From ce28e056c20bf2723f565bbf464b87781ec248a2 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:42 -0500 Subject: Second Life viewer sources 1.20.2 --- linden/indra/SConstruct | 85 +- linden/indra/indra_complete/indra_complete.sln | 58 +- linden/indra/indra_complete/indra_complete_vc8.sln | 46 - linden/indra/indra_complete/indra_complete_vc9.sln | 36 +- linden/indra/lib/python/indra/base/llsd.py | 12 - linden/indra/lib/python/indra/ipc/llsdhttp.py | 31 +- linden/indra/lib/python/indra/util/llmanifest.py | 2 +- linden/indra/llcharacter/lljoint.cpp | 9 +- linden/indra/llcharacter/llstatemachine.h | 4 +- linden/indra/llcommon/imageids.h | 38 +- linden/indra/llcommon/indra_constants.h | 9 +- linden/indra/llcommon/llagentconstants.h | 74 +- linden/indra/llcommon/llapp.cpp | 24 +- linden/indra/llcommon/llapp.h | 5 +- linden/indra/llcommon/llapr.cpp | 2 + linden/indra/llcommon/llcommon.vcproj | 7 +- linden/indra/llcommon/lldarray.h | 3 +- linden/indra/llcommon/lldefs.h | 11 +- linden/indra/llcommon/llerror.cpp | 57 +- linden/indra/llcommon/llevent.h | 7 - linden/indra/llcommon/llfile.cpp | 11 +- linden/indra/llcommon/llframetimer.cpp | 15 + linden/indra/llcommon/llframetimer.h | 6 + linden/indra/llcommon/lllslconstants.h | 1 + linden/indra/llcommon/llmemory.h | 27 + linden/indra/llcommon/llpreprocessor.h | 9 +- linden/indra/llcommon/llptrskiplist.h | 1 + linden/indra/llcommon/llskiplist.h | 1 + linden/indra/llcommon/llsmoothstep.h | 50 + linden/indra/llcommon/llstatenums.h | 8 +- linden/indra/llcommon/llstl.h | 3 + linden/indra/llcommon/llstreamtools.cpp | 81 +- linden/indra/llcommon/llstreamtools.h | 5 - linden/indra/llcommon/llstring.cpp | 21 +- linden/indra/llcommon/llversionserver.h | 6 +- linden/indra/llcommon/llversionviewer.h | 6 +- linden/indra/llimage/llimage.cpp | 27 +- linden/indra/llimage/llimage.h | 6 +- linden/indra/llimagej2coj/llimagej2coj.cpp | 12 + linden/indra/llinventory/lleconomy.cpp | 31 +- linden/indra/llinventory/lleconomy.h | 11 +- linden/indra/llinventory/llinventory.cpp | 1 + linden/indra/llinventory/llinventory.h | 34 +- linden/indra/llinventory/llparcel.cpp | 8 +- linden/indra/llinventory/llparcelflags.h | 2 +- linden/indra/llmath/files.lst | 2 + linden/indra/llmath/llline.cpp | 189 + linden/indra/llmath/llline.h | 75 + linden/indra/llmath/llmath.h | 33 + linden/indra/llmath/llmath.vcproj | 12 + linden/indra/llmath/llquaternion.cpp | 186 +- linden/indra/llmath/llquaternion.h | 164 +- linden/indra/llmath/llrect.h | 5 + linden/indra/llmath/llsphere.cpp | 364 + linden/indra/llmath/llsphere.h | 72 + linden/indra/llmath/lluuid.cpp | 5 + linden/indra/llmath/lluuid.h | 1 + linden/indra/llmath/llvolume.cpp | 269 +- linden/indra/llmath/llvolume.h | 35 +- linden/indra/llmath/llvolumemgr.cpp | 182 +- linden/indra/llmath/llvolumemgr.h | 47 +- linden/indra/llmath/m3math.cpp | 91 +- linden/indra/llmath/m3math.h | 24 +- linden/indra/llmath/m4math.cpp | 2 +- linden/indra/llmath/m4math.h | 8 +- linden/indra/llmath/v2math.h | 95 +- linden/indra/llmath/v3dmath.h | 13 +- linden/indra/llmath/v3math.cpp | 16 + linden/indra/llmath/v3math.h | 123 +- linden/indra/llmath/v4math.cpp | 8 +- linden/indra/llmath/v4math.h | 127 +- linden/indra/llmath/xform.h | 10 +- linden/indra/llmedia/llmediaimplllmozlib.cpp | 2 +- linden/indra/llmedia/llmediaimplquicktime.cpp | 35 +- linden/indra/llmedia/llmediaobserver.h | 11 + linden/indra/llmessage/llcachename.cpp | 7 +- linden/indra/llmessage/llhttpnode.h | 1 - linden/indra/llmessage/llinstantmessage.h | 2 +- linden/indra/llmessage/lliohttpserver.cpp | 8 +- linden/indra/llmessage/llmessageconfig.cpp | 8 + linden/indra/llmessage/llmessageconfig.h | 1 + linden/indra/llmessage/llmessagetemplate.h | 6 +- linden/indra/llmessage/llnamevalue.cpp | 1216 +-- linden/indra/llmessage/llnamevalue.h | 53 +- linden/indra/llmessage/llregionflags.h | 5 +- linden/indra/llmessage/llservicebuilder.cpp | 7 +- linden/indra/llmessage/llurlrequest.cpp | 6 +- linden/indra/llmessage/llurlrequest.h | 5 + linden/indra/llmessage/message.cpp | 163 +- linden/indra/llmessage/message.h | 9 +- linden/indra/llmessage/message_prehash.cpp | 4000 +++----- linden/indra/llmessage/message_prehash.h | 6 - linden/indra/llmessage/message_string_table.cpp | 2 - linden/indra/llprimitive/llmaterialtable.cpp | 48 + linden/indra/llprimitive/llmaterialtable.h | 57 +- linden/indra/llprimitive/llprimitive.cpp | 45 +- linden/indra/llprimitive/llprimitive.h | 54 +- linden/indra/llprimitive/llprimitive.vcproj | 15 +- linden/indra/llprimitive/llprimlinkinfo.h | 388 + linden/indra/llrender/llfontgl.cpp | 6 + linden/indra/llrender/llfontgl.h | 5 +- linden/indra/llrender/llrendertarget.cpp | 59 +- linden/indra/llrender/llrendertarget.h | 27 +- linden/indra/llui/llalertdialog.cpp | 58 +- linden/indra/llui/llalertdialog.h | 7 +- linden/indra/llui/llbutton.cpp | 578 +- linden/indra/llui/llbutton.h | 8 +- linden/indra/llui/llcheckboxctrl.cpp | 3 +- linden/indra/llui/llcheckboxctrl.h | 3 +- linden/indra/llui/llcombobox.cpp | 75 +- linden/indra/llui/llcombobox.h | 15 +- linden/indra/llui/lldraghandle.cpp | 26 +- linden/indra/llui/lldraghandle.h | 6 - linden/indra/llui/llfloater.cpp | 265 +- linden/indra/llui/llfloater.h | 14 +- linden/indra/llui/llfocusmgr.cpp | 5 +- linden/indra/llui/llfocusmgr.h | 7 +- linden/indra/llui/llhtmlhelp.h | 3 +- linden/indra/llui/lliconctrl.cpp | 59 +- linden/indra/llui/lliconctrl.h | 6 +- linden/indra/llui/lllineeditor.cpp | 216 +- linden/indra/llui/lllineeditor.h | 40 +- linden/indra/llui/llmenugl.cpp | 279 +- linden/indra/llui/llmenugl.h | 50 +- linden/indra/llui/llmodaldialog.cpp | 49 +- linden/indra/llui/llmodaldialog.h | 2 +- linden/indra/llui/llmultislider.cpp | 308 +- linden/indra/llui/llmultislider.h | 4 +- linden/indra/llui/llmultisliderctrl.cpp | 2 + linden/indra/llui/llmultisliderctrl.h | 2 - linden/indra/llui/llpanel.cpp | 320 +- linden/indra/llui/llpanel.h | 40 +- linden/indra/llui/llradiogroup.cpp | 5 +- linden/indra/llui/llradiogroup.h | 4 +- linden/indra/llui/llresizebar.cpp | 15 +- linden/indra/llui/llresizebar.h | 3 - linden/indra/llui/llresizehandle.cpp | 27 +- linden/indra/llui/llresizehandle.h | 5 +- linden/indra/llui/llresmgr.cpp | 2 - linden/indra/llui/llresmgr.h | 66 +- linden/indra/llui/llrootview.h | 3 - linden/indra/llui/llscrollbar.cpp | 191 +- linden/indra/llui/llscrollbar.h | 5 +- linden/indra/llui/llscrollcontainer.cpp | 176 +- linden/indra/llui/llscrollcontainer.h | 4 +- linden/indra/llui/llscrollingpanellist.cpp | 9 +- linden/indra/llui/llscrollingpanellist.h | 2 - linden/indra/llui/llscrolllistctrl.cpp | 288 +- linden/indra/llui/llscrolllistctrl.h | 35 +- linden/indra/llui/llslider.cpp | 134 +- linden/indra/llui/llslider.h | 10 +- linden/indra/llui/llsliderctrl.cpp | 1 + linden/indra/llui/llsliderctrl.h | 3 +- linden/indra/llui/llspinctrl.cpp | 22 +- linden/indra/llui/llspinctrl.h | 5 +- linden/indra/llui/llstyle.cpp | 32 +- linden/indra/llui/llstyle.h | 17 +- linden/indra/llui/lltabcontainer.cpp | 213 +- linden/indra/llui/lltabcontainer.h | 10 +- linden/indra/llui/lltextbox.cpp | 95 +- linden/indra/llui/lltextbox.h | 3 +- linden/indra/llui/lltexteditor.cpp | 166 +- linden/indra/llui/lltexteditor.h | 7 +- linden/indra/llui/llui.cpp | 175 +- linden/indra/llui/llui.h | 127 +- linden/indra/llui/lluictrl.cpp | 22 +- linden/indra/llui/lluictrl.h | 4 +- linden/indra/llui/lluictrlfactory.cpp | 301 +- linden/indra/llui/lluictrlfactory.h | 64 +- linden/indra/llui/llview.cpp | 215 +- linden/indra/llui/llview.h | 177 +- linden/indra/llui/llviewborder.cpp | 81 +- linden/indra/llui/llviewborder.h | 4 +- linden/indra/llui/llviewquery.cpp | 5 - linden/indra/llui/llviewquery.h | 10 +- linden/indra/llvfs/llvfile.cpp | 1 - linden/indra/llvfs/llvfile.h | 2 - linden/indra/llwindow/lldxhardware.cpp | 37 +- linden/indra/llwindow/lldxhardware.h | 7 +- linden/indra/llwindow/llgl.cpp | 4 +- linden/indra/llwindow/llglstates.h | 20 +- linden/indra/llwindow/llkeyboard.cpp | 1 + linden/indra/llwindow/llkeyboardmacosx.cpp | 4 +- linden/indra/llwindow/llkeyboardsdl.cpp | 4 +- linden/indra/llwindow/llkeyboardwin32.cpp | 6 +- linden/indra/llwindow/lllogitechlcd.cpp | 5 +- linden/indra/llwindow/llpreeditor.h | 2 +- linden/indra/llwindow/llwindow.cpp | 50 +- linden/indra/llwindow/llwindow.h | 15 +- linden/indra/llwindow/llwindowheadless.h | 4 +- linden/indra/llwindow/llwindowlinux.h | 2 +- linden/indra/llwindow/llwindowmacosx.cpp | 30 +- linden/indra/llwindow/llwindowmacosx.h | 13 +- linden/indra/llwindow/llwindowmesaheadless.h | 4 +- linden/indra/llwindow/llwindowsdl.cpp | 45 +- linden/indra/llwindow/llwindowsdl.h | 7 +- linden/indra/llwindow/llwindowsolaris.h | 4 +- linden/indra/llwindow/llwindowwin32.cpp | 1074 +- linden/indra/llwindow/llwindowwin32.h | 7 +- linden/indra/llxml/llcontrol.cpp | 817 +- linden/indra/llxml/llcontrol.h | 210 +- linden/indra/lscript/lscript_byteconvert.h | 41 +- linden/indra/lscript/lscript_compile/indra.l | 1 + linden/indra/mac_updater/mac_updater.cpp | 1 + linden/indra/newview/app_settings/cmd_line.xml | 335 + linden/indra/newview/app_settings/colors.ini | 20 - linden/indra/newview/app_settings/colors_base.xml | 344 +- linden/indra/newview/app_settings/grass.xml | 12 +- linden/indra/newview/app_settings/keys.ini | 18 + linden/indra/newview/app_settings/keywords.ini | 5 +- linden/indra/newview/app_settings/role_actions.xml | 314 - linden/indra/newview/app_settings/settings.xml | 10129 +++++++++++++++++++ .../app_settings/settings_crash_behavior.xml | 15 + .../indra/newview/app_settings/settings_files.xml | 22 + .../newview/app_settings/settings_per_account.xml | 114 + .../shaders/class1/deferred/diffuseF.glsl | 16 + .../shaders/class1/deferred/diffuseV.glsl | 22 + .../shaders/class1/environment/waterF.glsl | 2 +- .../shaders/class1/environment/waterFogF.glsl | 4 +- .../shaders/class1/environment/waterV.glsl | 5 +- .../shaders/class1/lighting/lightF.glsl | 2 +- .../shaders/class1/lighting/lightShinyF.glsl | 2 +- .../shaders/class1/lighting/lightShinyWaterF.glsl | 2 +- linden/indra/newview/app_settings/std_bump.ini | 30 +- linden/indra/newview/audiosettings.h | 41 - linden/indra/newview/fakevoicesoundsignal.cpp | 76 - linden/indra/newview/fakevoicesoundsignal.h | 52 - linden/indra/newview/featuretable.txt | 19 + linden/indra/newview/featuretable_linux.txt | 1 + linden/indra/newview/featuretable_mac.txt | 59 +- linden/indra/newview/featuretable_solaris.txt | 1 + linden/indra/newview/files.lst | 32 +- linden/indra/newview/gpu_table.txt | 12 +- linden/indra/newview/head.cpp | 153 - linden/indra/newview/head.h | 63 - .../installers/windows/installer_template.nsi | 16 +- .../indra/newview/installers/windows/lang_de.nsi | 114 +- .../newview/installers/windows/lang_en-us.nsi | 109 +- .../indra/newview/installers/windows/lang_ja.nsi | 114 +- .../indra/newview/installers/windows/lang_ko.nsi | 114 +- linden/indra/newview/linux_tools/client-readme.txt | 5 +- linden/indra/newview/linux_tools/wrapper.sh | 3 +- linden/indra/newview/llagent.cpp | 404 +- linden/indra/newview/llagent.h | 71 +- linden/indra/newview/llappviewer.cpp | 1643 ++- linden/indra/newview/llappviewer.h | 78 +- linden/indra/newview/llappviewerlinux.cpp | 103 +- linden/indra/newview/llappviewerlinux.h | 4 + linden/indra/newview/llappviewermacosx.cpp | 101 +- linden/indra/newview/llappviewermacosx.h | 3 + linden/indra/newview/llappviewerwin32.cpp | 92 +- linden/indra/newview/llappviewerwin32.h | 8 +- linden/indra/newview/llassetuploadresponders.cpp | 4 +- linden/indra/newview/llaudiosourcevo.cpp | 46 +- linden/indra/newview/llcallingcard.cpp | 13 + linden/indra/newview/llcameraview.cpp | 259 - linden/indra/newview/llcameraview.h | 92 - linden/indra/newview/llchatbar.cpp | 81 +- linden/indra/newview/llchatbar.h | 4 +- linden/indra/newview/llcloud.cpp | 2 +- linden/indra/newview/llcolorswatch.cpp | 73 +- linden/indra/newview/llcolorswatch.h | 7 +- linden/indra/newview/llcommandlineparser.cpp | 543 + linden/indra/newview/llcommandlineparser.h | 166 + linden/indra/newview/llcompilequeue.cpp | 21 +- linden/indra/newview/llconsole.cpp | 20 +- linden/indra/newview/llconsole.h | 2 - linden/indra/newview/llcontainerview.cpp | 108 +- linden/indra/newview/llcontainerview.h | 12 +- linden/indra/newview/llcontroldef.cpp | 2159 ---- linden/indra/newview/llcubemap.cpp | 8 +- linden/indra/newview/llcurrencyuimanager.cpp | 4 +- linden/indra/newview/lldebugview.cpp | 28 +- linden/indra/newview/lldebugview.h | 7 +- linden/indra/newview/lldelayedgestureerror.cpp | 125 + linden/indra/newview/lldelayedgestureerror.h | 82 + linden/indra/newview/lldrawable.cpp | 2 +- linden/indra/newview/lldrawpoolalpha.cpp | 2 +- linden/indra/newview/lldrawpoolavatar.cpp | 2 +- linden/indra/newview/lldrawpoolbump.cpp | 7 +- linden/indra/newview/lldrawpoolground.cpp | 2 +- linden/indra/newview/lldrawpoolsky.cpp | 4 +- linden/indra/newview/lldrawpoolterrain.cpp | 10 +- linden/indra/newview/lldrawpoolwater.cpp | 24 +- linden/indra/newview/lldrawpoolwater.h | 1 + linden/indra/newview/lldrawpoolwlsky.cpp | 4 +- linden/indra/newview/lldynamictexture.cpp | 20 +- linden/indra/newview/llface.cpp | 6 +- linden/indra/newview/llfasttimerview.cpp | 36 +- linden/indra/newview/llfasttimerview.h | 3 - linden/indra/newview/llfeaturemanager.cpp | 4 +- linden/indra/newview/llfeaturemanager.h | 5 +- linden/indra/newview/llfirstuse.cpp | 16 +- linden/indra/newview/llfirstuse.h | 1 - linden/indra/newview/llflexibleobject.cpp | 9 +- linden/indra/newview/llfloaterabout.cpp | 19 +- linden/indra/newview/llfloateractivespeakers.cpp | 114 +- linden/indra/newview/llfloateractivespeakers.h | 8 +- linden/indra/newview/llfloateranimpreview.cpp | 18 +- linden/indra/newview/llfloaterauction.cpp | 10 +- linden/indra/newview/llfloateravatarinfo.cpp | 26 +- linden/indra/newview/llfloateravatarpicker.cpp | 12 +- linden/indra/newview/llfloateravatarpicker.h | 2 +- linden/indra/newview/llfloateravatartextures.cpp | 4 +- linden/indra/newview/llfloaterbuildoptions.cpp | 4 +- linden/indra/newview/llfloaterbump.cpp | 6 +- linden/indra/newview/llfloaterbuy.cpp | 28 +- linden/indra/newview/llfloaterbuycontents.cpp | 24 +- linden/indra/newview/llfloaterbuycurrency.cpp | 6 +- linden/indra/newview/llfloaterbuyland.cpp | 55 +- linden/indra/newview/llfloatercamera.cpp | 119 + linden/indra/newview/llfloatercamera.h | 60 + linden/indra/newview/llfloaterchat.cpp | 70 +- linden/indra/newview/llfloaterchat.h | 7 +- linden/indra/newview/llfloaterchatterbox.cpp | 51 +- linden/indra/newview/llfloaterchatterbox.h | 3 +- linden/indra/newview/llfloaterclassified.cpp | 4 +- linden/indra/newview/llfloaterclothing.cpp | 13 +- linden/indra/newview/llfloatercolorpicker.cpp | 34 +- linden/indra/newview/llfloatercustomize.cpp | 377 +- linden/indra/newview/llfloaterdaycycle.cpp | 92 +- linden/indra/newview/llfloaterdirectory.cpp | 12 +- linden/indra/newview/llfloatereditui.cpp | 34 +- linden/indra/newview/llfloatereditui.h | 2 +- linden/indra/newview/llfloaterenvsettings.cpp | 33 +- linden/indra/newview/llfloaterevent.cpp | 6 +- linden/indra/newview/llfloaterfriends.cpp | 65 +- linden/indra/newview/llfloatergesture.cpp | 15 +- linden/indra/newview/llfloatergodtools.cpp | 26 +- linden/indra/newview/llfloatergroups.cpp | 13 +- linden/indra/newview/llfloatergroups.h | 2 +- linden/indra/newview/llfloaterhardwaresettings.cpp | 42 +- linden/indra/newview/llfloaterhardwaresettings.h | 1 + linden/indra/newview/llfloaterhtml.cpp | 26 +- linden/indra/newview/llfloaterhtml.h | 8 +- linden/indra/newview/llfloaterhtmlhelp.cpp | 42 +- linden/indra/newview/llfloaterhtmlhelp.h | 5 +- linden/indra/newview/llfloaterhud.cpp | 140 + linden/indra/newview/llfloaterhud.h | 66 + linden/indra/newview/llfloaterimagepreview.cpp | 24 +- linden/indra/newview/llfloaterinspect.cpp | 22 +- linden/indra/newview/llfloaterjoystick.cpp | 272 + linden/indra/newview/llfloaterjoystick.h | 78 + linden/indra/newview/llfloaterlagmeter.cpp | 53 +- linden/indra/newview/llfloaterlagmeter.h | 9 +- linden/indra/newview/llfloaterland.cpp | 262 +- linden/indra/newview/llfloaterland.h | 8 +- linden/indra/newview/llfloaterlandholdings.cpp | 6 +- linden/indra/newview/llfloaterlandmark.cpp | 20 +- linden/indra/newview/llfloaterlandmark.h | 2 +- linden/indra/newview/llfloatermap.cpp | 25 +- linden/indra/newview/llfloatermute.cpp | 45 +- linden/indra/newview/llfloatermute.h | 7 +- linden/indra/newview/llfloaternamedesc.cpp | 6 +- linden/indra/newview/llfloaternewim.cpp | 45 +- linden/indra/newview/llfloaternewim.h | 2 +- linden/indra/newview/llfloateropenobject.cpp | 8 +- linden/indra/newview/llfloaterparcel.cpp | 6 +- linden/indra/newview/llfloaterpermissionsmgr.cpp | 10 - linden/indra/newview/llfloaterpermissionsmgr.h | 3 - linden/indra/newview/llfloaterpostcard.cpp | 10 +- linden/indra/newview/llfloaterpostprocess.cpp | 37 +- linden/indra/newview/llfloaterpreference.cpp | 41 +- linden/indra/newview/llfloaterpreference.h | 1 - linden/indra/newview/llfloaterproperties.cpp | 39 +- linden/indra/newview/llfloaterregioninfo.cpp | 307 +- linden/indra/newview/llfloaterregioninfo.h | 1 - linden/indra/newview/llfloaterreleasemsg.cpp | 6 +- linden/indra/newview/llfloaterreporter.cpp | 26 +- linden/indra/newview/llfloaterscriptdebug.cpp | 8 +- linden/indra/newview/llfloatersellland.cpp | 38 +- linden/indra/newview/llfloatersettingsdebug.cpp | 492 + linden/indra/newview/llfloatersettingsdebug.h | 61 + linden/indra/newview/llfloatersnapshot.cpp | 809 +- linden/indra/newview/llfloatersnapshot.h | 10 +- linden/indra/newview/llfloaterstats.cpp | 87 + linden/indra/newview/llfloaterstats.h | 56 + linden/indra/newview/llfloatertelehub.cpp | 34 +- linden/indra/newview/llfloatertest.cpp | 10 +- linden/indra/newview/llfloatertools.cpp | 203 +- linden/indra/newview/llfloatertopobjects.cpp | 14 +- linden/indra/newview/llfloatertos.cpp | 16 +- linden/indra/newview/llfloaterurldisplay.cpp | 6 +- linden/indra/newview/llfloaterurlentry.cpp | 6 +- .../indra/newview/llfloatervoicedevicesettings.cpp | 323 + .../indra/newview/llfloatervoicedevicesettings.h | 82 + linden/indra/newview/llfloatervoicewizard.cpp | 499 - linden/indra/newview/llfloatervoicewizard.h | 108 - linden/indra/newview/llfloaterwater.cpp | 31 +- linden/indra/newview/llfloaterwindlight.cpp | 35 +- linden/indra/newview/llfloaterworldmap.cpp | 137 +- linden/indra/newview/llfolderview.cpp | 446 +- linden/indra/newview/llfolderview.h | 31 +- linden/indra/newview/llframestatview.cpp | 10 - linden/indra/newview/llframestatview.h | 3 - linden/indra/newview/llgesturemgr.cpp | 16 +- linden/indra/newview/llgivemoney.cpp | 24 +- linden/indra/newview/llglsandbox.cpp | 82 +- linden/indra/newview/llglslshader.cpp | 61 +- linden/indra/newview/llglslshader.h | 5 + linden/indra/newview/llgroupmgr.cpp | 46 +- linden/indra/newview/llgroupmgr.h | 7 +- linden/indra/newview/llgroupnotify.cpp | 79 +- linden/indra/newview/llhoverview.cpp | 56 +- linden/indra/newview/llhoverview.h | 5 +- linden/indra/newview/llhudeffect.cpp | 2 +- linden/indra/newview/llhudeffectbeam.cpp | 4 +- linden/indra/newview/llhudeffectlookat.cpp | 31 +- linden/indra/newview/llhudeffectlookat.h | 2 +- linden/indra/newview/llhudeffectpointat.cpp | 21 +- linden/indra/newview/llhudeffectpointat.h | 2 +- linden/indra/newview/llhudeffecttrail.cpp | 6 +- linden/indra/newview/llhudicon.cpp | 10 +- linden/indra/newview/llhudmanager.cpp | 25 +- linden/indra/newview/llhudmanager.h | 6 +- linden/indra/newview/llhudrender.cpp | 12 +- linden/indra/newview/llhudtext.cpp | 43 +- linden/indra/newview/llhudtext.h | 2 + linden/indra/newview/llhudview.cpp | 10 - linden/indra/newview/llhudview.h | 3 - linden/indra/newview/llimpanel.cpp | 91 +- linden/indra/newview/llimpanel.h | 5 +- linden/indra/newview/llimview.cpp | 41 +- linden/indra/newview/llinventoryactions.cpp | 2 +- linden/indra/newview/llinventorybridge.cpp | 63 +- linden/indra/newview/llinventorybridge.h | 30 +- linden/indra/newview/llinventorymodel.cpp | 5 + linden/indra/newview/llinventorymodel.h | 1 + linden/indra/newview/llinventoryview.cpp | 55 +- linden/indra/newview/llinventoryview.h | 8 +- linden/indra/newview/lljoystickbutton.cpp | 87 +- linden/indra/newview/lljoystickbutton.h | 11 +- linden/indra/newview/lllandmarklist.cpp | 5 +- linden/indra/newview/lllcd.cpp | 17 +- linden/indra/newview/lllogchat.cpp | 12 +- linden/indra/newview/lllogchat.h | 10 +- linden/indra/newview/llmanip.cpp | 63 +- linden/indra/newview/llmanip.h | 2 +- linden/indra/newview/llmaniprotate.cpp | 59 +- linden/indra/newview/llmanipscale.cpp | 100 +- linden/indra/newview/llmaniptranslate.cpp | 88 +- linden/indra/newview/llmapresponders.cpp | 48 +- linden/indra/newview/llmediaremotectrl.cpp | 33 +- linden/indra/newview/llmemoryview.cpp | 10 - linden/indra/newview/llmemoryview.h | 3 - linden/indra/newview/llmenucommands.cpp | 2 +- linden/indra/newview/llmimetypes.cpp | 4 +- linden/indra/newview/llmorphview.cpp | 16 +- linden/indra/newview/llmorphview.h | 3 - linden/indra/newview/llmoveview.cpp | 94 +- linden/indra/newview/llmoveview.h | 24 +- linden/indra/newview/llmutelist.cpp | 52 +- linden/indra/newview/llmutelist.h | 8 +- linden/indra/newview/llnameeditor.cpp | 33 +- linden/indra/newview/llnameeditor.h | 7 +- linden/indra/newview/llnamelistctrl.cpp | 2 + linden/indra/newview/llnamelistctrl.h | 3 +- linden/indra/newview/llnetmap.cpp | 91 +- linden/indra/newview/llnetmap.h | 11 - linden/indra/newview/llnotify.cpp | 23 +- linden/indra/newview/llnotify.h | 2 - linden/indra/newview/lloverlaybar.cpp | 36 +- linden/indra/newview/lloverlaybar.h | 3 - linden/indra/newview/llpanelLCD.cpp | 18 +- linden/indra/newview/llpanelaudioprefs.cpp | 4 +- linden/indra/newview/llpanelaudiovolume.cpp | 2 +- linden/indra/newview/llpanelavatar.cpp | 117 +- linden/indra/newview/llpanelclassified.cpp | 60 +- linden/indra/newview/llpanelcontents.cpp | 12 +- linden/indra/newview/llpaneldebug.cpp | 2 +- linden/indra/newview/llpaneldirbrowser.cpp | 68 +- linden/indra/newview/llpaneldirbrowser.h | 2 - linden/indra/newview/llpaneldirclassified.cpp | 2 +- linden/indra/newview/llpaneldirfind.cpp | 4 +- linden/indra/newview/llpaneldisplay.cpp | 191 +- linden/indra/newview/llpanelevent.cpp | 42 +- linden/indra/newview/llpanelevent.h | 1 - linden/indra/newview/llpanelface.cpp | 125 +- linden/indra/newview/llpanelgeneral.cpp | 52 +- linden/indra/newview/llpanelgroup.cpp | 21 +- linden/indra/newview/llpanelgroupgeneral.cpp | 35 +- linden/indra/newview/llpanelgroupinvite.cpp | 81 +- linden/indra/newview/llpanelgrouplandmoney.cpp | 2 +- linden/indra/newview/llpanelgroupnotices.cpp | 28 +- linden/indra/newview/llpanelgrouproles.cpp | 82 +- linden/indra/newview/llpanelgrouproles.h | 2 +- linden/indra/newview/llpanelgroupvoting.cpp | 4 +- linden/indra/newview/llpanelinput.cpp | 30 +- linden/indra/newview/llpanelinput.h | 3 + linden/indra/newview/llpanelinventory.cpp | 120 +- linden/indra/newview/llpanelland.cpp | 32 +- linden/indra/newview/llpanellandmedia.cpp | 51 +- linden/indra/newview/llpanellogin.cpp | 435 +- linden/indra/newview/llpanellogin.h | 5 +- linden/indra/newview/llpanelmorph.cpp | 2 +- linden/indra/newview/llpanelmsgs.cpp | 8 +- linden/indra/newview/llpanelnetwork.cpp | 4 +- linden/indra/newview/llpanelobject.cpp | 172 +- linden/indra/newview/llpanelpermissions.cpp | 134 +- linden/indra/newview/llpanelpick.cpp | 35 +- linden/indra/newview/llpanelplace.cpp | 24 +- linden/indra/newview/llpanelvolume.cpp | 38 +- linden/indra/newview/llpanelweb.cpp | 6 +- linden/indra/newview/llprefschat.cpp | 8 +- linden/indra/newview/llprefsim.cpp | 6 +- linden/indra/newview/llprefsvoice.cpp | 68 +- linden/indra/newview/llprefsvoice.h | 7 +- linden/indra/newview/llpreview.cpp | 16 +- linden/indra/newview/llpreviewanim.cpp | 8 +- linden/indra/newview/llpreviewgesture.cpp | 82 +- linden/indra/newview/llpreviewgesture.h | 2 +- linden/indra/newview/llpreviewlandmark.cpp | 35 +- linden/indra/newview/llpreviewnotecard.cpp | 50 +- linden/indra/newview/llpreviewnotecard.h | 2 +- linden/indra/newview/llpreviewscript.cpp | 173 +- linden/indra/newview/llpreviewscript.h | 5 +- linden/indra/newview/llpreviewsound.cpp | 8 +- linden/indra/newview/llpreviewtexture.cpp | 204 +- linden/indra/newview/llpreviewtexture.h | 4 +- linden/indra/newview/llprogressview.cpp | 235 +- linden/indra/newview/llprogressview.h | 11 +- linden/indra/newview/llregionposition.cpp | 2 +- linden/indra/newview/llrendersphere.cpp | 171 + linden/indra/newview/llrendersphere.h | 47 + linden/indra/newview/llselectmgr.cpp | 288 +- linden/indra/newview/llselectmgr.h | 11 +- linden/indra/newview/llspatialpartition.cpp | 12 +- linden/indra/newview/llsphere.cpp | 183 - linden/indra/newview/llsphere.h | 58 - linden/indra/newview/llsprite.cpp | 2 +- linden/indra/newview/llstartup.cpp | 487 +- linden/indra/newview/llstatbar.cpp | 10 - linden/indra/newview/llstatbar.h | 3 - linden/indra/newview/llstatgraph.cpp | 100 +- linden/indra/newview/llstatgraph.h | 2 - linden/indra/newview/llstatusbar.cpp | 55 +- linden/indra/newview/llstatusbar.h | 3 - linden/indra/newview/llstatview.cpp | 10 - linden/indra/newview/llstatview.h | 2 - linden/indra/newview/llsurface.cpp | 2 +- linden/indra/newview/llsurfacepatch.cpp | 2 +- linden/indra/newview/lltexlayer.cpp | 2 +- linden/indra/newview/lltexturecache.cpp | 214 +- linden/indra/newview/lltexturecache.h | 5 + linden/indra/newview/lltexturectrl.cpp | 124 +- linden/indra/newview/lltexturectrl.h | 4 +- linden/indra/newview/lltexturefetch.cpp | 84 +- linden/indra/newview/lltexturefetch.h | 2 + linden/indra/newview/lltextureview.cpp | 21 +- linden/indra/newview/lltextureview.h | 3 - linden/indra/newview/lltool.cpp | 2 +- linden/indra/newview/lltoolbar.cpp | 165 +- linden/indra/newview/lltoolbrush.cpp | 28 +- linden/indra/newview/lltoolbrush.h | 3 +- linden/indra/newview/lltoolcomp.cpp | 133 +- linden/indra/newview/lltoolcomp.h | 18 +- linden/indra/newview/lltooldraganddrop.cpp | 167 +- linden/indra/newview/lltooldraganddrop.h | 5 +- linden/indra/newview/lltoolface.cpp | 23 +- linden/indra/newview/lltoolface.h | 4 +- linden/indra/newview/lltoolfocus.cpp | 29 +- linden/indra/newview/lltoolfocus.h | 4 +- linden/indra/newview/lltoolgrab.cpp | 37 +- linden/indra/newview/lltoolgrab.h | 4 +- linden/indra/newview/lltoolgun.cpp | 29 +- linden/indra/newview/lltoolgun.h | 5 +- linden/indra/newview/lltoolindividual.cpp | 13 +- linden/indra/newview/lltoolindividual.h | 4 +- linden/indra/newview/lltoolmgr.cpp | 217 +- linden/indra/newview/lltoolmgr.h | 8 +- linden/indra/newview/lltoolmorph.cpp | 16 +- linden/indra/newview/lltoolmorph.h | 2 +- linden/indra/newview/lltoolobjpicker.cpp | 5 +- linden/indra/newview/lltoolobjpicker.h | 3 +- linden/indra/newview/lltoolpie.cpp | 71 +- linden/indra/newview/lltoolpie.h | 4 +- linden/indra/newview/lltoolpipette.cpp | 17 +- linden/indra/newview/lltoolpipette.h | 4 +- linden/indra/newview/lltoolplacer.cpp | 16 +- linden/indra/newview/lltoolselect.cpp | 33 +- linden/indra/newview/lltoolselect.h | 3 +- linden/indra/newview/lltoolselectland.cpp | 13 +- linden/indra/newview/lltoolselectland.h | 3 +- linden/indra/newview/lltoolselectrect.cpp | 6 +- linden/indra/newview/lltoolview.cpp | 6 +- linden/indra/newview/lltracker.cpp | 29 +- linden/indra/newview/lluploaddialog.cpp | 4 +- linden/indra/newview/llurldispatcher.cpp | 65 +- linden/indra/newview/llurlsimstring.cpp | 10 +- linden/indra/newview/llurlsimstring.h | 2 +- linden/indra/newview/lluserauth.cpp | 18 +- linden/indra/newview/lluserauth.h | 9 +- linden/indra/newview/llvectorperfoptions.cpp | 99 +- linden/indra/newview/llvectorperfoptions.h | 6 +- linden/indra/newview/llvelocitybar.cpp | 15 - linden/indra/newview/llvelocitybar.h | 3 - linden/indra/newview/llviewchildren.cpp | 32 +- linden/indra/newview/llvieweraudio.cpp | 15 +- linden/indra/newview/llvieweraudio.h | 6 + linden/indra/newview/llviewercamera.cpp | 13 +- linden/indra/newview/llviewercamera.h | 3 +- linden/indra/newview/llviewercontrol.cpp | 894 +- linden/indra/newview/llviewercontrol.h | 34 +- linden/indra/newview/llviewerdisplay.cpp | 93 +- linden/indra/newview/llviewerimage.cpp | 59 +- linden/indra/newview/llviewerimage.h | 10 + linden/indra/newview/llviewerimagelist.cpp | 627 +- linden/indra/newview/llviewerimagelist.h | 77 +- linden/indra/newview/llviewerjoint.cpp | 2 +- linden/indra/newview/llviewerjointmesh.cpp | 55 +- linden/indra/newview/llviewerjointmesh.h | 3 + linden/indra/newview/llviewerjoystick.cpp | 993 +- linden/indra/newview/llviewerjoystick.h | 73 +- linden/indra/newview/llviewerkeyboard.cpp | 114 +- linden/indra/newview/llviewerkeyboard.h | 3 +- linden/indra/newview/llviewermedia.cpp | 5 +- linden/indra/newview/llviewermenu.cpp | 684 +- linden/indra/newview/llviewermenu.h | 1 + linden/indra/newview/llviewermenufile.cpp | 32 +- linden/indra/newview/llviewermessage.cpp | 226 +- linden/indra/newview/llviewernetwork.cpp | 7 +- linden/indra/newview/llviewernetwork.h | 7 +- linden/indra/newview/llviewerobject.cpp | 99 +- linden/indra/newview/llviewerobject.h | 2 - linden/indra/newview/llviewerobjectlist.cpp | 24 +- linden/indra/newview/llviewerparcelmedia.cpp | 6 +- .../indra/newview/llviewerparcelmediaautoplay.cpp | 5 +- linden/indra/newview/llviewerparcelmgr.cpp | 270 +- linden/indra/newview/llviewerparcelmgr.h | 9 +- linden/indra/newview/llviewerparceloverlay.cpp | 12 +- linden/indra/newview/llviewerparceloverlay.h | 1 - linden/indra/newview/llviewerpartsim.cpp | 10 +- linden/indra/newview/llviewerpartsim.h | 8 +- linden/indra/newview/llviewerpartsource.cpp | 42 +- linden/indra/newview/llviewerregion.cpp | 13 +- linden/indra/newview/llviewerstats.cpp | 91 +- linden/indra/newview/llviewerstats.h | 12 +- linden/indra/newview/llviewertexteditor.cpp | 178 +- linden/indra/newview/llviewertexteditor.h | 3 +- linden/indra/newview/llviewerthrottle.cpp | 4 +- linden/indra/newview/llvieweruictrlfactory.cpp | 128 - linden/indra/newview/llvieweruictrlfactory.h | 71 - linden/indra/newview/llviewerwindow.cpp | 756 +- linden/indra/newview/llviewerwindow.h | 8 +- linden/indra/newview/llvlcomposition.cpp | 22 +- linden/indra/newview/llvoavatar.cpp | 313 +- linden/indra/newview/llvoavatar.h | 10 +- linden/indra/newview/llvoclouds.cpp | 4 +- linden/indra/newview/llvograss.cpp | 7 +- linden/indra/newview/llvoground.cpp | 4 +- linden/indra/newview/llvoiceclient.cpp | 52 +- linden/indra/newview/llvoiceremotectrl.cpp | 42 +- linden/indra/newview/llvoicevisualizer.cpp | 26 +- linden/indra/newview/llvopartgroup.cpp | 10 +- linden/indra/newview/llvosky.cpp | 20 +- linden/indra/newview/llvotextbubble.cpp | 2 +- linden/indra/newview/llvotree.cpp | 4 +- linden/indra/newview/llvovolume.cpp | 56 +- linden/indra/newview/llvowater.cpp | 3 +- linden/indra/newview/llwaterparammanager.cpp | 4 +- linden/indra/newview/llwaterparamset.cpp | 4 +- linden/indra/newview/llwearablelist.cpp | 38 +- linden/indra/newview/llwearablelist.h | 2 - linden/indra/newview/llwebbrowserctrl.cpp | 83 +- linden/indra/newview/llwebbrowserctrl.h | 22 +- linden/indra/newview/llwind.cpp | 4 +- linden/indra/newview/llwlparammanager.cpp | 4 +- linden/indra/newview/llworld.cpp | 101 +- linden/indra/newview/llworld.h | 20 +- linden/indra/newview/llworldmap.cpp | 119 +- linden/indra/newview/llworldmap.h | 9 +- linden/indra/newview/llworldmapview.cpp | 253 +- linden/indra/newview/llworldmapview.h | 38 +- linden/indra/newview/llxmlrpctransaction.cpp | 5 +- linden/indra/newview/lsl_guide.html | 61 +- .../newview/macview.xcodeproj/project.pbxproj | 189 +- linden/indra/newview/macview_Prefix.h | 7 +- linden/indra/newview/moviemaker.cpp | 811 -- linden/indra/newview/moviemaker.h | 143 - linden/indra/newview/newview.vcproj | 114 +- linden/indra/newview/newview_vc8.vcproj | 169 +- linden/indra/newview/newview_vc9.vcproj | 166 +- linden/indra/newview/pipeline.cpp | 295 +- linden/indra/newview/pipeline.h | 6 +- linden/indra/newview/releasenotes.txt | 1564 ++- .../newview/secondlife setup build dazzle.bat | 4 + linden/indra/newview/skins/textures/textures.xml | 838 +- .../newview/skins/xui/de/floater_about_land.xml | 5 +- .../newview/skins/xui/de/floater_critical.xml | 3 - .../indra/newview/skins/xui/de/floater_friends.xml | 35 - .../indra/newview/skins/xui/de/floater_groups.xml | 19 - .../xui/de/floater_instant_message_ad_hoc.xml | 2 +- .../skins/xui/de/floater_instant_message_group.xml | 2 +- .../newview/skins/xui/de/floater_joystick.xml | 53 +- .../skins/xui/de/floater_preview_new_landmark.xml | 9 - linden/indra/newview/skins/xui/de/floater_rate.xml | 44 - linden/indra/newview/skins/xui/de/menu_viewer.xml | 12 +- .../indra/newview/skins/xui/de/panel_friends.xml | 3 +- .../newview/skins/xui/de/panel_music_remote.xml | 15 - .../newview/skins/xui/de/panel_overlaybar.xml | 4 +- .../skins/xui/de/panel_preferences_graphics2.xml | 59 - .../skins/xui/de/panel_preferences_graphics3.xml | 54 - .../newview/skins/xui/de/panel_settings_chat.xml | 57 - .../newview/skins/xui/de/panel_settings_im.xml | 13 - .../newview/skins/xui/de/panel_settings_msgbox.xml | 12 - .../skins/xui/de/panel_settings_network.xml | 56 - .../newview/skins/xui/de/panel_settings_web.xml | 50 - .../skins/xui/de/panel_speaker_controls.xml | 6 +- .../indra/newview/skins/xui/de/panel_toolbar.xml | 6 +- linden/indra/newview/skins/xui/en-us/alerts.xml | 116 +- .../newview/skins/xui/en-us/floater_about.xml | 53 +- .../newview/skins/xui/en-us/floater_about_land.xml | 109 +- .../skins/xui/en-us/floater_avatar_textures.xml | 4 +- .../skins/xui/en-us/floater_buy_contents.xml | 5 +- .../skins/xui/en-us/floater_buy_currency.xml | 28 +- .../newview/skins/xui/en-us/floater_buy_land.xml | 96 +- .../newview/skins/xui/en-us/floater_buy_object.xml | 10 +- .../newview/skins/xui/en-us/floater_camera.xml | 19 + .../skins/xui/en-us/floater_chat_history.xml | 40 +- .../newview/skins/xui/en-us/floater_chatterbox.xml | 9 +- .../newview/skins/xui/en-us/floater_critical.xml | 21 +- .../newview/skins/xui/en-us/floater_customize.xml | 4 +- .../skins/xui/en-us/floater_day_cycle_options.xml | 68 +- .../newview/skins/xui/en-us/floater_directory.xml | 37 +- .../skins/xui/en-us/floater_env_settings.xml | 14 +- .../newview/skins/xui/en-us/floater_friends.xml | 65 - .../newview/skins/xui/en-us/floater_gesture.xml | 16 +- .../newview/skins/xui/en-us/floater_groups.xml | 39 - .../skins/xui/en-us/floater_hardware_settings.xml | 91 +- .../indra/newview/skins/xui/en-us/floater_html.xml | 6 +- .../indra/newview/skins/xui/en-us/floater_hud.xml | 9 + .../skins/xui/en-us/floater_instant_message.xml | 32 +- .../xui/en-us/floater_instant_message_ad_hoc.xml | 28 +- .../xui/en-us/floater_instant_message_group.xml | 26 +- .../newview/skins/xui/en-us/floater_inventory.xml | 10 +- .../newview/skins/xui/en-us/floater_joystick.xml | 223 +- .../newview/skins/xui/en-us/floater_lagmeter.xml | 2 +- .../skins/xui/en-us/floater_live_lsleditor.xml | 4 +- .../newview/skins/xui/en-us/floater_moveview.xml | 7 +- .../indra/newview/skins/xui/en-us/floater_mute.xml | 5 +- .../skins/xui/en-us/floater_mute_object.xml | 2 +- .../newview/skins/xui/en-us/floater_my_friends.xml | 4 +- .../skins/xui/en-us/floater_post_process.xml | 38 +- .../skins/xui/en-us/floater_preview_gesture.xml | 8 +- .../xui/en-us/floater_preview_new_landmark.xml | 28 - .../floater_preview_notecard_keep_discard.xml | 2 +- .../indra/newview/skins/xui/en-us/floater_rate.xml | 81 - .../skins/xui/en-us/floater_report_abuse.xml | 16 +- .../newview/skins/xui/en-us/floater_report_bug.xml | 8 +- .../skins/xui/en-us/floater_script_ed_panel.xml | 8 +- .../skins/xui/en-us/floater_script_preview.xml | 2 +- .../newview/skins/xui/en-us/floater_sell_land.xml | 24 +- .../skins/xui/en-us/floater_settings_debug.xml | 2 +- .../newview/skins/xui/en-us/floater_snapshot.xml | 4 +- .../newview/skins/xui/en-us/floater_tools.xml | 118 +- .../skins/xui/en-us/floater_top_objects.xml | 12 +- .../indra/newview/skins/xui/en-us/floater_tos.xml | 6 +- .../newview/skins/xui/en-us/floater_water.xml | 56 +- .../skins/xui/en-us/floater_windlight_options.xml | 114 +- .../newview/skins/xui/en-us/floater_world_map.xml | 7 +- .../newview/skins/xui/en-us/menu_inventory.xml | 6 +- .../indra/newview/skins/xui/en-us/menu_login.xml | 2 +- .../indra/newview/skins/xui/en-us/menu_viewer.xml | 150 +- .../indra/newview/skins/xui/en-us/mime_types.xml | 6 +- .../indra/newview/skins/xui/en-us/panel_audio.xml | 14 +- .../indra/newview/skins/xui/en-us/panel_avatar.xml | 62 +- .../skins/xui/en-us/panel_avatar_classified.xml | 16 +- .../newview/skins/xui/en-us/panel_avatar_pick.xml | 12 +- .../indra/newview/skins/xui/en-us/panel_bg_tab.xml | 11 +- .../newview/skins/xui/en-us/panel_bg_toolbar.xml | 7 + .../newview/skins/xui/en-us/panel_chat_bar.xml | 24 +- .../newview/skins/xui/en-us/panel_classified.xml | 18 +- .../newview/skins/xui/en-us/panel_friends.xml | 2 +- .../indra/newview/skins/xui/en-us/panel_group.xml | 2 +- .../skins/xui/en-us/panel_group_general.xml | 14 +- .../newview/skins/xui/en-us/panel_group_invite.xml | 20 +- .../skins/xui/en-us/panel_group_land_money.xml | 16 +- .../skins/xui/en-us/panel_group_notices.xml | 20 +- .../newview/skins/xui/en-us/panel_group_roles.xml | 52 +- .../newview/skins/xui/en-us/panel_group_voting.xml | 11 +- .../skins/xui/en-us/panel_land_covenant.xml | 28 +- .../indra/newview/skins/xui/en-us/panel_login.xml | 55 +- .../skins/xui/en-us/panel_master_volume.xml | 2 +- .../skins/xui/en-us/panel_media_controls.xml | 92 +- .../newview/skins/xui/en-us/panel_media_remote.xml | 8 +- .../xui/en-us/panel_media_remote_expanded.xml | 32 +- .../newview/skins/xui/en-us/panel_music_remote.xml | 23 - .../newview/skins/xui/en-us/panel_overlaybar.xml | 18 +- .../indra/newview/skins/xui/en-us/panel_place.xml | 18 +- .../newview/skins/xui/en-us/panel_place_small.xml | 16 +- .../skins/xui/en-us/panel_preferences_audio.xml | 2 +- .../skins/xui/en-us/panel_preferences_chat.xml | 30 +- .../skins/xui/en-us/panel_preferences_general.xml | 87 +- .../xui/en-us/panel_preferences_graphics1.xml | 104 +- .../skins/xui/en-us/panel_preferences_input.xml | 48 +- .../skins/xui/en-us/panel_preferences_popups.xml | 4 +- .../skins/xui/en-us/panel_preferences_voice.xml | 5 +- .../skins/xui/en-us/panel_region_covenant.xml | 24 +- .../newview/skins/xui/en-us/panel_region_debug.xml | 8 +- .../skins/xui/en-us/panel_region_estate.xml | 16 +- .../skins/xui/en-us/panel_region_general.xml | 11 +- .../skins/xui/en-us/panel_region_terrain.xml | 2 +- .../skins/xui/en-us/panel_settings_chat.xml | 76 - .../newview/skins/xui/en-us/panel_settings_im.xml | 18 - .../skins/xui/en-us/panel_settings_network.xml | 71 - .../newview/skins/xui/en-us/panel_settings_web.xml | 72 - .../skins/xui/en-us/panel_speaker_controls.xml | 14 +- .../newview/skins/xui/en-us/panel_status_bar.xml | 51 +- .../newview/skins/xui/en-us/panel_toolbar.xml | 105 +- .../newview/skins/xui/en-us/panel_top_pick.xml | 12 +- .../skins/xui/en-us/panel_voice_controls.xml | 22 +- .../newview/skins/xui/en-us/panel_voice_enable.xml | 2 +- .../newview/skins/xui/en-us/panel_voice_remote.xml | 8 +- .../xui/en-us/panel_voice_remote_expanded.xml | 24 +- .../newview/skins/xui/es/floater_critical.xml | 3 - .../indra/newview/skins/xui/es/floater_friends.xml | 28 - .../indra/newview/skins/xui/es/floater_groups.xml | 15 - .../skins/xui/es/floater_preview_new_landmark.xml | 9 - linden/indra/newview/skins/xui/es/floater_rate.xml | 44 - linden/indra/newview/skins/xui/es/menu_viewer.xml | 3 +- .../newview/skins/xui/es/panel_music_remote.xml | 13 - .../skins/xui/es/panel_preferences_graphics2.xml | 57 - .../skins/xui/es/panel_preferences_graphics3.xml | 50 - .../newview/skins/xui/es/panel_settings_chat.xml | 56 - .../newview/skins/xui/es/panel_settings_im.xml | 13 - .../newview/skins/xui/es/panel_settings_msgbox.xml | 12 - .../skins/xui/es/panel_settings_network.xml | 59 - .../newview/skins/xui/es/panel_settings_web.xml | 53 - .../indra/newview/skins/xui/es/panel_toolbar.xml | 2 + .../newview/skins/xui/fr/floater_critical.xml | 3 - .../indra/newview/skins/xui/fr/floater_friends.xml | 19 - .../indra/newview/skins/xui/fr/floater_groups.xml | 15 - .../skins/xui/fr/floater_preview_new_landmark.xml | 10 - linden/indra/newview/skins/xui/fr/floater_rate.xml | 44 - linden/indra/newview/skins/xui/fr/menu_viewer.xml | 3 +- .../newview/skins/xui/fr/panel_music_remote.xml | 10 - .../skins/xui/fr/panel_preferences_graphics2.xml | 57 - .../skins/xui/fr/panel_preferences_graphics3.xml | 50 - .../newview/skins/xui/fr/panel_settings_chat.xml | 58 - .../newview/skins/xui/fr/panel_settings_im.xml | 15 - .../newview/skins/xui/fr/panel_settings_msgbox.xml | 12 - .../skins/xui/fr/panel_settings_network.xml | 59 - .../newview/skins/xui/fr/panel_settings_web.xml | 52 - .../indra/newview/skins/xui/fr/panel_toolbar.xml | 2 + .../newview/skins/xui/ja/floater_about_land.xml | 5 +- .../newview/skins/xui/ja/floater_critical.xml | 3 - .../indra/newview/skins/xui/ja/floater_friends.xml | 37 - .../indra/newview/skins/xui/ja/floater_groups.xml | 17 - .../xui/ja/floater_instant_message_ad_hoc.xml | 2 +- .../skins/xui/ja/floater_instant_message_group.xml | 2 +- .../newview/skins/xui/ja/floater_joystick.xml | 55 +- .../skins/xui/ja/floater_preview_new_landmark.xml | 9 - linden/indra/newview/skins/xui/ja/floater_rate.xml | 44 - linden/indra/newview/skins/xui/ja/menu_viewer.xml | 16 +- .../newview/skins/xui/ja/panel_music_remote.xml | 18 - .../newview/skins/xui/ja/panel_overlaybar.xml | 4 +- .../skins/xui/ja/panel_preferences_graphics2.xml | 59 - .../skins/xui/ja/panel_preferences_graphics3.xml | 57 - .../newview/skins/xui/ja/panel_settings_chat.xml | 58 - .../newview/skins/xui/ja/panel_settings_im.xml | 13 - .../newview/skins/xui/ja/panel_settings_msgbox.xml | 12 - .../skins/xui/ja/panel_settings_network.xml | 58 - .../newview/skins/xui/ja/panel_settings_web.xml | 54 - .../skins/xui/ja/panel_speaker_controls.xml | 6 +- .../indra/newview/skins/xui/ja/panel_toolbar.xml | 6 +- .../newview/skins/xui/ko/floater_about_land.xml | 5 +- .../newview/skins/xui/ko/floater_critical.xml | 3 - .../indra/newview/skins/xui/ko/floater_friends.xml | 36 - .../indra/newview/skins/xui/ko/floater_groups.xml | 16 - .../xui/ko/floater_instant_message_ad_hoc.xml | 2 +- .../skins/xui/ko/floater_instant_message_group.xml | 2 +- .../newview/skins/xui/ko/floater_joystick.xml | 97 +- .../skins/xui/ko/floater_preview_new_landmark.xml | 9 - linden/indra/newview/skins/xui/ko/floater_rate.xml | 44 - linden/indra/newview/skins/xui/ko/menu_viewer.xml | 13 +- .../newview/skins/xui/ko/panel_music_remote.xml | 16 - .../newview/skins/xui/ko/panel_overlaybar.xml | 4 +- .../skins/xui/ko/panel_preferences_graphics2.xml | 59 - .../skins/xui/ko/panel_preferences_graphics3.xml | 54 - .../newview/skins/xui/ko/panel_settings_chat.xml | 55 - .../newview/skins/xui/ko/panel_settings_im.xml | 13 - .../newview/skins/xui/ko/panel_settings_msgbox.xml | 11 - .../skins/xui/ko/panel_settings_network.xml | 57 - .../newview/skins/xui/ko/panel_settings_web.xml | 50 - .../skins/xui/ko/panel_speaker_controls.xml | 6 +- .../newview/skins/xui/zh/floater_critical.xml | 3 - .../indra/newview/skins/xui/zh/floater_friends.xml | 34 - .../indra/newview/skins/xui/zh/floater_groups.xml | 15 - .../skins/xui/zh/floater_preview_new_landmark.xml | 10 - linden/indra/newview/skins/xui/zh/floater_rate.xml | 44 - linden/indra/newview/skins/xui/zh/menu_viewer.xml | 3 +- .../newview/skins/xui/zh/panel_music_remote.xml | 10 - .../skins/xui/zh/panel_preferences_graphics2.xml | 57 - .../skins/xui/zh/panel_preferences_graphics3.xml | 50 - .../newview/skins/xui/zh/panel_settings_chat.xml | 54 - .../newview/skins/xui/zh/panel_settings_im.xml | 13 - .../newview/skins/xui/zh/panel_settings_msgbox.xml | 11 - .../skins/xui/zh/panel_settings_network.xml | 57 - .../newview/skins/xui/zh/panel_settings_web.xml | 48 - .../indra/newview/skins/xui/zh/panel_toolbar.xml | 2 + linden/indra/newview/viewer_manifest.py | 51 +- linden/indra/test/files.lst | 2 + linden/indra/test/inventory.cpp | 4 +- linden/indra/test/io.cpp | 2 +- linden/indra/test/llcontrol_tut.cpp | 147 + linden/indra/test/llmessageconfig_tut.cpp | 24 +- linden/indra/test/llmessagetemplateparser_tut.cpp | 2 +- linden/indra/test/llnamevalue_tut.cpp | 550 +- linden/indra/test/llsdmessagereader_tut.cpp | 2 +- linden/indra/test/llstreamtools_tut.cpp | 42 +- linden/indra/test/lltemplatemessagebuilder_tut.cpp | 2 +- linden/indra/test/lltut.h | 10 + linden/indra/test/mass_properties_tut.cpp | 1008 ++ linden/indra/test/math.cpp | 442 +- linden/indra/test/message_tut.cpp | 2 +- linden/indra/test/prim_linkability_tut.cpp | 490 + linden/indra/test/test.vcproj | 19 +- linden/indra/test/test_vc8.vcproj | 6 +- linden/indra/test/test_vc9.vcproj | 2 +- 919 files changed, 39427 insertions(+), 31569 deletions(-) create mode 100644 linden/indra/llcommon/llsmoothstep.h create mode 100644 linden/indra/llmath/llline.cpp create mode 100644 linden/indra/llmath/llline.h create mode 100644 linden/indra/llmath/llsphere.cpp create mode 100644 linden/indra/llmath/llsphere.h create mode 100644 linden/indra/llprimitive/llprimlinkinfo.h create mode 100644 linden/indra/newview/app_settings/cmd_line.xml delete mode 100644 linden/indra/newview/app_settings/colors.ini delete mode 100644 linden/indra/newview/app_settings/role_actions.xml create mode 100644 linden/indra/newview/app_settings/settings.xml create mode 100644 linden/indra/newview/app_settings/settings_crash_behavior.xml create mode 100644 linden/indra/newview/app_settings/settings_files.xml create mode 100644 linden/indra/newview/app_settings/settings_per_account.xml create mode 100644 linden/indra/newview/app_settings/shaders/class1/deferred/diffuseF.glsl create mode 100644 linden/indra/newview/app_settings/shaders/class1/deferred/diffuseV.glsl delete mode 100644 linden/indra/newview/audiosettings.h delete mode 100644 linden/indra/newview/fakevoicesoundsignal.cpp delete mode 100644 linden/indra/newview/fakevoicesoundsignal.h delete mode 100644 linden/indra/newview/head.cpp delete mode 100644 linden/indra/newview/head.h delete mode 100644 linden/indra/newview/llcameraview.cpp delete mode 100644 linden/indra/newview/llcameraview.h create mode 100644 linden/indra/newview/llcommandlineparser.cpp create mode 100644 linden/indra/newview/llcommandlineparser.h delete mode 100644 linden/indra/newview/llcontroldef.cpp create mode 100644 linden/indra/newview/lldelayedgestureerror.cpp create mode 100644 linden/indra/newview/lldelayedgestureerror.h create mode 100644 linden/indra/newview/llfloatercamera.cpp create mode 100644 linden/indra/newview/llfloatercamera.h create mode 100644 linden/indra/newview/llfloaterhud.cpp create mode 100644 linden/indra/newview/llfloaterhud.h create mode 100644 linden/indra/newview/llfloaterjoystick.cpp create mode 100644 linden/indra/newview/llfloaterjoystick.h create mode 100644 linden/indra/newview/llfloatersettingsdebug.cpp create mode 100644 linden/indra/newview/llfloatersettingsdebug.h create mode 100644 linden/indra/newview/llfloaterstats.cpp create mode 100644 linden/indra/newview/llfloaterstats.h create mode 100644 linden/indra/newview/llfloatervoicedevicesettings.cpp create mode 100644 linden/indra/newview/llfloatervoicedevicesettings.h delete mode 100644 linden/indra/newview/llfloatervoicewizard.cpp delete mode 100644 linden/indra/newview/llfloatervoicewizard.h create mode 100644 linden/indra/newview/llrendersphere.cpp create mode 100644 linden/indra/newview/llrendersphere.h delete mode 100644 linden/indra/newview/llsphere.cpp delete mode 100644 linden/indra/newview/llsphere.h delete mode 100644 linden/indra/newview/llvieweruictrlfactory.cpp delete mode 100644 linden/indra/newview/llvieweruictrlfactory.h delete mode 100644 linden/indra/newview/moviemaker.cpp delete mode 100644 linden/indra/newview/moviemaker.h create mode 100644 linden/indra/newview/secondlife setup build dazzle.bat delete mode 100644 linden/indra/newview/skins/xui/de/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/de/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/de/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/de/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/de/panel_settings_web.xml create mode 100644 linden/indra/newview/skins/xui/en-us/floater_camera.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/floater_groups.xml create mode 100644 linden/indra/newview/skins/xui/en-us/floater_hud.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/floater_rate.xml create mode 100644 linden/indra/newview/skins/xui/en-us/panel_bg_toolbar.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/en-us/panel_settings_web.xml delete mode 100644 linden/indra/newview/skins/xui/es/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/es/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/es/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/es/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/es/panel_settings_web.xml delete mode 100644 linden/indra/newview/skins/xui/fr/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/fr/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/fr/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/fr/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/fr/panel_settings_web.xml delete mode 100644 linden/indra/newview/skins/xui/ja/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/ja/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/ja/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/ja/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/ja/panel_settings_web.xml delete mode 100644 linden/indra/newview/skins/xui/ko/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/ko/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/ko/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/ko/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/ko/panel_settings_web.xml delete mode 100644 linden/indra/newview/skins/xui/zh/floater_friends.xml delete mode 100644 linden/indra/newview/skins/xui/zh/floater_groups.xml delete mode 100644 linden/indra/newview/skins/xui/zh/floater_preview_new_landmark.xml delete mode 100644 linden/indra/newview/skins/xui/zh/floater_rate.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_music_remote.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_preferences_graphics2.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_preferences_graphics3.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_settings_chat.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_settings_im.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_settings_msgbox.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_settings_network.xml delete mode 100644 linden/indra/newview/skins/xui/zh/panel_settings_web.xml create mode 100644 linden/indra/test/llcontrol_tut.cpp create mode 100644 linden/indra/test/mass_properties_tut.cpp create mode 100644 linden/indra/test/prim_linkability_tut.cpp (limited to 'linden/indra') diff --git a/linden/indra/SConstruct b/linden/indra/SConstruct index 9bc78c4..92e75b5 100644 --- a/linden/indra/SConstruct +++ b/linden/indra/SConstruct @@ -189,15 +189,19 @@ for build_target in targets: print 'Building ' + build_target + ' ' + version_server + ' on ' + system_str + ' (' + buildtype + ')' system_lib_dir = '../libraries/' + system_str + havok_lib_dir = '../libraries/' + system_str + lib_dir = './lib_' + buildtype + '_' + build_target + '/' + system_str if build_target == 'client': system_lib_dir += '/lib_release_client' elif buildtype == 'debug': + havok_lib_dir += '/lib_debug/havok/hk460' system_lib_dir += '/lib_debug' + lib_dir = './lib_debug_' + build_target + '/' + system_str else: + havok_lib_dir += '/lib_release/havok/hk460' system_lib_dir += '/lib_release' - - lib_dir = './lib_' + buildtype + '_' + build_target + '/' + system_str + lib_dir = './lib_release_' + build_target + '/' + system_str try: build_dir_prefix = os.environ['TEMP_BUILD_DIR'] @@ -209,18 +213,19 @@ for build_target in targets: ### Base include directories ### include_dirs = Split(""" - ./llcommon ./llmath ./llwindow ./llaudio ./llcharacter ./llcrashlogger - ./lldatabase ./llhavok ./llimage ./llinventory ./llmedia ./llmessage + ./ ./llcommon ./llmath ./llwindow ./llaudio ./llcharacter ./llcrashlogger + ./lldatabase ./llimage ./llinventory ./llmedia ./llmessage ./llphysics ./llprimitive ./llrender ./llscene ./llui ./llvfs ./llwindow ./llxml ./lscript ./lscript/lscript_compile ../libraries/include - ../libraries/include/havok """ + '../libraries/' + system_str + '/include' ) client_external_libs = [] system_link_flags = '' + include_dirs += Split('../libraries/include/havok/hk460/physics ../libraries/include/havok/hk460/common ') + if platform != 'linux' and build_target == 'client' and enable_mozlib: ### Mozilla include directories ### @@ -249,12 +254,18 @@ for build_target in targets: ############## # Generic GCC flags - cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions ' + # cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -Werror -fexceptions ' + cflags = '-g -pipe -Wall -Wno-reorder -Wno-trigraphs -Wno-sign-compare -fexceptions ' cxxflags = '' - cppflags = '-D_FORTIFY_SOURCE=2 ' + #cppflags = '-D_FORTIFY_SOURCE=2 ' + cppflags = '' if standalone: cppflags += '-DLL_STANDALONE ' + if arch == 'i686': + cflags += '-m32 ' + system_link_flags += '-m32 ' + if build_target == 'server': # Server flags cppflags += '-D_GNU_SOURCE -DLL_MESA_HEADLESS=1 -DLL_MESA=1 ' @@ -290,9 +301,9 @@ for build_target in targets: if standalone: include_dirs += [d[2:] for d in pkgconfig('--cflags-only-I').split()] - client_external_libs += [ 'boost_regex' ] + client_external_libs += [ 'boost_program_options-gcc34-mt', 'boost_signals-gcc34-mt', 'boost_regex-gcc34-mt'] else: - client_external_libs += [ 'gtk-x11-2.0', 'atk-1.0', 'gmodule-2.0', 'gdk-x11-2.0', 'gdk_pixbuf-2.0', 'pango-1.0', 'pangoft2-1.0', 'pangox-1.0', 'pangoxft-1.0', 'Xinerama' , 'boost_regex'] + client_external_libs += [ 'gtk-x11-2.0', 'atk-1.0', 'gmodule-2.0', 'gdk-x11-2.0', 'gdk_pixbuf-2.0', 'pango-1.0', 'pangoft2-1.0', 'pangox-1.0', 'pangoxft-1.0', 'Xinerama', 'boost_program_options-gcc34-mt', 'boost_signals-gcc34-mt', 'boost_regex-gcc34-mt'] incdirs = [ 'ELFIO', 'atk-1.0', 'glib-2.0', 'gtk-2.0', 'llfreetype2', 'pango-1.0' ] include_dirs += ['../libraries/' + system_str + '/include/' + d @@ -320,6 +331,8 @@ for build_target in targets: include_dirs += [ '../libraries/' + system_str + '/include/libxml2'] else: cppflags += '-DLL_GSTREAMER_ENABLED=0 ' + + cppflags += '-DLL_CURRENT_HAVOK_VERSION=460 ' else: # Mac-only flags cflags += '-x c++ -arch ppc -pipe -Wno-trigraphs -fpascal-strings -faltivec -fasm-blocks -g -fmessage-length=0 -mtune=G4 -Wno-deprecated-declarations -Wno-invalid-offsetof -mmacosx-version-min=10.3 -Wmost -Wno-sign-compare -Wno-switch -fconstant-cfstrings -ffor-scope -Wno-reorder -fexceptions ' @@ -395,7 +408,7 @@ for build_target in targets: base_env = Environment(CXX = compiler, CPPPATH = include_dirs, - LIBPATH = lib_path, + LIBPATH = [lib_dir] + [system_lib_dir] + [havok_lib_dir], LINKFLAGS = system_link_flags + '--no-keep-memory --reduce-memory-overheads ' ) ### Environments for various build types ### @@ -409,6 +422,11 @@ for build_target in targets: CPPFLAGS=debug_cppflags, CXXFLAGS=debug_cxxflags) + if buildtype == 'havok1debug': + env = base_env.Copy(CFLAGS=debug_cflags, + CPPFLAGS=debug_cppflags, + CXXFLAGS=debug_cxxflags) + if buildtype == 'release': env = base_env.Copy(CFLAGS=release_cflags, CPPFLAGS=release_cppflags, @@ -627,6 +645,7 @@ for build_target in targets: pkgconfig('--libs-only-l', ['gtk+-2.0']).split()] else: external_libs = net_external_libs + [ 'db-4.2', 'gtk-x11-2.0' ] + external_libs += ['boost_signals-gcc34-mt'] internal_libs = [ 'llui', 'llxml', 'llmessage', 'llvfs', 'llmath', 'llcommon' ] create_executable(output_crashlogger_bin + '-globalsyms', 'linux_crash_logger', @@ -702,8 +721,8 @@ for build_target in targets: elif build_target == 'server': create_static_module('lldatabase') + create_static_module('llphysics', source_files='files.lst') create_static_module('llscene') - create_static_module('llhavok', '-fno-rtti') create_static_module_from_dir('llkdu', 'llkdustatic') @@ -711,7 +730,7 @@ for build_target in targets: # BUILD SERVERS # ################## file_suffix = '' - if buildtype == 'debug': + if buildtype == 'debug' or buildtype == 'havok1debug': file_suffix = '_debug' common_external_libs += [ 'pthread' ] @@ -740,7 +759,7 @@ for build_target in targets: # Dataserver external_libs = common_external_libs + [ - 'boost_regex-gcc-mt', 'mysqlclient', 'tcmalloc', 'stacktrace', + 'boost_regex-gcc33-mt', 'boost_signals-gcc33-mt', 'mysqlclient', 'tcmalloc', 'stacktrace', ] internal_libs = [ 'llcharacter', 'lldatabase', 'llimage', 'llimagej2coj', 'llinventory', 'llscene', 'llmessage', 'llvfs', 'llxml', 'llcommon', 'llmath' ] @@ -763,28 +782,46 @@ for build_target in targets: # Mapserver external_libs = common_external_libs + ['OSMesa16', 'kdu', - 'boost_regex-gcc-mt', 'iconv', 'jpeg', 'openjpeg', 'GL', - 'mysqlclient', 'pthread', 'dl'] + 'boost_regex-gcc33-mt', 'boost_signals-gcc33-mt', 'iconv', + 'jpeg', 'openjpeg', 'GL', 'mysqlclient', 'png12', 'pthread', 'dl'] internal_libs = ['llrender', 'llwindow', 'llimage', 'llimagej2coj', 'lldatabase', 'llprimitive', 'llmessage', 'llkdustatic', 'llxml', 'llvfs', 'llmath', 'llcommon'] create_executable('mapserver/mapserver' + file_suffix, 'mapserver', internal_libs + external_libs) # Simulator - external_libs = common_external_libs + [ - 'hkdynamics', 'hkgeometry', 'hkmath', 'hkbase', 'hkcollide', - 'hkactions', 'boost_regex-gcc-mt', 'openjpeg', 'dl', 'kdu', - 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace', - ] + Depends('newsim/simulator' + file_suffix, 'mapserver/mapserver' + file_suffix) + external_libs = common_external_libs + ['boost_regex-gcc33-mt', 'boost_signals-gcc33-mt', 'openjpeg', 'dl', 'kdu', + 'mysqlclient', 'iconv', 'tcmalloc', 'stacktrace', 'png12'] + + # the order of the havok libs matters + external_libs += [ + 'libhkcompat.a', + 'libhkutilities.a', + 'libhkvisualize.a', + 'libhkdynamics.a', + 'libhkvehicle.a', + 'libhkcollide.a', + 'libhkinternal.a', + 'libhkconstraintsolver.a', + 'libhkmath.a', + 'libhkscenedata.a', + 'libhkserialize.a', + 'libhkgraphicsogl.a', + 'libhkgraphicsbridge.a', + 'libhkgraphics.a', + 'libhkdemoframework.a', + 'libhkbase.a' + ] internal_libs = [ 'lscript', 'llprimitive', - 'llscene', 'llhavok', 'llinventory', 'llimage', 'llimagej2coj', + 'llscene', 'llphysics', 'llinventory', 'llimage', 'llimagej2coj', 'llcharacter', 'llxml', 'lldatabase', 'llkdustatic', 'llmessage', 'llvfs', 'llmath', 'llcommon' ] create_executable('newsim/simulator' + file_suffix, 'newsim', internal_libs + external_libs) # texture upload verifier - external_libs = common_external_libs + [ 'kdu', 'openjpeg', 'dl' ] + external_libs = common_external_libs + ['boost_signals-gcc33-mt', 'kdu', 'openjpeg', 'png12', 'z', 'dl'] internal_libs = [ 'llimage', 'llimagej2coj', @@ -816,8 +853,10 @@ for build_target in targets: # Test Depends('test/test', 'newsim/simulator' + file_suffix) external_libs = common_external_libs + ['mysqlclient'] + if platform == 'linux': + external_libs += ['boost_signals-gcc33-mt'] internal_libs = [ 'lldatabase', 'llinventory', 'llmessage', 'llxml', - 'llvfs', 'llcharacter', 'llmath', 'llcommon' ] + 'llvfs', 'llcharacter', 'llphysics', 'llprimitive', 'llmath', 'llcommon' ] test_executable = 'test/test' + file_suffix create_executable(test_executable, 'test', internal_libs + external_libs) diff --git a/linden/indra/indra_complete/indra_complete.sln b/linden/indra/indra_complete/indra_complete.sln index b9efa5a..e990489 100644 --- a/linden/indra/indra_complete/indra_complete.sln +++ b/linden/indra/indra_complete/indra_complete.sln @@ -112,7 +112,7 @@ EndProject {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE} = {020311F7-3DAB-4D93-9CE5-6D3926FD15FE} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -194,6 +194,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "..\test\test.vcproj {777F38BE-2DFE-4051-9AAD-2832ABC474CC} = {777F38BE-2DFE-4051-9AAD-2832ABC474CC} {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE} = {020311F7-3DAB-4D93-9CE5-6D3926FD15FE} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -209,6 +210,7 @@ EndProject EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -239,6 +241,7 @@ EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug + DebugMesaHeadless = DebugMesaHeadless Release = Release ReleaseForDownload = ReleaseForDownload ReleaseNoOpt = ReleaseNoOpt @@ -248,6 +251,7 @@ Global GlobalSection(ProjectConfiguration) = postSolution {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Debug.ActiveCfg = Debug|Win32 {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Debug.Build.0 = Debug|Win32 + {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Release.ActiveCfg = Release|Win32 {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.Release.Build.0 = Release|Win32 {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -256,6 +260,7 @@ Global {7BCB4B2C-8378-4186-88EA-5742B5ABE17F}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Debug.ActiveCfg = Debug|Win32 {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Debug.Build.0 = Debug|Win32 + {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Release.ActiveCfg = Release|Win32 {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.Release.Build.0 = Release|Win32 {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -264,6 +269,7 @@ Global {E87FD9BE-BE42-4EA3-BF4D-D992223046D9}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Debug.ActiveCfg = Debug|Win32 {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Debug.Build.0 = Debug|Win32 + {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Release.ActiveCfg = Release|Win32 {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.Release.Build.0 = Release|Win32 {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -272,6 +278,7 @@ Global {E5D94794-5671-4BD6-A16D-26EC18F3DB34}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {D37774F4-253D-4760-BF64-372A943224A1}.Debug.ActiveCfg = Debug|Win32 {D37774F4-253D-4760-BF64-372A943224A1}.Debug.Build.0 = Debug|Win32 + {D37774F4-253D-4760-BF64-372A943224A1}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {D37774F4-253D-4760-BF64-372A943224A1}.Release.ActiveCfg = Release|Win32 {D37774F4-253D-4760-BF64-372A943224A1}.Release.Build.0 = Release|Win32 {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -280,6 +287,7 @@ Global {D37774F4-253D-4760-BF64-372A943224A1}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {A5470DA6-0C3A-4602-B930-43DB25511A59}.Debug.ActiveCfg = Debug|Win32 {A5470DA6-0C3A-4602-B930-43DB25511A59}.Debug.Build.0 = Debug|Win32 + {A5470DA6-0C3A-4602-B930-43DB25511A59}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {A5470DA6-0C3A-4602-B930-43DB25511A59}.Release.ActiveCfg = Release|Win32 {A5470DA6-0C3A-4602-B930-43DB25511A59}.Release.Build.0 = Release|Win32 {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -288,6 +296,7 @@ Global {A5470DA6-0C3A-4602-B930-43DB25511A59}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {DE55D666-6A3D-476C-937F-109269B83681}.Debug.ActiveCfg = Debug|Win32 {DE55D666-6A3D-476C-937F-109269B83681}.Debug.Build.0 = Debug|Win32 + {DE55D666-6A3D-476C-937F-109269B83681}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {DE55D666-6A3D-476C-937F-109269B83681}.Release.ActiveCfg = Release|Win32 {DE55D666-6A3D-476C-937F-109269B83681}.Release.Build.0 = Release|Win32 {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -296,6 +305,7 @@ Global {DE55D666-6A3D-476C-937F-109269B83681}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Debug.ActiveCfg = Debug|Win32 {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Debug.Build.0 = Debug|Win32 + {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Release.ActiveCfg = Release|Win32 {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.Release.Build.0 = Release|Win32 {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -304,6 +314,7 @@ Global {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Debug.ActiveCfg = Debug|Win32 {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Debug.Build.0 = Debug|Win32 + {FCC4483C-5B84-4944-B91F-4589A219BC0B}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Release.ActiveCfg = Release|Win32 {FCC4483C-5B84-4944-B91F-4589A219BC0B}.Release.Build.0 = Release|Win32 {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -312,6 +323,7 @@ Global {FCC4483C-5B84-4944-B91F-4589A219BC0B}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Debug.ActiveCfg = Debug|Win32 {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Debug.Build.0 = Debug|Win32 + {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Release.ActiveCfg = Release|Win32 {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.Release.Build.0 = Release|Win32 {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -320,6 +332,7 @@ Global {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Debug.ActiveCfg = Debug|Win32 {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Debug.Build.0 = Debug|Win32 + {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Release.ActiveCfg = Release|Win32 {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.Release.Build.0 = Release|Win32 {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -328,6 +341,7 @@ Global {93B2BA29-FBE9-4376-92C1-6108DCFE09D3}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Debug.ActiveCfg = Debug|Win32 {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Debug.Build.0 = Debug|Win32 + {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Release.ActiveCfg = Release|Win32 {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.Release.Build.0 = Release|Win32 {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -336,6 +350,7 @@ Global {2ADE3C14-94C4-40BF-B033-70F3C954EE90}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Debug.ActiveCfg = Debug|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Debug.Build.0 = Debug|Win32 + {328D1968-924F-4863-AAE8-5F9A95BA68E5}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Release.ActiveCfg = Release|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.Release.Build.0 = Release|Win32 {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -344,6 +359,7 @@ Global {328D1968-924F-4863-AAE8-5F9A95BA68E5}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug.ActiveCfg = Debug|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Debug.Build.0 = Debug|Win32 + {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Release.ActiveCfg = Release|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.Release.Build.0 = Release|Win32 {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseForDownload.ActiveCfg = ReleaseForDownload|Win32 @@ -352,6 +368,7 @@ Global {E6F4CF1B-6109-4CA8-B58D-87FA936CDE08}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Debug.ActiveCfg = Debug|Win32 {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Debug.Build.0 = Debug|Win32 + {B4B838C7-2C72-428E-BBFD-25764E659A8B}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Release.ActiveCfg = Release|Win32 {B4B838C7-2C72-428E-BBFD-25764E659A8B}.Release.Build.0 = Release|Win32 {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -360,6 +377,7 @@ Global {B4B838C7-2C72-428E-BBFD-25764E659A8B}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Debug.ActiveCfg = Debug|Win32 {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Debug.Build.0 = Debug|Win32 + {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.DebugMesaHeadless.ActiveCfg = DebugMesaHeadless|Win32 {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Release.ActiveCfg = Release|Win32 {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.Release.Build.0 = Release|Win32 {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -368,6 +386,7 @@ Global {B5B53617-416F-404A-BF10-22EBCCA0E4FB}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Debug.ActiveCfg = Debug|Win32 {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Debug.Build.0 = Debug|Win32 + {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Release.ActiveCfg = Release|Win32 {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.Release.Build.0 = Release|Win32 {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -376,6 +395,7 @@ Global {BFA102B0-C891-4E13-B1CF-C2F28073DA8E}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Debug.ActiveCfg = Debug|Win32 {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Debug.Build.0 = Debug|Win32 + {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Release.ActiveCfg = Release|Win32 {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.Release.Build.0 = Release|Win32 {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -384,6 +404,7 @@ Global {F882263E-4F2A-43D9-A45A-FA4C8EC66552}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {44CE6D82-7320-4609-8FC3-5965C19F4808}.Debug.ActiveCfg = Debug|Win32 {44CE6D82-7320-4609-8FC3-5965C19F4808}.Debug.Build.0 = Debug|Win32 + {44CE6D82-7320-4609-8FC3-5965C19F4808}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {44CE6D82-7320-4609-8FC3-5965C19F4808}.Release.ActiveCfg = Release|Win32 {44CE6D82-7320-4609-8FC3-5965C19F4808}.Release.Build.0 = Release|Win32 {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -392,6 +413,7 @@ Global {44CE6D82-7320-4609-8FC3-5965C19F4808}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Debug.ActiveCfg = Debug|Win32 {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Debug.Build.0 = Debug|Win32 + {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Release.ActiveCfg = Release|Win32 {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.Release.Build.0 = Release|Win32 {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -400,6 +422,7 @@ Global {D0FDC1C3-A589-40F2-ABCA-A84FF3835624}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Debug.ActiveCfg = Debug|Win32 {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Debug.Build.0 = Debug|Win32 + {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Release.ActiveCfg = Release|Win32 {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.Release.Build.0 = Release|Win32 {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -408,6 +431,7 @@ Global {C6CA76F5-DCB4-4789-BBA7-43D11EE7C8E2}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Debug.ActiveCfg = Debug|Win32 {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Debug.Build.0 = Debug|Win32 + {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Release.ActiveCfg = Release|Win32 {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.Release.Build.0 = Release|Win32 {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -416,6 +440,7 @@ Global {A5504A1E-8BA4-45D2-8144-1B6937E37E98}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Debug.ActiveCfg = Debug|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Debug.Build.0 = Debug|Win32 + {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Release.ActiveCfg = Release|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.Release.Build.0 = Release|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -424,18 +449,21 @@ Global {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseNoOpt.Build.0 = Release|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Debug.ActiveCfg = Debug|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Debug.Build.0 = Debug|Win32 + {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Release.ActiveCfg = Release|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.Release.Build.0 = Release|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.ReleaseForDownload.ActiveCfg = Release|Win32 {777F38BE-2DFE-4051-9AAD-2832ABC474CC}.ReleaseNoOpt.ActiveCfg = Release|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Debug.ActiveCfg = Debug|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Debug.Build.0 = Debug|Win32 + {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Release.ActiveCfg = Release|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.Release.Build.0 = Release|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.ReleaseForDownload.ActiveCfg = Release|Win32 {EC2A989E-3F8F-4B8B-9AE6-7C7EA37C84BC}.ReleaseNoOpt.ActiveCfg = Release|Win32 {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Debug.ActiveCfg = Debug|Win32 {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Debug.Build.0 = Debug|Win32 + {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Release.ActiveCfg = Release|Win32 {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.Release.Build.0 = Release|Win32 {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -444,6 +472,7 @@ Global {648685F3-8760-4CC5-BB2B-CAF9DECC25A4}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Debug.ActiveCfg = Debug|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Debug.Build.0 = Debug|Win32 + {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Release.ActiveCfg = Release|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.Release.Build.0 = Release|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -451,11 +480,13 @@ Global {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseNoOpt.ActiveCfg = ReleaseNoOpt|Win32 {E928F33B-E090-4FA8-818B-6B5D8B0F1F4B}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.Debug.ActiveCfg = Debug|Win32 + {F56CA265-93E9-4068-8A67-8B104C876D70}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.Release.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseForDownload.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseNoOpt.ActiveCfg = ReleaseNoOpt|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug.ActiveCfg = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug.Build.0 = Debug|Win32 + {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Release.ActiveCfg = Release|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Release.Build.0 = Release|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -464,6 +495,7 @@ Global {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Debug.ActiveCfg = Debug|Win32 {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Debug.Build.0 = Debug|Win32 + {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Release.ActiveCfg = Release|Win32 {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.Release.Build.0 = Release|Win32 {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -472,6 +504,7 @@ Global {4B19F64E-AB97-4FB9-8E1D-74A8104DE0C4}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Debug.ActiveCfg = Debug|Win32 {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Debug.Build.0 = Debug|Win32 + {BBAA6588-CA96-4A87-A988-B02270B8D02B}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Release.ActiveCfg = Release|Win32 {BBAA6588-CA96-4A87-A988-B02270B8D02B}.Release.Build.0 = Release|Win32 {BBAA6588-CA96-4A87-A988-B02270B8D02B}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -479,22 +512,26 @@ Global {BBAA6588-CA96-4A87-A988-B02270B8D02B}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Debug.ActiveCfg = Debug|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Debug.Build.0 = Debug|Win32 + {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Release.ActiveCfg = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.Release.Build.0 = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload.ActiveCfg = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload.Build.0 = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt.ActiveCfg = ReleaseNoOpt|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug.ActiveCfg = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug.Build.0 = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt.ActiveCfg = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.Debug.ActiveCfg = Debug|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.Debug.Build.0 = Debug|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.DebugMesaHeadless.ActiveCfg = DebugHk460|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.DebugMesaHeadless.Build.0 = DebugHk460|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.Release.ActiveCfg = Release|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.Release.Build.0 = Release|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.ReleaseForDownload.ActiveCfg = Release|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.ReleaseForDownload.Build.0 = Release|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.ReleaseNoOpt.ActiveCfg = ReleaseNoOpt|Win32 + {020311F7-3DAB-4D93-9CE5-6D3926FD15FE}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug.ActiveCfg = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug.Build.0 = Debug|Win32 + {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Release.ActiveCfg = Release|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Release.Build.0 = Release|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -503,6 +540,7 @@ Global {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {076DD042-2E58-42EA-9401-53210B65C1FC}.Debug.ActiveCfg = Debug|Win32 {076DD042-2E58-42EA-9401-53210B65C1FC}.Debug.Build.0 = Debug|Win32 + {076DD042-2E58-42EA-9401-53210B65C1FC}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {076DD042-2E58-42EA-9401-53210B65C1FC}.Release.ActiveCfg = Release|Win32 {076DD042-2E58-42EA-9401-53210B65C1FC}.Release.Build.0 = Release|Win32 {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -511,6 +549,7 @@ Global {076DD042-2E58-42EA-9401-53210B65C1FC}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Debug.ActiveCfg = Debug|Win32 {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Debug.Build.0 = Debug|Win32 + {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Release.ActiveCfg = Release|Win32 {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.Release.Build.0 = Release|Win32 {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseForDownload.ActiveCfg = Release|Win32 @@ -519,6 +558,7 @@ Global {AF2D801E-EEE7-4B52-A025-F8E648ADC34B}.ReleaseNoOpt.Build.0 = ReleaseNoOpt|Win32 {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Debug.ActiveCfg = Debug|Win32 {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Debug.Build.0 = Debug|Win32 + {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.DebugMesaHeadless.ActiveCfg = Debug|Win32 {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Release.ActiveCfg = Release|Win32 {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.Release.Build.0 = Release|Win32 {4C8D64D5-649F-481E-96BE-EF1E82A77ACB}.ReleaseForDownload.ActiveCfg = Release|Win32 diff --git a/linden/indra/indra_complete/indra_complete_vc8.sln b/linden/indra/indra_complete/indra_complete_vc8.sln index e35c0f9..54bad30 100644 --- a/linden/indra/indra_complete/indra_complete_vc8.sln +++ b/linden/indra/indra_complete/indra_complete_vc8.sln @@ -83,7 +83,6 @@ EndProject {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -129,19 +128,6 @@ EndProject {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} EndProjectSection EndProject - ProjectSection(ProjectDependencies) = postProject - {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} - {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} - {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} - {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} - {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmedia", "..\llmedia\llmedia_vc8.vcproj", "{9D0C7E02-6506-4EE7-BC5C-75671D28D594}" EndProject EndProject @@ -175,7 +161,6 @@ EndProject EndProjectSection EndProject EndProject -EndProject ProjectSection(ProjectDependencies) = postProject {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} @@ -193,8 +178,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimagej2coj", "..\llimagej EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile_fb_vc8", "..\lscript\lscript_compile\lscript_compile_fb_vc8.vcproj", "{B771CF1B-E253-47BD-8B0A-6B0440CC9228}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "web-plugin-asset-upload", "..\web\doc\web-plugin-asset-upload_vc8.vcproj", "{0332E7B1-8913-4669-AD7E-7E2EB6204A75}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -454,15 +437,6 @@ Global {F56CA265-93E9-4068-8A67-8B104C876D70}.Release|Win32.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.Build.0 = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.ActiveCfg = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.Build.0 = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.ActiveCfg = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.Build.0 = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 @@ -502,16 +476,6 @@ Global {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload|Win32.Build.0 = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.Build.0 = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.ActiveCfg = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.Build.0 = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 @@ -562,16 +526,6 @@ Global {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseForDownload|Win32.Build.0 = Release|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseNoOpt|Win32.ActiveCfg = Release|Win32 {B771CF1B-E253-47BD-8B0A-6B0440CC9228}.ReleaseNoOpt|Win32.Build.0 = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.Debug|Win32.ActiveCfg = Debug|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.Debug|Win32.Build.0 = Debug|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.Release|Win32.ActiveCfg = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.Release|Win32.Build.0 = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.ReleaseForDownload|Win32.Build.0 = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.ReleaseNoOpt|Win32.ActiveCfg = Release|Win32 - {0332E7B1-8913-4669-AD7E-7E2EB6204A75}.ReleaseNoOpt|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/linden/indra/indra_complete/indra_complete_vc9.sln b/linden/indra/indra_complete/indra_complete_vc9.sln index 8424eb3..d7e781d 100644 --- a/linden/indra/indra_complete/indra_complete_vc9.sln +++ b/linden/indra/indra_complete/indra_complete_vc9.sln @@ -83,7 +83,6 @@ EndProject {B4B838C7-2C72-428E-BBFD-25764E659A8B} = {B4B838C7-2C72-428E-BBFD-25764E659A8B} {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} = {5EA5DDF0-C7E1-4F49-BEF5-9246A4656B2E} {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} = {023011F7-3ADB-49D3-9EC5-6D392F6D15FE} EndProjectSection EndProject ProjectSection(ProjectDependencies) = postProject @@ -129,19 +128,6 @@ EndProject {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} EndProjectSection EndProject - ProjectSection(ProjectDependencies) = postProject - {2ADE3C14-94C4-40BF-B033-70F3C954EE90} = {2ADE3C14-94C4-40BF-B033-70F3C954EE90} - {B5B53617-416F-404A-BF10-22EBCCA0E4FB} = {B5B53617-416F-404A-BF10-22EBCCA0E4FB} - {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} = {AF2D801E-EEE7-4B52-A025-F8E648ADC34B} - {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} = {93B2BA29-FBE9-4376-92C1-6108DCFE09D3} - {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} - {DE55D666-6A3D-476C-937F-109269B83681} = {DE55D666-6A3D-476C-937F-109269B83681} - {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} - {E5D94794-5671-4BD6-A16D-26EC18F3DB34} = {E5D94794-5671-4BD6-A16D-26EC18F3DB34} - {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} = {E87FD9BE-BE42-4EA3-BF4D-D992223046D9} - {D37774F4-253D-4760-BF64-372A943224A1} = {D37774F4-253D-4760-BF64-372A943224A1} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llmedia", "..\llmedia\llmedia_vc9.vcproj", "{9D0C7E02-6506-4EE7-BC5C-75671D28D594}" EndProject EndProject @@ -175,7 +161,6 @@ EndProject EndProjectSection EndProject EndProject -EndProject ProjectSection(ProjectDependencies) = postProject {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} = {7BCB4B2C-8378-4186-88EA-5742B5ABE17F} {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} = {681FDD6C-2FAE-4CB9-AF6D-B952F2B151C5} @@ -191,7 +176,7 @@ EndProject EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "llimagej2coj", "..\llimagej2coj\llimagej2coj_vc9.vcproj", "{4C8D64D5-649F-481E-96BE-EF1E82A77ACB}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile_fb_vc9", "..\lscript\lscript_compile\lscript_compile_fb_vc9.vcproj", "{B771CF1B-E253-47BD-8B0A-6B0440CC9228}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lscript_compile_fb_vc8", "..\lscript\lscript_compile\lscript_compile_fb_vc9.vcproj", "{B771CF1B-E253-47BD-8B0A-6B0440CC9228}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -455,15 +440,6 @@ Global {F56CA265-93E9-4068-8A67-8B104C876D70}.Release|Win32.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 {F56CA265-93E9-4068-8A67-8B104C876D70}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.ActiveCfg = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Debug|Win32.Build.0 = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.ActiveCfg = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.Release|Win32.Build.0 = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {BF69CC7B-5C5B-40C3-93CB-92AD6A5FBC45}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.ActiveCfg = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.Debug|Win32.Build.0 = Debug|Win32 {9D0C7E02-6506-4EE7-BC5C-75671D28D594}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 @@ -503,16 +479,6 @@ Global {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseForDownload|Win32.Build.0 = Release|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 {E9F5BD55-F8E8-4C61-B9B5-CCE7C1048241}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.ActiveCfg = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Debug|Win32.Build.0 = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.DebugMesaHeadless|Win32.Build.0 = Debug|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.Release|Win32.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.ActiveCfg = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseForDownload|Win32.Build.0 = Release|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.ActiveCfg = ReleaseNoOpt|Win32 - {023011F7-3ADB-49D3-9EC5-6D392F6D15FE}.ReleaseNoOpt|Win32.Build.0 = ReleaseNoOpt|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.ActiveCfg = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.Debug|Win32.Build.0 = Debug|Win32 {6AEE004D-BFE8-4082-B4D3-E51163B01EEB}.DebugMesaHeadless|Win32.ActiveCfg = Debug|Win32 diff --git a/linden/indra/lib/python/indra/base/llsd.py b/linden/indra/lib/python/indra/base/llsd.py index 71282bc..26ac3a2 100644 --- a/linden/indra/lib/python/indra/base/llsd.py +++ b/linden/indra/lib/python/indra/base/llsd.py @@ -842,16 +842,6 @@ try: except: print "Couldn't import mulib.stacked, not registering LLSD converters" else: - def llsd_convert_json(llsd_stuff, request): - callback = request.get_header('callback') - if callback is not None: - ## See Yahoo's ajax documentation for information about using this - ## callback style of programming - ## http://developer.yahoo.com/common/json.html#callbackparam - req.write("%s(%s)" % (callback, simplejson.dumps(llsd_stuff))) - else: - req.write(simplejson.dumps(llsd_stuff)) - def llsd_convert_xml(llsd_stuff, request): request.write(format_xml(llsd_stuff)) @@ -859,8 +849,6 @@ else: request.write(format_binary(llsd_stuff)) for typ in [LLSD, dict, list, tuple, str, int, float, bool, unicode, type(None)]: - stacked.add_producer(typ, llsd_convert_json, 'application/json') - stacked.add_producer(typ, llsd_convert_xml, 'application/llsd+xml') stacked.add_producer(typ, llsd_convert_xml, 'application/xml') stacked.add_producer(typ, llsd_convert_xml, 'text/xml') diff --git a/linden/indra/lib/python/indra/ipc/llsdhttp.py b/linden/indra/lib/python/indra/ipc/llsdhttp.py index 1bb335e..378c1c2 100644 --- a/linden/indra/lib/python/indra/ipc/llsdhttp.py +++ b/linden/indra/lib/python/indra/ipc/llsdhttp.py @@ -34,45 +34,54 @@ from indra.base import llsd from eventlet import httpc - -get, put, delete, post = httpc.make_suite( - llsd.format_xml, llsd.parse, 'application/xml+llsd') - +suite = httpc.HttpSuite(llsd.format_xml, llsd.parse, 'application/xml+llsd') +delete = suite.delete +delete_ = suite.delete_ +get = suite.get +get_ = suite.get_ +head = suite.head +head_ = suite.head_ +post = suite.post +post_ = suite.post_ +put = suite.put +put_ = suite.put_ +request = suite.request +request_ = suite.request_ for x in (httpc.ConnectionError, httpc.NotFound, httpc.Forbidden): globals()[x.__name__] = x -def postFile(url, filename, verbose=False): +def postFile(url, filename): f = open(filename) body = f.read() f.close() llsd_body = llsd.parse(body) - return post(url, llsd_body, verbose=verbose) + return post_(url, llsd_body) def getStatus(url, use_proxy=False): - status, _headers, _body = get(url, use_proxy=use_proxy, verbose=True) + status, _headers, _body = get_(url, use_proxy=use_proxy) return status def putStatus(url, data): - status, _headers, _body = put(url, data, verbose=True) + status, _headers, _body = put_(url, data) return status def deleteStatus(url): - status, _headers, _body = delete(url, verbose=True) + status, _headers, _body = delete_(url) return status def postStatus(url, data): - status, _headers, _body = post(url, data, verbose=True) + status, _headers, _body = post_(url, data) return status def postFileStatus(url, filename): - status, _headers, body = postFile(url, filename, verbose=True) + status, _headers, body = postFile(url, filename) return status, body diff --git a/linden/indra/lib/python/indra/util/llmanifest.py b/linden/indra/lib/python/indra/util/llmanifest.py index 1bd44ae..89c14e8 100644 --- a/linden/indra/lib/python/indra/util/llmanifest.py +++ b/linden/indra/lib/python/indra/util/llmanifest.py @@ -94,7 +94,7 @@ def get_channel(srctree): for p in paths: if os.path.exists(p): contents = open(p, 'r').read() - channel = re.search("LL_CHANNEL\s=\s\"([\w\s]+)\"", contents).group(1) + channel = re.search("LL_CHANNEL\s=\s\"(.+)\";\s*$", contents, flags = re.M).group(1) return channel diff --git a/linden/indra/llcharacter/lljoint.cpp b/linden/indra/llcharacter/lljoint.cpp index b7a51f1..4611f52 100644 --- a/linden/indra/llcharacter/lljoint.cpp +++ b/linden/indra/llcharacter/lljoint.cpp @@ -189,11 +189,12 @@ void LLJoint::removeChild(LLJoint* joint) child_list_t::iterator iter = std::find(mChildren.begin(), mChildren.end(), joint); if (iter != mChildren.end()) { - this->mChildren.erase(iter); + mChildren.erase(iter); + + joint->mXform.setParent(NULL); + joint->mParent = NULL; + joint->touch(); } - joint->mXform.setParent(NULL); - joint->mParent = NULL; - joint->touch(); } diff --git a/linden/indra/llcharacter/llstatemachine.h b/linden/indra/llcharacter/llstatemachine.h index 12a71b7..873e938 100644 --- a/linden/indra/llcharacter/llstatemachine.h +++ b/linden/indra/llcharacter/llstatemachine.h @@ -54,7 +54,7 @@ class LLFSMTransition : public LLUniqueID { public: LLFSMTransition() : LLUniqueID(){}; - virtual std::string getName(){ return "unnamed"; } + virtual std::string getName()const { return "unnamed"; } }; class LLFSMState : public LLUniqueID @@ -64,7 +64,7 @@ public: virtual void onEntry(void *){}; virtual void onExit(void *){}; virtual void execute(void *){}; - virtual std::string getName(){ return "unnamed"; } + virtual std::string getName() const { return "unnamed"; } }; class LLStateDiagram diff --git a/linden/indra/llcommon/imageids.h b/linden/indra/llcommon/imageids.h index 4a1e221..9361479 100644 --- a/linden/indra/llcommon/imageids.h +++ b/linden/indra/llcommon/imageids.h @@ -43,60 +43,34 @@ // pre-cached on viewer // Grass Images -//const LLUUID IMG_GRASS1 ("990c4086-46ce-49bd-8cae-afcc23a08f4e"); // dataserver -//const LLUUID IMG_GRASS2 ("869e2dcf-21b9-402d-a36d-9a23365cf723"); // dataserver -//const LLUUID IMG_GRASS3 ("8f97e7a7-f664-4967-9e8f-8d9e8039c1b7"); // dataserver - -//const LLUUID IMG_GRASS4 ("8a05131d-35b7-4812-bcfc-a989b0f954ef"); // dataserver - -//const LLUUID IMG_GRASS5 ("7d092acb-c69a-4122-b09b-f285e009b185"); // dataserver - -const LLUUID IMG_CLEAR ("11ee27f5-43c0-414e-afd5-d7f5688c351f"); // VIEWER const LLUUID IMG_SMOKE ("b4ba225c-373f-446d-9f7e-6cb7b5cf9b3d"); // VIEWER const LLUUID IMG_DEFAULT ("d2114404-dd59-4a4d-8e6c-49359e91bbf0"); // VIEWER -//const LLUUID IMG_SAND ("0ff70ead-4562-45f9-9e8a-52b1a3286868"); // VIEWER 1.5k -//const LLUUID IMG_GRASS ("5ab48dd5-05d0-4f1a-ace6-efd4e2fb3508"); // VIEWER 1.2k -//const LLUUID IMG_ROCK ("402f8b24-5f9d-4905-b5f8-37baff603e88"); // VIEWER 1.2k -//const LLUUID IMG_ROCKFACE ("9c88539c-fd04-46b8-bea2-ddf1bcffe3bd"); // VIEWER 1.2k const LLUUID IMG_SUN ("cce0f112-878f-4586-a2e2-a8f104bba271"); // dataserver const LLUUID IMG_MOON ("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver const LLUUID IMG_CLOUD_POOF ("fc4b9f0b-d008-45c6-96a4-01dd947ac621"); // dataserver const LLUUID IMG_SHOT ("35f217a3-f618-49cf-bbca-c86d486551a9"); // dataserver const LLUUID IMG_SPARK ("d2e75ac1-d0fb-4532-820e-a20034ac814d"); // dataserver const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver -//const LLUUID IMG_WATER ("e510b068-d20d-4612-a08d-fde4d5c15789"); // VIEWER const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector - -//const LLUUID IMG_SHADOW ("5e1de0a8-f9f8-4237-9396-d221126a7c4a"); // dataserver -//const LLUUID IMG_AVATARSHADOW ("c7d8bbf3-21ee-4f6e-9b20-3cf18425af1d"); // dataserver -//const LLUUID IMG_BOXSHADOW ("8d86b8cc-4889-408a-8b72-c1961bae53d7"); // dataserver -//const LLUUID IMG_EYE ("5e3551ae-9971-4814-af99-5117591e937b"); // dataserver -//const LLUUID IMG_BLUE_FLAME ("d8b62059-7b31-4511-a479-1fe45117948f"); // dataserver - const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver -//const LLUUID IMG_ENERGY_BEAM ("09e7bc54-11b9-442a-ae3d-f52e599e466a"); // dataserver -//const LLUUID IMG_ENERGY_BEAM2 ("de651394-f926-48db-b666-e49d83af1bbc"); // dataserver - -//const LLUUID IMG_BRICK_PATH ("a9d0019b-3783-4c7f-959c-322d301918bc"); // dataserver const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver const LLUUID IMG_EXPLOSION_3 ("fedea30a-1be8-47a6-bc06-337a04a39c4b"); // On dataserver const LLUUID IMG_EXPLOSION_4 ("abf0d56b-82e5-47a2-a8ad-74741bb2c29e"); // On dataserver -//const LLUUID IMG_EXPLOSION_5 ("60f2dec7-675b-4950-b614-85b907d552ea"); // On dataserver -//const LLUUID IMG_SPLASH_SPRITE ("8a101f63-fe45-49e7-9f8a-e64817daa475"); // On dataserver const LLUUID IMG_SMOKE_POOF ("1e63e323-5fe0-452e-92f8-b98bd0f764e3"); // On dataserver const LLUUID IMG_BIG_EXPLOSION_1 ("5e47a0dc-97bf-44e0-8b40-de06718cee9d"); // On dataserver const LLUUID IMG_BIG_EXPLOSION_2 ("9c8eca51-53d5-42a7-bb58-cef070395db8"); // On dataserver -//const LLUUID IMG_BLUE_BLOOD ("8bc2e3f8-097e-4c87-b417-b0d699d07189"); // On dataserver -const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); -//const LLUUID IMG_BLOOM2 ("9fb76e81-eca0-4b6a-96e1-a6c5a685150b"); -//const LLUUID IMG_BLOOM3 ("fb1fecba-9585-415b-ad15-6e6e3d6c5479"); +const LLUUID IMG_BLOOM1 ("3c59f7fe-9dc8-47f9-8aaf-a9dd1fbc3bef"); // VIEWER +const LLUUID TERRAIN_DIRT_DETAIL ("0bc58228-74a0-7e83-89bc-5c23464bcec5"); // VIEWER +const LLUUID TERRAIN_GRASS_DETAIL ("63338ede-0037-c4fd-855b-015d77112fc8"); // VIEWER +const LLUUID TERRAIN_MOUNTAIN_DETAIL ("303cd381-8560-7579-23f1-f0a880799740"); // VIEWER +const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // VIEWER -const LLUUID IMG_PTT_SPEAKER ("89e9fc7c-0b16-457d-be4f-136270759c4d"); // On cache +const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER #endif diff --git a/linden/indra/llcommon/indra_constants.h b/linden/indra/llcommon/indra_constants.h index eceb576..77f3d8c 100644 --- a/linden/indra/llcommon/indra_constants.h +++ b/linden/indra/llcommon/indra_constants.h @@ -38,9 +38,10 @@ // At 45 Hz collisions seem stable and objects seem // to settle down at a reasonable rate. // JC 3/18/2003 -const F32 HAVOK_TIMESTEP = 1.f / 45.f; +const F32 PHYSICS_TIMESTEP = 1.f / 45.f; const F32 COLLISION_TOLERANCE = 0.1f; +const F32 HALF_COLLISION_TOLERANCE = COLLISION_TOLERANCE * 0.5f; // Time constants const U32 HOURS_PER_LINDEN_DAY = 4; @@ -53,6 +54,8 @@ const F32 REGION_WIDTH_METERS = 256.f; const S32 REGION_WIDTH_UNITS = 256; const U32 REGION_WIDTH_U32 = 256; +const F32 REGION_HEIGHT_METERS = 4096.f; + // Bits for simulator performance query flags enum LAND_STAT_FLAGS { @@ -87,7 +90,7 @@ const F32 MAX_AGENT_HEIGHT = 2.65f - 2.0f * COLLISION_TOLERANCE; // For linked sets const S32 MAX_CHILDREN_PER_TASK = 255; -const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 31; +const S32 MAX_CHILDREN_PER_PHYSICAL_TASK = 32; const S32 MAX_JOINTS_PER_OBJECT = 1; // limiting to 1 until Havok 2.x @@ -339,7 +342,7 @@ const U32 MAP_ITEM_LAND_FOR_SALE = 0x07; const U32 MAP_ITEM_CLASSIFIED = 0x08; // Crash reporter behavior -const char* const CRASH_SETTINGS_FILE = "crash_settings.xml"; +const char* const CRASH_SETTINGS_FILE = "settings_crash_behavior.xml"; const char* const CRASH_BEHAVIOR_SETTING = "CrashSubmitBehavior"; const S32 CRASH_BEHAVIOR_ASK = 0; const S32 CRASH_BEHAVIOR_ALWAYS_SEND = 1; diff --git a/linden/indra/llcommon/llagentconstants.h b/linden/indra/llcommon/llagentconstants.h index 5757751..48c097a 100644 --- a/linden/indra/llcommon/llagentconstants.h +++ b/linden/indra/llcommon/llagentconstants.h @@ -67,43 +67,43 @@ const U32 CONTROL_ML_LBUTTON_DOWN_INDEX = 30; const U32 CONTROL_ML_LBUTTON_UP_INDEX = 31; const U32 TOTAL_CONTROLS = 32; -const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; -const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; -const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; -const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; -const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; -const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; -const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; -const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; -const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; -const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; - -const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; -const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; -const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; - -const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; -const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; -const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; -const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; -const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; -const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; - -const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; -const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; -const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; -const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; -const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; -const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; -const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; -const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; - -const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; - -const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; -const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; -const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; -const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; +const U32 AGENT_CONTROL_AT_POS = 0x1 << CONTROL_AT_POS_INDEX; // 0x00000001 +const U32 AGENT_CONTROL_AT_NEG = 0x1 << CONTROL_AT_NEG_INDEX; // 0x00000002 +const U32 AGENT_CONTROL_LEFT_POS = 0x1 << CONTROL_LEFT_POS_INDEX; // 0x00000004 +const U32 AGENT_CONTROL_LEFT_NEG = 0x1 << CONTROL_LEFT_NEG_INDEX; // 0x00000008 +const U32 AGENT_CONTROL_UP_POS = 0x1 << CONTROL_UP_POS_INDEX; // 0x00000010 +const U32 AGENT_CONTROL_UP_NEG = 0x1 << CONTROL_UP_NEG_INDEX; // 0x00000020 +const U32 AGENT_CONTROL_PITCH_POS = 0x1 << CONTROL_PITCH_POS_INDEX; // 0x00000040 +const U32 AGENT_CONTROL_PITCH_NEG = 0x1 << CONTROL_PITCH_NEG_INDEX; // 0x00000080 +const U32 AGENT_CONTROL_YAW_POS = 0x1 << CONTROL_YAW_POS_INDEX; // 0x00000100 +const U32 AGENT_CONTROL_YAW_NEG = 0x1 << CONTROL_YAW_NEG_INDEX; // 0x00000200 + +const U32 AGENT_CONTROL_FAST_AT = 0x1 << CONTROL_FAST_AT_INDEX; // 0x00000400 +const U32 AGENT_CONTROL_FAST_LEFT = 0x1 << CONTROL_FAST_LEFT_INDEX; // 0x00000800 +const U32 AGENT_CONTROL_FAST_UP = 0x1 << CONTROL_FAST_UP_INDEX; // 0x00001000 + +const U32 AGENT_CONTROL_FLY = 0x1 << CONTROL_FLY_INDEX; // 0x00002000 +const U32 AGENT_CONTROL_STOP = 0x1 << CONTROL_STOP_INDEX; // 0x00004000 +const U32 AGENT_CONTROL_FINISH_ANIM = 0x1 << CONTROL_FINISH_ANIM_INDEX; // 0x00008000 +const U32 AGENT_CONTROL_STAND_UP = 0x1 << CONTROL_STAND_UP_INDEX; // 0x00010000 +const U32 AGENT_CONTROL_SIT_ON_GROUND = 0x1 << CONTROL_SIT_ON_GROUND_INDEX; // 0x00020000 +const U32 AGENT_CONTROL_MOUSELOOK = 0x1 << CONTROL_MOUSELOOK_INDEX; // 0x00040000 + +const U32 AGENT_CONTROL_NUDGE_AT_POS = 0x1 << CONTROL_NUDGE_AT_POS_INDEX; // 0x00080000 +const U32 AGENT_CONTROL_NUDGE_AT_NEG = 0x1 << CONTROL_NUDGE_AT_NEG_INDEX; // 0x00100000 +const U32 AGENT_CONTROL_NUDGE_LEFT_POS = 0x1 << CONTROL_NUDGE_LEFT_POS_INDEX; // 0x00200000 +const U32 AGENT_CONTROL_NUDGE_LEFT_NEG = 0x1 << CONTROL_NUDGE_LEFT_NEG_INDEX; // 0x00400000 +const U32 AGENT_CONTROL_NUDGE_UP_POS = 0x1 << CONTROL_NUDGE_UP_POS_INDEX; // 0x00800000 +const U32 AGENT_CONTROL_NUDGE_UP_NEG = 0x1 << CONTROL_NUDGE_UP_NEG_INDEX; // 0x01000000 +const U32 AGENT_CONTROL_TURN_LEFT = 0x1 << CONTROL_TURN_LEFT_INDEX; // 0x02000000 +const U32 AGENT_CONTROL_TURN_RIGHT = 0x1 << CONTROL_TURN_RIGHT_INDEX; // 0x04000000 + +const U32 AGENT_CONTROL_AWAY = 0x1 << CONTROL_AWAY_INDEX; // 0x08000000 + +const U32 AGENT_CONTROL_LBUTTON_DOWN = 0x1 << CONTROL_LBUTTON_DOWN_INDEX; // 0x10000000 +const U32 AGENT_CONTROL_LBUTTON_UP = 0x1 << CONTROL_LBUTTON_UP_INDEX; // 0x20000000 +const U32 AGENT_CONTROL_ML_LBUTTON_DOWN = 0x1 << CONTROL_ML_LBUTTON_DOWN_INDEX; // 0x40000000 +const U32 AGENT_CONTROL_ML_LBUTTON_UP = ((U32)0x1) << CONTROL_ML_LBUTTON_UP_INDEX; // 0x80000000 const U32 AGENT_CONTROL_AT = AGENT_CONTROL_AT_POS | AGENT_CONTROL_AT_NEG diff --git a/linden/indra/llcommon/llapp.cpp b/linden/indra/llcommon/llapp.cpp index a10436a..bd2e377 100644 --- a/linden/indra/llcommon/llapp.cpp +++ b/linden/indra/llcommon/llapp.cpp @@ -65,6 +65,7 @@ BOOL LLApp::sLogInSignal = FALSE; // static LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status LLAppErrorHandler LLApp::sErrorHandler = NULL; +LLAppErrorHandler LLApp::sSyncErrorHandler = NULL; BOOL LLApp::sErrorThreadRunning = FALSE; #if !LL_WINDOWS LLApp::child_map LLApp::sChildMap; @@ -262,6 +263,21 @@ void LLApp::setErrorHandler(LLAppErrorHandler handler) LLApp::sErrorHandler = handler; } + +void LLApp::setSyncErrorHandler(LLAppErrorHandler handler) +{ + LLApp::sSyncErrorHandler = handler; +} + +// static +void LLApp::runSyncErrorHandler() +{ + if (LLApp::sSyncErrorHandler) + { + LLApp::sSyncErrorHandler(); + } +} + // static void LLApp::runErrorHandler() { @@ -285,7 +301,13 @@ void LLApp::setStatus(EAppStatus status) // static void LLApp::setError() { - setStatus(APP_STATUS_ERROR); + if (!isError()) + { + // perform any needed synchronous error-handling + runSyncErrorHandler(); + // set app status to ERROR so that the LLErrorThread notices + setStatus(APP_STATUS_ERROR); + } } diff --git a/linden/indra/llcommon/llapp.h b/linden/indra/llcommon/llapp.h index 1a700cc..50a70ae 100644 --- a/linden/indra/llcommon/llapp.h +++ b/linden/indra/llcommon/llapp.h @@ -189,6 +189,7 @@ public: // Error handling methods // void setErrorHandler(LLAppErrorHandler handler); + void setSyncErrorHandler(LLAppErrorHandler handler); #if !LL_WINDOWS // @@ -245,13 +246,15 @@ protected: private: void setupErrorHandling(); // Do platform-specific error-handling setup (signals, structured exceptions) - static void runErrorHandler(); + static void runErrorHandler(); // run shortly after we detect an error, ran in the relatively robust context of the LLErrorThread - preferred. + static void runSyncErrorHandler(); // run IMMEDIATELY when we get an error, ran in the context of the faulting thread. // *NOTE: On Windows, we need a routine to reset the structured // exception handler when some evil driver has taken it over for // their own purposes typedef int(*signal_handler_func)(int signum); static LLAppErrorHandler sErrorHandler; + static LLAppErrorHandler sSyncErrorHandler; // Default application threads LLErrorThread* mThreadErrorp; // Waits for app to go to status ERROR, then runs the error callback diff --git a/linden/indra/llcommon/llapr.cpp b/linden/indra/llcommon/llapr.cpp index 770cd3f..08c40a4 100644 --- a/linden/indra/llcommon/llapr.cpp +++ b/linden/indra/llcommon/llapr.cpp @@ -116,8 +116,10 @@ void LLScopedLock::unlock() bool ll_apr_warn_status(apr_status_t status) { if(APR_SUCCESS == status) return false; +#ifndef LL_WINDOWS char buf[MAX_STRING]; /* Flawfinder: ignore */ llwarns << "APR: " << apr_strerror(status, buf, MAX_STRING) << llendl; +#endif return true; } diff --git a/linden/indra/llcommon/llcommon.vcproj b/linden/indra/llcommon/llcommon.vcproj index 6b4a0e8..ab4e67a 100644 --- a/linden/indra/llcommon/llcommon.vcproj +++ b/linden/indra/llcommon/llcommon.vcproj @@ -432,10 +432,10 @@ RelativePath=".\lllivefile.h"> + RelativePath=".\lllocalidhashmap.h"> + RelativePath=".\lllog.h"> @@ -504,6 +504,9 @@ RelativePath=".\llskipmap.h"> + + ::removeObj(const Type& obj) typename std::vector::iterator iter = std::find(this->begin(), this->end(), obj); if (iter != this->end()) { + S32 res = iter - this->begin(); typename std::vector::iterator last = this->end(); --last; *iter = *last; this->pop_back(); - return iter - this->begin(); + return res; } return FAIL; } diff --git a/linden/indra/llcommon/lldefs.h b/linden/indra/llcommon/lldefs.h index d081245..0e69626 100644 --- a/linden/indra/llcommon/lldefs.h +++ b/linden/indra/llcommon/lldefs.h @@ -218,7 +218,15 @@ inline LLDATATYPE llmin(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATA template inline LLDATATYPE llclamp(const LLDATATYPE& a, const LLDATATYPE& minval, const LLDATATYPE& maxval) { - return llmin(llmax(a, minval), maxval); + if ( a < minval ) + { + return minval; + } + else if ( a > maxval ) + { + return maxval; + } + return a; } template @@ -234,3 +242,4 @@ inline LLDATATYPE llclampb(const LLDATATYPE& a) } #endif // LL_LLDEFS_H + diff --git a/linden/indra/llcommon/llerror.cpp b/linden/indra/llcommon/llerror.cpp index d9ab57c..0e7db89 100644 --- a/linden/indra/llcommon/llerror.cpp +++ b/linden/indra/llcommon/llerror.cpp @@ -37,15 +37,16 @@ #include #ifdef __GNUC__ -#include -#endif +# include +#endif // __GNUC__ #include #if !LL_WINDOWS -#include -#endif +# include +# include +#endif // !LL_WINDOWS #if LL_WINDOWS -#include -#endif +# include +#endif // LL_WINDOWS #include #include "llapp.h" @@ -133,18 +134,58 @@ namespace { class RecordToStderr : public LLError::Recorder { public: - RecordToStderr(bool timestamp) : mTimestamp(timestamp) { } + RecordToStderr(bool timestamp) : mTimestamp(timestamp), mUseANSI(ANSI_PROBE) { } virtual bool wantsTime() { return mTimestamp; } virtual void recordMessage(LLError::ELevel level, - const std::string& message) + const std::string& message) { + if (ANSI_PROBE == mUseANSI) + mUseANSI = (checkANSI() ? ANSI_YES : ANSI_NO); + + if (ANSI_YES == mUseANSI) + { + // Default all message levels to bold so we can distinguish our own messages from those dumped by subprocesses and libraries. + colorANSI("1"); // bold + switch (level) { + case LLError::LEVEL_ERROR: + colorANSI("31"); // red + break; + case LLError::LEVEL_WARN: + colorANSI("34"); // blue + break; + case LLError::LEVEL_DEBUG: + colorANSI("35"); // magenta + break; + default: + break; + } + } fprintf(stderr, "%s\n", message.c_str()); + if (ANSI_YES == mUseANSI) colorANSI("0"); // reset } private: bool mTimestamp; + typedef enum ANSIState {ANSI_PROBE, ANSI_YES, ANSI_NO}; + ANSIState mUseANSI; + void colorANSI(const std::string color) + { + // ANSI color code escape sequence + fprintf(stderr, "\033[%sm", color.c_str() ); + }; + bool checkANSI(void) + { +#if LL_LINUX || LL_DARWIN + // Check whether it's okay to use ANSI; if stderr is + // a tty then we assume yes. Can be turned off with + // the LL_NO_ANSI_COLOR env var. + return (0 != isatty(2)) && + (NULL == getenv("LL_NO_ANSI_COLOR")); +#endif // LL_LINUX + return false; + }; }; class RecordToFixedBuffer : public LLError::Recorder diff --git a/linden/indra/llcommon/llevent.h b/linden/indra/llcommon/llevent.h index 83cb79f..ef96ef7 100644 --- a/linden/indra/llcommon/llevent.h +++ b/linden/indra/llcommon/llevent.h @@ -185,13 +185,6 @@ protected: LLPointer mDispatcher; }; -// Utility mixer class which fires & handles events -class LLSimpleListenerObservable : public LLObservable, public LLSimpleListener -{ -public: - virtual bool handleEvent(LLPointer event, const LLSD& userdata) = 0; -}; - class LLValueChangedEvent : public LLEvent { public: diff --git a/linden/indra/llcommon/llfile.cpp b/linden/indra/llcommon/llfile.cpp index d551f28..32e9622 100644 --- a/linden/indra/llcommon/llfile.cpp +++ b/linden/indra/llcommon/llfile.cpp @@ -272,9 +272,11 @@ void llofstream::open(const char* _Filename, /* Flawfinder: ignore */ void llofstream::close() { // close the C stream - llassert(_Filebuffer); - if (_Filebuffer->close() == 0) - _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ + if(is_open()) + { + if (_Filebuffer->close() == 0) + _Myios::setstate(ios_base::failbit); /*Flawfinder: ignore*/ + } } llofstream::llofstream(const char *_Filename, @@ -286,7 +288,8 @@ llofstream::llofstream(const char *_Filename, } llofstream::~llofstream() -{ // destroy the object +{ + // destroy the object if (_ShouldClose) { close(); diff --git a/linden/indra/llcommon/llframetimer.cpp b/linden/indra/llcommon/llframetimer.cpp index 9de3be2..96e5014 100644 --- a/linden/indra/llcommon/llframetimer.cpp +++ b/linden/indra/llcommon/llframetimer.cpp @@ -140,3 +140,18 @@ F32 LLFrameTimer::getFrameDeltaTimeF32() { return (F32)(U64_to_F64(sFrameDeltaTime) * USEC_TO_SEC_F64); } + + +// static +// Return seconds since the current frame started +F32 LLFrameTimer::getCurrentFrameTime() +{ + U64 frame_time = totalTime() - sTotalTime; + return (F32)(U64_to_F64(frame_time) * USEC_TO_SEC_F64); +} + +// Glue code to avoid full class .h file #includes +F32 getCurrentFrameTime() +{ + return (F32)(LLFrameTimer::getCurrentFrameTime()); +} diff --git a/linden/indra/llcommon/llframetimer.h b/linden/indra/llcommon/llframetimer.h index bc0d79d..11c4cfc 100644 --- a/linden/indra/llcommon/llframetimer.h +++ b/linden/indra/llcommon/llframetimer.h @@ -74,6 +74,9 @@ public: static F32 getFrameDeltaTimeF32(); + // Return seconds since the current frame started + static F32 getCurrentFrameTime(); + // MANIPULATORS void start(); void stop(); @@ -144,4 +147,7 @@ protected: BOOL mStarted; }; +// Glue code for Havok (or anything else that doesn't want the full .h files) +extern F32 getCurrentFrameTime(); + #endif // LL_LLFRAMETIMER_H diff --git a/linden/indra/llcommon/lllslconstants.h b/linden/indra/llcommon/lllslconstants.h index ba39098..508fb42 100644 --- a/linden/indra/llcommon/lllslconstants.h +++ b/linden/indra/llcommon/lllslconstants.h @@ -70,6 +70,7 @@ const S32 LSL_PRIM_FLEXIBLE = 21; const S32 LSL_PRIM_TEXGEN = 22; const S32 LSL_PRIM_POINT_LIGHT = 23; const S32 LSL_PRIM_CAST_SHADOWS = 24; +const S32 LSL_PRIM_GLOW = 25; const S32 LSL_PRIM_TYPE_BOX = 0; const S32 LSL_PRIM_TYPE_CYLINDER= 1; diff --git a/linden/indra/llcommon/llmemory.h b/linden/indra/llcommon/llmemory.h index e1af7ba..c10661a 100644 --- a/linden/indra/llcommon/llmemory.h +++ b/linden/indra/llcommon/llmemory.h @@ -419,6 +419,31 @@ protected: // Foo* instance = FooSingleton::getInstance(); // // As currently written, it is not thread-safe. +#if LL_WINDOWS && _MSC_VER < 1400 // this is Visual C++ 2003 or earlier +// workaround for VC7 compiler bug +// adapted from http://www.codeproject.com/KB/tips/VC2003MeyersSingletonBug.aspx +// our version doesn't introduce a nested struct so that you can still declare LLSingleton +// a friend and hide your constructor + +template +class LLSingleton +{ +public: + static T* getInstance() + { + LLSingleton singleton; + return singleton.get(); + } +private: + T* get() + { + static T instance; + return &instance; + } + +}; +#else + template class LLSingleton { @@ -430,6 +455,8 @@ public: } }; +#endif + //---------------------------------------------------------------------------- // Return the resident set size of the current process, in bytes. diff --git a/linden/indra/llcommon/llpreprocessor.h b/linden/indra/llcommon/llpreprocessor.h index 8d38904..e99b103 100644 --- a/linden/indra/llcommon/llpreprocessor.h +++ b/linden/indra/llcommon/llpreprocessor.h @@ -79,9 +79,16 @@ #endif + // Deal with the differeneces on Windows #if LL_MSVC -#define snprintf safe_snprintf /* Flawfinder: ignore */ +namespace snprintf_hack +{ + int snprintf(char *str, size_t size, const char *format, ...); +} + +// #define snprintf safe_snprintf /* Flawfinder: ignore */ +using snprintf_hack::snprintf; #endif // LL_MSVC // Static linking with apr on windows needs to be declared. diff --git a/linden/indra/llcommon/llptrskiplist.h b/linden/indra/llcommon/llptrskiplist.h index df35d30..f1df27a 100644 --- a/linden/indra/llcommon/llptrskiplist.h +++ b/linden/indra/llcommon/llptrskiplist.h @@ -34,6 +34,7 @@ #include "llerror.h" //#include "vmath.h" +#include "llrand.h" ///////////////////////////////////////////// // diff --git a/linden/indra/llcommon/llskiplist.h b/linden/indra/llcommon/llskiplist.h index 78e6f0a..c88b310 100644 --- a/linden/indra/llcommon/llskiplist.h +++ b/linden/indra/llcommon/llskiplist.h @@ -32,6 +32,7 @@ #define LL_LLSKIPLIST_H #include "llrand.h" +#include "llrand.h" // NOTA BENE: Insert first needs to be < NOT <= // Binary depth must be >= 2 diff --git a/linden/indra/llcommon/llsmoothstep.h b/linden/indra/llcommon/llsmoothstep.h new file mode 100644 index 0000000..c2b3447 --- /dev/null +++ b/linden/indra/llcommon/llsmoothstep.h @@ -0,0 +1,50 @@ +/** + * @file llsmoothstep.h + * @brief Smoothstep - transition from 0 to 1 - function, first and second derivatives all continuous (smooth) + * + * $LicenseInfo:firstyear=2001&license=viewergpl$ + * + * Copyright (c) 2001-2008, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLSMOOTHSTEP_H +#define LL_LLSMOOTHSTEP_H + +template +inline LLDATATYPE llsmoothstep(const LLDATATYPE& edge0, const LLDATATYPE& edge1, const LLDATATYPE& value) +{ + if (value < edge0) + return (LLDATATYPE)0; + + if (value >= edge1) + return (LLDATATYPE)1; + + // Scale/bias into [0..1] range + LLDATATYPE scaled_value = (value - edge0) / (edge1 - edge0); + + return scaled_value * scaled_value * (3 - 2 * scaled_value); +} + +#endif // LL_LLSMOOTHSTEP_H diff --git a/linden/indra/llcommon/llstatenums.h b/linden/indra/llcommon/llstatenums.h index 6fa61e1..bde6ade 100644 --- a/linden/indra/llcommon/llstatenums.h +++ b/linden/indra/llcommon/llstatenums.h @@ -57,7 +57,13 @@ enum LL_SIM_STAT_VIRTUAL_SIZE_KB, LL_SIM_STAT_RESIDENT_SIZE_KB, LL_SIM_STAT_PENDING_LOCAL_UPLOADS, - LL_SIM_STAT_TOTAL_UNACKED_BYTES + LL_SIM_STAT_TOTAL_UNACKED_BYTES, + LL_SIM_STAT_PHYSICS_PINNED_TASKS, + LL_SIM_STAT_PHYSICS_LOD_TASKS, + LL_SIM_STAT_SIMPHYSICSSTEPMS, + LL_SIM_STAT_SIMPHYSICSSHAPEMS, + LL_SIM_STAT_SIMPHYSICSOTHERMS, + LL_SIM_STAT_SIMPHYSICSMEMORY }; #endif diff --git a/linden/indra/llcommon/llstl.h b/linden/indra/llcommon/llstl.h index 2719888..9a24185 100644 --- a/linden/indra/llcommon/llstl.h +++ b/linden/indra/llcommon/llstl.h @@ -33,6 +33,9 @@ #define LL_LLSTL_H #include +#include +#include +#include #include #include diff --git a/linden/indra/llcommon/llstreamtools.cpp b/linden/indra/llcommon/llstreamtools.cpp index 669bdd0..b95ee60 100644 --- a/linden/indra/llcommon/llstreamtools.cpp +++ b/linden/indra/llcommon/llstreamtools.cpp @@ -263,20 +263,14 @@ bool get_word(std::string& output_string, std::istream& input_stream, int n) // get everything up to and including the next newline bool get_line(std::string& output_string, std::istream& input_stream) { + output_string.clear(); char c = input_stream.get(); while (input_stream.good()) { - if ('\r' == c) - { - // skip carriage returns - } - else + output_string += c; + if ('\n' == c) { - output_string += c; - if ('\n' == c) - { - break; - } + break; } c = input_stream.get(); } @@ -288,27 +282,21 @@ bool get_line(std::string& output_string, std::istream& input_stream) // add a newline on the end if bail before actual line ending bool get_line(std::string& output_string, std::istream& input_stream, int n) { + output_string.clear(); int char_count = 0; char c = input_stream.get(); while (input_stream.good() && char_count < n) { char_count++; output_string += c; - if ('\r' == c) + if ('\n' == c) { - // skip carriage returns + break; } - else + if (char_count >= n) { - if ('\n' == c) - { - break; - } - if (char_count >= n) - { - output_string.append("\n"); - break; - } + output_string.append("\n"); + break; } c = input_stream.get(); } @@ -408,49 +396,6 @@ void replace_newlines_with_whitespace(std::string& line) } } -// returns 1 for solitary "{" -// returns -1 for solitary "}" -// otherwise returns 0 -int get_brace_count(const std::string& line) -{ - int index = 0; - int line_size = line.size(); - char c = 0; - while (index < line_size) - { - c = line[index]; - index++; - if (!isspace(c)) - { - break; - } - } - char brace = c; - // make sure the rest of the line is whitespace - while (index < line_size) - { - c = line[index]; - if (!isspace(c)) - { - break; - } - index++; - } - if ('\n' != c) - { - return 0; - } - if ('{' == brace) - { - return 1; - } - else if ('}' == brace) - { - return -1; - } - return 0; -} - // erases any double-quote characters in 'line' void remove_double_quotes(std::string& line) { @@ -498,7 +443,7 @@ void get_keyword_and_value(std::string& keyword, } // get the keyword - keyword.assign(""); + keyword.clear(); while (line_index < line_size) { c = line[line_index]; @@ -510,6 +455,8 @@ void get_keyword_and_value(std::string& keyword, line_index++; } + // get the value + value.clear(); if (keyword.size() > 0 && '\r' != line[line_index] && '\n' != line[line_index]) @@ -523,8 +470,6 @@ void get_keyword_and_value(std::string& keyword, line_index++; } - // get the value - value.assign(""); while (line_index < line_size) { c = line[line_index]; diff --git a/linden/indra/llcommon/llstreamtools.h b/linden/indra/llcommon/llstreamtools.h index 9db90c8..d84e53b 100644 --- a/linden/indra/llcommon/llstreamtools.h +++ b/linden/indra/llcommon/llstreamtools.h @@ -96,11 +96,6 @@ void escape_string(std::string& line); // replaces each '\n' character with ' ' void replace_newlines_with_whitespace(std::string& line); -// returns 1 for solitary "{" -// returns -1 for solitary "}" -// otherwise returns 0 -int get_brace_count(const std::string& line); - // erases any double-quote characters in line void remove_double_quotes(std::string& line); diff --git a/linden/indra/llcommon/llstring.cpp b/linden/indra/llcommon/llstring.cpp index 73c80e7..a1f19ad 100644 --- a/linden/indra/llcommon/llstring.cpp +++ b/linden/indra/llcommon/llstring.cpp @@ -804,16 +804,19 @@ std::string utf8str_removeCRLF(const std::string& utf8str) #if LL_WINDOWS // documentation moved to header. Phoenix 2007-11-27 -int safe_snprintf(char *str, size_t size, const char *format, ...) +namespace snprintf_hack { - va_list args; - va_start(args, format); - - int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */ - va_end(args); - - str[size-1] = '\0'; // always null terminate - return num_written; + int snprintf(char *str, size_t size, const char *format, ...) + { + va_list args; + va_start(args, format); + + int num_written = _vsnprintf(str, size, format, args); /* Flawfinder: ignore */ + va_end(args); + + str[size-1] = '\0'; // always null terminate + return num_written; + } } std::string ll_convert_wide_to_string(const wchar_t* in) diff --git a/linden/indra/llcommon/llversionserver.h b/linden/indra/llcommon/llversionserver.h index 05ac9b3..e865b6a 100644 --- a/linden/indra/llcommon/llversionserver.h +++ b/linden/indra/llcommon/llversionserver.h @@ -33,9 +33,9 @@ #define LL_LLVERSIONSERVER_H const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 19; -const S32 LL_VERSION_PATCH = 1; -const S32 LL_VERSION_BUILD = 3; +const S32 LL_VERSION_MINOR = 20; +const S32 LL_VERSION_PATCH = 0; +const S32 LL_VERSION_BUILD = 83892; const char * const LL_CHANNEL = "Second Life Server"; diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index f00657a..06f6a82 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h @@ -33,9 +33,9 @@ #define LL_LLVERSIONVIEWER_H const S32 LL_VERSION_MAJOR = 1; -const S32 LL_VERSION_MINOR = 19; -const S32 LL_VERSION_PATCH = 1; -const S32 LL_VERSION_BUILD = 4; +const S32 LL_VERSION_MINOR = 20; +const S32 LL_VERSION_PATCH = 2; +const S32 LL_VERSION_BUILD = 0; const char * const LL_CHANNEL = "Second Life Release"; diff --git a/linden/indra/llimage/llimage.cpp b/linden/indra/llimage/llimage.cpp index bcd9463..3600cce 100644 --- a/linden/indra/llimage/llimage.cpp +++ b/linden/indra/llimage/llimage.cpp @@ -43,6 +43,7 @@ #if JPEG_SUPPORT #include "llimagejpeg.h" #endif +#include "llimagepng.h" #include "llimagedxt.h" //--------------------------------------------------------------------------- @@ -490,8 +491,8 @@ void LLImageRaw::composite( LLImageRaw* src ) { LLImageRaw* dst = this; // Just for clarity. - llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); - llassert( (3 == dst->getComponents()) || (4 == dst->getComponents()) ); + llassert(3 == src->getComponents()); + llassert(3 == dst->getComponents()); if( 3 == dst->getComponents() ) { @@ -519,11 +520,6 @@ void LLImageRaw::composite( LLImageRaw* src ) } } } - else - { - // 4 == dst->mComponents - llassert(0); // not implemented yet. - } } // Src and dst can be any size. Src has 4 components. Dst has 3 components. @@ -689,7 +685,7 @@ void LLImageRaw::copyUnscaled(LLImageRaw* src) { LLImageRaw* dst = this; // Just for clarity. - llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); + llassert( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); llassert( src->getComponents() == dst->getComponents() ); llassert( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) ); @@ -772,7 +768,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src ) LLMemType mt1((LLMemType::EMemType)mMemType); LLImageRaw* dst = this; // Just for clarity. - llassert( (3 == src->getComponents()) || (4 == src->getComponents()) ); + llassert( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) ); llassert( src->getComponents() == dst->getComponents() ); if( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) ) @@ -803,7 +799,7 @@ void LLImageRaw::copyScaled( LLImageRaw* src ) void LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data ) { LLMemType mt1((LLMemType::EMemType)mMemType); - llassert( (3 == getComponents()) || (4 == getComponents()) ); + llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) ); S32 old_width = getWidth(); S32 old_height = getHeight(); @@ -1093,7 +1089,7 @@ void LLImageRaw::compositeRowScaled4onto3( U8* in, U8* out, S32 in_pixel_len, S3 static struct { const char* exten; - S8 codec; + EImageCodec codec; } file_extensions[] = { @@ -1128,7 +1124,7 @@ static LLString find_file(LLString &name, S8 *codec) return LLString(""); } -static S8 get_codec(const LLString& exten) +EImageCodec LLImageBase::getCodecFromExtension(const LLString& exten) { for (int i=0; i<(int)(NUM_FILE_EXTENSIONS); i++) { @@ -1151,7 +1147,7 @@ bool LLImageRaw::createFromFile(const LLString &filename, bool j2c_lowest_mip_on { exten = name.substr(dotidx+1); LLString::toLower(exten); - codec = get_codec(exten); + codec = getCodecFromExtension(exten); } else { @@ -1294,6 +1290,9 @@ LLImageFormatted* LLImageFormatted::createFromType(S8 codec) case IMG_CODEC_DXT: image = new LLImageDXT(); break; + case IMG_CODEC_PNG: + image = new LLImagePNG(); + break; default: image = NULL; break; @@ -1314,7 +1313,7 @@ LLImageFormatted* LLImageFormatted::createFromExtension(const LLString& instring { exten = instring; } - S8 codec = get_codec(exten); + S8 codec = getCodecFromExtension(exten); return createFromType(codec); } //---------------------------------------------------------------------------- diff --git a/linden/indra/llimage/llimage.h b/linden/indra/llimage/llimage.h index 199dc07..0393d13 100644 --- a/linden/indra/llimage/llimage.h +++ b/linden/indra/llimage/llimage.h @@ -60,7 +60,7 @@ class LLImageFormatted; class LLImageRaw; class LLColor4U; -enum +typedef enum e_image_codec { IMG_CODEC_INVALID = 0, IMG_CODEC_RGB = 1, @@ -71,7 +71,7 @@ enum IMG_CODEC_DXT = 6, IMG_CODEC_PNG = 7, IMG_CODEC_EOF = 8 -}; +} EImageCodec; //============================================================================ @@ -125,6 +125,8 @@ public: static void setSizeOverride(BOOL enabled) { sSizeOverride = enabled; } + static EImageCodec getCodecFromExtension(const LLString& exten); + private: U8 *mData; S32 mDataSize; diff --git a/linden/indra/llimagej2coj/llimagej2coj.cpp b/linden/indra/llimagej2coj/llimagej2coj.cpp index 3ca271c..01868fd 100644 --- a/linden/indra/llimagej2coj/llimagej2coj.cpp +++ b/linden/indra/llimagej2coj/llimagej2coj.cpp @@ -158,6 +158,18 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod return TRUE; // done } + // sometimes we get bad data out of the cache - check to see if the decode succeeded + for (S32 i = 0; i < image->numcomps; i++) + { + if (image->comps[i].factor != base.getRawDiscardLevel()) + { + // if we didn't get the discard level we're expecting, fail + opj_image_destroy(image); + base.mDecoding = FALSE; + return TRUE; + } + } + // Copy image data into our raw image format (instead of the separate channel format S32 img_components = image->numcomps; diff --git a/linden/indra/llinventory/lleconomy.cpp b/linden/indra/llinventory/lleconomy.cpp index 6ed0510..619c5f9 100644 --- a/linden/indra/llinventory/lleconomy.cpp +++ b/linden/indra/llinventory/lleconomy.cpp @@ -35,7 +35,6 @@ #include "message.h" #include "v3math.h" -LLGlobalEconomy *gGlobalEconomy = NULL; LLGlobalEconomy::LLGlobalEconomy() : mObjectCount( -1 ), @@ -55,35 +54,33 @@ LLGlobalEconomy::~LLGlobalEconomy() { } // static -void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, void** user_data) +void LLGlobalEconomy::processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data) { S32 i; F32 f; - LLGlobalEconomy *this_ptr = (LLGlobalEconomy*)user_data; - msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCapacity, i); - this_ptr->setObjectCapacity(i); + econ_data->setObjectCapacity(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_ObjectCount, i); - this_ptr->setObjectCount(i); + econ_data->setObjectCount(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceEnergyUnit, i); - this_ptr->setPriceEnergyUnit(i); + econ_data->setPriceEnergyUnit(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceObjectClaim, i); - this_ptr->setPriceObjectClaim(i); + econ_data->setPriceObjectClaim(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDecay, i); - this_ptr->setPricePublicObjectDecay(i); + econ_data->setPricePublicObjectDecay(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PricePublicObjectDelete, i); - this_ptr->setPricePublicObjectDelete(i); + econ_data->setPricePublicObjectDelete(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceUpload, i); - this_ptr->setPriceUpload(i); + econ_data->setPriceUpload(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceRentLight, i); - this_ptr->setPriceRentLight(i); + econ_data->setPriceRentLight(i); msg->getS32Fast(_PREHASH_Info, _PREHASH_TeleportMinPrice, i); - this_ptr->setTeleportMinPrice(i); + econ_data->setTeleportMinPrice(i); msg->getF32Fast(_PREHASH_Info, _PREHASH_TeleportPriceExponent, f); - this_ptr->setTeleportPriceExponent(f); + econ_data->setTeleportPriceExponent(f); msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceGroupCreate, i); - this_ptr->setPriceGroupCreate(i); + econ_data->setPriceGroupCreate(i); } S32 LLGlobalEconomy::calculateTeleportCost(F32 distance) const @@ -154,10 +151,10 @@ void LLRegionEconomy::processEconomyData(LLMessageSystem *msg, void** user_data) S32 i; F32 f; - LLGlobalEconomy::processEconomyData(msg, user_data); - LLRegionEconomy *this_ptr = (LLRegionEconomy*)user_data; + LLGlobalEconomy::processEconomyData(msg, this_ptr); + msg->getS32Fast(_PREHASH_Info, _PREHASH_PriceParcelClaim, i); this_ptr->setBasePriceParcelClaimDefault(i); msg->getF32(_PREHASH_Info, _PREHASH_PriceParcelClaimFactor, f); diff --git a/linden/indra/llinventory/lleconomy.h b/linden/indra/llinventory/lleconomy.h index c5caa42..dcc97b2 100644 --- a/linden/indra/llinventory/lleconomy.h +++ b/linden/indra/llinventory/lleconomy.h @@ -31,6 +31,8 @@ #ifndef LL_LLECONOMY_H #define LL_LLECONOMY_H +#include "llmemory.h" + class LLMessageSystem; class LLVector3; @@ -40,9 +42,14 @@ public: LLGlobalEconomy(); virtual ~LLGlobalEconomy(); + // This class defines its singleton internally as a typedef instead of inheriting from + // LLSingleton like most others because the LLRegionEconomy sub-class might also + // become a singleton and this pattern will more easily disambiguate them. + typedef LLSingleton Singleton; + virtual void print(); - static void processEconomyData(LLMessageSystem *msg, void **user_data); + static void processEconomyData(LLMessageSystem *msg, LLGlobalEconomy* econ_data); S32 calculateTeleportCost(F32 distance) const; S32 calculateLightRent(const LLVector3& object_size) const; @@ -136,6 +143,4 @@ private: }; -extern LLGlobalEconomy* gGlobalEconomy; - #endif diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 3afa2be..4c58789 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp @@ -940,6 +940,7 @@ LLSD LLInventoryItem::asLLSD() const } else { + // *TODO: get rid of this. Phoenix 2008-01-30 LLUUID shadow_id(mAssetUUID); LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); cipher.encrypt(shadow_id.mData, UUID_BYTES); diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h index 1623edf..b4199db 100644 --- a/linden/indra/llinventory/llinventory.h +++ b/linden/indra/llinventory/llinventory.h @@ -135,15 +135,40 @@ protected: S32 mCreationDate; // seconds from 1/1/1970, UTC public: + + /** + * Anonymous enumeration for specifying the inventory item flags. + */ enum { - // The meaning of LLInventoryItem::mFlags is distinct for each - // inventory type. + // The shared flags at the top are shared among all inventory + // types. After that section, all values of flags are type + // dependent. The shared flags will start at 2^30 and work + // down while item type specific flags will start at 2^0 and + // work up. II_FLAGS_NONE = 0, - // landmark flags + + // + // Shared flags + // + // + + // This value means that the asset has only one reference in + // the system. If the inventory item is deleted, or the asset + // id updated, then we can remove the old reference. + II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000, + + + // + // Landmark flags + // II_FLAGS_LANDMARK_VISITED = 1, + // + // Object flags + // + // flag to indicate that object permissions should have next // owner perm be more restrictive on rez. We bump this into // the second byte of the flags since the low byte is used to @@ -169,8 +194,11 @@ public: // of muiltiple items or not. II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000, + // // wearables use the low order byte of flags to store the // EWearableType enumeration found in newview/llwearable.h + // + II_FLAGS_WEARABLES_MASK = 0xff, }; protected: diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp index 5f8a000..1390f72 100644 --- a/linden/indra/llinventory/llparcel.cpp +++ b/linden/indra/llinventory/llparcel.cpp @@ -216,8 +216,8 @@ void LLParcel::init(const LLUUID &owner_id, mMediaID.setNull(); mMediaAutoScale = 0; mMediaLoop = TRUE; - mObscureMedia = 0; - mObscureMusic = 0; + mObscureMedia = 1; + mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; @@ -1856,8 +1856,8 @@ void LLParcel::clearParcel() setMediaDesc(NULL); setMediaAutoScale(0); setMediaLoop(TRUE); - mObscureMedia = 0; - mObscureMusic = 0; + mObscureMedia = 1; + mObscureMusic = 1; mMediaWidth = 0; mMediaHeight = 0; setMusicURL(NULL); diff --git a/linden/indra/llinventory/llparcelflags.h b/linden/indra/llinventory/llparcelflags.h index 1bf744b..62a6acf 100644 --- a/linden/indra/llinventory/llparcelflags.h +++ b/linden/indra/llinventory/llparcelflags.h @@ -81,7 +81,7 @@ const U32 PF_USE_RESTRICTED_ACCESS = PF_USE_ACCESS_GROUP | PF_DENY_ANONYMOUS | PF_DENY_AGEUNVERIFIED; const U32 PF_NONE = 0x00000000; -const U32 PF_ALL = 0x7FFFFFFF; +const U32 PF_ALL = 0xFFFFFFFF; const U32 PF_DEFAULT = PF_ALLOW_FLY | PF_ALLOW_OTHER_SCRIPTS | PF_ALLOW_GROUP_SCRIPTS diff --git a/linden/indra/llmath/files.lst b/linden/indra/llmath/files.lst index cfd635a..1001a6d 100644 --- a/linden/indra/llmath/files.lst +++ b/linden/indra/llmath/files.lst @@ -2,11 +2,13 @@ llmath/llbboxlocal.cpp llmath/llcamera.cpp llmath/llcoordframe.cpp llmath/llcrc.cpp +llmath/llline.cpp llmath/llmd5.cpp llmath/llperlin.cpp llmath/llquaternion.cpp llmath/llrand.cpp llmath/llrect.cpp +llmath/llsphere.cpp llmath/lluuid.cpp llmath/llvolume.cpp llmath/llvolumemgr.cpp diff --git a/linden/indra/llmath/llline.cpp b/linden/indra/llmath/llline.cpp new file mode 100644 index 0000000..9c41efb --- /dev/null +++ b/linden/indra/llmath/llline.cpp @@ -0,0 +1,189 @@ +/** + * @file llline.cpp + * @author Andrew Meadows + * @brief Simple line class that can compute nearest approach between two lines + * + * $LicenseInfo:firstyear=2001&license=internal$ + * + * Copyright (c) 2001-2008, Linden Research, Inc. + * + * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of + * this source code is governed by the Linden Lab Source Code Disclosure + * Agreement ("Agreement") previously entered between you and Linden + * Lab. By accessing, using, copying, modifying or distributing this + * software, you acknowledge that you have been informed of your + * obligations under the Agreement and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llline.h" +#include "llrand.h" + +const F32 SOME_SMALL_NUMBER = 1.0e-5f; +const F32 SOME_VERY_SMALL_NUMBER = 1.0e-8f; + +LLLine::LLLine() +: mPoint(0.f, 0.f, 0.f), + mDirection(1.f, 0.f, 0.f) +{ } + +LLLine::LLLine( const LLVector3& first_point, const LLVector3& second_point ) +{ + setPoints(first_point, second_point); +} + +void LLLine::setPoints( const LLVector3& first_point, const LLVector3& second_point ) +{ + mPoint = first_point; + mDirection = second_point - first_point; + mDirection.normalize(); +} + +void LLLine::setPointDirection( const LLVector3& first_point, const LLVector3& second_point ) +{ + setPoints(first_point, first_point + second_point); +} + +bool LLLine::intersects( const LLVector3& point, F32 radius ) const +{ + LLVector3 other_direction = point - mPoint; + LLVector3 nearest_point = mPoint + mDirection * (other_direction * mDirection); + F32 nearest_approach = (nearest_point - point).length(); + return (nearest_approach <= radius); +} + +// returns the point on this line that is closest to some_point +LLVector3 LLLine::nearestApproach( const LLVector3& some_point ) const +{ + return (mPoint + mDirection * ((some_point - mPoint) * mDirection)); +} + +// the accuracy of this method sucks when you give it two nearly +// parallel lines, so you should probably check for parallelism +// before you call this +// +// returns the point on this line that is closest to other_line +LLVector3 LLLine::nearestApproach( const LLLine& other_line ) const +{ + LLVector3 between_points = other_line.mPoint - mPoint; + F32 dir_dot_dir = mDirection * other_line.mDirection; + F32 one_minus_dir_dot_dir = 1.0f - fabs(dir_dot_dir); + if ( one_minus_dir_dot_dir < SOME_VERY_SMALL_NUMBER ) + { +#ifdef LL_DEBUG + llwarns << "LLLine::nearestApproach() was given two very " + << "nearly parallel lines dir1 = " << mDirection + << " dir2 = " << other_line.mDirection << " with 1-dot_product = " + << one_minus_dir_dot_dir << llendl; +#endif + // the lines are approximately parallel + // We shouldn't fall in here because this check should have been made + // BEFORE this function was called. We dare not continue with the + // computations for fear of division by zero, but we have to return + // something so we return a bogus point -- caller beware. + return 0.5f * (mPoint + other_line.mPoint); + } + + F32 odir_dot_bp = other_line.mDirection * between_points; + + F32 numerator = 0; + F32 denominator = 0; + for (S32 i=0; i<3; i++) + { + F32 factor = dir_dot_dir * other_line.mDirection.mV[i] - mDirection.mV[i]; + numerator += ( between_points.mV[i] - odir_dot_bp * other_line.mDirection.mV[i] ) * factor; + denominator -= factor * factor; + } + + F32 length_to_nearest_approach = numerator / denominator; + + return mPoint + length_to_nearest_approach * mDirection; +} + +std::ostream& operator<<( std::ostream& output_stream, const LLLine& line ) +{ + output_stream << "{point=" << line.mPoint << "," << "dir=" << line.mDirection << "}"; + return output_stream; +} + + +F32 ALMOST_PARALLEL = 0.99f; +F32 TOO_SMALL_FOR_DIVISION = 0.0001f; + +// returns 'true' if this line intersects the plane +// on success stores the intersection point in 'result' +bool LLLine::intersectsPlane( LLVector3& result, const LLLine& plane ) const +{ + // p = P + l * d equation for a line + // + // N * p = D equation for a point + // + // N * (P + l * d) = D + // N*P + l * (N*d) = D + // l * (N*d) = D - N*P + // l = ( D - N*P ) / ( N*d ) + // + + F32 dot = plane.mDirection * mDirection; + if (fabs(dot) < TOO_SMALL_FOR_DIVISION) + { + return false; + } + + F32 plane_dot = plane.mDirection * plane.mPoint; + F32 length = ( plane_dot - (plane.mDirection * mPoint) ) / dot; + result = mPoint + length * mDirection; + return true; +} + +//static +// returns 'true' if planes intersect, and stores the result +// the second and third arguments are treated as planes +// where mPoint is on the plane and mDirection is the normal +// result.mPoint will be the intersection line's closest approach +// to first_plane.mPoint +bool LLLine::getIntersectionBetweenTwoPlanes( LLLine& result, const LLLine& first_plane, const LLLine& second_plane ) +{ + // TODO -- if we ever get some generic matrix solving code in our libs + // then we should just use that, since this problem is really just + // linear algebra. + + F32 dot = fabs(first_plane.mDirection * second_plane.mDirection); + if (dot > ALMOST_PARALLEL) + { + // the planes are nearly parallel + return false; + } + + LLVector3 direction = first_plane.mDirection % second_plane.mDirection; + direction.normalize(); + + LLVector3 first_intersection; + { + LLLine intersection_line(first_plane); + intersection_line.mDirection = direction % first_plane.mDirection; + intersection_line.mDirection.normalize(); + intersection_line.intersectsPlane(first_intersection, second_plane); + } + + /* + LLVector3 second_intersection; + { + LLLine intersection_line(second_plane); + intersection_line.mDirection = direction % second_plane.mDirection; + intersection_line.mDirection.normalize(); + intersection_line.intersectsPlane(second_intersection, first_plane); + } + */ + + result.mPoint = first_intersection; + result.mDirection = direction; + + return true; +} + + diff --git a/linden/indra/llmath/llline.h b/linden/indra/llmath/llline.h new file mode 100644 index 0000000..ca454c5 --- /dev/null +++ b/linden/indra/llmath/llline.h @@ -0,0 +1,75 @@ +// llline.h +/** + * @file llline.cpp + * @author Andrew Meadows + * @brief Simple line for computing nearest approach between two infinite lines + * + * $LicenseInfo:firstyear=2006&license=internal$ + * + * Copyright (c) 2006-2008, Linden Research, Inc. + * + * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of + * this source code is governed by the Linden Lab Source Code Disclosure + * Agreement ("Agreement") previously entered between you and Linden + * Lab. By accessing, using, copying, modifying or distributing this + * software, you acknowledge that you have been informed of your + * obligations under the Agreement and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LINE_H +#define LL_LINE_H + +#include +#include "stdtypes.h" +#include "v3math.h" + +const F32 DEFAULT_INTERSECTION_ERROR = 0.000001f; + +class LLLine +{ +public: + LLLine(); + LLLine( const LLVector3& first_point, const LLVector3& second_point ); + virtual ~LLLine() {}; + + void setPointDirection( const LLVector3& first_point, const LLVector3& second_point ); + void setPoints( const LLVector3& first_point, const LLVector3& second_point ); + + bool intersects( const LLVector3& point, F32 radius = DEFAULT_INTERSECTION_ERROR ) const; + + // returns the point on this line that is closest to some_point + LLVector3 nearestApproach( const LLVector3& some_point ) const; + + // returns the point on this line that is closest to other_line + LLVector3 nearestApproach( const LLLine& other_line ) const; + + friend std::ostream& operator<<( std::ostream& output_stream, const LLLine& line ); + + // returns 'true' if this line intersects the plane + // on success stores the intersection point in 'result' + bool intersectsPlane( LLVector3& result, const LLLine& plane ) const; + + // returns 'true' if planes intersect, and stores the result + // the second and third arguments are treated as planes + // where mPoint is on the plane and mDirection is the normal + // result.mPoint will be the intersection line's closest approach + // to first_plane.mPoint + static bool getIntersectionBetweenTwoPlanes( LLLine& result, const LLLine& first_plane, const LLLine& second_plane ); + + const LLVector3& getPoint() const { return mPoint; } + const LLVector3& getDirection() const { return mDirection; } + +protected: + // these are protected because some code assumes that the normal is + // always correct and properly normalized. + LLVector3 mPoint; + LLVector3 mDirection; +}; + + +#endif diff --git a/linden/indra/llmath/llmath.h b/linden/indra/llmath/llmath.h index d3c0d86..4a6358d 100644 --- a/linden/indra/llmath/llmath.h +++ b/linden/indra/llmath/llmath.h @@ -32,8 +32,14 @@ #ifndef LLMATH_H #define LLMATH_H +#include +//#include +//#include +#include "lldefs.h" + // work around for Windows & older gcc non-standard function names. #if LL_WINDOWS +#include #define llisnan(val) _isnan(val) #define llfinite(val) _finite(val) #elif (LL_LINUX && __GNUC__ <= 2) @@ -99,6 +105,12 @@ inline BOOL is_approx_equal(F32 x, F32 y) return (abs((S32) ((U32&)x - (U32&)y) ) < COMPARE_MANTISSA_UP_TO_BIT); } +inline BOOL is_approx_equal(F64 x, F64 y) +{ + const S64 COMPARE_MANTISSA_UP_TO_BIT = 0x02; + return (abs((S32) ((U64&)x - (U64&)y) ) < COMPARE_MANTISSA_UP_TO_BIT); +} + inline BOOL is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits) { BOOL ret = TRUE; @@ -120,6 +132,27 @@ inline BOOL is_approx_equal_fraction(F32 x, F32 y, U32 frac_bits) return ret; } +inline BOOL is_approx_equal_fraction(F64 x, F64 y, U32 frac_bits) +{ + BOOL ret = TRUE; + F64 diff = (F64) fabs(x - y); + + S32 diffInt = (S32) diff; + S32 diffFracTolerance = (S32) ((diff - (F64) diffInt) * (1 << frac_bits)); + + // if integer portion is not equal, not enough bits were used for packing + // so error out since either the use case is not correct OR there is + // an issue with pack/unpack. should fail in either case. + // for decimal portion, make sure that the delta is no more than 1 + // based on the number of bits used for packing decimal portion. + if (diffInt != 0 || diffFracTolerance > 1) + { + ret = FALSE; + } + + return ret; +} + inline S32 llabs(const S32 a) { return S32(labs(a)); diff --git a/linden/indra/llmath/llmath.vcproj b/linden/indra/llmath/llmath.vcproj index 79e472a..d05505e 100644 --- a/linden/indra/llmath/llmath.vcproj +++ b/linden/indra/llmath/llmath.vcproj @@ -164,6 +164,9 @@ RelativePath=".\llcrc.cpp"> + + + + + + + + PI/2 // since quat and -quat are the same rotation we invert one of // p or q to reduce unecessary spins - // A equivalent way to do it is to convert acos(c) as if it had been negative, - // and to negate stp + // A equivalent way to do it is to convert acos(c) as if it had + // been negative, and to negate stp angle = (F32) acos(-c); stp = -(F32) sin(angle * (1.f - t)); stq = (F32) sin(angle * t); @@ -742,20 +840,6 @@ LLQuaternion::Order StringToOrder( const char *str ) return LLQuaternion::XYZ; } -const LLQuaternion& LLQuaternion::setQuat(const LLMatrix3 &mat) -{ - *this = mat.quaternion(); - normQuat(); - return (*this); -} - -const LLQuaternion& LLQuaternion::setQuat(const LLMatrix4 &mat) -{ - *this = mat.quaternion(); - normQuat(); - return (*this); -} - void LLQuaternion::getAngleAxis(F32* angle, LLVector3 &vec) const { F32 cos_a = mQ[VW]; @@ -769,10 +853,28 @@ void LLQuaternion::getAngleAxis(F32* angle, LLVector3 &vec) const else sin_a = 1.f/sin_a; - *angle = 2.0f * (F32) acos( cos_a ); - vec.mV[VX] = mQ[VX] * sin_a; - vec.mV[VY] = mQ[VY] * sin_a; - vec.mV[VZ] = mQ[VZ] * sin_a; + F32 temp_angle = 2.0f * (F32) acos( cos_a ); + if (temp_angle > F_PI) + { + // The (angle,axis) pair should never have angles outside [PI, -PI] + // since we want the _shortest_ (angle,axis) solution. + // Since acos is defined for [0, PI], and we multiply by 2.0, we + // can push the angle outside the acceptible range. + // When this happens we set the angle to the other portion of a + // full 2PI rotation, and negate the axis, which reverses the + // direction of the rotation (by the right-hand rule). + *angle = 2.f * F_PI - temp_angle; + vec.mV[VX] = - mQ[VX] * sin_a; + vec.mV[VY] = - mQ[VY] * sin_a; + vec.mV[VZ] = - mQ[VZ] * sin_a; + } + else + { + *angle = temp_angle; + vec.mV[VX] = mQ[VX] * sin_a; + vec.mV[VY] = mQ[VY] * sin_a; + vec.mV[VZ] = mQ[VZ] * sin_a; + } } @@ -846,7 +948,7 @@ BOOL LLQuaternion::parseQuat(const char* buf, LLQuaternion* value) S32 count = sscanf( buf, "%f %f %f %f", quat.mQ + 0, quat.mQ + 1, quat.mQ + 2, quat.mQ + 3 ); if( 4 == count ) { - value->setQuat( quat ); + value->set( quat ); return TRUE; } diff --git a/linden/indra/llmath/llquaternion.h b/linden/indra/llmath/llquaternion.h index 6805437..048db2d 100644 --- a/linden/indra/llmath/llquaternion.h +++ b/linden/indra/llmath/llquaternion.h @@ -57,10 +57,10 @@ public: LLQuaternion(); // Initializes Quaternion to (0,0,0,1) explicit LLQuaternion(const LLMatrix4 &mat); // Initializes Quaternion from Matrix4 explicit LLQuaternion(const LLMatrix3 &mat); // Initializes Quaternion from Matrix3 - LLQuaternion(F32 x, F32 y, F32 z, F32 w); // Initializes Quaternion to normQuat(x, y, z, w) + LLQuaternion(F32 x, F32 y, F32 z, F32 w); // Initializes Quaternion to normalize(x, y, z, w) LLQuaternion(F32 angle, const LLVector4 &vec); // Initializes Quaternion to axis_angle2quat(angle, vec) LLQuaternion(F32 angle, const LLVector3 &vec); // Initializes Quaternion to axis_angle2quat(angle, vec) - LLQuaternion(const F32 *q); // Initializes Quaternion to normQuat(x, y, z, w) + LLQuaternion(const F32 *q); // Initializes Quaternion to normalize(x, y, z, w) LLQuaternion(const LLVector3 &x_axis, const LLVector3 &y_axis, const LLVector3 &z_axis); // Initializes Quaternion from Matrix3 = [x_axis ; y_axis ; z_axis] @@ -71,15 +71,27 @@ public: void quantize16(F32 lower, F32 upper); // changes the vector to reflect quatization void quantize8(F32 lower, F32 upper); // changes the vector to reflect quatization void loadIdentity(); // Loads the quaternion that represents the identity rotation - const LLQuaternion& setQuatInit(F32 x, F32 y, F32 z, F32 w); // Sets Quaternion to normQuat(x, y, z, w) - const LLQuaternion& setQuat(const LLQuaternion &quat); // Copies Quaternion - const LLQuaternion& setQuat(const F32 *q); // Sets Quaternion to normQuat(quat[VX], quat[VY], quat[VZ], quat[VW]) - const LLQuaternion& setQuat(const LLMatrix3 &mat); // Sets Quaternion to mat2quat(mat) - const LLQuaternion& setQuat(const LLMatrix4 &mat); // Sets Quaternion to mat2quat(mat) - const LLQuaternion& setQuat(F32 angle, F32 x, F32 y, F32 z); // Sets Quaternion to axis_angle2quat(angle, x, y, z) - const LLQuaternion& setQuat(F32 angle, const LLVector3 &vec); // Sets Quaternion to axis_angle2quat(angle, vec) - const LLQuaternion& setQuat(F32 angle, const LLVector4 &vec); // Sets Quaternion to axis_angle2quat(angle, vec) - const LLQuaternion& setQuat(F32 roll, F32 pitch, F32 yaw); // Sets Quaternion to euler2quat(pitch, yaw, roll) + + const LLQuaternion& set(F32 x, F32 y, F32 z, F32 w); // Sets Quaternion to normalize(x, y, z, w) + const LLQuaternion& set(const LLQuaternion &quat); // Copies Quaternion + const LLQuaternion& set(const F32 *q); // Sets Quaternion to normalize(quat[VX], quat[VY], quat[VZ], quat[VW]) + const LLQuaternion& set(const LLMatrix3 &mat); // Sets Quaternion to mat2quat(mat) + const LLQuaternion& set(const LLMatrix4 &mat); // Sets Quaternion to mat2quat(mat) + + const LLQuaternion& setAngleAxis(F32 angle, F32 x, F32 y, F32 z); // Sets Quaternion to axis_angle2quat(angle, x, y, z) + const LLQuaternion& setAngleAxis(F32 angle, const LLVector3 &vec); // Sets Quaternion to axis_angle2quat(angle, vec) + const LLQuaternion& setAngleAxis(F32 angle, const LLVector4 &vec); // Sets Quaternion to axis_angle2quat(angle, vec) + const LLQuaternion& setEulerAngles(F32 roll, F32 pitch, F32 yaw); // Sets Quaternion to euler2quat(pitch, yaw, roll) + + const LLQuaternion& setQuatInit(F32 x, F32 y, F32 z, F32 w); // deprecated + const LLQuaternion& setQuat(const LLQuaternion &quat); // deprecated + const LLQuaternion& setQuat(const F32 *q); // deprecated + const LLQuaternion& setQuat(const LLMatrix3 &mat); // deprecated + const LLQuaternion& setQuat(const LLMatrix4 &mat); // deprecated + const LLQuaternion& setQuat(F32 angle, F32 x, F32 y, F32 z); // deprecated + const LLQuaternion& setQuat(F32 angle, const LLVector3 &vec); // deprecated + const LLQuaternion& setQuat(F32 angle, const LLVector4 &vec); // deprecated + const LLQuaternion& setQuat(F32 roll, F32 pitch, F32 yaw); // deprecated LLMatrix4 getMatrix4(void) const; // Returns the Matrix4 equivalent of Quaternion LLMatrix3 getMatrix3(void) const; // Returns the Matrix3 equivalent of Quaternion @@ -87,11 +99,16 @@ public: void getAngleAxis(F32* angle, LLVector3 &vec) const; void getEulerAngles(F32 *roll, F32* pitch, F32 *yaw) const; - F32 normQuat(); // Normalizes Quaternion and returns magnitude - const LLQuaternion& conjQuat(void); // Conjugates Quaternion and returns result + F32 normalize(); // Normalizes Quaternion and returns magnitude + F32 normQuat(); // deprecated + + const LLQuaternion& conjugate(void); // Conjugates Quaternion and returns result + const LLQuaternion& conjQuat(void); // deprecated // Other useful methods - const LLQuaternion& transQuat(); // Transpose + const LLQuaternion& transpose(); // transpose (same as conjugate) + const LLQuaternion& transQuat(); // deprecated + void shortestArc(const LLVector3 &a, const LLVector3 &b); // shortest rotation from a to b const LLQuaternion& constrain(F32 radians); // constrains rotation to a cone angle specified in radians @@ -189,7 +206,7 @@ inline LLQuaternion::LLQuaternion(F32 x, F32 y, F32 z, F32 w) mQ[VS] = w; //RN: don't normalize this case as its used mainly for temporaries during calculations - //normQuat(); + //normalize(); /* F32 mag = sqrtf(mQ[VX]*mQ[VX] + mQ[VY]*mQ[VY] + mQ[VZ]*mQ[VZ] + mQ[VS]*mQ[VS]); mag -= 1.f; @@ -205,7 +222,7 @@ inline LLQuaternion::LLQuaternion(const F32 *q) mQ[VZ] = q[VZ]; mQ[VS] = q[VW]; - normQuat(); + normalize(); /* F32 mag = sqrtf(mQ[VX]*mQ[VX] + mQ[VY]*mQ[VY] + mQ[VZ]*mQ[VZ] + mQ[VS]*mQ[VS]); mag -= 1.f; @@ -224,33 +241,67 @@ inline void LLQuaternion::loadIdentity() } +inline const LLQuaternion& LLQuaternion::set(F32 x, F32 y, F32 z, F32 w) +{ + mQ[VX] = x; + mQ[VY] = y; + mQ[VZ] = z; + mQ[VS] = w; + normalize(); + return (*this); +} + +inline const LLQuaternion& LLQuaternion::set(const LLQuaternion &quat) +{ + mQ[VX] = quat.mQ[VX]; + mQ[VY] = quat.mQ[VY]; + mQ[VZ] = quat.mQ[VZ]; + mQ[VW] = quat.mQ[VW]; + normalize(); + return (*this); +} + +inline const LLQuaternion& LLQuaternion::set(const F32 *q) +{ + mQ[VX] = q[VX]; + mQ[VY] = q[VY]; + mQ[VZ] = q[VZ]; + mQ[VS] = q[VW]; + normalize(); + return (*this); +} + + +// deprecated inline const LLQuaternion& LLQuaternion::setQuatInit(F32 x, F32 y, F32 z, F32 w) { mQ[VX] = x; mQ[VY] = y; mQ[VZ] = z; mQ[VS] = w; - normQuat(); + normalize(); return (*this); } +// deprecated inline const LLQuaternion& LLQuaternion::setQuat(const LLQuaternion &quat) { mQ[VX] = quat.mQ[VX]; mQ[VY] = quat.mQ[VY]; mQ[VZ] = quat.mQ[VZ]; mQ[VW] = quat.mQ[VW]; - normQuat(); + normalize(); return (*this); } +// deprecated inline const LLQuaternion& LLQuaternion::setQuat(const F32 *q) { mQ[VX] = q[VX]; mQ[VY] = q[VY]; mQ[VZ] = q[VZ]; mQ[VS] = q[VW]; - normQuat(); + normalize(); return (*this); } @@ -270,10 +321,36 @@ inline void LLQuaternion::getAngleAxis(F32* angle, F32* x, F32* y, F32* z) const else sin_a = 1.f/sin_a; - *angle = 2.0f * (F32) acos( cos_a ); - *x = mQ[VX] * sin_a; - *y = mQ[VY] * sin_a; - *z = mQ[VZ] * sin_a; + F32 temp_angle = 2.0f * (F32) acos( cos_a ); + if (temp_angle > F_PI) + { + // The (angle,axis) pair should never have angles outside [PI, -PI] + // since we want the _shortest_ (angle,axis) solution. + // Since acos is defined for [0, PI], and we multiply by 2.0, we + // can push the angle outside the acceptible range. + // When this happens we set the angle to the other portion of a + // full 2PI rotation, and negate the axis, which reverses the + // direction of the rotation (by the right-hand rule). + *angle = 2.f * F_PI - temp_angle; + *x = - mQ[VX] * sin_a; + *y = - mQ[VY] * sin_a; + *z = - mQ[VZ] * sin_a; + } + else + { + *angle = temp_angle; + *x = mQ[VX] * sin_a; + *y = mQ[VY] * sin_a; + *z = mQ[VZ] * sin_a; + } +} + +inline const LLQuaternion& LLQuaternion::conjugate() +{ + mQ[VX] *= -1.f; + mQ[VY] *= -1.f; + mQ[VZ] *= -1.f; + return (*this); } inline const LLQuaternion& LLQuaternion::conjQuat() @@ -285,12 +362,21 @@ inline const LLQuaternion& LLQuaternion::conjQuat() } // Transpose +inline const LLQuaternion& LLQuaternion::transpose() +{ + mQ[VX] *= -1.f; + mQ[VY] *= -1.f; + mQ[VZ] *= -1.f; + return (*this); +} + +// deprecated inline const LLQuaternion& LLQuaternion::transQuat() { - mQ[VX] = -mQ[VX]; - mQ[VY] = -mQ[VY]; - mQ[VZ] = -mQ[VZ]; - return *this; + mQ[VX] *= -1.f; + mQ[VY] *= -1.f; + mQ[VZ] *= -1.f; + return (*this); } @@ -382,6 +468,30 @@ inline const LLQuaternion& operator*=(LLQuaternion &a, const LLQuaternion &b) return a; } +inline F32 LLQuaternion::normalize() +{ + F32 mag = sqrtf(mQ[VX]*mQ[VX] + mQ[VY]*mQ[VY] + mQ[VZ]*mQ[VZ] + mQ[VS]*mQ[VS]); + + if (mag > FP_MAG_THRESHOLD) + { + F32 oomag = 1.f/mag; + mQ[VX] *= oomag; + mQ[VY] *= oomag; + mQ[VZ] *= oomag; + mQ[VS] *= oomag; + } + else + { + mQ[VX] = 0.f; + mQ[VY] = 0.f; + mQ[VZ] = 0.f; + mQ[VS] = 1.f; + } + + return mag; +} + +// deprecated inline F32 LLQuaternion::normQuat() { F32 mag = sqrtf(mQ[VX]*mQ[VX] + mQ[VY]*mQ[VY] + mQ[VZ]*mQ[VZ] + mQ[VS]*mQ[VS]); diff --git a/linden/indra/llmath/llrect.h b/linden/indra/llmath/llrect.h index 9aadf9f..f2a5d75 100644 --- a/linden/indra/llmath/llrect.h +++ b/linden/indra/llmath/llrect.h @@ -227,6 +227,11 @@ public: return mLeft == mRight || mBottom == mTop; } + bool notNull() const + { + return !isNull(); + } + LLRectBase& unionWith(const LLRectBase &other) { mLeft = llmin(mLeft, other.mLeft); diff --git a/linden/indra/llmath/llsphere.cpp b/linden/indra/llmath/llsphere.cpp new file mode 100644 index 0000000..62f6e27 --- /dev/null +++ b/linden/indra/llmath/llsphere.cpp @@ -0,0 +1,364 @@ +/** + * @file llsphere.cpp + * @author Andrew Meadows + * @brief Simple line class that can compute nearest approach between two lines + * + * $LicenseInfo:firstyear=2006&license=internal$ + * + * Copyright (c) 2006-2008, Linden Research, Inc. + * + * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of + * this source code is governed by the Linden Lab Source Code Disclosure + * Agreement ("Agreement") previously entered between you and Linden + * Lab. By accessing, using, copying, modifying or distributing this + * software, you acknowledge that you have been informed of your + * obligations under the Agreement and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llsphere.h" + +LLSphere::LLSphere() +: mCenter(0.f, 0.f, 0.f), + mRadius(0.f) +{ } + +LLSphere::LLSphere( const LLVector3& center, F32 radius) +{ + set(center, radius); +} + +void LLSphere::set( const LLVector3& center, F32 radius ) +{ + mCenter = center; + setRadius(radius); +} + +void LLSphere::setCenter( const LLVector3& center) +{ + mCenter = center; +} + +void LLSphere::setRadius( F32 radius) +{ + if (radius < 0.f) + { + radius = -radius; + } + mRadius = radius; +} + +const LLVector3& LLSphere::getCenter() const +{ + return mCenter; +} + +F32 LLSphere::getRadius() const +{ + return mRadius; +} + +// returns 'TRUE' if this sphere completely contains other_sphere +BOOL LLSphere::contains(const LLSphere& other_sphere) const +{ + F32 separation = (mCenter - other_sphere.mCenter).length(); + return (mRadius >= separation + other_sphere.mRadius) ? TRUE : FALSE; +} + +// returns 'TRUE' if this sphere completely contains other_sphere +BOOL LLSphere::overlaps(const LLSphere& other_sphere) const +{ + F32 separation = (mCenter - other_sphere.mCenter).length(); + return (separation <= mRadius + other_sphere.mRadius) ? TRUE : FALSE; +} + +// returns overlap +// negative overlap is closest approach +F32 LLSphere::getOverlap(const LLSphere& other_sphere) const +{ + // separation is distance from other_sphere's edge and this center + return (mCenter - other_sphere.mCenter).length() - mRadius - other_sphere.mRadius; +} + +bool LLSphere::operator==(const LLSphere& rhs) const +{ + // TODO? -- use approximate equality for centers? + return (mRadius == rhs.mRadius + && mCenter == rhs.mCenter); +} + +std::ostream& operator<<( std::ostream& output_stream, const LLSphere& sphere) +{ + output_stream << "{center=" << sphere.mCenter << "," << "radius=" << sphere.mRadius << "}"; + return output_stream; +} + +// static +// removes any spheres that are contained in others +void LLSphere::collapse(std::vector& sphere_list) +{ + std::vector::iterator first_itr = sphere_list.begin(); + while (first_itr != sphere_list.end()) + { + bool delete_from_front = false; + + std::vector::iterator second_itr = first_itr; + ++second_itr; + while (second_itr != sphere_list.end()) + { + if (second_itr->contains(*first_itr)) + { + delete_from_front = true; + break; + } + else if (first_itr->contains(*second_itr)) + { + sphere_list.erase(second_itr++); + } + else + { + ++second_itr; + } + } + + if (delete_from_front) + { + sphere_list.erase(first_itr++); + } + else + { + ++first_itr; + } + } +} + +// static +// returns the bounding sphere that contains both spheres +LLSphere LLSphere::getBoundingSphere(const LLSphere& first_sphere, const LLSphere& second_sphere) +{ + LLVector3 direction = second_sphere.mCenter - first_sphere.mCenter; + + // HACK -- it is possible to get enough floating point error in the + // other getBoundingSphere() method that we have to add some slop + // at the end. Unfortunately, this breaks the link-order invarience + // for the linkability tests... unless we also apply the same slop + // here. + F32 half_milimeter = 0.0005f; + + F32 distance = direction.length(); + if (0.f == distance) + { + direction.setVec(1.f, 0.f, 0.f); + } + else + { + direction.normVec(); + } + // the 'edge' is measured from the first_sphere's center + F32 max_edge = 0.f; + F32 min_edge = 0.f; + + max_edge = llmax(max_edge + first_sphere.getRadius(), max_edge + distance + second_sphere.getRadius() + half_milimeter); + min_edge = llmin(min_edge - first_sphere.getRadius(), min_edge + distance - second_sphere.getRadius() - half_milimeter); + F32 radius = 0.5f * (max_edge - min_edge); + LLVector3 center = first_sphere.mCenter + (0.5f * (max_edge + min_edge)) * direction; + return LLSphere(center, radius); +} + +// static +// returns the bounding sphere that contains an arbitrary set of spheres +LLSphere LLSphere::getBoundingSphere(const std::vector& sphere_list) +{ + // this algorithm can get relatively inaccurate when the sphere + // collection is 'small' (contained within a bounding sphere of about + // 2 meters or less) + // TODO -- improve the accuracy for small collections of spheres + + LLSphere bounding_sphere( LLVector3(0.f, 0.f, 0.f), 0.f ); + S32 sphere_count = sphere_list.size(); + if (1 == sphere_count) + { + // trivial case -- single sphere + std::vector::const_iterator sphere_itr = sphere_list.begin(); + bounding_sphere = *sphere_itr; + } + else if (2 == sphere_count) + { + // trivial case -- two spheres + std::vector::const_iterator first_sphere = sphere_list.begin(); + std::vector::const_iterator second_sphere = first_sphere; + ++second_sphere; + bounding_sphere = LLSphere::getBoundingSphere(*first_sphere, *second_sphere); + } + else if (sphere_count > 0) + { + // non-trivial case -- we will approximate the solution + // + // NOTE -- there is a fancy/fast way to do this for large + // numbers of arbirary N-dimensional spheres -- you can look it + // up on the net. We're dealing with 3D spheres at collection + // sizes of 256 spheres or smaller, so we just use this + // brute force method. + + // TODO -- perhaps would be worthwile to test for the solution where + // the largest spanning radius just happens to work. That is, where + // there are really two spheres that determine the bounding sphere, + // and all others are contained therein. + + // compute the AABB + std::vector::const_iterator first_itr = sphere_list.begin(); + LLVector3 max_corner = first_itr->getCenter() + first_itr->getRadius() * LLVector3(1.f, 1.f, 1.f); + LLVector3 min_corner = first_itr->getCenter() - first_itr->getRadius() * LLVector3(1.f, 1.f, 1.f); + { + std::vector::const_iterator sphere_itr = sphere_list.begin(); + for (++sphere_itr; sphere_itr != sphere_list.end(); ++sphere_itr) + { + LLVector3 center = sphere_itr->getCenter(); + F32 radius = sphere_itr->getRadius(); + for (S32 i=0; i<3; ++i) + { + if (center.mV[i] + radius > max_corner.mV[i]) + { + max_corner.mV[i] = center.mV[i] + radius; + } + if (center.mV[i] - radius < min_corner.mV[i]) + { + min_corner.mV[i] = center.mV[i] - radius; + } + } + } + } + + // get the starting center and radius from the AABB + LLVector3 diagonal = max_corner - min_corner; + F32 bounding_radius = 0.5f * diagonal.length(); + LLVector3 bounding_center = 0.5f * (max_corner + min_corner); + + // compute the starting step-size + F32 minimum_radius = 0.5f * llmin(diagonal.mV[VX], llmin(diagonal.mV[VY], diagonal.mV[VZ])); + F32 step_length = bounding_radius - minimum_radius; + S32 step_count = 0; + S32 max_step_count = 12; + F32 half_milimeter = 0.0005f; + + // wander the center around in search of tighter solutions + S32 last_dx = 2; // 2 is out of bounds --> no match + S32 last_dy = 2; + S32 last_dz = 2; + + while (step_length > half_milimeter + && step_count < max_step_count) + { + // the algorithm for testing the maximum radius could be expensive enough + // that it makes sense to NOT duplicate testing when possible, so we keep + // track of where we last tested, and only test the new points + + S32 best_dx = 0; + S32 best_dy = 0; + S32 best_dz = 0; + + // sample near the center of the box + bool found_better_center = false; + for (S32 dx = -1; dx < 2; ++dx) + { + for (S32 dy = -1; dy < 2; ++dy) + { + for (S32 dz = -1; dz < 2; ++dz) + { + if (dx == 0 && dy == 0 && dz == 0) + { + continue; + } + + // count the number of indecies that match the last_*'s + S32 match_count = 0; + if (last_dx == dx) ++match_count; + if (last_dy == dy) ++match_count; + if (last_dz == dz) ++match_count; + if (match_count == 2) + { + // we've already tested this point + continue; + } + + LLVector3 center = bounding_center; + center.mV[VX] += (F32) dx * step_length; + center.mV[VY] += (F32) dy * step_length; + center.mV[VZ] += (F32) dz * step_length; + + // compute the radius of the bounding sphere + F32 max_radius = 0.f; + std::vector::const_iterator sphere_itr; + for (sphere_itr = sphere_list.begin(); sphere_itr != sphere_list.end(); ++sphere_itr) + { + F32 radius = (sphere_itr->getCenter() - center).length() + sphere_itr->getRadius(); + if (radius > max_radius) + { + max_radius = radius; + } + } + if (max_radius < bounding_radius) + { + best_dx = dx; + best_dy = dy; + best_dz = dz; + bounding_center = center; + bounding_radius = max_radius; + found_better_center = true; + } + } + } + } + if (found_better_center) + { + // remember where we came from so we can avoid retesting + last_dx = -best_dx; + last_dy = -best_dy; + last_dz = -best_dz; + } + else + { + // reduce the step size + step_length *= 0.5f; + //++step_count; + // reset the last_*'s + last_dx = 2; // 2 is out of bounds --> no match + last_dy = 2; + last_dz = 2; + } + } + + // HACK -- it is possible to get enough floating point error for the + // bounding sphere to too small on the order of 10e-6, but we only need + // it to be accurate to within about half a millimeter + bounding_radius += half_milimeter; + + // this algorithm can get relatively inaccurate when the sphere + // collection is 'small' (contained within a bounding sphere of about + // 2 meters or less) + // TODO -- fix this + /* debug code + { + std::vector::const_iterator sphere_itr; + for (sphere_itr = sphere_list.begin(); sphere_itr != sphere_list.end(); ++sphere_itr) + { + F32 radius = (sphere_itr->getCenter() - bounding_center).length() + sphere_itr->getRadius(); + if (radius + 0.1f > bounding_radius) + { + std::cout << " rad = " << radius << " bounding - rad = " << (bounding_radius - radius) << std::endl; + } + } + std::cout << "\n" << std::endl; + } + */ + + bounding_sphere.set(bounding_center, bounding_radius); + } + return bounding_sphere; +} + + diff --git a/linden/indra/llmath/llsphere.h b/linden/indra/llmath/llsphere.h new file mode 100644 index 0000000..4d7cd7a --- /dev/null +++ b/linden/indra/llmath/llsphere.h @@ -0,0 +1,72 @@ +// llsphere.h +/** + * @file llsphere.cpp + * @author Andrew Meadows + * @brief Simple sphere implementation for basic geometric operations + * + * $LicenseInfo:firstyear=2001&license=internal$ + * + * Copyright (c) 2001-2008, Linden Research, Inc. + * + * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of + * this source code is governed by the Linden Lab Source Code Disclosure + * Agreement ("Agreement") previously entered between you and Linden + * Lab. By accessing, using, copying, modifying or distributing this + * software, you acknowledge that you have been informed of your + * obligations under the Agreement and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_SPHERE_H +#define LL_SPHERE_H + +#include "stdtypes.h" +#include "v3math.h" +#include +#include + +class LLSphere +{ +public: + LLSphere(); + LLSphere( const LLVector3& center, F32 radius ); + + void set( const LLVector3& center, F32 radius ); + void setCenter( const LLVector3& center ); + void setRadius( F32 radius ); + + const LLVector3& getCenter() const; + F32 getRadius() const; + + // returns TRUE if this sphere completely contains other_sphere + BOOL contains(const LLSphere& other_sphere) const; + + // returns TRUE if this sphere overlaps other_sphere + BOOL overlaps(const LLSphere& other_sphere) const; + + // returns overlap distance + // negative overlap is closest approach + F32 getOverlap(const LLSphere& other_sphere) const; + + // removes any spheres that are contained in others + static void collapse(std::vector& sphere_list); + + // returns minimum sphere bounding sphere for a set of spheres + static LLSphere getBoundingSphere(const LLSphere& first_sphere, const LLSphere& second_sphere); + static LLSphere getBoundingSphere(const std::vector& sphere_list); + + bool operator==(const LLSphere& rhs) const; + + friend std::ostream& operator<<( std::ostream& output_stream, const LLSphere& line ); + +protected: + LLVector3 mCenter; + F32 mRadius; +}; + + +#endif diff --git a/linden/indra/llmath/lluuid.cpp b/linden/indra/llmath/lluuid.cpp index db9e869..d835cbc 100644 --- a/linden/indra/llmath/lluuid.cpp +++ b/linden/indra/llmath/lluuid.cpp @@ -867,6 +867,11 @@ void LLUUID::generate() time_last = timestamp; } +void LLUUID::generate(std::string hash_string) +{ + LLMD5 md5_uuid((U8*)hash_string.c_str()); + md5_uuid.raw_digest(mData); +} U32 LLUUID::getRandomSeed() { diff --git a/linden/indra/llmath/lluuid.h b/linden/indra/llmath/lluuid.h index 190b772..48308f2 100644 --- a/linden/indra/llmath/lluuid.h +++ b/linden/indra/llmath/lluuid.h @@ -64,6 +64,7 @@ public: // MANIPULATORS // void generate(); // Generate a new UUID + void generate(std::string stream); //Generate a new UUID based on hash of input stream BOOL set(const char *in_string, BOOL emit = TRUE); // Convert from string, if emit is FALSE, do not emit warnings BOOL set(const std::string& in_string, BOOL emit = TRUE); // Convert from string, if emit is FALSE, do not emit warnings void setNull(); // Faster than setting to LLUUID::null. diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 4f1c260..9c19220 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp @@ -1858,9 +1858,6 @@ inline U32 sculpt_xy_to_index(U32 x, U32 y, U16 sculpt_width, U16 sculpt_height, { U32 index = (x + y * sculpt_width) * sculpt_components; - // attempt to resolve DEV-11158 - remove assert later. - //llassert(index < sculpt_width * sculpt_height * sculpt_components); - return index; } @@ -2513,12 +2510,19 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h return true; } -#define MAX_INDEX 10000 S32 *LLVolume::getTriangleIndices(U32 &num_indices) const { - S32 index[MAX_INDEX]; + S32 expected_num_triangle_indices = getNumTriangleIndices(); + if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES) + { + // we don't allow LLVolumes with this many vertices + llwarns << "Couldn't allocate triangle indices" << llendl; + num_indices = 0; + return NULL; + } + + S32* index = new S32[expected_num_triangle_indices]; S32 count = 0; - S32 *indices = NULL; // Let's do this totally diffently, as we don't care about faces... // Counter-clockwise triangles are forward facing... @@ -2532,6 +2536,9 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const size_s_out = getProfile().getTotalOut(); size_t = getPath().mPath.size(); + // NOTE -- if the construction of the triangles below ever changes + // then getNumTriangleIndices() method may also have to be updated. + if (open) /* Flawfinder: ignore */ { if (hollow) @@ -2539,9 +2546,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // Open hollow -- much like the closed solid, except we // we need to stitch up the gap between s=0 and s=size_s-1 - if ( (size_t - 1) * (((size_s -1) * 6) + 6) >= MAX_INDEX) - goto noindices; - for (t = 0; t < size_t - 1; t++) { // The outer face, first cut, and inner face @@ -2655,8 +2659,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (use_tri1a2) { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1 + i; index[count++] = pt1 + 1 + i; index[count++] = pt2 + i; @@ -2664,8 +2666,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } else { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1 + i; index[count++] = pt2 - 1 + i; index[count++] = pt2 + i; @@ -2756,8 +2756,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (use_tri1a2) { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1; index[count++] = pt2; index[count++] = pt1 + 1; @@ -2765,8 +2763,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } else { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1; index[count++] = pt2; index[count++] = pt2 - 1; @@ -2779,9 +2775,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const { // Open solid - if ( (size_t - 1) * (((size_s -1) * 6) + 6) >= MAX_INDEX) - goto noindices; - for (t = 0; t < size_t - 1; t++) { // Outer face + 1 cut face @@ -2811,8 +2804,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // Do the top and bottom caps, if necessary if (path_open) { - if ( count + (size_s - 2) * 3 >= MAX_INDEX) - goto noindices; for (s = 0; s < size_s - 2; s++) { index[count++] = s+1; @@ -2822,8 +2813,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // We've got a top cap S32 offset = (size_t - 1)*size_s; - if ( count + (size_s - 2) * 3 >= MAX_INDEX) - goto noindices; for (s = 0; s < size_s - 2; s++) { // Inverted ordering from bottom cap. @@ -2839,8 +2828,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // Closed hollow // Outer face - if ( (size_t - 1) * (size_s_out - 1) * 6 >= MAX_INDEX) - goto noindices; for (t = 0; t < size_t - 1; t++) { for (s = 0; s < size_s_out - 1; s++) @@ -2859,8 +2846,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // Inner face // Invert facing from outer face - if ( count + (size_t - 1) * ((size_s - 1) - size_s_out) * 6 >= MAX_INDEX) - goto noindices; for (t = 0; t < size_t - 1; t++) { for (s = size_s_out; s < size_s - 1; s++) @@ -2965,8 +2950,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (use_tri1a2) { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1 + i; index[count++] = pt1 + 1 + i; index[count++] = pt2 + i; @@ -2974,8 +2957,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } else { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1 + i; index[count++] = pt2 - 1 + i; index[count++] = pt2 + i; @@ -3066,8 +3047,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (use_tri1a2) { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1; index[count++] = pt2; index[count++] = pt1 + 1; @@ -3075,8 +3054,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } else { - if (count + 3 >= MAX_INDEX) - goto noindices; index[count++] = pt1; index[count++] = pt2; index[count++] = pt2 - 1; @@ -3088,8 +3065,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const else { // Closed solid. Easy case. - if ( (size_t - 1) * (size_s - 1) * 6 > MAX_INDEX) - goto noindices; for (t = 0; t < size_t - 1; t++) { for (s = 0; s < size_s - 1; s++) @@ -3111,8 +3086,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const if (path_open) { // bottom cap - if ( count + (size_s - 2 - 1) * 3 >= MAX_INDEX) - goto noindices; for (s = 1; s < size_s - 2; s++) { index[count++] = s+1; @@ -3122,8 +3095,6 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const // top cap S32 offset = (size_t - 1)*size_s; - if ( count + (size_s - 2 - 1) * 3 >= MAX_INDEX) - goto noindices; for (s = 1; s < size_s - 2; s++) { // Inverted ordering from bottom cap. @@ -3134,7 +3105,18 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } } +#ifdef LL_DEBUG + // assert that we computed the correct number of indices + if (count != expected_num_triangle_indices ) + { + llerrs << "bad index count prediciton:" + << " expected=" << expected_num_triangle_indices + << " actual=" << count << llendl; + } +#endif + #if 0 + // verify that each index does not point beyond the size of the mesh S32 num_vertices = mMesh.size(); for (i = 0; i < count; i+=3) { @@ -3145,17 +3127,65 @@ S32 *LLVolume::getTriangleIndices(U32 &num_indices) const } #endif - indices = new S32[count]; -noindices: - if (!indices) + num_indices = count; + return index; +} + +S32 LLVolume::getNumTriangleIndices() const +{ + BOOL profile_open = getProfile().isOpen(); + BOOL hollow = getProfile().isHollow(); + BOOL path_open = getPath().isOpen(); + + S32 size_s, size_s_out, size_t; + size_s = getProfile().getTotal(); + size_s_out = getProfile().getTotalOut(); + size_t = getPath().mPath.size(); + + S32 count = 0; + if (profile_open) /* Flawfinder: ignore */ { - llwarns << "Couldn't allocate triangle indices" << llendl; - num_indices = 0; - return NULL; + if (hollow) + { + // Open hollow -- much like the closed solid, except we + // we need to stitch up the gap between s=0 and s=size_s-1 + count = (size_t - 1) * (((size_s -1) * 6) + 6); + } + else + { + count = (size_t - 1) * (((size_s -1) * 6) + 6); + } } - num_indices = count; - memcpy(indices, index, count * sizeof(S32)); /* Flawfinder: ignore */ - return indices; + else if (hollow) + { + // Closed hollow + // Outer face + count = (size_t - 1) * (size_s_out - 1) * 6; + + // Inner face + count += (size_t - 1) * ((size_s - 1) - size_s_out) * 6; + } + else + { + // Closed solid. Easy case. + count = (size_t - 1) * (size_s - 1) * 6; + } + + if (path_open) + { + S32 cap_triangle_count = size_s - 3; + if ( profile_open + || hollow ) + { + cap_triangle_count = size_s - 2; + } + if ( cap_triangle_count > 0 ) + { + // top and bottom caps + count += cap_triangle_count * 2 * 3; + } + } + return count; } //----------------------------------------------------------------------------- @@ -3486,7 +3516,7 @@ struct lessTriangle BOOL equalTriangle(const S32 *a, const S32 *b) { - if ((*a == *b) && (*(a+1) == *(b+1)) && ((*a+2) == (*b+2))) + if ((*a == *b) && (*(a+1) == *(b+1)) && (*(a+2) == *(b+2))) { return TRUE; } @@ -3502,6 +3532,21 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, S32 &num_output_triangles, S32 **output_triangles) { + /* Testing: avoid any cleanup + num_output_vertices = num_input_vertices; + num_output_triangles = num_input_triangles; + + *output_vertices = new LLVector3[num_input_vertices]; + for (S32 i = 0; i < num_input_vertices; i++) + { + (*output_vertices)[i] = input_vertices[i].mPos; + } + + *output_triangles = new S32[num_input_triangles*3]; + memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore + return TRUE; + */ + // Here's how we do this: // Create a structure which contains the original vertex index and the // LLVector3 data. @@ -3552,7 +3597,7 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, } else { - //llinfos << "Removed duplicate vertex " << pairp->mVertex << llendl; + //llinfos << "Removed duplicate vertex " << pairp->mVertex << ", distance magVecSquared() is " << (pairp->mVertex - prev_pairp->mVertex).magVecSquared() << llendl; } vertex_mapping[pairp->mIndex] = new_num_vertices - 1; } @@ -3564,50 +3609,54 @@ BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices, for (i = 0; i < num_input_triangles; i++) { - //llinfos << "Checking triangle " << input_triangles[i*3] << ":" << input_triangles[i*3+1] << ":" << input_triangles[i*3+2] << llendl; - input_triangles[i*3] = vertex_mapping[input_triangles[i*3]]; - input_triangles[i*3+1] = vertex_mapping[input_triangles[i*3+1]]; - input_triangles[i*3+2] = vertex_mapping[input_triangles[i*3+2]]; + S32 v1 = i*3; + S32 v2 = i*3 + 1; + S32 v3 = i*3 + 2; + + //llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; + input_triangles[v1] = vertex_mapping[input_triangles[v1]]; + input_triangles[v2] = vertex_mapping[input_triangles[v2]]; + input_triangles[v3] = vertex_mapping[input_triangles[v3]]; - if ((input_triangles[i*3] == input_triangles[i*3+1]) - || (input_triangles[i*3] == input_triangles[i*3+2]) - || (input_triangles[i*3+1] == input_triangles[i*3+2])) + if ((input_triangles[v1] == input_triangles[v2]) + || (input_triangles[v1] == input_triangles[v3]) + || (input_triangles[v2] == input_triangles[v3])) { - //llinfos << "Removing degenerate triangle " << input_triangles[i*3] << ":" << input_triangles[i*3+1] << ":" << input_triangles[i*3+2] << llendl; + //llinfos << "Removing degenerate triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl; // Degenerate triangle, skip continue; } - if (input_triangles[i*3] < input_triangles[i*3+1]) + if (input_triangles[v1] < input_triangles[v2]) { - if (input_triangles[i*3] < input_triangles[i*3+2]) + if (input_triangles[v1] < input_triangles[v3]) { // (0 < 1) && (0 < 2) - new_triangles[new_num_triangles*3] = input_triangles[i*3]; - new_triangles[new_num_triangles*3+1] = input_triangles[i*3+1]; - new_triangles[new_num_triangles*3+2] = input_triangles[i*3+2]; + new_triangles[new_num_triangles*3] = input_triangles[v1]; + new_triangles[new_num_triangles*3+1] = input_triangles[v2]; + new_triangles[new_num_triangles*3+2] = input_triangles[v3]; } else { // (0 < 1) && (2 < 0) - new_triangles[new_num_triangles*3] = input_triangles[i*3+2]; - new_triangles[new_num_triangles*3+1] = input_triangles[i*3]; - new_triangles[new_num_triangles*3+2] = input_triangles[i*3+1]; + new_triangles[new_num_triangles*3] = input_triangles[v3]; + new_triangles[new_num_triangles*3+1] = input_triangles[v1]; + new_triangles[new_num_triangles*3+2] = input_triangles[v2]; } } - else if (input_triangles[i*3+1] < input_triangles[i*3+2]) + else if (input_triangles[v2] < input_triangles[v3]) { // (1 < 0) && (1 < 2) - new_triangles[new_num_triangles*3] = input_triangles[i*3+1]; - new_triangles[new_num_triangles*3+1] = input_triangles[i*3+2]; - new_triangles[new_num_triangles*3+2] = input_triangles[i*3]; + new_triangles[new_num_triangles*3] = input_triangles[v2]; + new_triangles[new_num_triangles*3+1] = input_triangles[v3]; + new_triangles[new_num_triangles*3+2] = input_triangles[v1]; } else { // (1 < 0) && (2 < 1) - new_triangles[new_num_triangles*3] = input_triangles[i*3+2]; - new_triangles[new_num_triangles*3+1] = input_triangles[i*3]; - new_triangles[new_num_triangles*3+2] = input_triangles[i*3+1]; + new_triangles[new_num_triangles*3] = input_triangles[v3]; + new_triangles[new_num_triangles*3+1] = input_triangles[v1]; + new_triangles[new_num_triangles*3+2] = input_triangles[v2]; } new_num_triangles++; } @@ -3848,23 +3897,44 @@ void LLVolumeParams::reduceT(F32 begin, F32 end) mPathParams.setEnd(a + end * (b - a)); } +const F32 MIN_CONCAVE_PROFILE_WEDGE = 0.125f; // 1/8 unity +const F32 MIN_CONCAVE_PATH_WEDGE = 0.111111f; // 1/9 unity + +// returns TRUE if the shape can be approximated with a convex shape +// for collison purposes BOOL LLVolumeParams::isConvex() const { - // The logic for determining convexity is a little convoluted. + F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); - // Do we need to take getTwistBegin into account? DK 08/12/04 - if ( mProfileParams.getHollow() != 0.0f - || mPathParams.getTwist() != mPathParams.getTwistBegin() ) + if ( mPathParams.getTwist() != mPathParams.getTwistBegin() + && path_length > MIN_CONCAVE_PATH_WEDGE ) { - // hollow or twist gaurantees concavity + // twist along a "not too short" path is concave return FALSE; } F32 profile_length = mProfileParams.getEnd() - mProfileParams.getBegin(); - BOOL concave_profile = (profile_length < 1.0f) && (profile_length > 0.5f); - if (concave_profile) + F32 hollow = mProfileParams.getHollow(); + BOOL same_hole = hollow == 0.f + || (mProfileParams.getCurveType() & LL_PCODE_HOLE_MASK) == LL_PCODE_HOLE_SAME; + + F32 min_profile_wedge = MIN_CONCAVE_PROFILE_WEDGE; + U8 profile_type = mProfileParams.getCurveType() & LL_PCODE_PROFILE_MASK; + if ( LL_PCODE_PROFILE_CIRCLE_HALF == profile_type ) { - // concave profile + // it is a sphere and spheres get twice the minimum profile wedge + min_profile_wedge = 2.f * MIN_CONCAVE_PROFILE_WEDGE; + } + + BOOL convex_profile = ( ( profile_length == 1.f + || profile_length <= 0.5f ) + && hollow == 0.f ) // trivially convex + || ( profile_length <= min_profile_wedge + && same_hole ); // effectvely convex (even when hollow) + + if (!convex_profile) + { + // profile is concave return FALSE; } @@ -3875,7 +3945,6 @@ BOOL LLVolumeParams::isConvex() const return TRUE; } - F32 path_length = mPathParams.getEnd() - mPathParams.getBegin(); BOOL concave_path = (path_length < 1.0f) && (path_length > 0.5f); if (concave_path) { @@ -3883,17 +3952,43 @@ BOOL LLVolumeParams::isConvex() const } // we're left with spheres, toroids and tubes - // only the spheres can be convex - U8 profile_type = mProfileParams.getCurveType() & LL_PCODE_PROFILE_MASK; if ( LL_PCODE_PROFILE_CIRCLE_HALF == profile_type ) { + // at this stage all spheres must be convex return TRUE; } // it's a toroid or tube + if ( path_length <= MIN_CONCAVE_PATH_WEDGE ) + { + // effectively convex + return TRUE; + } + return FALSE; } +// debug +void LLVolumeParams::setCube() +{ + mProfileParams.setCurveType(LL_PCODE_PROFILE_SQUARE); + mProfileParams.setBegin(0.f); + mProfileParams.setEnd(1.f); + mProfileParams.setHollow(0.f); + + mPathParams.setBegin(0.f); + mPathParams.setEnd(1.f); + mPathParams.setScale(1.f, 1.f); + mPathParams.setShear(0.f, 0.f); + mPathParams.setCurveType(LL_PCODE_PATH_LINE); + mPathParams.setTwistBegin(0.f); + mPathParams.setTwistEnd(0.f); + mPathParams.setRadiusOffset(0.f); + mPathParams.setTaper(0.f, 0.f); + mPathParams.setRevolutions(0.f); + mPathParams.setSkew(0.f); +} + LLFaceID LLVolume::generateFaceMask() { LLFaceID new_mask = 0x0000; diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h index 5ec7997..9dbea7a 100644 --- a/linden/indra/llmath/llvolume.h +++ b/linden/indra/llmath/llvolume.h @@ -72,6 +72,8 @@ const F32 TAPER_QUANTA = 0.01f; const F32 REV_QUANTA = 0.015f; const F32 HOLLOW_QUANTA = 0.00002f; +const S32 MAX_VOLUME_TRIANGLE_INDICES = 10000; + //============================================================================ // useful masks @@ -187,10 +189,10 @@ class LLProfileParams public: LLProfileParams() { - mBegin = 0; - mEnd = 1; - mHollow = 0; mCurveType = LL_PCODE_PROFILE_SQUARE; + mBegin = 0.f; + mEnd = 1.f; + mHollow = 0.f; } LLProfileParams(U8 curve, F32 begin, F32 end, F32 hollow) @@ -307,17 +309,17 @@ class LLPathParams public: LLPathParams() { - mBegin = 0; - mEnd = 1; - mScale.setVec(1,1); - mShear.setVec(0,0); + mBegin = 0.f; + mEnd = 1.f; + mScale.setVec(1.f,1.f); + mShear.setVec(0.f,0.f); mCurveType = LL_PCODE_PATH_LINE; - mTwistBegin = 0; - mTwistEnd = 0; - mRadiusOffset = 0; - mTaper.setVec(0,0); - mRevolutions = 1; - mSkew = 0; + mTwistBegin = 0.f; + mTwistEnd = 0.f; + mRadiusOffset = 0.f; + mTaper.setVec(0.f,0.f); + mRevolutions = 1.f; + mSkew = 0.f; } LLPathParams(U8 curve, F32 begin, F32 end, F32 scx, F32 scy, F32 shx, F32 shy, F32 twistend, F32 twistbegin, F32 radiusoffset, F32 tx, F32 ty, F32 revolutions, F32 skew) @@ -627,6 +629,9 @@ public: friend std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params); + // debug helper functions + void setCube(); + protected: LLProfileParams mProfileParams; LLPathParams mPathParams; @@ -869,6 +874,10 @@ public: S32 getSculptLevel() const { return mSculptLevel; } S32 *getTriangleIndices(U32 &num_indices) const; + + // returns number of triangle indeces required for path/profile mesh + S32 getNumTriangleIndices() const; + void generateSilhouetteVertices(std::vector &vertices, std::vector &normals, std::vector &segments, const LLVector3& view_vec, const LLMatrix4& mat, const LLMatrix3& norm_mat); diff --git a/linden/indra/llmath/llvolumemgr.cpp b/linden/indra/llmath/llvolumemgr.cpp index db99959..d9bca70 100644 --- a/linden/indra/llmath/llvolumemgr.cpp +++ b/linden/indra/llmath/llvolumemgr.cpp @@ -36,7 +36,7 @@ //#define DEBUG_VOLUME -LLVolumeMgr* gVolumeMgr = 0; +//LLVolumeMgr* gVolumeMgr = 0; const F32 BASE_THRESHOLD = 0.03f; @@ -49,37 +49,23 @@ F32 LLVolumeLODGroup::mDetailThresholds[NUM_LODS] = {BASE_THRESHOLD, //static F32 LLVolumeLODGroup::mDetailScales[NUM_LODS] = {1.f, 1.5f, 2.5f, 4.f}; -//============================================================================ -//static -void LLVolumeMgr::initClass() -{ - gVolumeMgr = new LLVolumeMgr(); -} - -//static -BOOL LLVolumeMgr::cleanupClass() -{ - BOOL res = FALSE; - if (gVolumeMgr) { - res = gVolumeMgr->cleanup(); - delete gVolumeMgr; - gVolumeMgr = 0; - } - return res; -} //============================================================================ LLVolumeMgr::LLVolumeMgr() +: mDataMutex(NULL) { - mDataMutex = new LLMutex(gAPRPoolp); -// mNumVolumes = 0; + // the LLMutex magic interferes with easy unit testing, + // so you now must manually call useMutex() to use it + //mDataMutex = new LLMutex(gAPRPoolp); } LLVolumeMgr::~LLVolumeMgr() { cleanup(); + delete mDataMutex; + mDataMutex = NULL; } BOOL LLVolumeMgr::cleanup() @@ -90,7 +76,10 @@ BOOL LLVolumeMgr::cleanup() } #endif BOOL no_refs = TRUE; - mDataMutex->lock(); + if (mDataMutex) + { + mDataMutex->lock(); + } for (volume_lod_group_map_t::iterator iter = mVolumeLODGroups.begin(), end = mVolumeLODGroups.end(); iter != end; iter++) @@ -106,29 +95,37 @@ BOOL LLVolumeMgr::cleanup() volgroupp->unref();// this ); } mVolumeLODGroups.clear(); - mDataMutex->unlock(); + if (mDataMutex) + { + mDataMutex->unlock(); + } return no_refs; } +// whatever calls getVolume() never owns the LLVolume* and +// cannot keep references for long since it may be deleted +// later. For best results hold it in an LLPointer. LLVolume *LLVolumeMgr::getVolume(const LLVolumeParams &volume_params, const S32 detail) { LLVolumeLODGroup* volgroupp; - mDataMutex->lock(); + if (mDataMutex) + { + mDataMutex->lock(); + } volume_lod_group_map_t::iterator iter = mVolumeLODGroups.find(&volume_params); if( iter == mVolumeLODGroups.end() ) { - volgroupp = new LLVolumeLODGroup(volume_params); - const LLVolumeParams* params = &(volgroupp->getParams()); - mVolumeLODGroups[params] = volgroupp; - volgroupp->ref(); // initial reference + volgroupp = createNewGroup(volume_params); } else { volgroupp = iter->second; } - volgroupp->ref();// this ); - mDataMutex->unlock(); - // mNumVolumes++; + volgroupp->ref(); + if (mDataMutex) + { + mDataMutex->unlock(); + } #ifdef DEBUG_VOLUME { lldebugs << "LLVolumeMgr::getVolume() " << (*this) << llendl; @@ -137,6 +134,27 @@ LLVolume *LLVolumeMgr::getVolume(const LLVolumeParams &volume_params, const S32 return volgroupp->getLOD(detail); } +// virtual +LLVolumeLODGroup* LLVolumeMgr::getGroup( const LLVolumeParams& volume_params ) const +{ + LLVolumeLODGroup* volgroupp = NULL; + if (mDataMutex) + { + mDataMutex->lock(); + } + volume_lod_group_map_t::const_iterator iter = mVolumeLODGroups.find(&volume_params); + if( iter != mVolumeLODGroups.end() ) + { + volgroupp = iter->second; + } + if (mDataMutex) + { + mDataMutex->unlock(); + } + return volgroupp; +} + +// virtual void LLVolumeMgr::cleanupVolume(LLVolume *volumep) { if (volumep->isUnique()) @@ -145,12 +163,18 @@ void LLVolumeMgr::cleanupVolume(LLVolume *volumep) return; } LLVolumeParams* params = (LLVolumeParams*) &(volumep->getParams()); - mDataMutex->lock(); + if (mDataMutex) + { + mDataMutex->lock(); + } volume_lod_group_map_t::iterator iter = mVolumeLODGroups.find(params); if( iter == mVolumeLODGroups.end() ) { llerrs << "Warning! Tried to cleanup unknown volume type! " << *params << llendl; - mDataMutex->unlock(); + if (mDataMutex) + { + mDataMutex->unlock(); + } return; } else @@ -164,9 +188,11 @@ void LLVolumeMgr::cleanupVolume(LLVolume *volumep) mVolumeLODGroups.erase(params); volgroupp->unref();// this ); } - // mNumVolumes--; } - mDataMutex->unlock(); + if (mDataMutex) + { + mDataMutex->unlock(); + } #ifdef DEBUG_VOLUME { @@ -175,10 +201,43 @@ void LLVolumeMgr::cleanupVolume(LLVolume *volumep) #endif } +#ifdef DEBUG_VOLUME +S32 LLVolumeMgr::getTotalRefCount() const +{ + S32 total_ref_count = 0; + for ( volume_lod_group_map_t::const_iterator iter = mVolumeLODGroups.begin(), + end = mVolumeLODGroups.end(); + iter != end; iter++) + { + total_ref_count += iter->second->getTotalVolumeRefCount(); + } + return total_ref_count; +} + +S32 LLVolumeMgr::getGroupCount() const +{ + return mVolumeLODGroups.size(); +} +#endif + +// protected +LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params) +{ + LLVolumeLODGroup* group = new LLVolumeLODGroup(volume_params); + const LLVolumeParams* params = &(group->getParams()); + mVolumeLODGroups[params] = group; + group->ref(); // initial reference + return group; +} + +// virtual void LLVolumeMgr::dump() { F32 avg = 0.f; - mDataMutex->lock(); + if (mDataMutex) + { + mDataMutex->lock(); + } for (volume_lod_group_map_t::iterator iter = mVolumeLODGroups.begin(), end = mVolumeLODGroups.end(); iter != end; iter++) @@ -188,16 +247,30 @@ void LLVolumeMgr::dump() } int count = (int)mVolumeLODGroups.size(); avg = count ? avg / (F32)count : 0.0f; - mDataMutex->unlock(); + if (mDataMutex) + { + mDataMutex->unlock(); + } llinfos << "Average usage of LODs " << avg << llendl; } +void LLVolumeMgr::useMutex() +{ + if (!mDataMutex) + { + mDataMutex = new LLMutex(gAPRPoolp); + } +} + std::ostream& operator<<(std::ostream& s, const LLVolumeMgr& volume_mgr) { s << "{ numLODgroups=" << volume_mgr.mVolumeLODGroups.size() << ", "; S32 total_refs = 0; - volume_mgr.mDataMutex->lock(); + if (volume_mgr.mDataMutex) + { + volume_mgr.mDataMutex->lock(); + } LLVolumeMgr::volume_lod_group_map_iter iter = volume_mgr.mVolumeLODGroups.begin(); LLVolumeMgr::volume_lod_group_map_iter end = volume_mgr.mVolumeLODGroups.end(); @@ -208,7 +281,10 @@ std::ostream& operator<<(std::ostream& s, const LLVolumeMgr& volume_mgr) s << ", " << (*volgroupp); } - volume_mgr.mDataMutex->unlock(); + if (volume_mgr.mDataMutex) + { + volume_mgr.mDataMutex->unlock(); + } s << ", total_refs=" << total_refs << " }"; return s; @@ -222,15 +298,39 @@ LLVolumeLODGroup::LLVolumeLODGroup(const LLVolumeParams ¶ms) for (i = 0; i < NUM_LODS; i++) { mLODRefs[i] = 0; - mVolumeLODs[i] = NULL; + // no need to initialize mVolumeLODs, they are smart pointers + //mVolumeLODs[i] = NULL; mAccessCount[i] = 0; } } +#ifdef DEBUG_VOLUME +S32 LLVolumeLODGroup::getTotalVolumeRefCount() const +{ + S32 total_ref_count = 0; + for (S32 i = 0; i < NUM_LODS; i++) + { + total_ref_count += mLODRefs[i]; + } + return total_ref_count; +} +#endif + +// protected LLVolumeLODGroup::~LLVolumeLODGroup() { + destroy(); } +// protected +void LLVolumeLODGroup::destroy() +{ + for (S32 i = 0; i < NUM_LODS; i++) + { + // remember that mVolumeLODs are smart pointers! + mVolumeLODs[i] = NULL; + } +} LLVolume * LLVolumeLODGroup::getLOD(const S32 detail) { @@ -242,7 +342,7 @@ LLVolume * LLVolumeLODGroup::getLOD(const S32 detail) mVolumeLODs[detail] = new LLVolume(mParams, mDetailScales[detail]); } mLODRefs[detail]++; - return mVolumeLODs[detail]; + return mVolumeLODs[detail].get(); } BOOL LLVolumeLODGroup::derefLOD(LLVolume *volumep) diff --git a/linden/indra/llmath/llvolumemgr.h b/linden/indra/llmath/llvolumemgr.h index 889bc56..0a2249e 100644 --- a/linden/indra/llmath/llvolumemgr.h +++ b/linden/indra/llmath/llvolumemgr.h @@ -43,9 +43,6 @@ class LLVolumeLODGroup; class LLVolumeLODGroup : public LLThreadSafeRefCount { -protected: - ~LLVolumeLODGroup(); - public: enum { @@ -60,11 +57,19 @@ public: static F32 getVolumeScaleFromDetail(const S32 detail); LLVolume *getLOD(const S32 detail); - const LLVolumeParams &getParams() const { return mParams; }; + const LLVolumeParams& getParams() const { return mParams; }; F32 dump(); friend std::ostream& operator<<(std::ostream& s, const LLVolumeLODGroup& volgroup); +#ifdef DEBUG_VOLUME + S32 getTotalVolumeRefCount() const; +#endif + +protected: + virtual ~LLVolumeLODGroup(); + void destroy(); + protected: LLVolumeParams mParams; @@ -77,30 +82,50 @@ protected: class LLVolumeMgr { -public: - static void initClass(); - static BOOL cleanupClass(); +//public: +// static void initClass(); +// static BOOL cleanupClass(); public: LLVolumeMgr(); - ~LLVolumeMgr(); + virtual ~LLVolumeMgr(); BOOL cleanup(); // Cleanup all volumes being managed, returns TRUE if no dangling references + + virtual LLVolumeLODGroup* getGroup( const LLVolumeParams& volume_params ) const; + + // whatever calls getVolume() never owns the LLVolume* and + // cannot keep references for long since it may be deleted + // later. For best results hold it in an LLPointer. LLVolume *getVolume(const LLVolumeParams &volume_params, const S32 detail); + void cleanupVolume(LLVolume *volumep); void dump(); + + // manually call this for mutex magic + void useMutex(); + +#ifdef DEBUG_VOLUME + S32 getTotalRefCount() const; + S32 getGroupCount() const; +#endif friend std::ostream& operator<<(std::ostream& s, const LLVolumeMgr& volume_mgr); protected: + virtual LLVolumeLODGroup* createNewGroup(const LLVolumeParams& volume_params); + +protected: typedef std::map volume_lod_group_map_t; typedef volume_lod_group_map_t::const_iterator volume_lod_group_map_iter; volume_lod_group_map_t mVolumeLODGroups; LLMutex* mDataMutex; - -// S32 mNumVolumes; + + // We need to be able to disable threadsafe checks to prevent + // some unit_tests from blocking on failure + bool mThreadSafe; }; -extern LLVolumeMgr* gVolumeMgr; +//extern LLVolumeMgr* gVolumeMgr; #endif // LL_LLVOLUMEMGR_H diff --git a/linden/indra/llmath/m3math.cpp b/linden/indra/llmath/m3math.cpp index 6741f05..5c3eb08 100644 --- a/linden/indra/llmath/m3math.cpp +++ b/linden/indra/llmath/m3math.cpp @@ -136,7 +136,7 @@ void LLMatrix3::getEulerAngles(F32 *roll, F32 *pitch, F32 *yaw) const // Clear and Assignment Functions -const LLMatrix3& LLMatrix3::identity() +const LLMatrix3& LLMatrix3::setIdentity() { mMatrix[0][0] = 1.f; mMatrix[0][1] = 0.f; @@ -152,7 +152,23 @@ const LLMatrix3& LLMatrix3::identity() return (*this); } -const LLMatrix3& LLMatrix3::zero() +const LLMatrix3& LLMatrix3::clear() +{ + mMatrix[0][0] = 0.f; + mMatrix[0][1] = 0.f; + mMatrix[0][2] = 0.f; + + mMatrix[1][0] = 0.f; + mMatrix[1][1] = 0.f; + mMatrix[1][2] = 0.f; + + mMatrix[2][0] = 0.f; + mMatrix[2][1] = 0.f; + mMatrix[2][2] = 0.f; + return (*this); +} + +const LLMatrix3& LLMatrix3::setZero() { mMatrix[0][0] = 0.f; mMatrix[0][1] = 0.f; @@ -190,15 +206,26 @@ F32 LLMatrix3::determinant() const mMatrix[0][2] * (mMatrix[1][0] * mMatrix[2][1] - mMatrix[1][1] * mMatrix[2][0]); } -// This is identical to the transMat3() method because we assume a rotation matrix -const LLMatrix3& LLMatrix3::invert() +// inverts this matrix +void LLMatrix3::invert() { - // transpose the matrix - F32 temp; - temp = mMatrix[VX][VY]; mMatrix[VX][VY] = mMatrix[VY][VX]; mMatrix[VY][VX] = temp; - temp = mMatrix[VX][VZ]; mMatrix[VX][VZ] = mMatrix[VZ][VX]; mMatrix[VZ][VX] = temp; - temp = mMatrix[VY][VZ]; mMatrix[VY][VZ] = mMatrix[VZ][VY]; mMatrix[VZ][VY] = temp; - return *this; + // fails silently if determinant is zero too small + F32 det = determinant(); + const F32 VERY_SMALL_DETERMINANT = 0.000001f; + if (fabs(det) > VERY_SMALL_DETERMINANT) + { + // invertiable + LLMatrix3 t(*this); + mMatrix[VX][VX] = ( t.mMatrix[VY][VY] * t.mMatrix[VZ][VZ] - t.mMatrix[VY][VZ] * t.mMatrix[VZ][VY] ) / det; + mMatrix[VY][VX] = ( t.mMatrix[VY][VZ] * t.mMatrix[VZ][VX] - t.mMatrix[VY][VX] * t.mMatrix[VZ][VZ] ) / det; + mMatrix[VZ][VX] = ( t.mMatrix[VY][VX] * t.mMatrix[VZ][VY] - t.mMatrix[VY][VY] * t.mMatrix[VZ][VX] ) / det; + mMatrix[VX][VY] = ( t.mMatrix[VZ][VY] * t.mMatrix[VX][VZ] - t.mMatrix[VZ][VZ] * t.mMatrix[VX][VY] ) / det; + mMatrix[VY][VY] = ( t.mMatrix[VZ][VZ] * t.mMatrix[VX][VX] - t.mMatrix[VZ][VX] * t.mMatrix[VX][VZ] ) / det; + mMatrix[VZ][VY] = ( t.mMatrix[VZ][VX] * t.mMatrix[VX][VY] - t.mMatrix[VZ][VY] * t.mMatrix[VX][VX] ) / det; + mMatrix[VX][VZ] = ( t.mMatrix[VX][VY] * t.mMatrix[VY][VZ] - t.mMatrix[VX][VZ] * t.mMatrix[VY][VY] ) / det; + mMatrix[VY][VZ] = ( t.mMatrix[VX][VZ] * t.mMatrix[VY][VX] - t.mMatrix[VX][VX] * t.mMatrix[VY][VZ] ) / det; + mMatrix[VZ][VZ] = ( t.mMatrix[VX][VX] * t.mMatrix[VY][VY] - t.mMatrix[VX][VY] * t.mMatrix[VY][VX] ) / det; + } } // does not assume a rotation matrix, and does not divide by determinant, assuming results will be renormalized @@ -351,6 +378,27 @@ const LLMatrix3& LLMatrix3::setRows(const LLVector3 &fwd, const LLVector3 &left, return *this; } +const LLMatrix3& LLMatrix3::setRow( U32 rowIndex, const LLVector3& row ) +{ + llassert( rowIndex >= 0 && rowIndex < NUM_VALUES_IN_MAT3 ); + + mMatrix[rowIndex][0] = row[0]; + mMatrix[rowIndex][1] = row[1]; + mMatrix[rowIndex][2] = row[2]; + + return *this; +} + +const LLMatrix3& LLMatrix3::setCol( U32 colIndex, const LLVector3& col ) +{ + llassert( colIndex >= 0 && colIndex < NUM_VALUES_IN_MAT3 ); + + mMatrix[0][colIndex] = col[0]; + mMatrix[1][colIndex] = col[1]; + mMatrix[2][colIndex] = col[2]; + + return *this; +} // Rotate exisitng mMatrix const LLMatrix3& LLMatrix3::rotate(const F32 angle, const F32 x, const F32 y, const F32 z) @@ -384,6 +432,16 @@ const LLMatrix3& LLMatrix3::rotate(const LLQuaternion &q) return *this; } +void LLMatrix3::add(const LLMatrix3& other_matrix) +{ + for (S32 i = 0; i < 3; ++i) + { + for (S32 j = 0; j < 3; ++j) + { + mMatrix[i][j] += other_matrix.mMatrix[i][j]; + } + } +} LLVector3 LLMatrix3::getFwdRow() const { @@ -536,6 +594,19 @@ const LLMatrix3& operator*=(LLMatrix3 &a, const LLMatrix3 &b) return a; } +const LLMatrix3& operator*=(LLMatrix3 &a, F32 scalar ) +{ + for( U32 i = 0; i < NUM_VALUES_IN_MAT3; ++i ) + { + for( U32 j = 0; j < NUM_VALUES_IN_MAT3; ++j ) + { + a.mMatrix[i][j] *= scalar; + } + } + + return a; +} + std::ostream& operator<<(std::ostream& s, const LLMatrix3 &a) { s << "{ " diff --git a/linden/indra/llmath/m3math.h b/linden/indra/llmath/m3math.h index 8bd94d8..cd22a86 100644 --- a/linden/indra/llmath/m3math.h +++ b/linden/indra/llmath/m3math.h @@ -33,6 +33,7 @@ #define LL_M3MATH_H #include "llerror.h" +#include "stdtypes.h" class LLVector4; class LLVector3; @@ -76,8 +77,9 @@ class LLMatrix3 // // various useful matrix functions - const LLMatrix3& identity(); // Load identity matrix - const LLMatrix3& zero(); // Clears Matrix to zero + const LLMatrix3& setIdentity(); // Load identity matrix + const LLMatrix3& clear(); // Clears Matrix to zero + const LLMatrix3& setZero(); // Clears Matrix to zero /////////////////////////// // @@ -91,6 +93,9 @@ class LLMatrix3 const LLMatrix3& setRot(const LLQuaternion &q); // Transform matrix by Euler angles and translating by pos const LLMatrix3& setRows(const LLVector3 &x_axis, const LLVector3 &y_axis, const LLVector3 &z_axis); + const LLMatrix3& setRow( U32 rowIndex, const LLVector3& row ); + const LLMatrix3& setCol( U32 colIndex, const LLVector3& col ); + /////////////////////////// // @@ -103,29 +108,31 @@ class LLMatrix3 LLVector3 getFwdRow() const; LLVector3 getLeftRow() const; LLVector3 getUpRow() const; - F32 determinant() const; // Return determinant + F32 determinant() const; // Return determinant /////////////////////////// // // Operations on an existing matrix // - const LLMatrix3& transpose(); // Transpose MAT4 - const LLMatrix3& invert(); // Invert MAT4 - const LLMatrix3& orthogonalize(); // Orthogonalizes X, then Y, then Z - const LLMatrix3& adjointTranspose(); // returns transpose of matrix adjoint, for multiplying normals + const LLMatrix3& transpose(); // Transpose MAT4 + const LLMatrix3& orthogonalize(); // Orthogonalizes X, then Y, then Z + void invert(); // Invert MAT4 + const LLMatrix3& adjointTranspose();// returns transpose of matrix adjoint, for multiplying normals // Rotate existing matrix // Note: the two lines below are equivalent: // foo.rotate(bar) // foo = foo * bar - // That is, foo.rotMat3(bar) multiplies foo by bar FROM THE RIGHT + // That is, foo.rotate(bar) multiplies foo by bar FROM THE RIGHT const LLMatrix3& rotate(const F32 angle, const F32 x, const F32 y, const F32 z); // Rotate matrix by rotating angle radians about (x, y, z) const LLMatrix3& rotate(const F32 angle, const LLVector3 &vec); // Rotate matrix by rotating angle radians about vec const LLMatrix3& rotate(const F32 roll, const F32 pitch, const F32 yaw); // Rotate matrix by roll (about x), pitch (about y), and yaw (about z) const LLMatrix3& rotate(const LLQuaternion &q); // Transform matrix by Euler angles and translating by pos + void add(const LLMatrix3& other_matrix); // add other_matrix to this one + // This operator is misleading as to operation direction // friend LLVector3 operator*(const LLMatrix3 &a, const LLVector3 &b); // Apply rotation a to vector b @@ -137,6 +144,7 @@ class LLMatrix3 friend bool operator!=(const LLMatrix3 &a, const LLMatrix3 &b); // Return a != b friend const LLMatrix3& operator*=(LLMatrix3 &a, const LLMatrix3 &b); // Return a * b + friend const LLMatrix3& operator*=(LLMatrix3 &a, F32 scalar ); // Return a * scalar friend std::ostream& operator<<(std::ostream& s, const LLMatrix3 &a); // Stream a }; diff --git a/linden/indra/llmath/m4math.cpp b/linden/indra/llmath/m4math.cpp index 2b51db1..f2db478 100644 --- a/linden/indra/llmath/m4math.cpp +++ b/linden/indra/llmath/m4math.cpp @@ -163,7 +163,7 @@ LLMatrix4::~LLMatrix4(void) // Clear and Assignment Functions -const LLMatrix4& LLMatrix4::zero() +const LLMatrix4& LLMatrix4::setZero() { mMatrix[0][0] = 0.f; mMatrix[0][1] = 0.f; diff --git a/linden/indra/llmath/m4math.h b/linden/indra/llmath/m4math.h index 7a51eb2..27eb865 100644 --- a/linden/indra/llmath/m4math.h +++ b/linden/indra/llmath/m4math.h @@ -132,8 +132,8 @@ public: const LLVector4 &row3); // various useful matrix functions - const LLMatrix4& identity(); // Load identity matrix - const LLMatrix4& zero(); // Clears matrix to all zeros. + const LLMatrix4& setIdentity(); // Load identity matrix + const LLMatrix4& setZero(); // Clears matrix to all zeros. const LLMatrix4& initRotation(const F32 angle, const F32 x, const F32 y, const F32 z); // Calculate rotation matrix by rotating angle radians about (x, y, z) const LLMatrix4& initRotation(const F32 angle, const LLVector4 &axis); // Calculate rotation matrix for rotating angle radians about vec @@ -243,10 +243,10 @@ public: inline LLMatrix4::LLMatrix4() { - identity(); + setIdentity(); } -inline const LLMatrix4& LLMatrix4::identity() +inline const LLMatrix4& LLMatrix4::setIdentity() { mMatrix[0][0] = 1.f; mMatrix[0][1] = 0.f; diff --git a/linden/indra/llmath/v2math.h b/linden/indra/llmath/v2math.h index b951786..5a520d2 100644 --- a/linden/indra/llmath/v2math.h +++ b/linden/indra/llmath/v2math.h @@ -54,18 +54,26 @@ class LLVector2 LLVector2(const F32 *vec); // Initializes LLVector2 to (vec[0]. vec[1]) // Clears LLVector2 to (0, 0). DEPRECATED - prefer zeroVec. - void clearVec(); + void clear(); + void setZero(); + void clearVec(); // deprecated + void zeroVec(); // deprecated - // Zero LLVector2 to (0, 0) - void zeroVec(); + void set(F32 x, F32 y); // Sets LLVector2 to (x, y) + void set(const LLVector2 &vec); // Sets LLVector2 to vec + void set(const F32 *vec); // Sets LLVector2 to vec - void setVec(F32 x, F32 y); // Sets LLVector2 to (x, y) - void setVec(const LLVector2 &vec); // Sets LLVector2 to vec - void setVec(const F32 *vec); // Sets LLVector2 to vec + void setVec(F32 x, F32 y); // deprecated + void setVec(const LLVector2 &vec); // deprecated + void setVec(const F32 *vec); // deprecated - F32 magVec() const; // Returns magnitude of LLVector2 - F32 magVecSquared() const; // Returns magnitude squared of LLVector2 - F32 normVec(); // Normalizes and returns the magnitude of LLVector2 + F32 length() const; // Returns magnitude of LLVector2 + F32 lengthSquared() const; // Returns magnitude squared of LLVector2 + F32 normalize(); // Normalizes and returns the magnitude of LLVector2 + + F32 magVec() const; // deprecated + F32 magVecSquared() const; // deprecated + F32 normVec(); // deprecated BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed @@ -132,30 +140,66 @@ inline LLVector2::LLVector2(const F32 *vec) // Clear and Assignment Functions +inline void LLVector2::clear(void) +{ + mV[VX] = 0.f; + mV[VY] = 0.f; +} + +inline void LLVector2::setZero(void) +{ + mV[VX] = 0.f; + mV[VY] = 0.f; +} + +// deprecated inline void LLVector2::clearVec(void) { mV[VX] = 0.f; mV[VY] = 0.f; } +// deprecated inline void LLVector2::zeroVec(void) { mV[VX] = 0.f; mV[VY] = 0.f; } +inline void LLVector2::set(F32 x, F32 y) +{ + mV[VX] = x; + mV[VY] = y; +} + +inline void LLVector2::set(const LLVector2 &vec) +{ + mV[VX] = vec.mV[VX]; + mV[VY] = vec.mV[VY]; +} + +inline void LLVector2::set(const F32 *vec) +{ + mV[VX] = vec[VX]; + mV[VY] = vec[VY]; +} + + +// deprecated inline void LLVector2::setVec(F32 x, F32 y) { mV[VX] = x; mV[VY] = y; } +// deprecated inline void LLVector2::setVec(const LLVector2 &vec) { mV[VX] = vec.mV[VX]; mV[VY] = vec.mV[VY]; } +// deprecated inline void LLVector2::setVec(const F32 *vec) { mV[VX] = vec[VX]; @@ -164,16 +208,49 @@ inline void LLVector2::setVec(const F32 *vec) // LLVector2 Magnitude and Normalization Functions +inline F32 LLVector2::length(void) const +{ + return fsqrtf(mV[0]*mV[0] + mV[1]*mV[1]); +} + +inline F32 LLVector2::lengthSquared(void) const +{ + return mV[0]*mV[0] + mV[1]*mV[1]; +} + +inline F32 LLVector2::normalize(void) +{ + F32 mag = fsqrtf(mV[0]*mV[0] + mV[1]*mV[1]); + F32 oomag; + + if (mag > FP_MAG_THRESHOLD) + { + oomag = 1.f/mag; + mV[0] *= oomag; + mV[1] *= oomag; + } + else + { + mV[0] = 0.f; + mV[1] = 0.f; + mag = 0; + } + return (mag); +} + +// deprecated inline F32 LLVector2::magVec(void) const { return fsqrtf(mV[0]*mV[0] + mV[1]*mV[1]); } +// deprecated inline F32 LLVector2::magVecSquared(void) const { return mV[0]*mV[0] + mV[1]*mV[1]; } +// deprecated inline F32 LLVector2::normVec(void) { F32 mag = fsqrtf(mV[0]*mV[0] + mV[1]*mV[1]); diff --git a/linden/indra/llmath/v3dmath.h b/linden/indra/llmath/v3dmath.h index 60757ba..9bd80b8 100644 --- a/linden/indra/llmath/v3dmath.h +++ b/linden/indra/llmath/v3dmath.h @@ -83,8 +83,9 @@ class LLVector3d BOOL clamp(const F64 min, const F64 max); // Clamps all values to (min,max), returns TRUE if data changed BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed - inline const LLVector3d& clearVec(); // Clears LLVector3d to (0, 0, 0, 1) - inline const LLVector3d& zeroVec(); // Zero LLVector3d to (0, 0, 0, 0) + inline const LLVector3d& clearVec(); // Clears LLVector3d to (0, 0, 0, 1) + inline const LLVector3d& setZero(); // Zero LLVector3d to (0, 0, 0, 0) + inline const LLVector3d& zeroVec(); // deprecated inline const LLVector3d& setVec(const F64 x, const F64 y, const F64 z); // Sets LLVector3d to (x, y, z, 1) inline const LLVector3d& setVec(const LLVector3d &vec); // Sets LLVector3d to vec inline const LLVector3d& setVec(const F64 *vec); // Sets LLVector3d to vec @@ -198,6 +199,14 @@ inline const LLVector3d& LLVector3d::clearVec(void) return (*this); } +inline const LLVector3d& LLVector3d::setZero(void) +{ + mdV[0] = 0.f; + mdV[1] = 0.f; + mdV[2] = 0.f; + return (*this); +} + inline const LLVector3d& LLVector3d::zeroVec(void) { mdV[0] = 0.f; diff --git a/linden/indra/llmath/v3math.cpp b/linden/indra/llmath/v3math.cpp index 34cce06..bbe460f 100644 --- a/linden/indra/llmath/v3math.cpp +++ b/linden/indra/llmath/v3math.cpp @@ -172,6 +172,22 @@ LLVector3 LLVector3::scaledVec(const LLVector3& vec) const return ret; } +const LLVector3& LLVector3::set(const LLVector3d &vec) +{ + mV[0] = (F32)vec.mdV[0]; + mV[1] = (F32)vec.mdV[1]; + mV[2] = (F32)vec.mdV[2]; + return (*this); +} + +const LLVector3& LLVector3::set(const LLVector4 &vec) +{ + mV[0] = vec.mV[0]; + mV[1] = vec.mV[1]; + mV[2] = vec.mV[2]; + return (*this); +} + const LLVector3& LLVector3::setVec(const LLVector3d &vec) { mV[0] = (F32)vec.mdV[0]; diff --git a/linden/indra/llmath/v3math.h b/linden/indra/llmath/v3math.h index f1c1b39..ddb5e1f 100644 --- a/linden/indra/llmath/v3math.h +++ b/linden/indra/llmath/v3math.h @@ -81,18 +81,33 @@ class LLVector3 BOOL abs(); // sets all values to absolute value of original value (first octant), returns TRUE if changed - inline void clearVec(); // Clears LLVector3 to (0, 0, 0, 1) - inline void zeroVec(); // Zero LLVector3 to (0, 0, 0, 0) - inline void setVec(F32 x, F32 y, F32 z); // Sets LLVector3 to (x, y, z, 1) - inline void setVec(const LLVector3 &vec); // Sets LLVector3 to vec - inline void setVec(const F32 *vec); // Sets LLVector3 to vec + inline void clear(); // Clears LLVector3 to (0, 0, 0) + inline void setZero(); // Clears LLVector3 to (0, 0, 0) + inline void clearVec(); // deprecated + inline void zeroVec(); // deprecated - const LLVector3& setVec(const LLVector4 &vec); - const LLVector3& setVec(const LLVector3d &vec); // Sets LLVector3 to vec + inline void set(F32 x, F32 y, F32 z); // Sets LLVector3 to (x, y, z, 1) + inline void set(const LLVector3 &vec); // Sets LLVector3 to vec + inline void set(const F32 *vec); // Sets LLVector3 to vec + const LLVector3& set(const LLVector4 &vec); + const LLVector3& set(const LLVector3d &vec);// Sets LLVector3 to vec - F32 magVec() const; // Returns magnitude of LLVector3 - F32 magVecSquared() const; // Returns magnitude squared of LLVector3 - inline F32 normVec(); // Normalizes and returns the magnitude of LLVector3 + inline void setVec(F32 x, F32 y, F32 z); // deprecated + inline void setVec(const LLVector3 &vec); // deprecated + inline void setVec(const F32 *vec); // deprecated + + const LLVector3& setVec(const LLVector4 &vec); // deprecated + const LLVector3& setVec(const LLVector3d &vec); // deprecated + + F32 length() const; // Returns magnitude of LLVector3 + F32 lengthSquared() const; // Returns magnitude squared of LLVector3 + F32 magVec() const; // deprecated + F32 magVecSquared() const; // deprecated + + inline F32 normalize(); // Normalizes and returns the magnitude of LLVector3 + inline F32 normVec(); // deprecated + + inline BOOL inRange( F32 min, F32 max ) const; // Returns true if all values of the vector are between min and max const LLVector3& rotVec(F32 angle, const LLVector3 &vec); // Rotates about vec by angle radians const LLVector3& rotVec(F32 angle, F32 x, F32 y, F32 z); // Rotates about x,y,z by angle radians @@ -188,6 +203,20 @@ inline BOOL LLVector3::isFinite() const // Clear and Assignment Functions +inline void LLVector3::clear(void) +{ + mV[0] = 0.f; + mV[1] = 0.f; + mV[2] = 0.f; +} + +inline void LLVector3::setZero(void) +{ + mV[0] = 0.f; + mV[1] = 0.f; + mV[2] = 0.f; +} + inline void LLVector3::clearVec(void) { mV[0] = 0.f; @@ -202,6 +231,28 @@ inline void LLVector3::zeroVec(void) mV[2] = 0.f; } +inline void LLVector3::set(F32 x, F32 y, F32 z) +{ + mV[VX] = x; + mV[VY] = y; + mV[VZ] = z; +} + +inline void LLVector3::set(const LLVector3 &vec) +{ + mV[0] = vec.mV[0]; + mV[1] = vec.mV[1]; + mV[2] = vec.mV[2]; +} + +inline void LLVector3::set(const F32 *vec) +{ + mV[0] = vec[0]; + mV[1] = vec[1]; + mV[2] = vec[2]; +} + +// deprecated inline void LLVector3::setVec(F32 x, F32 y, F32 z) { mV[VX] = x; @@ -209,6 +260,7 @@ inline void LLVector3::setVec(F32 x, F32 y, F32 z) mV[VZ] = z; } +// deprecated inline void LLVector3::setVec(const LLVector3 &vec) { mV[0] = vec.mV[0]; @@ -216,6 +268,7 @@ inline void LLVector3::setVec(const LLVector3 &vec) mV[2] = vec.mV[2]; } +// deprecated inline void LLVector3::setVec(const F32 *vec) { mV[0] = vec[0]; @@ -223,6 +276,29 @@ inline void LLVector3::setVec(const F32 *vec) mV[2] = vec[2]; } +inline F32 LLVector3::normalize(void) +{ + F32 mag = fsqrtf(mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]); + F32 oomag; + + if (mag > FP_MAG_THRESHOLD) + { + oomag = 1.f/mag; + mV[0] *= oomag; + mV[1] *= oomag; + mV[2] *= oomag; + } + else + { + mV[0] = 0.f; + mV[1] = 0.f; + mV[2] = 0.f; + mag = 0; + } + return (mag); +} + +// deprecated inline F32 LLVector3::normVec(void) { F32 mag = fsqrtf(mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]); @@ -247,6 +323,16 @@ inline F32 LLVector3::normVec(void) // LLVector3 Magnitude and Normalization Functions +inline F32 LLVector3::length(void) const +{ + return fsqrtf(mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]); +} + +inline F32 LLVector3::lengthSquared(void) const +{ + return mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]; +} + inline F32 LLVector3::magVec(void) const { return fsqrtf(mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]); @@ -257,6 +343,13 @@ inline F32 LLVector3::magVecSquared(void) const return mV[0]*mV[0] + mV[1]*mV[1] + mV[2]*mV[2]; } +inline BOOL LLVector3::inRange( F32 min, F32 max ) const +{ + return mV[0] >= min && mV[0] <= max && + mV[1] >= min && mV[1] <= max && + mV[2] >= min && mV[2] <= max; +} + inline LLVector3 operator+(const LLVector3 &a, const LLVector3 &b) { LLVector3 c(a); @@ -397,7 +490,7 @@ inline F32 dist_vec_squared2D(const LLVector3 &a, const LLVector3 &b) inline LLVector3 projected_vec(const LLVector3 &a, const LLVector3 &b) { LLVector3 project_axis = b; - project_axis.normVec(); + project_axis.normalize(); return project_axis * (a * project_axis); } @@ -438,8 +531,8 @@ inline F32 angle_between(const LLVector3& a, const LLVector3& b) { LLVector3 an = a; LLVector3 bn = b; - an.normVec(); - bn.normVec(); + an.normalize(); + bn.normalize(); F32 cosine = an * bn; F32 angle = (cosine >= 1.0f) ? 0.0f : (cosine <= -1.0f) ? F_PI : @@ -451,8 +544,8 @@ inline BOOL are_parallel(const LLVector3 &a, const LLVector3 &b, F32 epsilon) { LLVector3 an = a; LLVector3 bn = b; - an.normVec(); - bn.normVec(); + an.normalize(); + bn.normalize(); F32 dot = an * bn; if ( (1.0f - fabs(dot)) < epsilon) { diff --git a/linden/indra/llmath/v4math.cpp b/linden/indra/llmath/v4math.cpp index 26a47ff..34b8f07 100644 --- a/linden/indra/llmath/v4math.cpp +++ b/linden/indra/llmath/v4math.cpp @@ -113,8 +113,8 @@ F32 angle_between( const LLVector4& a, const LLVector4& b ) { LLVector4 an = a; LLVector4 bn = b; - an.normVec(); - bn.normVec(); + an.normalize(); + bn.normalize(); F32 cosine = an * bn; F32 angle = (cosine >= 1.0f) ? 0.0f : (cosine <= -1.0f) ? F_PI : @@ -126,8 +126,8 @@ BOOL are_parallel(const LLVector4 &a, const LLVector4 &b, F32 epsilon) { LLVector4 an = a; LLVector4 bn = b; - an.normVec(); - bn.normVec(); + an.normalize(); + bn.normalize(); F32 dot = an * bn; if ( (1.0f - fabs(dot)) < epsilon) return TRUE; diff --git a/linden/indra/llmath/v4math.h b/linden/indra/llmath/v4math.h index 60e30e3..4ef2d32 100644 --- a/linden/indra/llmath/v4math.h +++ b/linden/indra/llmath/v4math.h @@ -68,17 +68,29 @@ class LLVector4 inline BOOL isFinite() const; // checks to see if all values of LLVector3 are finite - inline void clearVec(); // Clears LLVector4 to (0, 0, 0, 1) - inline void zeroVec(); // zero LLVector4 to (0, 0, 0, 0) - inline void setVec(F32 x, F32 y, F32 z); // Sets LLVector4 to (x, y, z, 1) - inline void setVec(F32 x, F32 y, F32 z, F32 w); // Sets LLVector4 to (x, y, z, w) - inline void setVec(const LLVector4 &vec); // Sets LLVector4 to vec - inline void setVec(const LLVector3 &vec, F32 w = 1.f); // Sets LLVector4 to LLVector3 vec - inline void setVec(const F32 *vec); // Sets LLVector4 to vec - - F32 magVec() const; // Returns magnitude of LLVector4 - F32 magVecSquared() const; // Returns magnitude squared of LLVector4 - F32 normVec(); // Normalizes and returns the magnitude of LLVector4 + inline void clear(); // Clears LLVector4 to (0, 0, 0, 1) + inline void clearVec(); // deprecated + inline void zeroVec(); // deprecated + + inline void set(F32 x, F32 y, F32 z); // Sets LLVector4 to (x, y, z, 1) + inline void set(F32 x, F32 y, F32 z, F32 w); // Sets LLVector4 to (x, y, z, w) + inline void set(const LLVector4 &vec); // Sets LLVector4 to vec + inline void set(const LLVector3 &vec, F32 w = 1.f); // Sets LLVector4 to LLVector3 vec + inline void set(const F32 *vec); // Sets LLVector4 to vec + + inline void setVec(F32 x, F32 y, F32 z); // deprecated + inline void setVec(F32 x, F32 y, F32 z, F32 w); // deprecated + inline void setVec(const LLVector4 &vec); // deprecated + inline void setVec(const LLVector3 &vec, F32 w = 1.f); // deprecated + inline void setVec(const F32 *vec); // deprecated + + F32 length() const; // Returns magnitude of LLVector4 + F32 lengthSquared() const; // Returns magnitude squared of LLVector4 + F32 normalize(); // Normalizes and returns the magnitude of LLVector4 + + F32 magVec() const; // deprecated + F32 magVecSquared() const; // deprecated + F32 normVec(); // deprecated // Sets all values to absolute value of their original values // Returns TRUE if data changed @@ -192,6 +204,15 @@ inline BOOL LLVector4::isFinite() const // Clear and Assignment Functions +inline void LLVector4::clear(void) +{ + mV[VX] = 0.f; + mV[VY] = 0.f; + mV[VZ] = 0.f; + mV[VW] = 1.f; +} + +// deprecated inline void LLVector4::clearVec(void) { mV[VX] = 0.f; @@ -200,6 +221,7 @@ inline void LLVector4::clearVec(void) mV[VW] = 1.f; } +// deprecated inline void LLVector4::zeroVec(void) { mV[VX] = 0.f; @@ -208,6 +230,48 @@ inline void LLVector4::zeroVec(void) mV[VW] = 0.f; } +inline void LLVector4::set(F32 x, F32 y, F32 z) +{ + mV[VX] = x; + mV[VY] = y; + mV[VZ] = z; + mV[VW] = 1.f; +} + +inline void LLVector4::set(F32 x, F32 y, F32 z, F32 w) +{ + mV[VX] = x; + mV[VY] = y; + mV[VZ] = z; + mV[VW] = w; +} + +inline void LLVector4::set(const LLVector4 &vec) +{ + mV[VX] = vec.mV[VX]; + mV[VY] = vec.mV[VY]; + mV[VZ] = vec.mV[VZ]; + mV[VW] = vec.mV[VW]; +} + +inline void LLVector4::set(const LLVector3 &vec, F32 w) +{ + mV[VX] = vec.mV[VX]; + mV[VY] = vec.mV[VY]; + mV[VZ] = vec.mV[VZ]; + mV[VW] = w; +} + +inline void LLVector4::set(const F32 *vec) +{ + mV[VX] = vec[VX]; + mV[VY] = vec[VY]; + mV[VZ] = vec[VZ]; + mV[VW] = vec[VW]; +} + + +// deprecated inline void LLVector4::setVec(F32 x, F32 y, F32 z) { mV[VX] = x; @@ -216,6 +280,7 @@ inline void LLVector4::setVec(F32 x, F32 y, F32 z) mV[VW] = 1.f; } +// deprecated inline void LLVector4::setVec(F32 x, F32 y, F32 z, F32 w) { mV[VX] = x; @@ -224,6 +289,7 @@ inline void LLVector4::setVec(F32 x, F32 y, F32 z, F32 w) mV[VW] = w; } +// deprecated inline void LLVector4::setVec(const LLVector4 &vec) { mV[VX] = vec.mV[VX]; @@ -232,6 +298,7 @@ inline void LLVector4::setVec(const LLVector4 &vec) mV[VW] = vec.mV[VW]; } +// deprecated inline void LLVector4::setVec(const LLVector3 &vec, F32 w) { mV[VX] = vec.mV[VX]; @@ -240,6 +307,7 @@ inline void LLVector4::setVec(const LLVector3 &vec, F32 w) mV[VW] = w; } +// deprecated inline void LLVector4::setVec(const F32 *vec) { mV[VX] = vec[VX]; @@ -250,6 +318,16 @@ inline void LLVector4::setVec(const F32 *vec) // LLVector4 Magnitude and Normalization Functions +inline F32 LLVector4::length(void) const +{ + return fsqrtf(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]); +} + +inline F32 LLVector4::lengthSquared(void) const +{ + return mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]; +} + inline F32 LLVector4::magVec(void) const { return fsqrtf(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]); @@ -364,13 +442,13 @@ inline LLVector4 operator-(const LLVector4 &a) inline F32 dist_vec(const LLVector4 &a, const LLVector4 &b) { LLVector4 vec = a - b; - return (vec.magVec()); + return (vec.length()); } inline F32 dist_vec_squared(const LLVector4 &a, const LLVector4 &b) { LLVector4 vec = a - b; - return (vec.magVecSquared()); + return (vec.lengthSquared()); } inline LLVector4 lerp(const LLVector4 &a, const LLVector4 &b, F32 u) @@ -382,6 +460,29 @@ inline LLVector4 lerp(const LLVector4 &a, const LLVector4 &b, F32 u) a.mV[VW] + (b.mV[VW] - a.mV[VW]) * u); } +inline F32 LLVector4::normalize(void) +{ + F32 mag = fsqrtf(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]); + F32 oomag; + + if (mag > FP_MAG_THRESHOLD) + { + oomag = 1.f/mag; + mV[VX] *= oomag; + mV[VY] *= oomag; + mV[VZ] *= oomag; + } + else + { + mV[0] = 0.f; + mV[1] = 0.f; + mV[2] = 0.f; + mag = 0; + } + return (mag); +} + +// deprecated inline F32 LLVector4::normVec(void) { F32 mag = fsqrtf(mV[VX]*mV[VX] + mV[VY]*mV[VY] + mV[VZ]*mV[VZ]); diff --git a/linden/indra/llmath/xform.h b/linden/indra/llmath/xform.h index 8fd1e9e..ad2a944 100644 --- a/linden/indra/llmath/xform.h +++ b/linden/indra/llmath/xform.h @@ -35,10 +35,12 @@ #include "m4math.h" #include "llquaternion.h" -const F32 MAX_OBJECT_Z = 768.f; +const F32 MAX_OBJECT_Z = 4096.f; // should match REGION_HEIGHT_METERS, Pre-havok4: 768.f const F32 MIN_OBJECT_Z = -256.f; -const F32 MIN_OBJECT_SCALE = 0.01f; -const F32 MAX_OBJECT_SCALE = 10.f; +const F32 DEFAULT_MAX_PRIM_SCALE = 10.f; +const F32 MIN_PRIM_SCALE = 0.01f; +const F32 MAX_PRIM_SCALE = 65536.f; // something very high but not near FLT_MAX + class LLXform { @@ -138,7 +140,7 @@ public: void init() { - mWorldMatrix.identity(); + mWorldMatrix.setIdentity(); mMin.clearVec(); mMax.clearVec(); diff --git a/linden/indra/llmedia/llmediaimplllmozlib.cpp b/linden/indra/llmedia/llmediaimplllmozlib.cpp index 5efaa59..53cb344 100644 --- a/linden/indra/llmedia/llmediaimplllmozlib.cpp +++ b/linden/indra/llmedia/llmediaimplllmozlib.cpp @@ -289,7 +289,7 @@ void LLMediaImplLLMozLib::onPageChanged( const EventType& eventIn ) // virtual void LLMediaImplLLMozLib::onClickLinkHref( const EventType& eventIn ) { - LLMediaEvent event( this, eventIn.getStringValue() ); + LLMediaEvent event( this, eventIn.getStringValue(), eventIn.getStringValue2() ); mEventEmitter.update( &LLMediaObserver::onClickLinkHref, event ); } diff --git a/linden/indra/llmedia/llmediaimplquicktime.cpp b/linden/indra/llmedia/llmediaimplquicktime.cpp index f9a3b05..b126e2f 100644 --- a/linden/indra/llmedia/llmediaimplquicktime.cpp +++ b/linden/indra/llmedia/llmediaimplquicktime.cpp @@ -256,17 +256,6 @@ bool LLMediaImplQuickTime::sizeChanged() SetMovieGWorld( mMovieHandle, mGWorldHandle, GetGWorldDevice ( mGWorldHandle ) ); } - // flip movie to match the way the client expects textures (sigh!) - MatrixRecord transform; - SetIdentityMatrix( &transform ); // transforms are additive so start from identify matrix - double scaleX = 1.0 / (double)LLMediaManager::textureWidthFromMediaWidth( width ); - double scaleY = -1.0 / (double)LLMediaManager::textureHeightFromMediaHeight( height ); - double centerX = width / 2.0; - double centerY = height / 2.0; - ScaleMatrix( &transform, X2Fix ( scaleX ), X2Fix ( scaleY ), X2Fix ( centerX ), X2Fix ( centerY ) ); - SetMovieMatrix( mMovieHandle, &transform ); - std::cout << "LLMEDIA> Flipping stream to match expected OpenGL orientation size=" << width << " x " << height << std::endl; - // update movie controller if ( mMovieController ) { @@ -454,10 +443,14 @@ bool LLMediaImplQuickTime::processState() bool LLMediaImplQuickTime::setMovieBoxEnhanced( Rect* rect ) { // get movie rect - GetMovieBox( mMovieHandle, rect ); - int width = ( rect->right - rect->left ); - int height = ( rect->bottom - rect->top ); + GetMovieNaturalBoundsRect( mMovieHandle, rect ); + + int natural_width = ( rect->right - rect->left ); + int natural_height = ( rect->bottom - rect->top ); + int width = natural_width; + int height = natural_height; + // if the user has requested a specific size, use it: if ((mMediaRequestedWidth != 0) && (mMediaRequestedHeight != 0)) { @@ -485,12 +478,22 @@ bool LLMediaImplQuickTime::setMovieBoxEnhanced( Rect* rect ) if ( height > mMaxHeight ) height = mMaxHeight; - // tell quicktime about new size + + // scale movie to fit rect and invert vertically to match opengl image format + MatrixRecord transform; + SetIdentityMatrix( &transform ); // transforms are additive so start from identify matrix + double scaleX = (double) width / natural_width; + double scaleY = -1.0 * (double) height / natural_height; + double centerX = width / 2.0; + double centerY = height / 2.0; + ScaleMatrix( &transform, X2Fix ( scaleX ), X2Fix ( scaleY ), X2Fix ( centerX ), X2Fix ( centerY ) ); + SetMovieMatrix( mMovieHandle, &transform ); + + // return the new rect rect->right = width; rect->bottom = height; rect->left = 0; rect->top = 0; - SetMovieBox( mMovieHandle, rect ); return true; } diff --git a/linden/indra/llmedia/llmediaobserver.h b/linden/indra/llmedia/llmediaobserver.h index aeb2c39..ec9f881 100644 --- a/linden/indra/llmedia/llmediaobserver.h +++ b/linden/indra/llmedia/llmediaobserver.h @@ -47,6 +47,11 @@ class LLMediaEvent { }; + LLMediaEvent( LLMediaBase* subject, std::string string_in, std::string string_ex_in ) : + mSubject( subject ), mStringValue(string_in), mStringValueEx(string_ex_in) + { + }; + LLMediaEvent( LLMediaBase* subject, std::string string_in, int int_in ) : mSubject( subject ), mStringValue(string_in), mIntValue(int_in) { @@ -74,10 +79,16 @@ class LLMediaEvent return mStringValue; } + std::string getStringValueEx() const + { + return mStringValueEx; + } + private: LLMediaBase* mSubject; int mIntValue; std::string mStringValue; + std::string mStringValueEx; }; class LLMediaObserver diff --git a/linden/indra/llmessage/llcachename.cpp b/linden/indra/llmessage/llcachename.cpp index 6075958..e8208cc 100644 --- a/linden/indra/llmessage/llcachename.cpp +++ b/linden/indra/llmessage/llcachename.cpp @@ -43,9 +43,10 @@ #include "message.h" // Constants -const char* CN_WAITING = "(waiting)"; -const char* CN_NOBODY = "(nobody)"; -const char* CN_NONE = "(none)"; +// probably need a setUIString() call in the interface +const char* const CN_WAITING = "(Loading...)"; // *TODO: translate +const char* const CN_NOBODY = "(nobody)"; // *TODO: translate +const char* const CN_NONE = "(none)"; // *TODO: translate // llsd serialization constants static const std::string AGENTS("agents"); diff --git a/linden/indra/llmessage/llhttpnode.h b/linden/indra/llmessage/llhttpnode.h index 7d9cb95..02e8ceb 100644 --- a/linden/indra/llmessage/llhttpnode.h +++ b/linden/indra/llmessage/llhttpnode.h @@ -108,7 +108,6 @@ public: virtual void get(ResponsePtr, const LLSD& context) const; virtual void put(ResponsePtr, const LLSD& context, const LLSD& input) const; virtual void post(ResponsePtr, const LLSD& context, const LLSD& input) const; - virtual void del(ResponsePtr, const LLSD& context) const; //@} diff --git a/linden/indra/llmessage/llinstantmessage.h b/linden/indra/llmessage/llinstantmessage.h index c6319da..35127c3 100644 --- a/linden/indra/llmessage/llinstantmessage.h +++ b/linden/indra/llmessage/llinstantmessage.h @@ -177,7 +177,7 @@ enum EGodlikeRequest GOD_WANTS_NOTHING, // for requesting physics information about an object - GOD_WANTS_HAVOK_INFO, + GOD_WANTS_PHYSICS_INFO, // two unused requests that can be appropriated for debug // purposes (no viewer recompile necessary) diff --git a/linden/indra/llmessage/lliohttpserver.cpp b/linden/indra/llmessage/lliohttpserver.cpp index 6e94ec6..2ebf117 100644 --- a/linden/indra/llmessage/lliohttpserver.cpp +++ b/linden/indra/llmessage/lliohttpserver.cpp @@ -203,7 +203,9 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl( } // Log all HTTP transactions. - llinfos << verb << " " << context[CONTEXT_REQUEST]["path"].asString() + // TODO: Add a way to log these to their own file instead of indra.log + // It is just too spammy to be in indra.log. + lldebugs << verb << " " << context[CONTEXT_REQUEST]["path"].asString() << " " << mStatusCode << " " << mStatusMessage << " " << delta << "s" << llendl; @@ -723,8 +725,8 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl( const LLHTTPNode* node = mRootNode.traverse(mPath, context); if(node) { - lldebugs << "LLHTTPResponder::process_impl found node for " - << mAbsPathAndQuery << llendl; + //llinfos << "LLHTTPResponder::process_impl found node for " + // << mAbsPathAndQuery << llendl; // Copy everything after mLast read to the out. LLBufferArray::segment_iterator_t seg_iter; diff --git a/linden/indra/llmessage/llmessageconfig.cpp b/linden/indra/llmessage/llmessageconfig.cpp index 0e7f768..807a35b 100644 --- a/linden/indra/llmessage/llmessageconfig.cpp +++ b/linden/indra/llmessage/llmessageconfig.cpp @@ -252,6 +252,14 @@ bool LLMessageConfig::isValidMessage(const std::string& msg_name) return file.mMessages.has(msg_name); } +//static +bool LLMessageConfig::onlySendLatest(const std::string& msg_name) +{ + LLMessageConfigFile& file = LLMessageConfigFile::instance(); + LLSD config = file.mMessages[msg_name]; + return config["only-send-latest"].asBoolean(); +} + bool LLMessageConfig::isCapBanned(const std::string& cap_name) { return LLMessageConfigFile::instance().isCapBanned(cap_name); diff --git a/linden/indra/llmessage/llmessageconfig.h b/linden/indra/llmessage/llmessageconfig.h index 32702e8..9b62f06 100644 --- a/linden/indra/llmessage/llmessageconfig.h +++ b/linden/indra/llmessage/llmessageconfig.h @@ -53,6 +53,7 @@ public: static Flavor getMessageFlavor(const std::string& msg_name); static SenderTrust getSenderTrustedness(const std::string& msg_name); static bool isValidMessage(const std::string& msg_name); + static bool onlySendLatest(const std::string& msg_name); static bool isCapBanned(const std::string& cap_name); static LLSD getConfigForMessage(const std::string& msg_name); }; diff --git a/linden/indra/llmessage/llmessagetemplate.h b/linden/indra/llmessage/llmessagetemplate.h index d0ef945..f92c4b7 100644 --- a/linden/indra/llmessage/llmessagetemplate.h +++ b/linden/indra/llmessage/llmessagetemplate.h @@ -156,7 +156,7 @@ public: LLMessageVariable(const char *name, const EMsgVariableType type, const S32 size) : mType(type), mSize(size) { - mName = gMessageStringTable.getString(name); + mName = LLMessageStringTable::getInstance()->getString(name); } ~LLMessageVariable() {} @@ -187,7 +187,7 @@ class LLMessageBlock public: LLMessageBlock(const char *name, EMsgBlockType type, S32 number = 1) : mType(type), mNumber(number), mTotalSize(0) { - mName = gMessageStringTable.getString(name); + mName = LLMessageStringTable::getInstance()->getString(name); } ~LLMessageBlock() @@ -293,7 +293,7 @@ public: mHandlerFunc(NULL), mUserData(NULL) { - mName = gMessageStringTable.getString(name); + mName = LLMessageStringTable::getInstance()->getString(name); } ~LLMessageTemplate() diff --git a/linden/indra/llmessage/llnamevalue.cpp b/linden/indra/llmessage/llnamevalue.cpp index 6c8a2c4..18bd5ac 100644 --- a/linden/indra/llmessage/llnamevalue.cpp +++ b/linden/indra/llmessage/llnamevalue.cpp @@ -34,12 +34,12 @@ #include "linden_common.h" -#include - #include "llnamevalue.h" + #include "u64.h" #include "llstring.h" #include "llcamera.h" +#include "string_table.h" // Anonymous enumeration to provide constants in this file. // *NOTE: These values may be used in sscanf statements below as their @@ -51,17 +51,7 @@ enum U64_BUFFER_LEN = 64 }; -struct user_callback_t -{ - user_callback_t() {}; - user_callback_t(TNameValueCallback cb, void** data) : m_Callback(cb), m_Data(data) {} - TNameValueCallback m_Callback; - void ** m_Data; -}; -typedef std::map user_callback_map_t; -user_callback_map_t gUserCallbackMap; - -LLStringTable gNVNameTable(16384); +LLStringTable gNVNameTable(256); char NameValueTypeStrings[NVT_EOF][NAME_VALUE_TYPE_STRING_LENGTH] = /*Flawfinder: Ignore*/ { @@ -80,8 +70,7 @@ char NameValueClassStrings[NVC_EOF][NAME_VALUE_CLASS_STRING_LENGTH] = /*Flawfind { "NULL", "R", // read only - "RW", // read write - "CB" // callback + "RW" // read write }; char NameValueSendtoStrings[NVS_EOF][NAME_VALUE_SENDTO_STRING_LENGTH] = /*Flawfinder: Ignore*/ @@ -94,13 +83,6 @@ char NameValueSendtoStrings[NVS_EOF][NAME_VALUE_SENDTO_STRING_LENGTH] = /*Flawfi }; /*Flawfinder: Ignore*/ -void add_use_callback(char *name, TNameValueCallback ucb, void **user_data) -{ - char *temp = gNVNameTable.addString(name); - gUserCallbackMap[temp] = user_callback_t(ucb,user_data); -} - - // // Class // @@ -125,12 +107,9 @@ void LLNameValue::baseInit() mSendto = NVS_NULL; mStringSendto = NameValueSendtoStrings[NVS_NULL]; - - mNameValueCB = NULL; - mUserData = NULL; } -void LLNameValue::init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, TNameValueCallback nvcb, void **user_data) +void LLNameValue::init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto) { mNVNameTable = &gNVNameTable; @@ -254,40 +233,11 @@ void LLNameValue::init(const char *name, const char *data, const char *type, con mClass = NVC_READ_WRITE; mStringClass = mNVNameTable->addString("RW"); } - else if (!strcmp(nvclass, "CB") || - !strcmp(nvclass, "CALLBACK")) // legacy - { - mClass = NVC_CALLBACK; - mStringClass = mNVNameTable->addString("CB"); - mNameValueCB = nvcb; - mUserData = user_data; - } else { // assume it's bad mClass = NVC_NULL; mStringClass = mNVNameTable->addString(nvclass); - mNameValueCB = NULL; - mUserData = NULL; - - // are we a user-defined call back? - for (user_callback_map_t::iterator iter = gUserCallbackMap.begin(); - iter != gUserCallbackMap.end(); iter++) - { - char* tname = iter->first; - if (tname == mStringClass) - { - mClass = NVC_CALLBACK; - mNameValueCB = (iter->second).m_Callback; - mUserData = (iter->second).m_Data; - } - } - - // Warn if we didn't find a callback - if (mClass == NVC_NULL) - { - llwarns << "Unknown user callback in name value init() for " << mName << llendl; - } } // Initialize the sendto variable @@ -326,24 +276,24 @@ void LLNameValue::init(const char *name, const char *data, const char *type, con } -LLNameValue::LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, TNameValueCallback nvcb, void **user_data) +LLNameValue::LLNameValue(const char *name, const char *data, const char *type, const char *nvclass) { baseInit(); // if not specified, send to simulator only - init(name, data, type, nvclass, "SIM", nvcb, user_data); + init(name, data, type, nvclass, "SIM"); } -LLNameValue::LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, TNameValueCallback nvcb, void **user_data) +LLNameValue::LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto) { baseInit(); - init(name, data, type, nvclass, nvsendto, nvcb, user_data); + init(name, data, type, nvclass, nvsendto); } // Initialize without any initial data. -LLNameValue::LLNameValue(const char *name, const char *type, const char *nvclass, TNameValueCallback nvcb, void **user_data) +LLNameValue::LLNameValue(const char *name, const char *type, const char *nvclass) { baseInit(); mName = mNVNameTable->addString(name); @@ -401,11 +351,9 @@ LLNameValue::LLNameValue(const char *name, const char *type, const char *nvclass { mClass = NVC_READ_WRITE; } - else if (!strcmp(mStringClass, "CALLBACK")) + else { - mClass = NVC_READ_WRITE; - mNameValueCB = nvcb; - mUserData = user_data; + mClass = NVC_NULL; } // Initialize the sendto variable @@ -734,46 +682,6 @@ LLVector3 *LLNameValue::getVec3() } -F32 LLNameValue::magnitude() -{ - switch(mType) - { - case NVT_STRING: - return (F32)(strlen(mNameValueReference.string)); /* Flawfinder: ignore */ - break; - case NVT_F32: - return (fabsf(*mNameValueReference.f32)); - break; - case NVT_S32: - return (fabsf((F32)(*mNameValueReference.s32))); - break; - case NVT_VEC3: - return (mNameValueReference.vec3->magVec()); - break; - case NVT_U32: - return (F32)(*mNameValueReference.u32); - break; - default: - llerrs << "No magnitude operation for NV type " << mStringType << llendl; - break; - } - return 0.f; -} - - -void LLNameValue::callCallback() -{ - if (mNameValueCB) - { - (*mNameValueCB)(this, mUserData); - } - else - { - llinfos << mName << " has no callback!" << llendl; - } -} - - BOOL LLNameValue::sendToData() const { return (mSendto == NVS_DATA_SIM || mSendto == NVS_DATA_SIM_VIEWER); @@ -795,13 +703,6 @@ LLNameValue &LLNameValue::operator=(const LLNameValue &a) if (mClass == NVC_READ_ONLY) return *this; - BOOL b_changed = FALSE; - if ( (mClass == NVC_CALLBACK) - &&(*this != a)) - { - b_changed = TRUE; - } - switch(a.mType) { case NVT_STRING: @@ -835,11 +736,6 @@ LLNameValue &LLNameValue::operator=(const LLNameValue &a) break; } - if (b_changed) - { - callCallback(); - } - return *this; } @@ -847,19 +743,12 @@ void LLNameValue::setString(const char *a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_STRING: if (a) { - if ( (mClass == NVC_CALLBACK) - &&(strcmp(this->mNameValueReference.string,a))) - { - b_changed = TRUE; - } - if (mNameValueReference.string) { delete [] mNameValueReference.string; @@ -870,11 +759,6 @@ void LLNameValue::setString(const char *a) { strcpy(mNameValueReference.string, a); /* Flawfinder: ignore */ } - - if (b_changed) - { - callCallback(); - } } else { @@ -889,11 +773,6 @@ void LLNameValue::setString(const char *a) break; } - if (b_changed) - { - callCallback(); - } - return; } @@ -902,19 +781,12 @@ void LLNameValue::setAsset(const char *a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_ASSET: if (a) { - if ( (mClass == NVC_CALLBACK) - &&(strcmp(this->mNameValueReference.string,a))) - { - b_changed = TRUE; - } - if (mNameValueReference.string) { delete [] mNameValueReference.string; @@ -924,11 +796,6 @@ void LLNameValue::setAsset(const char *a) { strcpy(mNameValueReference.string, a); /* Flawfinder: ignore */ } - - if (b_changed) - { - callCallback(); - } } else { @@ -942,10 +809,6 @@ void LLNameValue::setAsset(const char *a) default: break; } - if (b_changed) - { - callCallback(); - } } @@ -953,29 +816,15 @@ void LLNameValue::setF32(const F32 a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_F32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.f32 != a)) - { - b_changed = TRUE; - } *mNameValueReference.f32 = a; - if (b_changed) - { - callCallback(); - } break; default: break; } - if (b_changed) - { - callCallback(); - } return; } @@ -985,53 +834,21 @@ void LLNameValue::setS32(const S32 a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_S32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.s32 != a)) - { - b_changed = TRUE; - } *mNameValueReference.s32 = a; - if (b_changed) - { - callCallback(); - } break; case NVT_U32: - if ( (mClass == NVC_CALLBACK) - && ((S32) (*this->mNameValueReference.u32) != a)) - { - b_changed = TRUE; - } *mNameValueReference.u32 = a; - if (b_changed) - { - callCallback(); - } break; case NVT_F32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.f32 != a)) - { - b_changed = TRUE; - } *mNameValueReference.f32 = (F32)a; - if (b_changed) - { - callCallback(); - } break; default: break; } - if (b_changed) - { - callCallback(); - } return; } @@ -1041,45 +858,17 @@ void LLNameValue::setU32(const U32 a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_S32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.s32 != (S32) a)) - { - b_changed = TRUE; - } *mNameValueReference.s32 = a; - if (b_changed) - { - callCallback(); - } break; case NVT_U32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.u32 != a)) - { - b_changed = TRUE; - } *mNameValueReference.u32 = a; - if (b_changed) - { - callCallback(); - } break; case NVT_F32: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.f32 != a)) - { - b_changed = TRUE; - } *mNameValueReference.f32 = (F32)a; - if (b_changed) - { - callCallback(); - } break; default: llerrs << "NameValue: Trying to set U32 into a " << mStringType << ", unknown conversion" << llendl; @@ -1093,21 +882,11 @@ void LLNameValue::setVec3(const LLVector3 &a) { if (mClass == NVC_READ_ONLY) return; - BOOL b_changed = FALSE; switch(mType) { case NVT_VEC3: - if ( (mClass == NVC_CALLBACK) - &&(*this->mNameValueReference.vec3 != a)) - { - b_changed = TRUE; - } *mNameValueReference.vec3 = a; - if (b_changed) - { - callCallback(); - } break; default: llerrs << "NameValue: Trying to set LLVector3 into a " << mStringType << ", unknown conversion" << llendl; @@ -1117,29 +896,6 @@ void LLNameValue::setVec3(const LLVector3 &a) } -BOOL LLNameValue::nonzero() -{ - switch(mType) - { - case NVT_STRING: - if (!mNameValueReference.string) - return 0; - return (mNameValueReference.string[0] != 0); - case NVT_F32: - return (*mNameValueReference.f32 != 0.f); - case NVT_S32: - return (*mNameValueReference.s32 != 0); - case NVT_U32: - return (*mNameValueReference.u32 != 0); - case NVT_VEC3: - return (mNameValueReference.vec3->magVecSquared() != 0.f); - default: - llerrs << "NameValue: Trying to call nonzero on a " << mStringType << ", unknown conversion" << llendl; - break; - } - return FALSE; -} - std::string LLNameValue::printNameValue() { std::string buffer; @@ -1217,951 +973,3 @@ std::ostream& operator<<(std::ostream& s, const LLNameValue &a) return s; } - -// nota bene: return values aren't static for now to prevent memory leaks - -LLNameValue &operator+(const LLNameValue &a, const LLNameValue &b) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - if (b.mType == NVT_STRING) - { - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - - S32 length1 = (S32)strlen(a.mNameValueReference.string); /* Flawfinder: Ignore */ - S32 length2 = (S32)strlen(b.mNameValueReference.string); /* Flawfinder: Ignore */ - delete [] retval.mNameValueReference.string; - retval.mNameValueReference.string = new char[length1 + length2 + 1]; - if(retval.mNameValueReference.string != NULL) - { - strcpy(retval.mNameValueReference.string, a.mNameValueReference.string); /* Flawfinder: Ignore */ - strcat(retval.mNameValueReference.string, b.mNameValueReference.string); /* Flawfinder: Ignore */ - } - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 + *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 + *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 + *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 + *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 + *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 + *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 + *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.u32 + *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_U32; - retval.mStringType = NameValueTypeStrings[NVT_U32]; - delete retval.mNameValueReference.u32; - retval.mNameValueReference.u32 = new U32(*a.mNameValueReference.u32 + *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(*a.mNameValueReference.vec3 + *b.mNameValueReference.vec3); - } - break; - default: - llerrs << "Unknown add of NV type " << a.mStringType << " to " << b.mStringType << llendl; - break; - } - return retval; -} - -LLNameValue &operator-(const LLNameValue &a, const LLNameValue &b) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 - *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 - *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 - *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 - *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 - *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 - *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 - *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.u32 - *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_U32; - retval.mStringType = NameValueTypeStrings[NVT_U32]; - delete retval.mNameValueReference.u32; - retval.mNameValueReference.u32 = new U32(*a.mNameValueReference.u32 - *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(*a.mNameValueReference.vec3 - *b.mNameValueReference.vec3); - } - break; - default: - llerrs << "Unknown subtract of NV type " << a.mStringType << " to " << b.mStringType << llendl; - break; - } - return retval; -} - -LLNameValue &operator*(const LLNameValue &a, const LLNameValue &b) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 * *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 * *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 * *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 * *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 * *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 * *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 * *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.u32 * *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_U32; - retval.mStringType = NameValueTypeStrings[NVT_U32]; - delete retval.mNameValueReference.u32; - retval.mNameValueReference.u32 = new U32(*a.mNameValueReference.u32 * *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32((*a.mNameValueReference.vec3) * (*b.mNameValueReference.vec3)); - } - break; - default: - llerrs << "Unknown multiply of NV type " << a.mStringType << " to " << b.mStringType << llendl; - break; - } - return retval; -} - -LLNameValue &operator/(const LLNameValue &a, const LLNameValue &b) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 / *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 / *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 / *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 / *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 / *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 / *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 / *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.u32 / *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_U32; - retval.mStringType = NameValueTypeStrings[NVT_U32]; - delete retval.mNameValueReference.u32; - retval.mNameValueReference.u32 = new U32(*a.mNameValueReference.u32 / *b.mNameValueReference.u32); - } - break; - default: - llerrs << "Unknown divide of NV type " << a.mStringType << " to " << b.mStringType << llendl; - break; - } - return retval; -} - -LLNameValue &operator%(const LLNameValue &a, const LLNameValue &b) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - break; - case NVT_S32: - if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 % *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.s32 % *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_S32) - { - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(*a.mNameValueReference.u32 % *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - retval.mType = NVT_U32; - retval.mStringType = NameValueTypeStrings[NVT_U32]; - delete retval.mNameValueReference.u32; - retval.mNameValueReference.u32 = new U32(*a.mNameValueReference.u32 % *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(*a.mNameValueReference.vec3 % *b.mNameValueReference.vec3); - } - break; - default: - llerrs << "Unknown % of NV type " << a.mStringType << " to " << b.mStringType << llendl; - break; - } - return retval; -} - - -// Multiplying anything times a float gives you some floats -LLNameValue &operator*(const LLNameValue &a, F32 k) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 * k); - break; - case NVT_S32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 * k); - break; - case NVT_U32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 * k); - break; - case NVT_VEC3: - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(*a.mNameValueReference.vec3 * k); - break; - default: - llerrs << "Unknown multiply of NV type " << a.mStringType << " with F32" << llendl; - break; - } - return retval; -} - - -LLNameValue &operator*(F32 k, const LLNameValue &a) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.f32 * k); - break; - case NVT_S32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.s32 * k); - break; - case NVT_U32: - retval.mType = NVT_F32; - retval.mStringType = NameValueTypeStrings[NVT_F32]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(*a.mNameValueReference.u32 * k); - break; - case NVT_VEC3: - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(*a.mNameValueReference.vec3 * k); - break; - default: - llerrs << "Unknown multiply of NV type " << a.mStringType << " with F32" << llendl; - break; - } - return retval; -} - - -bool operator==(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if (b.mType == NVT_STRING) - { - if (!a.mNameValueReference.string) - return FALSE; - if (!b.mNameValueReference.string) - return FALSE; - return (!strcmp(a.mNameValueReference.string, b.mNameValueReference.string)); - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 == *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 == *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 == *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 == *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 == *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 == (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 == *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 == *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 == *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - return (*a.mNameValueReference.vec3 == *b.mNameValueReference.vec3); - } - break; - default: - llerrs << "Unknown == NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - -bool operator<=(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if (b.mType == NVT_STRING) - { - S32 retval = strcmp(a.mNameValueReference.string, b.mNameValueReference.string); - return (retval <= 0); - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 <= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 <= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 <= *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 <= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 <= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 <= (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 <= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 <= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 <= *b.mNameValueReference.u32); - } - break; - default: - llerrs << "Unknown <= NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - - -bool operator>=(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if ( (a.mType == b.mType) - &&(a.mType == NVT_STRING)) - { - S32 retval = strcmp(a.mNameValueReference.string, b.mNameValueReference.string); - return (retval >= 0); - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 >= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 >= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 >= *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 >= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 >= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 >= (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 >= *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 >= *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 >= *b.mNameValueReference.u32); - } - break; - default: - llerrs << "Unknown >= NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - - -bool operator<(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if ( (a.mType == b.mType) - &&(a.mType == NVT_STRING)) - { - S32 retval = strcmp(a.mNameValueReference.string, b.mNameValueReference.string); - return (retval < 0); - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 < *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 < *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 < *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 < *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 < *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 < (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 < *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 < *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 < *b.mNameValueReference.u32); - } - break; - default: - llerrs << "Unknown < NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - - -bool operator>(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if ( (a.mType == b.mType) - &&(a.mType == NVT_STRING)) - { - S32 retval = strcmp(a.mNameValueReference.string, b.mNameValueReference.string); - return (retval > 0); - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 > *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 > *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 > *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 > *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 > *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 > (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 > *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 > *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 > *b.mNameValueReference.u32); - } - break; - default: - llerrs << "Unknown > NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - -bool operator!=(const LLNameValue &a, const LLNameValue &b) -{ - switch(a.mType) - { - case NVT_STRING: - if ( (a.mType == b.mType) - &&(a.mType == NVT_STRING)) - { - return (strcmp(a.mNameValueReference.string, b.mNameValueReference.string)) ? true : false; - } - break; - case NVT_F32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.f32 != *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.f32 != *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.f32 != *b.mNameValueReference.u32); - } - break; - case NVT_S32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.s32 != *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return (*a.mNameValueReference.s32 != *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.s32 != (S32) *b.mNameValueReference.u32); - } - break; - case NVT_U32: - if (b.mType == NVT_F32) - { - return (*a.mNameValueReference.u32 != *b.mNameValueReference.f32); - } - else if (b.mType == NVT_S32) - { - return ((S32) *a.mNameValueReference.u32 != *b.mNameValueReference.s32); - } - else if (b.mType == NVT_U32) - { - return (*a.mNameValueReference.u32 != *b.mNameValueReference.u32); - } - break; - case NVT_VEC3: - if ( (a.mType == b.mType) - &&(a.mType == NVT_VEC3)) - { - return (*a.mNameValueReference.vec3 != *b.mNameValueReference.vec3); - } - break; - default: - llerrs << "Unknown != NV type " << a.mStringType << " with " << b.mStringType << llendl; - break; - } - return FALSE; -} - - -LLNameValue &operator-(const LLNameValue &a) -{ - static LLNameValue retval; - - switch(a.mType) - { - case NVT_STRING: - break; - case NVT_F32: - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.f32; - retval.mNameValueReference.f32 = new F32(-*a.mNameValueReference.f32); - break; - case NVT_S32: - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.s32; - retval.mNameValueReference.s32 = new S32(-*a.mNameValueReference.s32); - break; - case NVT_U32: - retval.mType = NVT_S32; - retval.mStringType = NameValueTypeStrings[NVT_S32]; - delete retval.mNameValueReference.s32; - // Can't do unary minus on U32, doesn't work. - retval.mNameValueReference.s32 = new S32(-S32(*a.mNameValueReference.u32)); - break; - case NVT_VEC3: - retval.mType = a.mType; - retval.mStringType = NameValueTypeStrings[a.mType]; - delete retval.mNameValueReference.vec3; - retval.mNameValueReference.vec3 = new LLVector3(-*a.mNameValueReference.vec3); - break; - default: - llerrs << "Unknown - NV type " << a.mStringType << llendl; - break; - } - return retval; -} diff --git a/linden/indra/llmessage/llnamevalue.h b/linden/indra/llmessage/llnamevalue.h index c58172a..52beb07 100644 --- a/linden/indra/llmessage/llnamevalue.h +++ b/linden/indra/llmessage/llnamevalue.h @@ -32,15 +32,27 @@ #ifndef LL_LLNAMEVALUE_H #define LL_LLNAMEVALUE_H +// As of January 2008, I believe we only use the following name-value +// pairs. This is hard to prove because they are initialized from +// strings. JC +// +// FirstName STRING +// LastName STRING +// AttachPt U32 +// AttachmentItemId STRING +// Title STRING +// AttachmentOffset VEC3 +// AttachmentOrientation VEC3 +// SitObject STRING +// SitPosition VEC3 + #include "string_table.h" #include "llmath.h" #include "v3math.h" #include "lldbstrings.h" class LLNameValue; -typedef void (*TNameValueCallback)(LLNameValue *changed, void **user_data); - -void add_use_callback(char *name, TNameValueCallback ucb, void **user_data); +class LLStringTable; typedef enum e_name_value_types { @@ -61,7 +73,6 @@ typedef enum e_name_value_class NVC_NULL, NVC_READ_ONLY, NVC_READ_WRITE, - NVC_CALLBACK, NVC_EOF } ENameValueClass; @@ -110,17 +121,13 @@ class LLNameValue { public: void baseInit(); - void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, - TNameValueCallback nvcb = NULL, void **user_data = NULL); + void init(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto ); LLNameValue(); LLNameValue(const char *data); - LLNameValue(const char *name, const char *type, const char *nvclass, - TNameValueCallback nvcb = NULL, void **user_data = NULL); - LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, - TNameValueCallback nvcb = NULL, void **user_data = NULL); - LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto, - TNameValueCallback nvcb = NULL, void **user_data = NULL); + LLNameValue(const char *name, const char *type, const char *nvclass ); + LLNameValue(const char *name, const char *data, const char *type, const char *nvclass ); + LLNameValue(const char *name, const char *data, const char *type, const char *nvclass, const char *nvsendto ); ~LLNameValue(); @@ -130,7 +137,6 @@ public: S32 *getS32(); void getVec3(LLVector3 &vec); LLVector3 *getVec3(); - F32 magnitude(); U32 *getU32(); U64 *getU64(); @@ -157,27 +163,8 @@ public: void setVec3(const LLVector3 &a); void setU32(const U32 a); - BOOL nonzero(); - friend std::ostream& operator<<(std::ostream& s, const LLNameValue &a); - friend LLNameValue &operator+(const LLNameValue &a, const LLNameValue &b); - friend LLNameValue &operator-(const LLNameValue &a, const LLNameValue &b); - friend LLNameValue &operator*(const LLNameValue &a, const LLNameValue &b); - friend LLNameValue &operator/(const LLNameValue &a, const LLNameValue &b); - friend LLNameValue &operator%(const LLNameValue &a, const LLNameValue &b); - friend LLNameValue &operator*(const LLNameValue &a, F32 k); - friend LLNameValue &operator*(F32 k, const LLNameValue &a); - - friend bool operator==(const LLNameValue &a, const LLNameValue &b); - friend bool operator<=(const LLNameValue &a, const LLNameValue &b); - friend bool operator>=(const LLNameValue &a, const LLNameValue &b); - friend bool operator<(const LLNameValue &a, const LLNameValue &b); - friend bool operator>(const LLNameValue &a, const LLNameValue &b); - friend bool operator!=(const LLNameValue &a, const LLNameValue &b); - - friend LLNameValue &operator-(const LLNameValue &a); - private: void printNameValue(std::ostream& s); @@ -193,8 +180,6 @@ public: UNameValueReference mNameValueReference; LLStringTable *mNVNameTable; - TNameValueCallback mNameValueCB; - void **mUserData; }; extern LLStringTable gNVNameTable; diff --git a/linden/indra/llmessage/llregionflags.h b/linden/indra/llmessage/llregionflags.h index 96b66ca..1675478 100644 --- a/linden/indra/llmessage/llregionflags.h +++ b/linden/indra/llmessage/llregionflags.h @@ -140,7 +140,7 @@ const U32 ESTATE_MAINLAND = 1; const U32 ESTATE_ORIENTATION = 2; const U32 ESTATE_INTERNAL = 3; const U32 ESTATE_SHOWCASE = 4; -const U32 ESTATE_KIDGRID = 5; +const U32 ESTATE_TEEN = 5; const U32 ESTATE_LAST_LINDEN = 5; // last linden owned/managed estate // for EstateOwnerRequest, setaccess message @@ -172,9 +172,10 @@ const U32 ESTATE_ACCESS_BANNED_AGENT_ADD = 1 << 6; const U32 ESTATE_ACCESS_BANNED_AGENT_REMOVE = 1 << 7; const U32 ESTATE_ACCESS_MANAGER_ADD = 1 << 8; const U32 ESTATE_ACCESS_MANAGER_REMOVE = 1 << 9; +const U32 ESTATE_ACCESS_NO_REPLY = 1 << 10; const S32 ESTATE_MAX_MANAGERS = 10; -const S32 ESTATE_MAX_ACCESS_IDS = 300; // max for access, banned +const S32 ESTATE_MAX_ACCESS_IDS = 500; // max for access, banned const S32 ESTATE_MAX_GROUP_IDS = (S32) ESTATE_ACCESS_MAX_ENTRIES_PER_PACKET; // 'Sim Wide Delete' flags diff --git a/linden/indra/llmessage/llservicebuilder.cpp b/linden/indra/llmessage/llservicebuilder.cpp index 195e24b..138ab2d 100644 --- a/linden/indra/llmessage/llservicebuilder.cpp +++ b/linden/indra/llmessage/llservicebuilder.cpp @@ -134,6 +134,9 @@ std::string LLServiceBuilder::buildServiceURI( std::string::iterator end(service_url.end()); std::string::iterator deepest_node(service_url.end()); std::string::iterator deepest_node_end(service_url.end()); + //parse out the variables to replace by going through {}s one at a time, + // starting with the "deepest" in series {{}}, + // and otherwise replacing right-to-left for(; iter != end; ++iter) { switch(*iter) @@ -163,7 +166,7 @@ std::string LLServiceBuilder::buildServiceURI( { break; } - + //replace the variable we found in the {} above. // *NOTE: since the c++ implementation only understands // params and straight string substitution, so it's a // known distance of 2 to skip the directive. @@ -181,7 +184,7 @@ std::string LLServiceBuilder::buildServiceURI( } else { - llinfos << "Unknown key: " << key << llendl; + llwarns << "Unknown key: " << key << " in option map: " << LLSDOStreamer(option_map) << llendl; keep_looping = false; } break; diff --git a/linden/indra/llmessage/llurlrequest.cpp b/linden/indra/llmessage/llurlrequest.cpp index eabd951..5760197 100644 --- a/linden/indra/llmessage/llurlrequest.cpp +++ b/linden/indra/llmessage/llurlrequest.cpp @@ -34,7 +34,6 @@ #include "linden_common.h" #include "llurlrequest.h" -#include #include #include "llcurl.h" @@ -192,6 +191,11 @@ void LLURLRequest::useProxy(bool use_proxy) } } +void LLURLRequest::useProxy(const std::string &proxy) +{ + mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, proxy); +} + // virtual LLIOPipe::EStatus LLURLRequest::handleError( LLIOPipe::EStatus status, diff --git a/linden/indra/llmessage/llurlrequest.h b/linden/indra/llmessage/llurlrequest.h index dd82a9f..b6da56b 100644 --- a/linden/indra/llmessage/llurlrequest.h +++ b/linden/indra/llmessage/llurlrequest.h @@ -166,6 +166,11 @@ public: */ void useProxy(bool use_proxy); + /** + * @ brief Set the CURLOPT_PROXY header to the given value. + */ + void useProxy(const std::string& proxy); + public: /** * @brief Give this pipe a chance to handle a generated error diff --git a/linden/indra/llmessage/message.cpp b/linden/indra/llmessage/message.cpp index ee295d7..c572341 100644 --- a/linden/indra/llmessage/message.cpp +++ b/linden/indra/llmessage/message.cpp @@ -201,7 +201,7 @@ void LLMessageHandlerBridge::post(LLHTTPNode::ResponsePtr response, const LLSD& context, const LLSD& input) const { std::string name = context["request"]["wildcard"]["message-name"]; - char* namePtr = gMessageStringTable.getString(name.c_str()); + char* namePtr = LLMessageStringTable::getInstance()->getString(name.c_str()); lldebugs << "Setting mLastSender " << input["sender"].asString() << llendl; gMessageSystem->mLastSender = LLHost(input["sender"].asString()); @@ -469,7 +469,7 @@ static LLMessageSystem::message_template_name_map_t::const_iterator findTemplate(const LLMessageSystem::message_template_name_map_t& templates, std::string name) { - const char* namePrehash = gMessageStringTable.getString(name.c_str()); + const char* namePrehash = LLMessageStringTable::getInstance()->getString(name.c_str()); if(NULL == namePrehash) {return templates.end();} return templates.find(namePrehash); } @@ -770,7 +770,7 @@ BOOL LLMessageSystem::checkMessages( S64 frame_count ) /* Code for dumping the complete contents of a message. Keep for future use in optimizing messages. if( 1 ) { - static char* object_update = gMessageStringTable.getString("ObjectUpdate"); + static char* object_update = LLMessageStringTable::getInstance()->getString("ObjectUpdate"); if(object_update == mTemplateMessageReader->getMessageName() ) { llinfos << "ObjectUpdate:" << llendl; @@ -1018,7 +1018,7 @@ BOOL LLMessageSystem::isSendFull(const char* blockname) char* stringTableName = NULL; if(NULL != blockname) { - stringTableName = gMessageStringTable.getString(blockname); + stringTableName = LLMessageStringTable::getInstance()->getString(blockname); } return isSendFullFast(stringTableName); } @@ -2139,7 +2139,7 @@ void LLMessageSystem::dispatch( LLHTTPNode::ResponsePtr responsep) { if ((gMessageSystem->mMessageTemplates.find - (gMessageStringTable.getString(msg_name.c_str())) == + (LLMessageStringTable::getInstance()->getString(msg_name.c_str())) == gMessageSystem->mMessageTemplates.end()) && !LLMessageConfig::isValidMessage(msg_name)) { @@ -2173,7 +2173,7 @@ static void check_for_unrecognized_messages( end = map.endMap(); iter != end; ++iter) { - const char* name = gMessageStringTable.getString(iter->first.c_str()); + const char* name = LLMessageStringTable::getInstance()->getString(iter->first.c_str()); if (templates.find(name) == templates.end()) { @@ -2441,13 +2441,11 @@ void dump_prehash_files() fprintf(fp, "\n\nextern F32 gPrehashVersionNumber;\n\n"); for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) { - if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') + if (!LLMessageStringTable::getInstance()->mEmpty[i] && LLMessageStringTable::getInstance()->mString[i][0] != '.') { - fprintf(fp, "extern char * _PREHASH_%s;\n", gMessageStringTable.mString[i]); + fprintf(fp, "extern char * _PREHASH_%s;\n", LLMessageStringTable::getInstance()->mString[i]); } } - fprintf(fp, "\n\nvoid init_prehash_data();\n\n"); - fprintf(fp, "\n\n"); fprintf(fp, "\n\n#endif\n"); fclose(fp); } @@ -2472,21 +2470,11 @@ void dump_prehash_files() fprintf(fp, "\n\nF32 gPrehashVersionNumber = %.3ff;\n\n", gMessageSystem->mMessageFileVersionNumber); for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) { - if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') + if (!LLMessageStringTable::getInstance()->mEmpty[i] && LLMessageStringTable::getInstance()->mString[i][0] != '.') { - fprintf(fp, "char * _PREHASH_%s;\n", gMessageStringTable.mString[i]); + fprintf(fp, "char * _PREHASH_%s = LLMessageStringTable::getInstance()->getString(\"%s\");\n", LLMessageStringTable::getInstance()->mString[i], LLMessageStringTable::getInstance()->mString[i]); } } - fprintf(fp, "\nvoid init_prehash_data()\n"); - fprintf(fp, "{\n"); - for (i = 0; i < MESSAGE_NUMBER_OF_HASH_BUCKETS; i++) - { - if (!gMessageStringTable.mEmpty[i] && gMessageStringTable.mString[i][0] != '.') - { - fprintf(fp, "\t_PREHASH_%s = gMessageStringTable.getString(\"%s\");\n", gMessageStringTable.mString[i], gMessageStringTable.mString[i]); - } - } - fprintf(fp, "}\n"); fclose(fp); } } @@ -2528,7 +2516,6 @@ BOOL start_messaging_system( } else { - init_prehash_data(); if (gMessageSystem->mMessageFileVersionNumber != gPrehashVersionNumber) { llinfos << "Message template version does not match prehash version number" << llendl; @@ -2991,7 +2978,7 @@ void LLMessageSystem::setHandlerFuncFast(const char *name, void (*handler_func)( bool LLMessageSystem::callHandler(const char *name, bool trustedSource, LLMessageSystem* msg) { - name = gMessageStringTable.getString(name); + name = LLMessageStringTable::getInstance()->getString(name); message_template_name_map_t::const_iterator iter; iter = mMessageTemplates.find(name); if(iter == mMessageTemplates.end()) @@ -3474,7 +3461,7 @@ void LLMessageSystem::newMessageFast(const char *name) void LLMessageSystem::newMessage(const char *name) { - newMessageFast(gMessageStringTable.getString(name)); + newMessageFast(LLMessageStringTable::getInstance()->getString(name)); } void LLMessageSystem::addBinaryDataFast(const char *varname, const void *data, S32 size) @@ -3484,7 +3471,7 @@ void LLMessageSystem::addBinaryDataFast(const char *varname, const void *data, S void LLMessageSystem::addBinaryData(const char *varname, const void *data, S32 size) { - mMessageBuilder->addBinaryData(gMessageStringTable.getString(varname),data, size); + mMessageBuilder->addBinaryData(LLMessageStringTable::getInstance()->getString(varname),data, size); } void LLMessageSystem::addS8Fast(const char *varname, S8 v) @@ -3494,7 +3481,7 @@ void LLMessageSystem::addS8Fast(const char *varname, S8 v) void LLMessageSystem::addS8(const char *varname, S8 v) { - mMessageBuilder->addS8(gMessageStringTable.getString(varname), v); + mMessageBuilder->addS8(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addU8Fast(const char *varname, U8 v) @@ -3504,7 +3491,7 @@ void LLMessageSystem::addU8Fast(const char *varname, U8 v) void LLMessageSystem::addU8(const char *varname, U8 v) { - mMessageBuilder->addU8(gMessageStringTable.getString(varname), v); + mMessageBuilder->addU8(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addS16Fast(const char *varname, S16 v) @@ -3514,7 +3501,7 @@ void LLMessageSystem::addS16Fast(const char *varname, S16 v) void LLMessageSystem::addS16(const char *varname, S16 v) { - mMessageBuilder->addS16(gMessageStringTable.getString(varname), v); + mMessageBuilder->addS16(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addU16Fast(const char *varname, U16 v) @@ -3524,7 +3511,7 @@ void LLMessageSystem::addU16Fast(const char *varname, U16 v) void LLMessageSystem::addU16(const char *varname, U16 v) { - mMessageBuilder->addU16(gMessageStringTable.getString(varname), v); + mMessageBuilder->addU16(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addF32Fast(const char *varname, F32 v) @@ -3534,7 +3521,7 @@ void LLMessageSystem::addF32Fast(const char *varname, F32 v) void LLMessageSystem::addF32(const char *varname, F32 v) { - mMessageBuilder->addF32(gMessageStringTable.getString(varname), v); + mMessageBuilder->addF32(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addS32Fast(const char *varname, S32 v) @@ -3544,7 +3531,7 @@ void LLMessageSystem::addS32Fast(const char *varname, S32 v) void LLMessageSystem::addS32(const char *varname, S32 v) { - mMessageBuilder->addS32(gMessageStringTable.getString(varname), v); + mMessageBuilder->addS32(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addU32Fast(const char *varname, U32 v) @@ -3554,7 +3541,7 @@ void LLMessageSystem::addU32Fast(const char *varname, U32 v) void LLMessageSystem::addU32(const char *varname, U32 v) { - mMessageBuilder->addU32(gMessageStringTable.getString(varname), v); + mMessageBuilder->addU32(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addU64Fast(const char *varname, U64 v) @@ -3564,7 +3551,7 @@ void LLMessageSystem::addU64Fast(const char *varname, U64 v) void LLMessageSystem::addU64(const char *varname, U64 v) { - mMessageBuilder->addU64(gMessageStringTable.getString(varname), v); + mMessageBuilder->addU64(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addF64Fast(const char *varname, F64 v) @@ -3574,7 +3561,7 @@ void LLMessageSystem::addF64Fast(const char *varname, F64 v) void LLMessageSystem::addF64(const char *varname, F64 v) { - mMessageBuilder->addF64(gMessageStringTable.getString(varname), v); + mMessageBuilder->addF64(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addIPAddrFast(const char *varname, U32 v) @@ -3584,7 +3571,7 @@ void LLMessageSystem::addIPAddrFast(const char *varname, U32 v) void LLMessageSystem::addIPAddr(const char *varname, U32 v) { - mMessageBuilder->addIPAddr(gMessageStringTable.getString(varname), v); + mMessageBuilder->addIPAddr(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addIPPortFast(const char *varname, U16 v) @@ -3594,7 +3581,7 @@ void LLMessageSystem::addIPPortFast(const char *varname, U16 v) void LLMessageSystem::addIPPort(const char *varname, U16 v) { - mMessageBuilder->addIPPort(gMessageStringTable.getString(varname), v); + mMessageBuilder->addIPPort(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) @@ -3604,7 +3591,7 @@ void LLMessageSystem::addBOOLFast(const char* varname, BOOL v) void LLMessageSystem::addBOOL(const char* varname, BOOL v) { - mMessageBuilder->addBOOL(gMessageStringTable.getString(varname), v); + mMessageBuilder->addBOOL(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addStringFast(const char* varname, const char* v) @@ -3614,7 +3601,7 @@ void LLMessageSystem::addStringFast(const char* varname, const char* v) void LLMessageSystem::addString(const char* varname, const char* v) { - mMessageBuilder->addString(gMessageStringTable.getString(varname), v); + mMessageBuilder->addString(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addStringFast(const char* varname, const std::string& v) @@ -3624,7 +3611,7 @@ void LLMessageSystem::addStringFast(const char* varname, const std::string& v) void LLMessageSystem::addString(const char* varname, const std::string& v) { - mMessageBuilder->addString(gMessageStringTable.getString(varname), v); + mMessageBuilder->addString(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addVector3Fast(const char *varname, const LLVector3& v) @@ -3634,7 +3621,7 @@ void LLMessageSystem::addVector3Fast(const char *varname, const LLVector3& v) void LLMessageSystem::addVector3(const char *varname, const LLVector3& v) { - mMessageBuilder->addVector3(gMessageStringTable.getString(varname), v); + mMessageBuilder->addVector3(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addVector4Fast(const char *varname, const LLVector4& v) @@ -3644,7 +3631,7 @@ void LLMessageSystem::addVector4Fast(const char *varname, const LLVector4& v) void LLMessageSystem::addVector4(const char *varname, const LLVector4& v) { - mMessageBuilder->addVector4(gMessageStringTable.getString(varname), v); + mMessageBuilder->addVector4(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addVector3dFast(const char *varname, const LLVector3d& v) @@ -3654,7 +3641,7 @@ void LLMessageSystem::addVector3dFast(const char *varname, const LLVector3d& v) void LLMessageSystem::addVector3d(const char *varname, const LLVector3d& v) { - mMessageBuilder->addVector3d(gMessageStringTable.getString(varname), v); + mMessageBuilder->addVector3d(LLMessageStringTable::getInstance()->getString(varname), v); } void LLMessageSystem::addQuatFast(const char *varname, const LLQuaternion& v) @@ -3664,7 +3651,7 @@ void LLMessageSystem::addQuatFast(const char *varname, const LLQuaternion& v) void LLMessageSystem::addQuat(const char *varname, const LLQuaternion& v) { - mMessageBuilder->addQuat(gMessageStringTable.getString(varname), v); + mMessageBuilder->addQuat(LLMessageStringTable::getInstance()->getString(varname), v); } @@ -3675,7 +3662,7 @@ void LLMessageSystem::addUUIDFast(const char *varname, const LLUUID& v) void LLMessageSystem::addUUID(const char *varname, const LLUUID& v) { - mMessageBuilder->addUUID(gMessageStringTable.getString(varname), v); + mMessageBuilder->addUUID(LLMessageStringTable::getInstance()->getString(varname), v); } S32 LLMessageSystem::getCurrentSendTotal() const @@ -3692,8 +3679,8 @@ void LLMessageSystem::getS8Fast(const char *block, const char *var, S8 &u, void LLMessageSystem::getS8(const char *block, const char *var, S8 &u, S32 blocknum) { - getS8Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), u, blocknum); + getS8Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), u, blocknum); } void LLMessageSystem::getU8Fast(const char *block, const char *var, U8 &u, @@ -3705,8 +3692,8 @@ void LLMessageSystem::getU8Fast(const char *block, const char *var, U8 &u, void LLMessageSystem::getU8(const char *block, const char *var, U8 &u, S32 blocknum) { - getU8Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), u, blocknum); + getU8Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), u, blocknum); } void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, @@ -3718,8 +3705,8 @@ void LLMessageSystem::getBOOLFast(const char *block, const char *var, BOOL &b, void LLMessageSystem::getBOOL(const char *block, const char *var, BOOL &b, S32 blocknum) { - getBOOLFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), b, blocknum); + getBOOLFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), b, blocknum); } void LLMessageSystem::getS16Fast(const char *block, const char *var, S16 &d, @@ -3731,8 +3718,8 @@ void LLMessageSystem::getS16Fast(const char *block, const char *var, S16 &d, void LLMessageSystem::getS16(const char *block, const char *var, S16 &d, S32 blocknum) { - getS16Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getS16Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getU16Fast(const char *block, const char *var, U16 &d, @@ -3744,8 +3731,8 @@ void LLMessageSystem::getU16Fast(const char *block, const char *var, U16 &d, void LLMessageSystem::getU16(const char *block, const char *var, U16 &d, S32 blocknum) { - getU16Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getU16Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getS32Fast(const char *block, const char *var, S32 &d, @@ -3757,8 +3744,8 @@ void LLMessageSystem::getS32Fast(const char *block, const char *var, S32 &d, void LLMessageSystem::getS32(const char *block, const char *var, S32 &d, S32 blocknum) { - getS32Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getS32Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getU32Fast(const char *block, const char *var, U32 &d, @@ -3770,8 +3757,8 @@ void LLMessageSystem::getU32Fast(const char *block, const char *var, U32 &d, void LLMessageSystem::getU32(const char *block, const char *var, U32 &d, S32 blocknum) { - getU32Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getU32Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getU64Fast(const char *block, const char *var, U64 &d, @@ -3784,8 +3771,8 @@ void LLMessageSystem::getU64(const char *block, const char *var, U64 &d, S32 blocknum) { - getU64Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getU64Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getBinaryDataFast(const char *blockname, @@ -3802,8 +3789,8 @@ void LLMessageSystem::getBinaryData(const char *blockname, void *datap, S32 size, S32 blocknum, S32 max_size) { - getBinaryDataFast(gMessageStringTable.getString(blockname), - gMessageStringTable.getString(varname), + getBinaryDataFast(LLMessageStringTable::getInstance()->getString(blockname), + LLMessageStringTable::getInstance()->getString(varname), datap, size, blocknum, max_size); } @@ -3816,8 +3803,8 @@ void LLMessageSystem::getF32Fast(const char *block, const char *var, F32 &d, void LLMessageSystem::getF32(const char *block, const char *var, F32 &d, S32 blocknum) { - getF32Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getF32Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } void LLMessageSystem::getF64Fast(const char *block, const char *var, F64 &d, @@ -3829,8 +3816,8 @@ void LLMessageSystem::getF64Fast(const char *block, const char *var, F64 &d, void LLMessageSystem::getF64(const char *block, const char *var, F64 &d, S32 blocknum) { - getF64Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), d, blocknum); + getF64Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), d, blocknum); } @@ -3843,8 +3830,8 @@ void LLMessageSystem::getVector3Fast(const char *block, const char *var, void LLMessageSystem::getVector3(const char *block, const char *var, LLVector3 &v, S32 blocknum ) { - getVector3Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), v, blocknum); + getVector3Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), v, blocknum); } void LLMessageSystem::getVector4Fast(const char *block, const char *var, @@ -3856,8 +3843,8 @@ void LLMessageSystem::getVector4Fast(const char *block, const char *var, void LLMessageSystem::getVector4(const char *block, const char *var, LLVector4 &v, S32 blocknum ) { - getVector4Fast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), v, blocknum); + getVector4Fast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), v, blocknum); } void LLMessageSystem::getVector3dFast(const char *block, const char *var, @@ -3869,8 +3856,8 @@ void LLMessageSystem::getVector3dFast(const char *block, const char *var, void LLMessageSystem::getVector3d(const char *block, const char *var, LLVector3d &v, S32 blocknum ) { - getVector3dFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), v, blocknum); + getVector3dFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), v, blocknum); } void LLMessageSystem::getQuatFast(const char *block, const char *var, @@ -3882,8 +3869,8 @@ void LLMessageSystem::getQuatFast(const char *block, const char *var, void LLMessageSystem::getQuat(const char *block, const char *var, LLQuaternion &q, S32 blocknum) { - getQuatFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), q, blocknum); + getQuatFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), q, blocknum); } void LLMessageSystem::getUUIDFast(const char *block, const char *var, @@ -3895,8 +3882,8 @@ void LLMessageSystem::getUUIDFast(const char *block, const char *var, void LLMessageSystem::getUUID(const char *block, const char *var, LLUUID &u, S32 blocknum ) { - getUUIDFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), u, blocknum); + getUUIDFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), u, blocknum); } void LLMessageSystem::getIPAddrFast(const char *block, const char *var, @@ -3908,8 +3895,8 @@ void LLMessageSystem::getIPAddrFast(const char *block, const char *var, void LLMessageSystem::getIPAddr(const char *block, const char *var, U32 &u, S32 blocknum) { - getIPAddrFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), u, blocknum); + getIPAddrFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), u, blocknum); } void LLMessageSystem::getIPPortFast(const char *block, const char *var, @@ -3921,8 +3908,8 @@ void LLMessageSystem::getIPPortFast(const char *block, const char *var, void LLMessageSystem::getIPPort(const char *block, const char *var, U16 &u, S32 blocknum) { - getIPPortFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), u, + getIPPortFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), u, blocknum); } @@ -3940,8 +3927,8 @@ void LLMessageSystem::getStringFast(const char *block, const char *var, void LLMessageSystem::getString(const char *block, const char *var, S32 buffer_size, char *s, S32 blocknum ) { - getStringFast(gMessageStringTable.getString(block), - gMessageStringTable.getString(var), buffer_size, s, + getStringFast(LLMessageStringTable::getInstance()->getString(block), + LLMessageStringTable::getInstance()->getString(var), buffer_size, s, blocknum); } @@ -3952,7 +3939,7 @@ S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname) S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) { - return getNumberOfBlocksFast(gMessageStringTable.getString(blockname)); + return getNumberOfBlocksFast(LLMessageStringTable::getInstance()->getString(blockname)); } S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) @@ -3962,8 +3949,8 @@ S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) S32 LLMessageSystem::getSize(const char *blockname, const char *varname) { - return getSizeFast(gMessageStringTable.getString(blockname), - gMessageStringTable.getString(varname)); + return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), + LLMessageStringTable::getInstance()->getString(varname)); } // size in bytes of variable length data @@ -3976,8 +3963,8 @@ S32 LLMessageSystem::getSizeFast(const char *blockname, S32 blocknum, S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum, const char *varname) { - return getSizeFast(gMessageStringTable.getString(blockname), blocknum, - gMessageStringTable.getString(varname)); + return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), blocknum, + LLMessageStringTable::getInstance()->getString(varname)); } S32 LLMessageSystem::getReceiveSize() const diff --git a/linden/indra/llmessage/message.h b/linden/indra/llmessage/message.h index 05aa592..00abff4 100644 --- a/linden/indra/llmessage/message.h +++ b/linden/indra/llmessage/message.h @@ -68,7 +68,7 @@ const U32 MESSAGE_NUMBER_OF_HASH_BUCKETS = 8192; const S32 MESSAGE_MAX_PER_FRAME = 400; -class LLMessageStringTable +class LLMessageStringTable : public LLSingleton { public: LLMessageStringTable(); @@ -81,7 +81,6 @@ public: char mString[MESSAGE_NUMBER_OF_HASH_BUCKETS][MESSAGE_MAX_STRINGS_LENGTH]; /* Flawfinder: ignore */ }; -extern LLMessageStringTable gMessageStringTable; // Individual Messages are described with the following format // Note that to ease parsing, keywords are used @@ -302,7 +301,7 @@ public: void setHandlerFuncFast(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL); void setHandlerFunc(const char *name, void (*handler_func)(LLMessageSystem *msgsystem, void **user_data), void **user_data = NULL) { - setHandlerFuncFast(gMessageStringTable.getString(name), handler_func, user_data); + setHandlerFuncFast(LLMessageStringTable::getInstance()->getString(name), handler_func, user_data); } // Set a callback function for a message system exception. @@ -339,7 +338,7 @@ public: BOOL isMessageFast(const char *msg); BOOL isMessage(const char *msg) { - return isMessageFast(gMessageStringTable.getString(msg)); + return isMessageFast(LLMessageStringTable::getInstance()->getString(msg)); } void dumpPacketToLog(); @@ -372,7 +371,7 @@ public: void nextBlockFast(const char *blockname); void nextBlock(const char *blockname) { - nextBlockFast(gMessageStringTable.getString(blockname)); + nextBlockFast(LLMessageStringTable::getInstance()->getString(blockname)); } public: diff --git a/linden/indra/llmessage/message_prehash.cpp b/linden/indra/llmessage/message_prehash.cpp index 39a4f33..745271f 100644 --- a/linden/indra/llmessage/message_prehash.cpp +++ b/linden/indra/llmessage/message_prehash.cpp @@ -39,2672 +39,1336 @@ F32 gPrehashVersionNumber = 2.000f; -char * _PREHASH_X; -char * _PREHASH_Y; -char * _PREHASH_Z; -char * _PREHASH_AddFlags; -char * _PREHASH_FailureInfo; -char * _PREHASH_MapData; -char * _PREHASH_AddItem; -char * _PREHASH_MeanCollision; -char * _PREHASH_RezScript; -char * _PREHASH_AvatarSitResponse; -char * _PREHASH_InventoryAssetResponse; -char * _PREHASH_KillObject; -char * _PREHASH_ProposalID; -char * _PREHASH_SerialNum; -char * _PREHASH_Duration; -char * _PREHASH_ScriptQuestion; -char * _PREHASH_AddCircuitCode; -char * _PREHASH_UseCircuitCode; -char * _PREHASH_ViewerCircuitCode; -char * _PREHASH_ScriptAnswerYes; -char * _PREHASH_PartnerID; -char * _PREHASH_DirLandQuery; -char * _PREHASH_TeleportStart; -char * _PREHASH_AboutText; -char * _PREHASH_VisualParam; -char * _PREHASH_GroupPrims; -char * _PREHASH_SelectedPrims; -char * _PREHASH_ID; -char * _PREHASH_UUIDNameRequest; -char * _PREHASH_UUIDGroupNameRequest; -char * _PREHASH_GroupAccountTransactionsRequest; -char * _PREHASH_MapNameRequest; -char * _PREHASH_UpdateSimulator; -char * _PREHASH_BillableFactor; -char * _PREHASH_ObjectBonusFactor; -char * _PREHASH_EnableSimulator; -char * _PREHASH_DisableSimulator; -char * _PREHASH_ConfirmEnableSimulator; -char * _PREHASH_LayerType; -char * _PREHASH_OwnerRole; -char * _PREHASH_ParcelOverlay; -char * _PREHASH_GroupOwned; -char * _PREHASH_IP; -char * _PREHASH_ChatFromViewer; -char * _PREHASH_AvgAgentsInView; -char * _PREHASH_AgentsInView; -char * _PREHASH_GroupTitle; -char * _PREHASH_MapLayerReply; -char * _PREHASH_CompoundMsgID; -char * _PREHASH_CameraConstraint; -char * _PREHASH_DownloadTotals; -char * _PREHASH_GenCounter; -char * _PREHASH_FrozenData; -char * _PREHASH_ChildAgentDying; -char * _PREHASH_To; -char * _PREHASH_CopyInventoryFromNotecard; -char * _PREHASH_RezObjectFromNotecard; -char * _PREHASH_ParcelDirFeeCurrent; -char * _PREHASH_SeedCapability; -char * _PREHASH_ObjectDuplicate; -char * _PREHASH_InventoryData; -char * _PREHASH_ReplyData; -char * _PREHASH_ResetList; -char * _PREHASH_MediaID; -char * _PREHASH_RelatedRights; -char * _PREHASH_RedirectGridX; -char * _PREHASH_RedirectGridY; -char * _PREHASH_TransferID; -char * _PREHASH_TexturesChanged; -char * _PREHASH_UserLookAt; -char * _PREHASH_TestBlock1; -char * _PREHASH_SensedData; -char * _PREHASH_UpdateBlock; -char * _PREHASH_ClassifiedGodDelete; -char * _PREHASH_ObjectGrabUpdate; -char * _PREHASH_LocationPos; -char * _PREHASH_TaxDate; -char * _PREHASH_StartDateTime; -char * _PREHASH_ObjectUpdateCached; -char * _PREHASH_Packets; -char * _PREHASH_FailureType; -char * _PREHASH_UpdateGroupInfo; -char * _PREHASH_ObjectPermissions; -char * _PREHASH_RevokePermissions; -char * _PREHASH_UpdateFlags; -char * _PREHASH_ObjectExportSelected; -char * _PREHASH_RezSelected; -char * _PREHASH_AutoPilot; -char * _PREHASH_UpdateMuteListEntry; -char * _PREHASH_RemoveMuteListEntry; -char * _PREHASH_SetSimStatusInDatabase; -char * _PREHASH_SetSimPresenceInDatabase; -char * _PREHASH_CameraProperty; -char * _PREHASH_BrushSize; -char * _PREHASH_SimulatorSetMap; -char * _PREHASH_RegionPresenceRequestByRegionID; -char * _PREHASH_ParcelObjectOwnersReply; -char * _PREHASH_GroupMembersReply; -char * _PREHASH_GroupRoleMembersReply; -char * _PREHASH_RequestRegionInfo; -char * _PREHASH_AABBMax; -char * _PREHASH_RequestPayPrice; -char * _PREHASH_SimulatorPresentAtLocation; -char * _PREHASH_AgentRequestSit; -char * _PREHASH_AABBMin; -char * _PREHASH_ClassifiedFlags; -char * _PREHASH_ControlFlags; -char * _PREHASH_TeleportRequest; -char * _PREHASH_ScriptTeleportRequest; -char * _PREHASH_EstateCovenantRequest; -char * _PREHASH_DateUTC; -char * _PREHASH_TaskIDs; -char * _PREHASH_RequestResult; -char * _PREHASH_CanAcceptAgents; -char * _PREHASH_ObjectSaleInfo; -char * _PREHASH_KillChildAgents; -char * _PREHASH_Balance; -char * _PREHASH_DerezContainer; -char * _PREHASH_ObjectData; -char * _PREHASH_CameraAtAxis; -char * _PREHASH_InfoBlock; -char * _PREHASH_OwnershipCost; -char * _PREHASH_AvatarNotesUpdate; -char * _PREHASH_PID; -char * _PREHASH_DirPopularReply; -char * _PREHASH_TerrainHeightRange00; -char * _PREHASH_SimData; -char * _PREHASH_TerrainHeightRange01; -char * _PREHASH_TerrainHeightRange10; -char * _PREHASH_TerrainHeightRange11; -char * _PREHASH_UpdateInventoryItem; -char * _PREHASH_UpdateCreateInventoryItem; -char * _PREHASH_MoveInventoryItem; -char * _PREHASH_CopyInventoryItem; -char * _PREHASH_RemoveInventoryItem; -char * _PREHASH_CreateInventoryItem; -char * _PREHASH_PathTwistBegin; -char * _PREHASH_CRC; -char * _PREHASH_AttachmentPoint; -char * _PREHASH_TelehubBlock; -char * _PREHASH_FOVBlock; -char * _PREHASH_StartLocationData; -char * _PREHASH_PositionData; -char * _PREHASH_TimeSinceLast; -char * _PREHASH_MapImage; -char * _PREHASH_Objects; -char * _PREHASH_URL; -char * _PREHASH_CreationDate; -char * _PREHASH_JointPivot; -char * _PREHASH_FPS; -char * _PREHASH_HasTelehub; -char * _PREHASH_PathEnd; -char * _PREHASH_ScriptDataReply; -char * _PREHASH_MapBlockReply; -char * _PREHASH_PropertiesData; -char * _PREHASH_ViewerEffect; -char * _PREHASH_FreezeUser; -char * _PREHASH_OwnerPrims; -char * _PREHASH_ObjectGrab; -char * _PREHASH_ToAgentID; -char * _PREHASH_SimulatorMapUpdate; -char * _PREHASH_TransferPacket; -char * _PREHASH_ObjectName; -char * _PREHASH_GroupPowers; -char * _PREHASH_OriginalName; -char * _PREHASH_CompletePingCheck; -char * _PREHASH_OnlineStatus; -char * _PREHASH_ObjectDrop; -char * _PREHASH_UseBigPackets; -char * _PREHASH_GroupNoticesListReply; -char * _PREHASH_ParcelAccessListReply; -char * _PREHASH_RpcChannelReply; -char * _PREHASH_RegionPresenceResponse; -char * _PREHASH_CharterMember; -char * _PREHASH_EdgeData; -char * _PREHASH_NameData; -char * _PREHASH_RegionPushOverride; -char * _PREHASH_SimName; -char * _PREHASH_UserReport; -char * _PREHASH_DownloadPriority; -char * _PREHASH_ToAgentId; -char * _PREHASH_DirPopularQuery; -char * _PREHASH_Mag; -char * _PREHASH_ParcelPropertiesRequestByID; -char * _PREHASH_ObjectLink; -char * _PREHASH_RpcScriptReplyInbound; -char * _PREHASH_RezData; -char * _PREHASH_RemoveInventoryObjects; -char * _PREHASH_GroupProposalBallot; -char * _PREHASH_RPCServerIP; -char * _PREHASH_Far; -char * _PREHASH_GodSessionID; -char * _PREHASH_FLAboutText; -char * _PREHASH_RegionHandshakeReply; -char * _PREHASH_GroupActiveProposalItemReply; -char * _PREHASH_MapItemReply; -char * _PREHASH_Seconds; -char * _PREHASH_UpdateUserInfo; -char * _PREHASH_AggregatePermTexturesOwner; -char * _PREHASH_Set; -char * _PREHASH_NewName; -char * _PREHASH_Key; -char * _PREHASH_AgentID; -char * _PREHASH_EventNotificationRemoveRequest; -char * _PREHASH_NewFolderID; -char * _PREHASH_Arc; -char * _PREHASH_RegionX; -char * _PREHASH_RegionY; -char * _PREHASH_RequestData; -char * _PREHASH_Msg; -char * _PREHASH_Top; -char * _PREHASH_MiscStats; -char * _PREHASH_ImageID; -char * _PREHASH_DataPacket; -char * _PREHASH_You; -char * _PREHASH_ScriptControlChange; -char * _PREHASH_LoadURL; -char * _PREHASH_SetCPURatio; -char * _PREHASH_NameValueData; -char * _PREHASH_AtomicPassObject; -char * _PREHASH_ErrorMessage; -char * _PREHASH_ViewerFrozenMessage; -char * _PREHASH_HealthMessage; -char * _PREHASH_LogTextMessage; -char * _PREHASH_TimeDilation; -char * _PREHASH_RemoveContribution; -char * _PREHASH_Contribution; -char * _PREHASH_SetGroupContribution; -char * _PREHASH_Offline; -char * _PREHASH_AgentIsNowWearing; -char * _PREHASH_Members; -char * _PREHASH_FailedResends; -char * _PREHASH_SecPerDay; -char * _PREHASH_CameraCenter; -char * _PREHASH_CameraLeftAxis; -char * _PREHASH_ExBlock; -char * _PREHASH_Channel; -char * _PREHASH_NetTest; -char * _PREHASH_DiscardLevel; -char * _PREHASH_LayerID; -char * _PREHASH_GrabOffset; -char * _PREHASH_SimPort; -char * _PREHASH_PricePerMeter; -char * _PREHASH_RegionFlags; -char * _PREHASH_VoteResult; -char * _PREHASH_ParcelDirFeeEstimate; -char * _PREHASH_ModifyBlock; -char * _PREHASH_InventoryBlock; -char * _PREHASH_ReplyBlock; -char * _PREHASH_ValidUntil; -char * _PREHASH_VelocityInterpolateOn; -char * _PREHASH_ClassifiedDelete; -char * _PREHASH_RegionDenyAnonymous; -char * _PREHASH_FLImageID; -char * _PREHASH_AllowPublish; -char * _PREHASH_SitName; -char * _PREHASH_RegionsVisited; -char * _PREHASH_DirClassifiedReply; -char * _PREHASH_AvatarClassifiedReply; -char * _PREHASH_MediaURL; -char * _PREHASH_CompleteAgentMovement; -char * _PREHASH_ClassifiedID; -char * _PREHASH_LocalID; -char * _PREHASH_SpaceIP; -char * _PREHASH_RemoveItem; -char * _PREHASH_LogFailedMoneyTransaction; -char * _PREHASH_ViewerStartAuction; -char * _PREHASH_StartAuction; -char * _PREHASH_DuplicateFlags; -char * _PREHASH_RegionInfo2; -char * _PREHASH_TextColor; -char * _PREHASH_SlaveID; -char * _PREHASH_Charter; -char * _PREHASH_AlertData; -char * _PREHASH_TargetBlock; -char * _PREHASH_CheckParcelAuctions; -char * _PREHASH_ParcelAuctions; -char * _PREHASH_OwnerIsGroup; -char * _PREHASH_NameValuePair; -char * _PREHASH_RemoveNameValuePair; -char * _PREHASH_BulkUpdateInventory; -char * _PREHASH_UpdateTaskInventory; -char * _PREHASH_RemoveTaskInventory; -char * _PREHASH_MoveTaskInventory; -char * _PREHASH_RequestTaskInventory; -char * _PREHASH_ReplyTaskInventory; -char * _PREHASH_AggregatePermInventory; -char * _PREHASH_GroupAccountTransactionsReply; -char * _PREHASH_SimulatorInfo; -char * _PREHASH_WearableData; -char * _PREHASH_Enabled; -char * _PREHASH_Savings; -char * _PREHASH_SimulatorLoad; -char * _PREHASH_InternalRegionIP; -char * _PREHASH_ExternalRegionIP; -char * _PREHASH_TotalPairs; -char * _PREHASH_CreateGroupRequest; -char * _PREHASH_JoinGroupRequest; -char * _PREHASH_LeaveGroupRequest; -char * _PREHASH_InviteGroupRequest; -char * _PREHASH_LiveHelpGroupRequest; -char * _PREHASH_PriceParcelClaimFactor; -char * _PREHASH_BillableArea; -char * _PREHASH_ObjectID; -char * _PREHASH_ObjectFlagUpdate; -char * _PREHASH_GroupRoleUpdate; -char * _PREHASH_RequestInventoryAsset; -char * _PREHASH_ChangedGrid; -char * _PREHASH_AgentDropGroup; -char * _PREHASH_Details; -char * _PREHASH_LocationX; -char * _PREHASH_SaleType; -char * _PREHASH_LocationY; -char * _PREHASH_LocationZ; -char * _PREHASH_EconomyData; -char * _PREHASH_HeadRotation; -char * _PREHASH_DeleteOnCompletion; -char * _PREHASH_PublicPort; -char * _PREHASH_DirClassifiedQuery; -char * _PREHASH_CallbackID; -char * _PREHASH_RequestParcelTransfer; -char * _PREHASH_RoleCount; -char * _PREHASH_ObjectCapacity; -char * _PREHASH_RequestID; -char * _PREHASH_RequestXfer; -char * _PREHASH_ObjectTaxCurrent; -char * _PREHASH_LightTaxCurrent; -char * _PREHASH_LandTaxCurrent; -char * _PREHASH_GroupTaxCurrent; -char * _PREHASH_FetchInventoryDescendents; -char * _PREHASH_InventoryDescendents; -char * _PREHASH_Descendents; -char * _PREHASH_PurgeInventoryDescendents; -char * _PREHASH_ShowDir; -char * _PREHASH_IsOwner; -char * _PREHASH_Timestamp; -char * _PREHASH_GlobalPos; -char * _PREHASH_GrabOffsetInitial; -char * _PREHASH_IsTrial; -char * _PREHASH_ObjectDuplicateOnRay; -char * _PREHASH_GroupMembershipCount; -char * _PREHASH_MethodData; -char * _PREHASH_ActivateGestures; -char * _PREHASH_DeactivateGestures; -char * _PREHASH_ProposalData; -char * _PREHASH_PosGlobal; -char * _PREHASH_SearchID; -char * _PREHASH_RezMultipleAttachmentsFromInv; -char * _PREHASH_SearchName; -char * _PREHASH_VersionString; -char * _PREHASH_CreateGroupReply; -char * _PREHASH_LeaveGroupReply; -char * _PREHASH_ActualArea; -char * _PREHASH_Message; -char * _PREHASH_ClickAction; -char * _PREHASH_AssetUploadComplete; -char * _PREHASH_RequestType; -char * _PREHASH_UUID; -char * _PREHASH_BaseMask; -char * _PREHASH_NetBlock; -char * _PREHASH_GlobalX; -char * _PREHASH_GlobalY; -char * _PREHASH_CopyRotates; -char * _PREHASH_KickUserAck; -char * _PREHASH_TopPick; -char * _PREHASH_SessionID; -char * _PREHASH_GlobalZ; -char * _PREHASH_DeclineFriendship; -char * _PREHASH_FormFriendship; -char * _PREHASH_TerminateFriendship; -char * _PREHASH_TaskData; -char * _PREHASH_SimWideMaxPrims; -char * _PREHASH_TotalPrims; -char * _PREHASH_ProfileBegin; -char * _PREHASH_Request; -char * _PREHASH_GroupAccountDetailsRequest; -char * _PREHASH_GroupActiveProposalsRequest; -char * _PREHASH_StringValue; -char * _PREHASH_Version; -char * _PREHASH_OtherCount; -char * _PREHASH_MemberCount; -char * _PREHASH_ChatData; -char * _PREHASH_IsGroupOwned; -char * _PREHASH_EnergyEfficiency; -char * _PREHASH_PickInfoUpdate; -char * _PREHASH_PickDelete; -char * _PREHASH_ScriptReset; -char * _PREHASH_Requester; -char * _PREHASH_ForSale; -char * _PREHASH_NearestLandingRegionReply; -char * _PREHASH_ParcelID; -char * _PREHASH_Godlike; -char * _PREHASH_TotalDebits; -char * _PREHASH_Direction; -char * _PREHASH_HealthData; -char * _PREHASH_LeftAxis; -char * _PREHASH_LocationBlock; -char * _PREHASH_ObjectImage; -char * _PREHASH_TerrainStartHeight00; -char * _PREHASH_TerrainStartHeight01; -char * _PREHASH_TerrainStartHeight10; -char * _PREHASH_TerrainStartHeight11; -char * _PREHASH_WaterHeight; -char * _PREHASH_FetchInventoryReply; -char * _PREHASH_GroupAccountSummaryReply; -char * _PREHASH_AttachedSound; -char * _PREHASH_ParamInUse; -char * _PREHASH_GodKickUser; -char * _PREHASH_PickName; -char * _PREHASH_TaskName; -char * _PREHASH_ObjectCount; -char * _PREHASH_RegionPresenceRequestByHandle; -char * _PREHASH_RezSingleAttachmentFromInv; -char * _PREHASH_ChildAgentUpdate; -char * _PREHASH_IsOwnerGroup; -char * _PREHASH_AgentHeightWidth; -char * _PREHASH_VerticalAngle; -char * _PREHASH_WearableType; -char * _PREHASH_AggregatePermNextOwner; -char * _PREHASH_ShowInList; -char * _PREHASH_UpdateParcel; -char * _PREHASH_SetAlwaysRun; -char * _PREHASH_NVPair; -char * _PREHASH_SearchType; -char * _PREHASH_ObjectSpinStart; -char * _PREHASH_UseEstateSun; -char * _PREHASH_RegionID; -char * _PREHASH_AbuseRegionID; -char * _PREHASH_Creator; -char * _PREHASH_ProposalText; -char * _PREHASH_DirEventsReply; -char * _PREHASH_EventInfoReply; -char * _PREHASH_UserInfoReply; -char * _PREHASH_PathRadiusOffset; -char * _PREHASH_TextureData; -char * _PREHASH_ChatPass; -char * _PREHASH_TargetID; -char * _PREHASH_DefaultPayPrice; -char * _PREHASH_UserLocation; -char * _PREHASH_MaxPrims; -char * _PREHASH_LandmarkID; -char * _PREHASH_InitiateDownload; -char * _PREHASH_Name; -char * _PREHASH_OtherCleanTime; -char * _PREHASH_ParcelSetOtherCleanTime; -char * _PREHASH_TeleportPriceExponent; -char * _PREHASH_Gain; -char * _PREHASH_PacketAck; -char * _PREHASH_PathSkew; -char * _PREHASH_SimulatorShutdownRequest; -char * _PREHASH_NearestLandingRegionRequest; -char * _PREHASH_OtherID; -char * _PREHASH_MemberID; -char * _PREHASH_MapLayerRequest; -char * _PREHASH_ObjectScale; -char * _PREHASH_TargetIP; -char * _PREHASH_Redo; -char * _PREHASH_MoneyBalance; -char * _PREHASH_TrackAgent; -char * _PREHASH_MaxX; -char * _PREHASH_Data; -char * _PREHASH_MaxY; -char * _PREHASH_TextureAnim; -char * _PREHASH_ReturnIDs; -char * _PREHASH_Date; -char * _PREHASH_AgentWearablesUpdate; -char * _PREHASH_AgentDataUpdate; -char * _PREHASH_GroupDataUpdate; -char * _PREHASH_Hash; -char * _PREHASH_AgentGroupDataUpdate; -char * _PREHASH_Left; -char * _PREHASH_Mask; -char * _PREHASH_ForceMouselook; -char * _PREHASH_Success; -char * _PREHASH_ObjectGroup; -char * _PREHASH_SunHour; -char * _PREHASH_MinX; -char * _PREHASH_ScriptSensorReply; -char * _PREHASH_MinY; -char * _PREHASH_Command; -char * _PREHASH_Desc; -char * _PREHASH_AttachmentNeedsSave; -char * _PREHASH_HistoryItemData; -char * _PREHASH_AgentCachedTexture; -char * _PREHASH_Subject; -char * _PREHASH_East; -char * _PREHASH_QueryReplies; -char * _PREHASH_ObjectCategory; -char * _PREHASH_Time; -char * _PREHASH_CreateLandmarkForEvent; -char * _PREHASH_ParentID; -char * _PREHASH_Ping; -char * _PREHASH_Perp; -char * _PREHASH_Code; -char * _PREHASH_InvType; -char * _PREHASH_AgentFOV; -char * _PREHASH_Audible; -char * _PREHASH_AuctionData; -char * _PREHASH_IDBlock; -char * _PREHASH_West; -char * _PREHASH_Undo; -char * _PREHASH_TotalNumItems; -char * _PREHASH_Info; -char * _PREHASH_Area; -char * _PREHASH_SimCrashed; -char * _PREHASH_Text; -char * _PREHASH_PriceGroupCreate; -char * _PREHASH_ObjectShape; -char * _PREHASH_GroupRoleDataReply; -char * _PREHASH_MuteCRC; -char * _PREHASH_Size; -char * _PREHASH_FromAddress; -char * _PREHASH_Body; -char * _PREHASH_FileData; -char * _PREHASH_List; -char * _PREHASH_KickUser; -char * _PREHASH_OtherPrims; -char * _PREHASH_RunTime; -char * _PREHASH_GrantUserRights; -char * _PREHASH_RpcScriptRequestInboundForward; -char * _PREHASH_More; -char * _PREHASH_Majority; -char * _PREHASH_MetersTraveled; -char * _PREHASH_Stat; -char * _PREHASH_SoundID; -char * _PREHASH_Item; -char * _PREHASH_User; -char * _PREHASH_Prey; -char * _PREHASH_RayStart; -char * _PREHASH_UsecSinceStart; -char * _PREHASH_ParcelData; -char * _PREHASH_CameraUpAxis; -char * _PREHASH_ScriptDialog; -char * _PREHASH_MasterParcelData; -char * _PREHASH_Invalid; -char * _PREHASH_ProfileCurve; -char * _PREHASH_ParcelAccessListUpdate; -char * _PREHASH_MuteListUpdate; -char * _PREHASH_SendPacket; -char * _PREHASH_SendXferPacket; -char * _PREHASH_RegionDenyIdentified; -char * _PREHASH_NotecardItemID; -char * _PREHASH_LastName; -char * _PREHASH_From; -char * _PREHASH_RoleChange; -char * _PREHASH_Port; -char * _PREHASH_MemberTitle; -char * _PREHASH_LogParcelChanges; -char * _PREHASH_AgentCachedTextureResponse; -char * _PREHASH_DeRezObject; -char * _PREHASH_IsTemporary; -char * _PREHASH_InsigniaID; -char * _PREHASH_CheckFlags; -char * _PREHASH_EventID; -char * _PREHASH_Selected; -char * _PREHASH_FromAgentId; -char * _PREHASH_Type; -char * _PREHASH_ChatType; -char * _PREHASH_ReportData; -char * _PREHASH_RequestBlock; -char * _PREHASH_GrantData; -char * _PREHASH_DetachAttachmentIntoInv; -char * _PREHASH_ParcelDisableObjects; -char * _PREHASH_Sections; -char * _PREHASH_GodLevel; -char * _PREHASH_PayPriceReply; -char * _PREHASH_QueryID; -char * _PREHASH_CameraEyeOffset; -char * _PREHASH_AgentPosition; -char * _PREHASH_GrabPosition; -char * _PREHASH_OnlineNotification; -char * _PREHASH_OfflineNotification; -char * _PREHASH_SendPostcard; -char * _PREHASH_RequestFlags; -char * _PREHASH_GroupAccountSummaryRequest; -char * _PREHASH_GroupVoteHistoryRequest; -char * _PREHASH_ParamValue; -char * _PREHASH_MaxAgents; -char * _PREHASH_CreateNewOutfitAttachments; -char * _PREHASH_RegionHandle; -char * _PREHASH_TeleportProgress; -char * _PREHASH_AgentQuitCopy; -char * _PREHASH_AvatarInterestsUpdate; -char * _PREHASH_GroupNoticeID; -char * _PREHASH_ParcelName; -char * _PREHASH_PriceObjectRent; -char * _PREHASH_OfferCallingCard; -char * _PREHASH_AcceptCallingCard; -char * _PREHASH_DeclineCallingCard; -char * _PREHASH_AgentAccess; -char * _PREHASH_DataHomeLocationReply; -char * _PREHASH_EventLocationReply; -char * _PREHASH_TerseDateID; -char * _PREHASH_ObjectOwner; -char * _PREHASH_AssetID; -char * _PREHASH_AlertMessage; -char * _PREHASH_AgentAlertMessage; -char * _PREHASH_EstateOwnerMessage; -char * _PREHASH_ParcelMediaCommandMessage; -char * _PREHASH_Auction; -char * _PREHASH_Category; -char * _PREHASH_FilePath; -char * _PREHASH_ItemFlags; -char * _PREHASH_Invoice; -char * _PREHASH_IntervalDays; -char * _PREHASH_PathScaleX; -char * _PREHASH_FromTaskID; -char * _PREHASH_PathScaleY; -char * _PREHASH_TimeInfo; -char * _PREHASH_PublicCount; -char * _PREHASH_ParcelJoin; -char * _PREHASH_GroupRolesCount; -char * _PREHASH_SimulatorBlock; -char * _PREHASH_GroupID; -char * _PREHASH_AgentVel; -char * _PREHASH_RequestImage; -char * _PREHASH_NetStats; -char * _PREHASH_AgentPos; -char * _PREHASH_AgentSit; -char * _PREHASH_Material; -char * _PREHASH_ObjectDeGrab; -char * _PREHASH_VelocityInterpolateOff; -char * _PREHASH_AuthorizedBuyerID; -char * _PREHASH_AvatarPropertiesReply; -char * _PREHASH_GroupProfileReply; -char * _PREHASH_SimOwner; -char * _PREHASH_SalePrice; -char * _PREHASH_Animation; -char * _PREHASH_OwnerID; -char * _PREHASH_NearestLandingRegionUpdated; -char * _PREHASH_PassToAgent; -char * _PREHASH_PreyAgent; -char * _PREHASH_SimStats; -char * _PREHASH_LogoutReply; -char * _PREHASH_FeatureDisabled; -char * _PREHASH_PhysicalAvatarEventList; -char * _PREHASH_ObjectLocalID; -char * _PREHASH_Dropped; -char * _PREHASH_WebProfilesDisabled; -char * _PREHASH_Destination; -char * _PREHASH_MasterID; -char * _PREHASH_TransferData; -char * _PREHASH_WantToMask; -char * _PREHASH_ParcelSelectObjects; -char * _PREHASH_ExtraParams; -char * _PREHASH_CreatorID; -char * _PREHASH_Summary; -char * _PREHASH_BuyObjectInventory; -char * _PREHASH_FetchInventory; -char * _PREHASH_InventoryID; -char * _PREHASH_PacketNumber; -char * _PREHASH_SetFollowCamProperties; -char * _PREHASH_ClearFollowCamProperties; -char * _PREHASH_SequenceID; -char * _PREHASH_DataServerLogout; -char * _PREHASH_NameValue; -char * _PREHASH_PathShearX; -char * _PREHASH_PathShearY; -char * _PREHASH_Velocity; -char * _PREHASH_SecPerYear; -char * _PREHASH_FirstName; -char * _PREHASH_AttachedSoundGainChange; -char * _PREHASH_LocationID; -char * _PREHASH_Running; -char * _PREHASH_AgentThrottle; -char * _PREHASH_NeighborList; -char * _PREHASH_PathTaperX; -char * _PREHASH_PathTaperY; -char * _PREHASH_AgentRelated; -char * _PREHASH_GranterBlock; -char * _PREHASH_UseCachedMuteList; -char * _PREHASH_FailStats; -char * _PREHASH_Tempfile; -char * _PREHASH_BuyerID; -char * _PREHASH_DirPeopleReply; -char * _PREHASH_TransferInfo; -char * _PREHASH_AvatarPickerRequestBackend; -char * _PREHASH_AvatarPropertiesRequestBackend; -char * _PREHASH_UpdateData; -char * _PREHASH_SimFPS; -char * _PREHASH_ReporterID; -char * _PREHASH_ButtonLabel; -char * _PREHASH_GranterID; -char * _PREHASH_WantToText; -char * _PREHASH_ReportType; -char * _PREHASH_SimulatorReady; -char * _PREHASH_DataBlock; -char * _PREHASH_AnimationSourceList; -char * _PREHASH_SubscribeLoad; -char * _PREHASH_UnsubscribeLoad; -char * _PREHASH_Packet; -char * _PREHASH_UndoLand; -char * _PREHASH_SimAccess; -char * _PREHASH_AbuserID; -char * _PREHASH_MembershipFee; -char * _PREHASH_InviteGroupResponse; -char * _PREHASH_CreateInventoryFolder; -char * _PREHASH_UpdateInventoryFolder; -char * _PREHASH_MoveInventoryFolder; -char * _PREHASH_RemoveInventoryFolder; -char * _PREHASH_MoneyData; -char * _PREHASH_ObjectDeselect; -char * _PREHASH_NewAssetID; -char * _PREHASH_ObjectAdd; -char * _PREHASH_RayEndIsIntersection; -char * _PREHASH_CompleteAuction; -char * _PREHASH_CircuitCode; -char * _PREHASH_AgentMovementComplete; -char * _PREHASH_ViewerIP; -char * _PREHASH_Header; -char * _PREHASH_GestureFlags; -char * _PREHASH_XferID; -char * _PREHASH_StatValue; -char * _PREHASH_TaskID; -char * _PREHASH_PickID; -char * _PREHASH_RayEnd; -char * _PREHASH_Throttles; -char * _PREHASH_RebakeAvatarTextures; -char * _PREHASH_UpAxis; -char * _PREHASH_AgentTextures; -char * _PREHASH_NotecardData; -char * _PREHASH_Radius; -char * _PREHASH_OffCircuit; -char * _PREHASH_Access; -char * _PREHASH_TitleRoleID; -char * _PREHASH_SquareMetersCredit; -char * _PREHASH_Filename; -char * _PREHASH_ClassifiedInfoRequest; -char * _PREHASH_ParcelInfoRequest; -char * _PREHASH_ParcelObjectOwnersRequest; -char * _PREHASH_TeleportLandmarkRequest; -char * _PREHASH_EventInfoRequest; -char * _PREHASH_MoneyBalanceRequest; -char * _PREHASH_GroupMembersRequest; -char * _PREHASH_GroupRoleMembersRequest; -char * _PREHASH_ChatFromSimulator; -char * _PREHASH_OldFolderID; -char * _PREHASH_UserInfoRequest; -char * _PREHASH_TextureID; -char * _PREHASH_ProfileURL; -char * _PREHASH_Handle; -char * _PREHASH_ButtonIndex; -char * _PREHASH_GetScriptRunning; -char * _PREHASH_SetScriptRunning; -char * _PREHASH_Health; -char * _PREHASH_CircuitInfo; -char * _PREHASH_ObjectBuy; -char * _PREHASH_ProfileEnd; -char * _PREHASH_Effect; -char * _PREHASH_TestMessage; -char * _PREHASH_ScriptMailRegistration; -char * _PREHASH_AgentSetAppearance; -char * _PREHASH_AvatarAppearance; -char * _PREHASH_RegionData; -char * _PREHASH_RequestingRegionData; -char * _PREHASH_LandingRegionData; -char * _PREHASH_SitTransform; -char * _PREHASH_TerrainBase0; -char * _PREHASH_SkillsMask; -char * _PREHASH_AtAxis; -char * _PREHASH_TerrainBase1; -char * _PREHASH_Reason; -char * _PREHASH_TerrainBase2; -char * _PREHASH_TerrainBase3; -char * _PREHASH_Params; -char * _PREHASH_PingID; -char * _PREHASH_Change; -char * _PREHASH_Height; -char * _PREHASH_Region; -char * _PREHASH_TelehubInfo; -char * _PREHASH_StateSave; -char * _PREHASH_RoleData; -char * _PREHASH_AgentAnimation; -char * _PREHASH_AvatarAnimation; -char * _PREHASH_LogDwellTime; -char * _PREHASH_ParcelGodMarkAsContent; -char * _PREHASH_UsePhysics; -char * _PREHASH_RegionDenyTransacted; -char * _PREHASH_JointType; -char * _PREHASH_ObjectTaxEstimate; -char * _PREHASH_LightTaxEstimate; -char * _PREHASH_LandTaxEstimate; -char * _PREHASH_TeleportLandingStatusChanged; -char * _PREHASH_GroupTaxEstimate; -char * _PREHASH_AvgViewerFPS; -char * _PREHASH_Buttons; -char * _PREHASH_Sender; -char * _PREHASH_Dialog; -char * _PREHASH_TargetData; -char * _PREHASH_DestID; -char * _PREHASH_PricePublicObjectDelete; -char * _PREHASH_ObjectDelete; -char * _PREHASH_Delete; -char * _PREHASH_EventGodDelete; -char * _PREHASH_LastTaxDate; -char * _PREHASH_MapImageID; -char * _PREHASH_EndDateTime; -char * _PREHASH_TerrainDetail0; -char * _PREHASH_TerrainDetail1; -char * _PREHASH_TerrainDetail2; -char * _PREHASH_TerrainDetail3; -char * _PREHASH_Offset; -char * _PREHASH_ObjectDelink; -char * _PREHASH_TargetObject; -char * _PREHASH_IsEstateManager; -char * _PREHASH_CancelAuction; -char * _PREHASH_ObjectDetach; -char * _PREHASH_Compressed; -char * _PREHASH_PathBegin; -char * _PREHASH_BypassRaycast; -char * _PREHASH_WinnerID; -char * _PREHASH_ChannelType; -char * _PREHASH_NonExemptMembers; -char * _PREHASH_Agents; -char * _PREHASH_MemberData; -char * _PREHASH_ToGroupID; -char * _PREHASH_ImageNotInDatabase; -char * _PREHASH_StartDate; -char * _PREHASH_AnimID; -char * _PREHASH_Serial; -char * _PREHASH_AbuseRegionName; -char * _PREHASH_ModifyLand; -char * _PREHASH_Digest; -char * _PREHASH_Victim; -char * _PREHASH_Script; -char * _PREHASH_PickInfoReply; -char * _PREHASH_MoneyBalanceReply; -char * _PREHASH_RoutedMoneyBalanceReply; -char * _PREHASH_RoleID; -char * _PREHASH_RegionInfo; -char * _PREHASH_GodUpdateRegionInfo; -char * _PREHASH_StartAnim; -char * _PREHASH_Action; -char * _PREHASH_Location; -char * _PREHASH_Rights; -char * _PREHASH_SearchDir; -char * _PREHASH_TransferRequest; -char * _PREHASH_ScriptSensorRequest; -char * _PREHASH_MoneyTransferRequest; -char * _PREHASH_EjectGroupMemberRequest; -char * _PREHASH_SkillsText; -char * _PREHASH_Resent; -char * _PREHASH_Center; -char * _PREHASH_SharedData; -char * _PREHASH_PSBlock; -char * _PREHASH_UUIDNameBlock; -char * _PREHASH_GroupTitleUpdate; -char * _PREHASH_Method; -char * _PREHASH_TouchName; -char * _PREHASH_UpdateType; -char * _PREHASH_KickedFromEstateID; -char * _PREHASH_CandidateID; -char * _PREHASH_ParamData; -char * _PREHASH_GodlikeMessage; -char * _PREHASH_SystemMessage; -char * _PREHASH_BodyRotation; -char * _PREHASH_SearchRegions; -char * _PREHASH_AnimationData; -char * _PREHASH_StatID; -char * _PREHASH_ItemID; -char * _PREHASH_ScriptDialogReply; -char * _PREHASH_RegionIDAndHandleReply; -char * _PREHASH_CameraAtOffset; -char * _PREHASH_VoteID; -char * _PREHASH_ParcelGodForceOwner; -char * _PREHASH_Filter; -char * _PREHASH_InviteData; -char * _PREHASH_PCode; -char * _PREHASH_SearchPos; -char * _PREHASH_PreyID; -char * _PREHASH_TerrainLowerLimit; -char * _PREHASH_EventFlags; -char * _PREHASH_TallyVotes; -char * _PREHASH_Result; -char * _PREHASH_LookAt; -char * _PREHASH_SearchOrder; -char * _PREHASH_PayButton; -char * _PREHASH_SelfCount; -char * _PREHASH_PacketCount; -char * _PREHASH_ParcelBuyPass; -char * _PREHASH_OldItemID; -char * _PREHASH_RegionPort; -char * _PREHASH_PriceEnergyUnit; -char * _PREHASH_Bitmap; -char * _PREHASH_CacheMissType; -char * _PREHASH_VFileID; -char * _PREHASH_GroupInsigniaID; -char * _PREHASH_Online; -char * _PREHASH_KickFlags; -char * _PREHASH_CovenantID; -char * _PREHASH_SysCPU; -char * _PREHASH_EMail; -char * _PREHASH_AggregatePermTextures; -char * _PREHASH_ChatChannel; -char * _PREHASH_ReturnID; -char * _PREHASH_ObjectAttach; -char * _PREHASH_TargetPort; -char * _PREHASH_ObjectSpinStop; -char * _PREHASH_FullID; -char * _PREHASH_ActivateGroup; -char * _PREHASH_SysGPU; -char * _PREHASH_AvatarInterestsReply; -char * _PREHASH_StartLure; -char * _PREHASH_SysRAM; -char * _PREHASH_ObjectPosition; -char * _PREHASH_SitPosition; -char * _PREHASH_StartTime; -char * _PREHASH_BornOn; -char * _PREHASH_CameraCollidePlane; -char * _PREHASH_EconomyDataRequest; -char * _PREHASH_TeleportLureRequest; -char * _PREHASH_FolderID; -char * _PREHASH_RegionHandleRequest; -char * _PREHASH_ScriptDataRequest; -char * _PREHASH_GroupRoleDataRequest; -char * _PREHASH_GroupTitlesRequest; -char * _PREHASH_AgentWearablesRequest; -char * _PREHASH_MapBlockRequest; -char * _PREHASH_LureID; -char * _PREHASH_CopyCenters; -char * _PREHASH_ParamList; -char * _PREHASH_InventorySerial; -char * _PREHASH_EdgeDataPacket; -char * _PREHASH_AvatarPickerReply; -char * _PREHASH_ParcelDwellReply; -char * _PREHASH_IsForSale; -char * _PREHASH_MuteID; -char * _PREHASH_MeanCollisionAlert; -char * _PREHASH_CanAcceptTasks; -char * _PREHASH_ItemData; -char * _PREHASH_AnimationList; -char * _PREHASH_Reputation; -char * _PREHASH_IntValue; -char * _PREHASH_TargetType; -char * _PREHASH_Amount; -char * _PREHASH_HasAttachment; -char * _PREHASH_UpdateAttachment; -char * _PREHASH_RemoveAttachment; -char * _PREHASH_HeightWidthBlock; -char * _PREHASH_RequestObjectPropertiesFamily; -char * _PREHASH_ObjectPropertiesFamily; -char * _PREHASH_UserData; -char * _PREHASH_IsReadable; -char * _PREHASH_PathCurve; -char * _PREHASH_Status; -char * _PREHASH_FromGroup; -char * _PREHASH_AlreadyVoted; -char * _PREHASH_PlacesReply; -char * _PREHASH_DirPlacesReply; -char * _PREHASH_ParcelBuy; -char * _PREHASH_DirFindQueryBackend; -char * _PREHASH_DirPlacesQueryBackend; -char * _PREHASH_DirClassifiedQueryBackend; -char * _PREHASH_DirLandQueryBackend; -char * _PREHASH_DirPopularQueryBackend; -char * _PREHASH_HistoryData; -char * _PREHASH_SnapshotID; -char * _PREHASH_Aspect; -char * _PREHASH_ParamSize; -char * _PREHASH_VoteCast; -char * _PREHASH_CastsShadows; -char * _PREHASH_EveryoneMask; -char * _PREHASH_ObjectSpinUpdate; -char * _PREHASH_MaturePublish; -char * _PREHASH_UseExistingAsset; -char * _PREHASH_Powers; -char * _PREHASH_ParcelLocalID; -char * _PREHASH_TeleportCancel; -char * _PREHASH_UnixTime; -char * _PREHASH_QueryFlags; -char * _PREHASH_AlwaysRun; -char * _PREHASH_Bottom; -char * _PREHASH_ButtonData; -char * _PREHASH_SoundData; -char * _PREHASH_ViewerStats; -char * _PREHASH_RegionHandshake; -char * _PREHASH_ObjectDescription; -char * _PREHASH_Description; -char * _PREHASH_ParamType; -char * _PREHASH_UUIDNameReply; -char * _PREHASH_UUIDGroupNameReply; -char * _PREHASH_SaveAssetIntoInventory; -char * _PREHASH_UserInfo; -char * _PREHASH_AnimSequenceID; -char * _PREHASH_NVPairs; -char * _PREHASH_GroupNoticesListRequest; -char * _PREHASH_ParcelAccessListRequest; -char * _PREHASH_MuteListRequest; -char * _PREHASH_RpcChannelRequest; -char * _PREHASH_LandStatRequest; -char * _PREHASH_PlacesQuery; -char * _PREHASH_DirPlacesQuery; -char * _PREHASH_SortOrder; -char * _PREHASH_Hunter; -char * _PREHASH_SunAngVelocity; -char * _PREHASH_BinaryBucket; -char * _PREHASH_ImagePacket; -char * _PREHASH_StartGroupProposal; -char * _PREHASH_EnergyLevel; -char * _PREHASH_PriceForListing; -char * _PREHASH_Scale; -char * _PREHASH_EstateCovenantReply; -char * _PREHASH_ParentEstateID; -char * _PREHASH_Extra2; -char * _PREHASH_Throttle; -char * _PREHASH_SimIP; -char * _PREHASH_GodID; -char * _PREHASH_TeleportMinPrice; -char * _PREHASH_VoteItem; -char * _PREHASH_ObjectRotation; -char * _PREHASH_SitRotation; -char * _PREHASH_SnapSelection; -char * _PREHASH_SoundTrigger; -char * _PREHASH_TerrainRaiseLimit; -char * _PREHASH_Quorum; -char * _PREHASH_AgentBlock; -char * _PREHASH_CommandBlock; -char * _PREHASH_PricePublicObjectDecay; -char * _PREHASH_SpawnPointPos; -char * _PREHASH_VolumeDetail; -char * _PREHASH_FromAgentName; -char * _PREHASH_Range; -char * _PREHASH_DirectoryVisibility; -char * _PREHASH_PublicIP; -char * _PREHASH_TeleportFailed; -char * _PREHASH_PreloadSound; -char * _PREHASH_ScreenshotID; -char * _PREHASH_CovenantTimestamp; -char * _PREHASH_OldestUnacked; -char * _PREHASH_SimulatorIP; -char * _PREHASH_Value; -char * _PREHASH_JointAxisOrAnchor; -char * _PREHASH_Test0; -char * _PREHASH_Test1; -char * _PREHASH_Test2; -char * _PREHASH_SunPhase; -char * _PREHASH_ParcelDivide; -char * _PREHASH_PriceObjectClaim; -char * _PREHASH_Field; -char * _PREHASH_Ratio; -char * _PREHASH_JoinGroupReply; -char * _PREHASH_LiveHelpGroupReply; -char * _PREHASH_Score; -char * _PREHASH_Image; -char * _PREHASH_ObjectClickAction; -char * _PREHASH_Parameter; -char * _PREHASH_Flags; -char * _PREHASH_Plane; -char * _PREHASH_Width; -char * _PREHASH_Right; -char * _PREHASH_DirFindQuery; -char * _PREHASH_Textures; -char * _PREHASH_EventData; -char * _PREHASH_Final; -char * _PREHASH_System; -char * _PREHASH_TelehubPos; -char * _PREHASH_ReportAutosaveCrash; -char * _PREHASH_CreateTrustedCircuit; -char * _PREHASH_DenyTrustedCircuit; -char * _PREHASH_RequestTrustedCircuit; -char * _PREHASH_Codec; -char * _PREHASH_Modal; -char * _PREHASH_ChildAgentUnknown; -char * _PREHASH_LandingType; -char * _PREHASH_ScriptRunningReply; -char * _PREHASH_Reply; -char * _PREHASH_GroupAccountDetailsReply; -char * _PREHASH_TelehubRot; -char * _PREHASH_AcceptFriendship; -char * _PREHASH_ItemType; -char * _PREHASH_DwellInfo; -char * _PREHASH_AgentResume; -char * _PREHASH_MailFilter; -char * _PREHASH_Disconnect; -char * _PREHASH_SimPosition; -char * _PREHASH_SimWideTotalPrims; -char * _PREHASH_Index; -char * _PREHASH_SimFilename; -char * _PREHASH_LastOwnerID; -char * _PREHASH_GroupNoticeRequest; -char * _PREHASH_EmailMessageRequest; -char * _PREHASH_MapItemRequest; -char * _PREHASH_AgentCount; -char * _PREHASH_MessageBlock; -char * _PREHASH_FuseBlock; -char * _PREHASH_AgentGroupData; -char * _PREHASH_ClassifiedInfoUpdate; -char * _PREHASH_RegionPos; -char * _PREHASH_ParcelMediaUpdate; -char * _PREHASH_NoticeID; -char * _PREHASH_GridX; -char * _PREHASH_GridY; -char * _PREHASH_Title; -char * _PREHASH_AuctionID; -char * _PREHASH_VoteType; -char * _PREHASH_CategoryID; -char * _PREHASH_Token; -char * _PREHASH_AggregatePerms; -char * _PREHASH_ObjectSelect; -char * _PREHASH_ForceObjectSelect; -char * _PREHASH_Price; -char * _PREHASH_SunDirection; -char * _PREHASH_FromName; -char * _PREHASH_ChangeInventoryItemFlags; -char * _PREHASH_Force; -char * _PREHASH_TransactionBlock; -char * _PREHASH_PowersMask; -char * _PREHASH_Stamp; -char * _PREHASH_TotalCredits; -char * _PREHASH_State; -char * _PREHASH_TextureIndex; -char * _PREHASH_InviteeID; -char * _PREHASH_ParcelReclaim; -char * _PREHASH_Money; -char * _PREHASH_PathTwist; -char * _PREHASH_AuthBuyerID; -char * _PREHASH_Color; -char * _PREHASH_SourceType; -char * _PREHASH_World; -char * _PREHASH_QueryData; -char * _PREHASH_Users; -char * _PREHASH_SysOS; -char * _PREHASH_Notes; -char * _PREHASH_AvatarID; -char * _PREHASH_FounderID; -char * _PREHASH_EndPointID; -char * _PREHASH_LocationLookAt; -char * _PREHASH_Sound; -char * _PREHASH_Cover; -char * _PREHASH_TotalObjectCount; -char * _PREHASH_TextureEntry; -char * _PREHASH_SquareMetersCommitted; -char * _PREHASH_ChannelID; -char * _PREHASH_Dwell; -char * _PREHASH_North; -char * _PREHASH_AgentUpdate; -char * _PREHASH_PickGodDelete; -char * _PREHASH_HostName; -char * _PREHASH_PriceParcelClaim; -char * _PREHASH_ParcelClaim; -char * _PREHASH_AgentPowers; -char * _PREHASH_ProfileHollow; -char * _PREHASH_GroupRoleChanges; -char * _PREHASH_Count; -char * _PREHASH_South; -char * _PREHASH_ObjectUpdateCompressed; -char * _PREHASH_MuteFlags; -char * _PREHASH_Group; -char * _PREHASH_AgentPause; -char * _PREHASH_LanguagesText; -char * _PREHASH_Error; -char * _PREHASH_InternalScriptMail; -char * _PREHASH_FindAgent; -char * _PREHASH_AgentData; -char * _PREHASH_FolderData; -char * _PREHASH_AssetBlock; -char * _PREHASH_AcceptNotices; -char * _PREHASH_SetGroupAcceptNotices; -char * _PREHASH_CloseCircuit; -char * _PREHASH_TeleportFinish; -char * _PREHASH_PathRevolutions; -char * _PREHASH_ClassifiedInfoReply; -char * _PREHASH_ParcelInfoReply; -char * _PREHASH_AutosaveData; -char * _PREHASH_SetStartLocation; -char * _PREHASH_PassHours; -char * _PREHASH_AttachmentPt; -char * _PREHASH_ParcelFlags; -char * _PREHASH_NumVotes; -char * _PREHASH_AvatarPickerRequest; -char * _PREHASH_TeleportLocationRequest; -char * _PREHASH_DataHomeLocationRequest; -char * _PREHASH_EventNotificationAddRequest; -char * _PREHASH_ParcelDwellRequest; -char * _PREHASH_EventLocationRequest; -char * _PREHASH_SetStartLocationRequest; -char * _PREHASH_QueryStart; -char * _PREHASH_EjectData; -char * _PREHASH_AvatarTextureUpdate; -char * _PREHASH_RPCServerPort; -char * _PREHASH_Bytes; -char * _PREHASH_Extra; -char * _PREHASH_ForceScriptControlRelease; -char * _PREHASH_ParcelRelease; -char * _PREHASH_VFileType; -char * _PREHASH_EjectGroupMemberReply; -char * _PREHASH_ImageData; -char * _PREHASH_SimulatorViewerTimeMessage; -char * _PREHASH_Rotation; -char * _PREHASH_Selection; -char * _PREHASH_TransactionData; -char * _PREHASH_OperationData; -char * _PREHASH_ExpirationDate; -char * _PREHASH_ParcelDeedToGroup; -char * _PREHASH_AvatarPicksReply; -char * _PREHASH_GroupTitlesReply; -char * _PREHASH_AgentInfo; -char * _PREHASH_MoneyTransferBackend; -char * _PREHASH_NextOwnerMask; -char * _PREHASH_MuteData; -char * _PREHASH_PassPrice; -char * _PREHASH_SourceID; -char * _PREHASH_ChangeUserRights; -char * _PREHASH_TeleportFlags; -char * _PREHASH_SlaveParcelData; -char * _PREHASH_AssetData; -char * _PREHASH_MultipleObjectUpdate; -char * _PREHASH_ObjectUpdate; -char * _PREHASH_ImprovedTerseObjectUpdate; -char * _PREHASH_ConfirmXferPacket; -char * _PREHASH_StartPingCheck; -char * _PREHASH_SimWideDeletes; -char * _PREHASH_LandStatReply; -char * _PREHASH_IsPhantom; -char * _PREHASH_AgentList; -char * _PREHASH_SimApproved; -char * _PREHASH_RezObject; -char * _PREHASH_TaskLocalID; -char * _PREHASH_ClaimDate; -char * _PREHASH_MergeParcel; -char * _PREHASH_Priority; -char * _PREHASH_QueryText; -char * _PREHASH_GroupNoticeAdd; -char * _PREHASH_ReturnType; -char * _PREHASH_FetchFolders; -char * _PREHASH_SimulatorPublicHostBlock; -char * _PREHASH_HeaderData; -char * _PREHASH_RequestMultipleObjects; -char * _PREHASH_RetrieveInstantMessages; -char * _PREHASH_OpenCircuit; -char * _PREHASH_CrossedRegion; -char * _PREHASH_DirGroupsReply; -char * _PREHASH_AvatarGroupsReply; -char * _PREHASH_EmailMessageReply; -char * _PREHASH_GroupVoteHistoryItemReply; -char * _PREHASH_ViewerPosition; -char * _PREHASH_Position; -char * _PREHASH_ParentEstate; -char * _PREHASH_EstateName; -char * _PREHASH_MuteName; -char * _PREHASH_ParcelRename; -char * _PREHASH_ViewerFilename; -char * _PREHASH_UserReportInternal; -char * _PREHASH_AvatarPropertiesRequest; -char * _PREHASH_ParcelPropertiesRequest; -char * _PREHASH_GroupProfileRequest; -char * _PREHASH_AgentDataUpdateRequest; -char * _PREHASH_PriceObjectScaleFactor; -char * _PREHASH_OpenEnrollment; -char * _PREHASH_GroupData; -char * _PREHASH_RequestGodlikePowers; -char * _PREHASH_GrantGodlikePowers; -char * _PREHASH_TransactionID; -char * _PREHASH_DestinationID; -char * _PREHASH_Controls; -char * _PREHASH_FirstDetachAll; -char * _PREHASH_EstateID; -char * _PREHASH_ImprovedInstantMessage; -char * _PREHASH_CheckParcelSales; -char * _PREHASH_ParcelSales; -char * _PREHASH_CurrentInterval; -char * _PREHASH_PriceRentLight; -char * _PREHASH_MediaAutoScale; -char * _PREHASH_NeighborBlock; -char * _PREHASH_LayerData; -char * _PREHASH_NVPairData; -char * _PREHASH_TeleportLocal; -char * _PREHASH_EjecteeID; -char * _PREHASH_VoteInitiator; -char * _PREHASH_TypeData; -char * _PREHASH_OwnerIDs; -char * _PREHASH_SystemKickUser; -char * _PREHASH_TransactionTime; -char * _PREHASH_TimeToLive; -char * _PREHASH_OldAgentID; -char * _PREHASH_MusicURL; -char * _PREHASH_ParcelPrimBonus; -char * _PREHASH_EjectUser; -char * _PREHASH_CoarseLocationUpdate; -char * _PREHASH_ChildAgentPositionUpdate; -char * _PREHASH_StoreLocal; -char * _PREHASH_GroupName; -char * _PREHASH_PriceParcelRent; -char * _PREHASH_SimStatus; -char * _PREHASH_TransactionSuccess; -char * _PREHASH_LureType; -char * _PREHASH_GroupMask; -char * _PREHASH_SitObject; -char * _PREHASH_Override; -char * _PREHASH_LocomotionState; -char * _PREHASH_PriceUpload; -char * _PREHASH_RemoveParcel; -char * _PREHASH_ConfirmAuctionStart; -char * _PREHASH_RpcScriptRequestInbound; -char * _PREHASH_ActiveGroupID; -char * _PREHASH_ParcelReturnObjects; -char * _PREHASH_TotalObjects; -char * _PREHASH_ObjectExtraParams; -char * _PREHASH_Questions; -char * _PREHASH_TransferAbort; -char * _PREHASH_TransferInventory; -char * _PREHASH_RayTargetID; -char * _PREHASH_ClaimPrice; -char * _PREHASH_ObjectProperties; -char * _PREHASH_ParcelProperties; -char * _PREHASH_EstateOwnerID; -char * _PREHASH_LogoutRequest; -char * _PREHASH_AssetUploadRequest; -char * _PREHASH_TransactionType; -char * _PREHASH_AvatarPropertiesUpdate; -char * _PREHASH_ParcelPropertiesUpdate; -char * _PREHASH_FetchItems; -char * _PREHASH_AbortXfer; -char * _PREHASH_DeRezAck; -char * _PREHASH_TakeControls; -char * _PREHASH_DirLandReply; -char * _PREHASH_MuteType; -char * _PREHASH_IMViaEMail; -char * _PREHASH_RentPrice; -char * _PREHASH_GenericMessage; -char * _PREHASH_ChildAgentAlive; -char * _PREHASH_AssetType; -char * _PREHASH_SpawnPointBlock; -char * _PREHASH_AttachmentBlock; -char * _PREHASH_ObjectMaterial; -char * _PREHASH_OwnerName; -char * _PREHASH_AvatarNotesReply; -char * _PREHASH_CacheID; -char * _PREHASH_OwnerMask; -char * _PREHASH_TransferInventoryAck; -char * _PREHASH_RegionDenyAgeUnverified; -char * _PREHASH_AgeVerificationBlock; +char* _PREHASH_X = LLMessageStringTable::getInstance()->getString("X"); +char* _PREHASH_Y = LLMessageStringTable::getInstance()->getString("Y"); +char* _PREHASH_Z = LLMessageStringTable::getInstance()->getString("Z"); +char* _PREHASH_AddFlags = LLMessageStringTable::getInstance()->getString("AddFlags"); +char* _PREHASH_FailureInfo = LLMessageStringTable::getInstance()->getString("FailureInfo"); +char* _PREHASH_MapData = LLMessageStringTable::getInstance()->getString("MapData"); +char* _PREHASH_AddItem = LLMessageStringTable::getInstance()->getString("AddItem"); +char* _PREHASH_MeanCollision = LLMessageStringTable::getInstance()->getString("MeanCollision"); +char* _PREHASH_RezScript = LLMessageStringTable::getInstance()->getString("RezScript"); +char* _PREHASH_AvatarSitResponse = LLMessageStringTable::getInstance()->getString("AvatarSitResponse"); +char* _PREHASH_InventoryAssetResponse = LLMessageStringTable::getInstance()->getString("InventoryAssetResponse"); +char* _PREHASH_KillObject = LLMessageStringTable::getInstance()->getString("KillObject"); +char* _PREHASH_ProposalID = LLMessageStringTable::getInstance()->getString("ProposalID"); +char* _PREHASH_SerialNum = LLMessageStringTable::getInstance()->getString("SerialNum"); +char* _PREHASH_Duration = LLMessageStringTable::getInstance()->getString("Duration"); +char* _PREHASH_ScriptQuestion = LLMessageStringTable::getInstance()->getString("ScriptQuestion"); +char* _PREHASH_AddCircuitCode = LLMessageStringTable::getInstance()->getString("AddCircuitCode"); +char* _PREHASH_UseCircuitCode = LLMessageStringTable::getInstance()->getString("UseCircuitCode"); +char* _PREHASH_ViewerCircuitCode = LLMessageStringTable::getInstance()->getString("ViewerCircuitCode"); +char* _PREHASH_ScriptAnswerYes = LLMessageStringTable::getInstance()->getString("ScriptAnswerYes"); +char* _PREHASH_PartnerID = LLMessageStringTable::getInstance()->getString("PartnerID"); +char* _PREHASH_DirLandQuery = LLMessageStringTable::getInstance()->getString("DirLandQuery"); +char* _PREHASH_TeleportStart = LLMessageStringTable::getInstance()->getString("TeleportStart"); +char* _PREHASH_AboutText = LLMessageStringTable::getInstance()->getString("AboutText"); +char* _PREHASH_VisualParam = LLMessageStringTable::getInstance()->getString("VisualParam"); +char* _PREHASH_GroupPrims = LLMessageStringTable::getInstance()->getString("GroupPrims"); +char* _PREHASH_SelectedPrims = LLMessageStringTable::getInstance()->getString("SelectedPrims"); +char* _PREHASH_ID = LLMessageStringTable::getInstance()->getString("ID"); +char* _PREHASH_UUIDNameRequest = LLMessageStringTable::getInstance()->getString("UUIDNameRequest"); +char* _PREHASH_UUIDGroupNameRequest = LLMessageStringTable::getInstance()->getString("UUIDGroupNameRequest"); +char* _PREHASH_GroupAccountTransactionsRequest = LLMessageStringTable::getInstance()->getString("GroupAccountTransactionsRequest"); +char* _PREHASH_MapNameRequest = LLMessageStringTable::getInstance()->getString("MapNameRequest"); +char* _PREHASH_UpdateSimulator = LLMessageStringTable::getInstance()->getString("UpdateSimulator"); +char* _PREHASH_BillableFactor = LLMessageStringTable::getInstance()->getString("BillableFactor"); +char* _PREHASH_ObjectBonusFactor = LLMessageStringTable::getInstance()->getString("ObjectBonusFactor"); +char* _PREHASH_EnableSimulator = LLMessageStringTable::getInstance()->getString("EnableSimulator"); +char* _PREHASH_DisableSimulator = LLMessageStringTable::getInstance()->getString("DisableSimulator"); +char* _PREHASH_ConfirmEnableSimulator = LLMessageStringTable::getInstance()->getString("ConfirmEnableSimulator"); +char* _PREHASH_LayerType = LLMessageStringTable::getInstance()->getString("LayerType"); +char* _PREHASH_OwnerRole = LLMessageStringTable::getInstance()->getString("OwnerRole"); +char* _PREHASH_ParcelOverlay = LLMessageStringTable::getInstance()->getString("ParcelOverlay"); +char* _PREHASH_GroupOwned = LLMessageStringTable::getInstance()->getString("GroupOwned"); +char* _PREHASH_IP = LLMessageStringTable::getInstance()->getString("IP"); +char* _PREHASH_ChatFromViewer = LLMessageStringTable::getInstance()->getString("ChatFromViewer"); +char* _PREHASH_AvgAgentsInView = LLMessageStringTable::getInstance()->getString("AvgAgentsInView"); +char* _PREHASH_AgentsInView = LLMessageStringTable::getInstance()->getString("AgentsInView"); +char* _PREHASH_GroupTitle = LLMessageStringTable::getInstance()->getString("GroupTitle"); +char* _PREHASH_MapLayerReply = LLMessageStringTable::getInstance()->getString("MapLayerReply"); +char* _PREHASH_CompoundMsgID = LLMessageStringTable::getInstance()->getString("CompoundMsgID"); +char* _PREHASH_CameraConstraint = LLMessageStringTable::getInstance()->getString("CameraConstraint"); +char* _PREHASH_DownloadTotals = LLMessageStringTable::getInstance()->getString("DownloadTotals"); +char* _PREHASH_GenCounter = LLMessageStringTable::getInstance()->getString("GenCounter"); +char* _PREHASH_FrozenData = LLMessageStringTable::getInstance()->getString("FrozenData"); +char* _PREHASH_ChildAgentDying = LLMessageStringTable::getInstance()->getString("ChildAgentDying"); +char* _PREHASH_To = LLMessageStringTable::getInstance()->getString("To"); +char* _PREHASH_CopyInventoryFromNotecard = LLMessageStringTable::getInstance()->getString("CopyInventoryFromNotecard"); +char* _PREHASH_RezObjectFromNotecard = LLMessageStringTable::getInstance()->getString("RezObjectFromNotecard"); +char* _PREHASH_ParcelDirFeeCurrent = LLMessageStringTable::getInstance()->getString("ParcelDirFeeCurrent"); +char* _PREHASH_SeedCapability = LLMessageStringTable::getInstance()->getString("SeedCapability"); +char* _PREHASH_ObjectDuplicate = LLMessageStringTable::getInstance()->getString("ObjectDuplicate"); +char* _PREHASH_InventoryData = LLMessageStringTable::getInstance()->getString("InventoryData"); +char* _PREHASH_ReplyData = LLMessageStringTable::getInstance()->getString("ReplyData"); +char* _PREHASH_ResetList = LLMessageStringTable::getInstance()->getString("ResetList"); +char* _PREHASH_MediaID = LLMessageStringTable::getInstance()->getString("MediaID"); +char* _PREHASH_RelatedRights = LLMessageStringTable::getInstance()->getString("RelatedRights"); +char* _PREHASH_RedirectGridX = LLMessageStringTable::getInstance()->getString("RedirectGridX"); +char* _PREHASH_RedirectGridY = LLMessageStringTable::getInstance()->getString("RedirectGridY"); +char* _PREHASH_TransferID = LLMessageStringTable::getInstance()->getString("TransferID"); +char* _PREHASH_TexturesChanged = LLMessageStringTable::getInstance()->getString("TexturesChanged"); +char* _PREHASH_UserLookAt = LLMessageStringTable::getInstance()->getString("UserLookAt"); +char* _PREHASH_TestBlock1 = LLMessageStringTable::getInstance()->getString("TestBlock1"); +char* _PREHASH_SensedData = LLMessageStringTable::getInstance()->getString("SensedData"); +char* _PREHASH_UpdateBlock = LLMessageStringTable::getInstance()->getString("UpdateBlock"); +char* _PREHASH_ClassifiedGodDelete = LLMessageStringTable::getInstance()->getString("ClassifiedGodDelete"); +char* _PREHASH_ObjectGrabUpdate = LLMessageStringTable::getInstance()->getString("ObjectGrabUpdate"); +char* _PREHASH_LocationPos = LLMessageStringTable::getInstance()->getString("LocationPos"); +char* _PREHASH_TaxDate = LLMessageStringTable::getInstance()->getString("TaxDate"); +char* _PREHASH_StartDateTime = LLMessageStringTable::getInstance()->getString("StartDateTime"); +char* _PREHASH_ObjectUpdateCached = LLMessageStringTable::getInstance()->getString("ObjectUpdateCached"); +char* _PREHASH_Packets = LLMessageStringTable::getInstance()->getString("Packets"); +char* _PREHASH_FailureType = LLMessageStringTable::getInstance()->getString("FailureType"); +char* _PREHASH_UpdateGroupInfo = LLMessageStringTable::getInstance()->getString("UpdateGroupInfo"); +char* _PREHASH_ObjectPermissions = LLMessageStringTable::getInstance()->getString("ObjectPermissions"); +char* _PREHASH_RevokePermissions = LLMessageStringTable::getInstance()->getString("RevokePermissions"); +char* _PREHASH_UpdateFlags = LLMessageStringTable::getInstance()->getString("UpdateFlags"); +char* _PREHASH_ObjectExportSelected = LLMessageStringTable::getInstance()->getString("ObjectExportSelected"); +char* _PREHASH_RezSelected = LLMessageStringTable::getInstance()->getString("RezSelected"); +char* _PREHASH_AutoPilot = LLMessageStringTable::getInstance()->getString("AutoPilot"); +char* _PREHASH_UpdateMuteListEntry = LLMessageStringTable::getInstance()->getString("UpdateMuteListEntry"); +char* _PREHASH_RemoveMuteListEntry = LLMessageStringTable::getInstance()->getString("RemoveMuteListEntry"); +char* _PREHASH_SetSimStatusInDatabase = LLMessageStringTable::getInstance()->getString("SetSimStatusInDatabase"); +char* _PREHASH_SetSimPresenceInDatabase = LLMessageStringTable::getInstance()->getString("SetSimPresenceInDatabase"); +char* _PREHASH_CameraProperty = LLMessageStringTable::getInstance()->getString("CameraProperty"); +char* _PREHASH_BrushSize = LLMessageStringTable::getInstance()->getString("BrushSize"); +char* _PREHASH_SimulatorSetMap = LLMessageStringTable::getInstance()->getString("SimulatorSetMap"); +char* _PREHASH_RegionPresenceRequestByRegionID = LLMessageStringTable::getInstance()->getString("RegionPresenceRequestByRegionID"); +char* _PREHASH_ParcelObjectOwnersReply = LLMessageStringTable::getInstance()->getString("ParcelObjectOwnersReply"); +char* _PREHASH_GroupMembersReply = LLMessageStringTable::getInstance()->getString("GroupMembersReply"); +char* _PREHASH_GroupRoleMembersReply = LLMessageStringTable::getInstance()->getString("GroupRoleMembersReply"); +char* _PREHASH_RequestRegionInfo = LLMessageStringTable::getInstance()->getString("RequestRegionInfo"); +char* _PREHASH_AABBMax = LLMessageStringTable::getInstance()->getString("AABBMax"); +char* _PREHASH_RequestPayPrice = LLMessageStringTable::getInstance()->getString("RequestPayPrice"); +char* _PREHASH_SimulatorPresentAtLocation = LLMessageStringTable::getInstance()->getString("SimulatorPresentAtLocation"); +char* _PREHASH_AgentRequestSit = LLMessageStringTable::getInstance()->getString("AgentRequestSit"); +char* _PREHASH_AABBMin = LLMessageStringTable::getInstance()->getString("AABBMin"); +char* _PREHASH_ClassifiedFlags = LLMessageStringTable::getInstance()->getString("ClassifiedFlags"); +char* _PREHASH_ControlFlags = LLMessageStringTable::getInstance()->getString("ControlFlags"); +char* _PREHASH_TeleportRequest = LLMessageStringTable::getInstance()->getString("TeleportRequest"); +char* _PREHASH_ScriptTeleportRequest = LLMessageStringTable::getInstance()->getString("ScriptTeleportRequest"); +char* _PREHASH_EstateCovenantRequest = LLMessageStringTable::getInstance()->getString("EstateCovenantRequest"); +char* _PREHASH_DateUTC = LLMessageStringTable::getInstance()->getString("DateUTC"); +char* _PREHASH_TaskIDs = LLMessageStringTable::getInstance()->getString("TaskIDs"); +char* _PREHASH_RequestResult = LLMessageStringTable::getInstance()->getString("RequestResult"); +char* _PREHASH_CanAcceptAgents = LLMessageStringTable::getInstance()->getString("CanAcceptAgents"); +char* _PREHASH_ObjectSaleInfo = LLMessageStringTable::getInstance()->getString("ObjectSaleInfo"); +char* _PREHASH_KillChildAgents = LLMessageStringTable::getInstance()->getString("KillChildAgents"); +char* _PREHASH_Balance = LLMessageStringTable::getInstance()->getString("Balance"); +char* _PREHASH_DerezContainer = LLMessageStringTable::getInstance()->getString("DerezContainer"); +char* _PREHASH_ObjectData = LLMessageStringTable::getInstance()->getString("ObjectData"); +char* _PREHASH_CameraAtAxis = LLMessageStringTable::getInstance()->getString("CameraAtAxis"); +char* _PREHASH_InfoBlock = LLMessageStringTable::getInstance()->getString("InfoBlock"); +char* _PREHASH_OwnershipCost = LLMessageStringTable::getInstance()->getString("OwnershipCost"); +char* _PREHASH_AvatarNotesUpdate = LLMessageStringTable::getInstance()->getString("AvatarNotesUpdate"); +char* _PREHASH_PID = LLMessageStringTable::getInstance()->getString("PID"); +char* _PREHASH_DirPopularReply = LLMessageStringTable::getInstance()->getString("DirPopularReply"); +char* _PREHASH_TerrainHeightRange00 = LLMessageStringTable::getInstance()->getString("TerrainHeightRange00"); +char* _PREHASH_SimData = LLMessageStringTable::getInstance()->getString("SimData"); +char* _PREHASH_TerrainHeightRange01 = LLMessageStringTable::getInstance()->getString("TerrainHeightRange01"); +char* _PREHASH_TerrainHeightRange10 = LLMessageStringTable::getInstance()->getString("TerrainHeightRange10"); +char* _PREHASH_TerrainHeightRange11 = LLMessageStringTable::getInstance()->getString("TerrainHeightRange11"); +char* _PREHASH_UpdateInventoryItem = LLMessageStringTable::getInstance()->getString("UpdateInventoryItem"); +char* _PREHASH_UpdateCreateInventoryItem = LLMessageStringTable::getInstance()->getString("UpdateCreateInventoryItem"); +char* _PREHASH_MoveInventoryItem = LLMessageStringTable::getInstance()->getString("MoveInventoryItem"); +char* _PREHASH_CopyInventoryItem = LLMessageStringTable::getInstance()->getString("CopyInventoryItem"); +char* _PREHASH_RemoveInventoryItem = LLMessageStringTable::getInstance()->getString("RemoveInventoryItem"); +char* _PREHASH_CreateInventoryItem = LLMessageStringTable::getInstance()->getString("CreateInventoryItem"); +char* _PREHASH_PathTwistBegin = LLMessageStringTable::getInstance()->getString("PathTwistBegin"); +char* _PREHASH_CRC = LLMessageStringTable::getInstance()->getString("CRC"); +char* _PREHASH_AttachmentPoint = LLMessageStringTable::getInstance()->getString("AttachmentPoint"); +char* _PREHASH_TelehubBlock = LLMessageStringTable::getInstance()->getString("TelehubBlock"); +char* _PREHASH_FOVBlock = LLMessageStringTable::getInstance()->getString("FOVBlock"); +char* _PREHASH_StartLocationData = LLMessageStringTable::getInstance()->getString("StartLocationData"); +char* _PREHASH_PositionData = LLMessageStringTable::getInstance()->getString("PositionData"); +char* _PREHASH_TimeSinceLast = LLMessageStringTable::getInstance()->getString("TimeSinceLast"); +char* _PREHASH_MapImage = LLMessageStringTable::getInstance()->getString("MapImage"); +char* _PREHASH_Objects = LLMessageStringTable::getInstance()->getString("Objects"); +char* _PREHASH_URL = LLMessageStringTable::getInstance()->getString("URL"); +char* _PREHASH_CreationDate = LLMessageStringTable::getInstance()->getString("CreationDate"); +char* _PREHASH_JointPivot = LLMessageStringTable::getInstance()->getString("JointPivot"); +char* _PREHASH_FPS = LLMessageStringTable::getInstance()->getString("FPS"); +char* _PREHASH_HasTelehub = LLMessageStringTable::getInstance()->getString("HasTelehub"); +char* _PREHASH_PathEnd = LLMessageStringTable::getInstance()->getString("PathEnd"); +char* _PREHASH_ScriptDataReply = LLMessageStringTable::getInstance()->getString("ScriptDataReply"); +char* _PREHASH_MapBlockReply = LLMessageStringTable::getInstance()->getString("MapBlockReply"); +char* _PREHASH_PropertiesData = LLMessageStringTable::getInstance()->getString("PropertiesData"); +char* _PREHASH_ViewerEffect = LLMessageStringTable::getInstance()->getString("ViewerEffect"); +char* _PREHASH_FreezeUser = LLMessageStringTable::getInstance()->getString("FreezeUser"); +char* _PREHASH_OwnerPrims = LLMessageStringTable::getInstance()->getString("OwnerPrims"); +char* _PREHASH_ObjectGrab = LLMessageStringTable::getInstance()->getString("ObjectGrab"); +char* _PREHASH_ToAgentID = LLMessageStringTable::getInstance()->getString("ToAgentID"); +char* _PREHASH_SimulatorMapUpdate = LLMessageStringTable::getInstance()->getString("SimulatorMapUpdate"); +char* _PREHASH_TransferPacket = LLMessageStringTable::getInstance()->getString("TransferPacket"); +char* _PREHASH_ObjectName = LLMessageStringTable::getInstance()->getString("ObjectName"); +char* _PREHASH_GroupPowers = LLMessageStringTable::getInstance()->getString("GroupPowers"); +char* _PREHASH_OriginalName = LLMessageStringTable::getInstance()->getString("OriginalName"); +char* _PREHASH_CompletePingCheck = LLMessageStringTable::getInstance()->getString("CompletePingCheck"); +char* _PREHASH_OnlineStatus = LLMessageStringTable::getInstance()->getString("OnlineStatus"); +char* _PREHASH_ObjectDrop = LLMessageStringTable::getInstance()->getString("ObjectDrop"); +char* _PREHASH_UseBigPackets = LLMessageStringTable::getInstance()->getString("UseBigPackets"); +char* _PREHASH_GroupNoticesListReply = LLMessageStringTable::getInstance()->getString("GroupNoticesListReply"); +char* _PREHASH_ParcelAccessListReply = LLMessageStringTable::getInstance()->getString("ParcelAccessListReply"); +char* _PREHASH_RpcChannelReply = LLMessageStringTable::getInstance()->getString("RpcChannelReply"); +char* _PREHASH_RegionPresenceResponse = LLMessageStringTable::getInstance()->getString("RegionPresenceResponse"); +char* _PREHASH_CharterMember = LLMessageStringTable::getInstance()->getString("CharterMember"); +char* _PREHASH_EdgeData = LLMessageStringTable::getInstance()->getString("EdgeData"); +char* _PREHASH_NameData = LLMessageStringTable::getInstance()->getString("NameData"); +char* _PREHASH_RegionPushOverride = LLMessageStringTable::getInstance()->getString("RegionPushOverride"); +char* _PREHASH_SimName = LLMessageStringTable::getInstance()->getString("SimName"); +char* _PREHASH_UserReport = LLMessageStringTable::getInstance()->getString("UserReport"); +char* _PREHASH_DownloadPriority = LLMessageStringTable::getInstance()->getString("DownloadPriority"); +char* _PREHASH_ToAgentId = LLMessageStringTable::getInstance()->getString("ToAgentId"); +char* _PREHASH_DirPopularQuery = LLMessageStringTable::getInstance()->getString("DirPopularQuery"); +char* _PREHASH_Mag = LLMessageStringTable::getInstance()->getString("Mag"); +char* _PREHASH_ParcelPropertiesRequestByID = LLMessageStringTable::getInstance()->getString("ParcelPropertiesRequestByID"); +char* _PREHASH_ObjectLink = LLMessageStringTable::getInstance()->getString("ObjectLink"); +char* _PREHASH_RpcScriptReplyInbound = LLMessageStringTable::getInstance()->getString("RpcScriptReplyInbound"); +char* _PREHASH_RezData = LLMessageStringTable::getInstance()->getString("RezData"); +char* _PREHASH_RemoveInventoryObjects = LLMessageStringTable::getInstance()->getString("RemoveInventoryObjects"); +char* _PREHASH_GroupProposalBallot = LLMessageStringTable::getInstance()->getString("GroupProposalBallot"); +char* _PREHASH_RPCServerIP = LLMessageStringTable::getInstance()->getString("RPCServerIP"); +char* _PREHASH_Far = LLMessageStringTable::getInstance()->getString("Far"); +char* _PREHASH_GodSessionID = LLMessageStringTable::getInstance()->getString("GodSessionID"); +char* _PREHASH_FLAboutText = LLMessageStringTable::getInstance()->getString("FLAboutText"); +char* _PREHASH_RegionHandshakeReply = LLMessageStringTable::getInstance()->getString("RegionHandshakeReply"); +char* _PREHASH_GroupActiveProposalItemReply = LLMessageStringTable::getInstance()->getString("GroupActiveProposalItemReply"); +char* _PREHASH_MapItemReply = LLMessageStringTable::getInstance()->getString("MapItemReply"); +char* _PREHASH_Seconds = LLMessageStringTable::getInstance()->getString("Seconds"); +char* _PREHASH_UpdateUserInfo = LLMessageStringTable::getInstance()->getString("UpdateUserInfo"); +char* _PREHASH_AggregatePermTexturesOwner = LLMessageStringTable::getInstance()->getString("AggregatePermTexturesOwner"); +char* _PREHASH_Set = LLMessageStringTable::getInstance()->getString("Set"); +char* _PREHASH_NewName = LLMessageStringTable::getInstance()->getString("NewName"); +char* _PREHASH_Key = LLMessageStringTable::getInstance()->getString("Key"); +char* _PREHASH_AgentID = LLMessageStringTable::getInstance()->getString("AgentID"); +char* _PREHASH_EventNotificationRemoveRequest = LLMessageStringTable::getInstance()->getString("EventNotificationRemoveRequest"); +char* _PREHASH_NewFolderID = LLMessageStringTable::getInstance()->getString("NewFolderID"); +char* _PREHASH_Arc = LLMessageStringTable::getInstance()->getString("Arc"); +char* _PREHASH_RegionX = LLMessageStringTable::getInstance()->getString("RegionX"); +char* _PREHASH_RegionY = LLMessageStringTable::getInstance()->getString("RegionY"); +char* _PREHASH_RequestData = LLMessageStringTable::getInstance()->getString("RequestData"); +char* _PREHASH_Msg = LLMessageStringTable::getInstance()->getString("Msg"); +char* _PREHASH_Top = LLMessageStringTable::getInstance()->getString("Top"); +char* _PREHASH_MiscStats = LLMessageStringTable::getInstance()->getString("MiscStats"); +char* _PREHASH_ImageID = LLMessageStringTable::getInstance()->getString("ImageID"); +char* _PREHASH_DataPacket = LLMessageStringTable::getInstance()->getString("DataPacket"); +char* _PREHASH_You = LLMessageStringTable::getInstance()->getString("You"); +char* _PREHASH_ScriptControlChange = LLMessageStringTable::getInstance()->getString("ScriptControlChange"); +char* _PREHASH_LoadURL = LLMessageStringTable::getInstance()->getString("LoadURL"); +char* _PREHASH_SetCPURatio = LLMessageStringTable::getInstance()->getString("SetCPURatio"); +char* _PREHASH_NameValueData = LLMessageStringTable::getInstance()->getString("NameValueData"); +char* _PREHASH_AtomicPassObject = LLMessageStringTable::getInstance()->getString("AtomicPassObject"); +char* _PREHASH_ErrorMessage = LLMessageStringTable::getInstance()->getString("ErrorMessage"); +char* _PREHASH_ViewerFrozenMessage = LLMessageStringTable::getInstance()->getString("ViewerFrozenMessage"); +char* _PREHASH_HealthMessage = LLMessageStringTable::getInstance()->getString("HealthMessage"); +char* _PREHASH_LogTextMessage = LLMessageStringTable::getInstance()->getString("LogTextMessage"); +char* _PREHASH_TimeDilation = LLMessageStringTable::getInstance()->getString("TimeDilation"); +char* _PREHASH_RemoveContribution = LLMessageStringTable::getInstance()->getString("RemoveContribution"); +char* _PREHASH_Contribution = LLMessageStringTable::getInstance()->getString("Contribution"); +char* _PREHASH_SetGroupContribution = LLMessageStringTable::getInstance()->getString("SetGroupContribution"); +char* _PREHASH_Offline = LLMessageStringTable::getInstance()->getString("Offline"); +char* _PREHASH_AgentIsNowWearing = LLMessageStringTable::getInstance()->getString("AgentIsNowWearing"); +char* _PREHASH_Members = LLMessageStringTable::getInstance()->getString("Members"); +char* _PREHASH_FailedResends = LLMessageStringTable::getInstance()->getString("FailedResends"); +char* _PREHASH_SecPerDay = LLMessageStringTable::getInstance()->getString("SecPerDay"); +char* _PREHASH_CameraCenter = LLMessageStringTable::getInstance()->getString("CameraCenter"); +char* _PREHASH_CameraLeftAxis = LLMessageStringTable::getInstance()->getString("CameraLeftAxis"); +char* _PREHASH_ExBlock = LLMessageStringTable::getInstance()->getString("ExBlock"); +char* _PREHASH_Channel = LLMessageStringTable::getInstance()->getString("Channel"); +char* _PREHASH_NetTest = LLMessageStringTable::getInstance()->getString("NetTest"); +char* _PREHASH_DiscardLevel = LLMessageStringTable::getInstance()->getString("DiscardLevel"); +char* _PREHASH_LayerID = LLMessageStringTable::getInstance()->getString("LayerID"); +char* _PREHASH_GrabOffset = LLMessageStringTable::getInstance()->getString("GrabOffset"); +char* _PREHASH_SimPort = LLMessageStringTable::getInstance()->getString("SimPort"); +char* _PREHASH_PricePerMeter = LLMessageStringTable::getInstance()->getString("PricePerMeter"); +char* _PREHASH_RegionFlags = LLMessageStringTable::getInstance()->getString("RegionFlags"); +char* _PREHASH_VoteResult = LLMessageStringTable::getInstance()->getString("VoteResult"); +char* _PREHASH_ParcelDirFeeEstimate = LLMessageStringTable::getInstance()->getString("ParcelDirFeeEstimate"); +char* _PREHASH_ModifyBlock = LLMessageStringTable::getInstance()->getString("ModifyBlock"); +char* _PREHASH_InventoryBlock = LLMessageStringTable::getInstance()->getString("InventoryBlock"); +char* _PREHASH_ReplyBlock = LLMessageStringTable::getInstance()->getString("ReplyBlock"); +char* _PREHASH_ValidUntil = LLMessageStringTable::getInstance()->getString("ValidUntil"); +char* _PREHASH_VelocityInterpolateOn = LLMessageStringTable::getInstance()->getString("VelocityInterpolateOn"); +char* _PREHASH_ClassifiedDelete = LLMessageStringTable::getInstance()->getString("ClassifiedDelete"); +char* _PREHASH_RegionDenyAnonymous = LLMessageStringTable::getInstance()->getString("RegionDenyAnonymous"); +char* _PREHASH_FLImageID = LLMessageStringTable::getInstance()->getString("FLImageID"); +char* _PREHASH_AllowPublish = LLMessageStringTable::getInstance()->getString("AllowPublish"); +char* _PREHASH_SitName = LLMessageStringTable::getInstance()->getString("SitName"); +char* _PREHASH_RegionsVisited = LLMessageStringTable::getInstance()->getString("RegionsVisited"); +char* _PREHASH_DirClassifiedReply = LLMessageStringTable::getInstance()->getString("DirClassifiedReply"); +char* _PREHASH_AvatarClassifiedReply = LLMessageStringTable::getInstance()->getString("AvatarClassifiedReply"); +char* _PREHASH_MediaURL = LLMessageStringTable::getInstance()->getString("MediaURL"); +char* _PREHASH_CompleteAgentMovement = LLMessageStringTable::getInstance()->getString("CompleteAgentMovement"); +char* _PREHASH_ClassifiedID = LLMessageStringTable::getInstance()->getString("ClassifiedID"); +char* _PREHASH_LocalID = LLMessageStringTable::getInstance()->getString("LocalID"); +char* _PREHASH_SpaceIP = LLMessageStringTable::getInstance()->getString("SpaceIP"); +char* _PREHASH_RemoveItem = LLMessageStringTable::getInstance()->getString("RemoveItem"); +char* _PREHASH_LogFailedMoneyTransaction = LLMessageStringTable::getInstance()->getString("LogFailedMoneyTransaction"); +char* _PREHASH_ViewerStartAuction = LLMessageStringTable::getInstance()->getString("ViewerStartAuction"); +char* _PREHASH_StartAuction = LLMessageStringTable::getInstance()->getString("StartAuction"); +char* _PREHASH_DuplicateFlags = LLMessageStringTable::getInstance()->getString("DuplicateFlags"); +char* _PREHASH_RegionInfo2 = LLMessageStringTable::getInstance()->getString("RegionInfo2"); +char* _PREHASH_TextColor = LLMessageStringTable::getInstance()->getString("TextColor"); +char* _PREHASH_SlaveID = LLMessageStringTable::getInstance()->getString("SlaveID"); +char* _PREHASH_Charter = LLMessageStringTable::getInstance()->getString("Charter"); +char* _PREHASH_AlertData = LLMessageStringTable::getInstance()->getString("AlertData"); +char* _PREHASH_TargetBlock = LLMessageStringTable::getInstance()->getString("TargetBlock"); +char* _PREHASH_CheckParcelAuctions = LLMessageStringTable::getInstance()->getString("CheckParcelAuctions"); +char* _PREHASH_ParcelAuctions = LLMessageStringTable::getInstance()->getString("ParcelAuctions"); +char* _PREHASH_OwnerIsGroup = LLMessageStringTable::getInstance()->getString("OwnerIsGroup"); +char* _PREHASH_NameValuePair = LLMessageStringTable::getInstance()->getString("NameValuePair"); +char* _PREHASH_RemoveNameValuePair = LLMessageStringTable::getInstance()->getString("RemoveNameValuePair"); +char* _PREHASH_BulkUpdateInventory = LLMessageStringTable::getInstance()->getString("BulkUpdateInventory"); +char* _PREHASH_UpdateTaskInventory = LLMessageStringTable::getInstance()->getString("UpdateTaskInventory"); +char* _PREHASH_RemoveTaskInventory = LLMessageStringTable::getInstance()->getString("RemoveTaskInventory"); +char* _PREHASH_MoveTaskInventory = LLMessageStringTable::getInstance()->getString("MoveTaskInventory"); +char* _PREHASH_RequestTaskInventory = LLMessageStringTable::getInstance()->getString("RequestTaskInventory"); +char* _PREHASH_ReplyTaskInventory = LLMessageStringTable::getInstance()->getString("ReplyTaskInventory"); +char* _PREHASH_AggregatePermInventory = LLMessageStringTable::getInstance()->getString("AggregatePermInventory"); +char* _PREHASH_GroupAccountTransactionsReply = LLMessageStringTable::getInstance()->getString("GroupAccountTransactionsReply"); +char* _PREHASH_SimulatorInfo = LLMessageStringTable::getInstance()->getString("SimulatorInfo"); +char* _PREHASH_WearableData = LLMessageStringTable::getInstance()->getString("WearableData"); +char* _PREHASH_Enabled = LLMessageStringTable::getInstance()->getString("Enabled"); +char* _PREHASH_Savings = LLMessageStringTable::getInstance()->getString("Savings"); +char* _PREHASH_SimulatorLoad = LLMessageStringTable::getInstance()->getString("SimulatorLoad"); +char* _PREHASH_InternalRegionIP = LLMessageStringTable::getInstance()->getString("InternalRegionIP"); +char* _PREHASH_ExternalRegionIP = LLMessageStringTable::getInstance()->getString("ExternalRegionIP"); +char* _PREHASH_TotalPairs = LLMessageStringTable::getInstance()->getString("TotalPairs"); +char* _PREHASH_CreateGroupRequest = LLMessageStringTable::getInstance()->getString("CreateGroupRequest"); +char* _PREHASH_JoinGroupRequest = LLMessageStringTable::getInstance()->getString("JoinGroupRequest"); +char* _PREHASH_LeaveGroupRequest = LLMessageStringTable::getInstance()->getString("LeaveGroupRequest"); +char* _PREHASH_InviteGroupRequest = LLMessageStringTable::getInstance()->getString("InviteGroupRequest"); +char* _PREHASH_LiveHelpGroupRequest = LLMessageStringTable::getInstance()->getString("LiveHelpGroupRequest"); +char* _PREHASH_PriceParcelClaimFactor = LLMessageStringTable::getInstance()->getString("PriceParcelClaimFactor"); +char* _PREHASH_BillableArea = LLMessageStringTable::getInstance()->getString("BillableArea"); +char* _PREHASH_ObjectID = LLMessageStringTable::getInstance()->getString("ObjectID"); +char* _PREHASH_ObjectFlagUpdate = LLMessageStringTable::getInstance()->getString("ObjectFlagUpdate"); +char* _PREHASH_GroupRoleUpdate = LLMessageStringTable::getInstance()->getString("GroupRoleUpdate"); +char* _PREHASH_RequestInventoryAsset = LLMessageStringTable::getInstance()->getString("RequestInventoryAsset"); +char* _PREHASH_ChangedGrid = LLMessageStringTable::getInstance()->getString("ChangedGrid"); +char* _PREHASH_AgentDropGroup = LLMessageStringTable::getInstance()->getString("AgentDropGroup"); +char* _PREHASH_Details = LLMessageStringTable::getInstance()->getString("Details"); +char* _PREHASH_LocationX = LLMessageStringTable::getInstance()->getString("LocationX"); +char* _PREHASH_SaleType = LLMessageStringTable::getInstance()->getString("SaleType"); +char* _PREHASH_LocationY = LLMessageStringTable::getInstance()->getString("LocationY"); +char* _PREHASH_LocationZ = LLMessageStringTable::getInstance()->getString("LocationZ"); +char* _PREHASH_EconomyData = LLMessageStringTable::getInstance()->getString("EconomyData"); +char* _PREHASH_HeadRotation = LLMessageStringTable::getInstance()->getString("HeadRotation"); +char* _PREHASH_DeleteOnCompletion = LLMessageStringTable::getInstance()->getString("DeleteOnCompletion"); +char* _PREHASH_PublicPort = LLMessageStringTable::getInstance()->getString("PublicPort"); +char* _PREHASH_DirClassifiedQuery = LLMessageStringTable::getInstance()->getString("DirClassifiedQuery"); +char* _PREHASH_CallbackID = LLMessageStringTable::getInstance()->getString("CallbackID"); +char* _PREHASH_RequestParcelTransfer = LLMessageStringTable::getInstance()->getString("RequestParcelTransfer"); +char* _PREHASH_RoleCount = LLMessageStringTable::getInstance()->getString("RoleCount"); +char* _PREHASH_ObjectCapacity = LLMessageStringTable::getInstance()->getString("ObjectCapacity"); +char* _PREHASH_RequestID = LLMessageStringTable::getInstance()->getString("RequestID"); +char* _PREHASH_RequestXfer = LLMessageStringTable::getInstance()->getString("RequestXfer"); +char* _PREHASH_ObjectTaxCurrent = LLMessageStringTable::getInstance()->getString("ObjectTaxCurrent"); +char* _PREHASH_LightTaxCurrent = LLMessageStringTable::getInstance()->getString("LightTaxCurrent"); +char* _PREHASH_LandTaxCurrent = LLMessageStringTable::getInstance()->getString("LandTaxCurrent"); +char* _PREHASH_GroupTaxCurrent = LLMessageStringTable::getInstance()->getString("GroupTaxCurrent"); +char* _PREHASH_FetchInventoryDescendents = LLMessageStringTable::getInstance()->getString("FetchInventoryDescendents"); +char* _PREHASH_InventoryDescendents = LLMessageStringTable::getInstance()->getString("InventoryDescendents"); +char* _PREHASH_Descendents = LLMessageStringTable::getInstance()->getString("Descendents"); +char* _PREHASH_PurgeInventoryDescendents = LLMessageStringTable::getInstance()->getString("PurgeInventoryDescendents"); +char* _PREHASH_ShowDir = LLMessageStringTable::getInstance()->getString("ShowDir"); +char* _PREHASH_IsOwner = LLMessageStringTable::getInstance()->getString("IsOwner"); +char* _PREHASH_Timestamp = LLMessageStringTable::getInstance()->getString("Timestamp"); +char* _PREHASH_GlobalPos = LLMessageStringTable::getInstance()->getString("GlobalPos"); +char* _PREHASH_GrabOffsetInitial = LLMessageStringTable::getInstance()->getString("GrabOffsetInitial"); +char* _PREHASH_IsTrial = LLMessageStringTable::getInstance()->getString("IsTrial"); +char* _PREHASH_ObjectDuplicateOnRay = LLMessageStringTable::getInstance()->getString("ObjectDuplicateOnRay"); +char* _PREHASH_GroupMembershipCount = LLMessageStringTable::getInstance()->getString("GroupMembershipCount"); +char* _PREHASH_MethodData = LLMessageStringTable::getInstance()->getString("MethodData"); +char* _PREHASH_ActivateGestures = LLMessageStringTable::getInstance()->getString("ActivateGestures"); +char* _PREHASH_DeactivateGestures = LLMessageStringTable::getInstance()->getString("DeactivateGestures"); +char* _PREHASH_ProposalData = LLMessageStringTable::getInstance()->getString("ProposalData"); +char* _PREHASH_PosGlobal = LLMessageStringTable::getInstance()->getString("PosGlobal"); +char* _PREHASH_SearchID = LLMessageStringTable::getInstance()->getString("SearchID"); +char* _PREHASH_RezMultipleAttachmentsFromInv = LLMessageStringTable::getInstance()->getString("RezMultipleAttachmentsFromInv"); +char* _PREHASH_SearchName = LLMessageStringTable::getInstance()->getString("SearchName"); +char* _PREHASH_VersionString = LLMessageStringTable::getInstance()->getString("VersionString"); +char* _PREHASH_CreateGroupReply = LLMessageStringTable::getInstance()->getString("CreateGroupReply"); +char* _PREHASH_LeaveGroupReply = LLMessageStringTable::getInstance()->getString("LeaveGroupReply"); +char* _PREHASH_ActualArea = LLMessageStringTable::getInstance()->getString("ActualArea"); +char* _PREHASH_Message = LLMessageStringTable::getInstance()->getString("Message"); +char* _PREHASH_ClickAction = LLMessageStringTable::getInstance()->getString("ClickAction"); +char* _PREHASH_AssetUploadComplete = LLMessageStringTable::getInstance()->getString("AssetUploadComplete"); +char* _PREHASH_RequestType = LLMessageStringTable::getInstance()->getString("RequestType"); +char* _PREHASH_UUID = LLMessageStringTable::getInstance()->getString("UUID"); +char* _PREHASH_BaseMask = LLMessageStringTable::getInstance()->getString("BaseMask"); +char* _PREHASH_NetBlock = LLMessageStringTable::getInstance()->getString("NetBlock"); +char* _PREHASH_GlobalX = LLMessageStringTable::getInstance()->getString("GlobalX"); +char* _PREHASH_GlobalY = LLMessageStringTable::getInstance()->getString("GlobalY"); +char* _PREHASH_CopyRotates = LLMessageStringTable::getInstance()->getString("CopyRotates"); +char* _PREHASH_KickUserAck = LLMessageStringTable::getInstance()->getString("KickUserAck"); +char* _PREHASH_TopPick = LLMessageStringTable::getInstance()->getString("TopPick"); +char* _PREHASH_SessionID = LLMessageStringTable::getInstance()->getString("SessionID"); +char* _PREHASH_GlobalZ = LLMessageStringTable::getInstance()->getString("GlobalZ"); +char* _PREHASH_DeclineFriendship = LLMessageStringTable::getInstance()->getString("DeclineFriendship"); +char* _PREHASH_FormFriendship = LLMessageStringTable::getInstance()->getString("FormFriendship"); +char* _PREHASH_TerminateFriendship = LLMessageStringTable::getInstance()->getString("TerminateFriendship"); +char* _PREHASH_TaskData = LLMessageStringTable::getInstance()->getString("TaskData"); +char* _PREHASH_SimWideMaxPrims = LLMessageStringTable::getInstance()->getString("SimWideMaxPrims"); +char* _PREHASH_TotalPrims = LLMessageStringTable::getInstance()->getString("TotalPrims"); +char* _PREHASH_ProfileBegin = LLMessageStringTable::getInstance()->getString("ProfileBegin"); +char* _PREHASH_Request = LLMessageStringTable::getInstance()->getString("Request"); +char* _PREHASH_GroupAccountDetailsRequest = LLMessageStringTable::getInstance()->getString("GroupAccountDetailsRequest"); +char* _PREHASH_GroupActiveProposalsRequest = LLMessageStringTable::getInstance()->getString("GroupActiveProposalsRequest"); +char* _PREHASH_StringValue = LLMessageStringTable::getInstance()->getString("StringValue"); +char* _PREHASH_Version = LLMessageStringTable::getInstance()->getString("Version"); +char* _PREHASH_OtherCount = LLMessageStringTable::getInstance()->getString("OtherCount"); +char* _PREHASH_MemberCount = LLMessageStringTable::getInstance()->getString("MemberCount"); +char* _PREHASH_ChatData = LLMessageStringTable::getInstance()->getString("ChatData"); +char* _PREHASH_IsGroupOwned = LLMessageStringTable::getInstance()->getString("IsGroupOwned"); +char* _PREHASH_EnergyEfficiency = LLMessageStringTable::getInstance()->getString("EnergyEfficiency"); +char* _PREHASH_PickInfoUpdate = LLMessageStringTable::getInstance()->getString("PickInfoUpdate"); +char* _PREHASH_PickDelete = LLMessageStringTable::getInstance()->getString("PickDelete"); +char* _PREHASH_ScriptReset = LLMessageStringTable::getInstance()->getString("ScriptReset"); +char* _PREHASH_Requester = LLMessageStringTable::getInstance()->getString("Requester"); +char* _PREHASH_ForSale = LLMessageStringTable::getInstance()->getString("ForSale"); +char* _PREHASH_NearestLandingRegionReply = LLMessageStringTable::getInstance()->getString("NearestLandingRegionReply"); +char* _PREHASH_ParcelID = LLMessageStringTable::getInstance()->getString("ParcelID"); +char* _PREHASH_Godlike = LLMessageStringTable::getInstance()->getString("Godlike"); +char* _PREHASH_TotalDebits = LLMessageStringTable::getInstance()->getString("TotalDebits"); +char* _PREHASH_Direction = LLMessageStringTable::getInstance()->getString("Direction"); +char* _PREHASH_HealthData = LLMessageStringTable::getInstance()->getString("HealthData"); +char* _PREHASH_LeftAxis = LLMessageStringTable::getInstance()->getString("LeftAxis"); +char* _PREHASH_LocationBlock = LLMessageStringTable::getInstance()->getString("LocationBlock"); +char* _PREHASH_ObjectImage = LLMessageStringTable::getInstance()->getString("ObjectImage"); +char* _PREHASH_TerrainStartHeight00 = LLMessageStringTable::getInstance()->getString("TerrainStartHeight00"); +char* _PREHASH_TerrainStartHeight01 = LLMessageStringTable::getInstance()->getString("TerrainStartHeight01"); +char* _PREHASH_TerrainStartHeight10 = LLMessageStringTable::getInstance()->getString("TerrainStartHeight10"); +char* _PREHASH_TerrainStartHeight11 = LLMessageStringTable::getInstance()->getString("TerrainStartHeight11"); +char* _PREHASH_WaterHeight = LLMessageStringTable::getInstance()->getString("WaterHeight"); +char* _PREHASH_FetchInventoryReply = LLMessageStringTable::getInstance()->getString("FetchInventoryReply"); +char* _PREHASH_GroupAccountSummaryReply = LLMessageStringTable::getInstance()->getString("GroupAccountSummaryReply"); +char* _PREHASH_AttachedSound = LLMessageStringTable::getInstance()->getString("AttachedSound"); +char* _PREHASH_ParamInUse = LLMessageStringTable::getInstance()->getString("ParamInUse"); +char* _PREHASH_GodKickUser = LLMessageStringTable::getInstance()->getString("GodKickUser"); +char* _PREHASH_PickName = LLMessageStringTable::getInstance()->getString("PickName"); +char* _PREHASH_TaskName = LLMessageStringTable::getInstance()->getString("TaskName"); +char* _PREHASH_ObjectCount = LLMessageStringTable::getInstance()->getString("ObjectCount"); +char* _PREHASH_RegionPresenceRequestByHandle = LLMessageStringTable::getInstance()->getString("RegionPresenceRequestByHandle"); +char* _PREHASH_RezSingleAttachmentFromInv = LLMessageStringTable::getInstance()->getString("RezSingleAttachmentFromInv"); +char* _PREHASH_ChildAgentUpdate = LLMessageStringTable::getInstance()->getString("ChildAgentUpdate"); +char* _PREHASH_IsOwnerGroup = LLMessageStringTable::getInstance()->getString("IsOwnerGroup"); +char* _PREHASH_AgentHeightWidth = LLMessageStringTable::getInstance()->getString("AgentHeightWidth"); +char* _PREHASH_VerticalAngle = LLMessageStringTable::getInstance()->getString("VerticalAngle"); +char* _PREHASH_WearableType = LLMessageStringTable::getInstance()->getString("WearableType"); +char* _PREHASH_AggregatePermNextOwner = LLMessageStringTable::getInstance()->getString("AggregatePermNextOwner"); +char* _PREHASH_ShowInList = LLMessageStringTable::getInstance()->getString("ShowInList"); +char* _PREHASH_UpdateParcel = LLMessageStringTable::getInstance()->getString("UpdateParcel"); +char* _PREHASH_SetAlwaysRun = LLMessageStringTable::getInstance()->getString("SetAlwaysRun"); +char* _PREHASH_NVPair = LLMessageStringTable::getInstance()->getString("NVPair"); +char* _PREHASH_SearchType = LLMessageStringTable::getInstance()->getString("SearchType"); +char* _PREHASH_ObjectSpinStart = LLMessageStringTable::getInstance()->getString("ObjectSpinStart"); +char* _PREHASH_UseEstateSun = LLMessageStringTable::getInstance()->getString("UseEstateSun"); +char* _PREHASH_RegionID = LLMessageStringTable::getInstance()->getString("RegionID"); +char* _PREHASH_AbuseRegionID = LLMessageStringTable::getInstance()->getString("AbuseRegionID"); +char* _PREHASH_Creator = LLMessageStringTable::getInstance()->getString("Creator"); +char* _PREHASH_ProposalText = LLMessageStringTable::getInstance()->getString("ProposalText"); +char* _PREHASH_DirEventsReply = LLMessageStringTable::getInstance()->getString("DirEventsReply"); +char* _PREHASH_EventInfoReply = LLMessageStringTable::getInstance()->getString("EventInfoReply"); +char* _PREHASH_UserInfoReply = LLMessageStringTable::getInstance()->getString("UserInfoReply"); +char* _PREHASH_PathRadiusOffset = LLMessageStringTable::getInstance()->getString("PathRadiusOffset"); +char* _PREHASH_TextureData = LLMessageStringTable::getInstance()->getString("TextureData"); +char* _PREHASH_ChatPass = LLMessageStringTable::getInstance()->getString("ChatPass"); +char* _PREHASH_TargetID = LLMessageStringTable::getInstance()->getString("TargetID"); +char* _PREHASH_DefaultPayPrice = LLMessageStringTable::getInstance()->getString("DefaultPayPrice"); +char* _PREHASH_UserLocation = LLMessageStringTable::getInstance()->getString("UserLocation"); +char* _PREHASH_MaxPrims = LLMessageStringTable::getInstance()->getString("MaxPrims"); +char* _PREHASH_LandmarkID = LLMessageStringTable::getInstance()->getString("LandmarkID"); +char* _PREHASH_InitiateDownload = LLMessageStringTable::getInstance()->getString("InitiateDownload"); +char* _PREHASH_Name = LLMessageStringTable::getInstance()->getString("Name"); +char* _PREHASH_OtherCleanTime = LLMessageStringTable::getInstance()->getString("OtherCleanTime"); +char* _PREHASH_ParcelSetOtherCleanTime = LLMessageStringTable::getInstance()->getString("ParcelSetOtherCleanTime"); +char* _PREHASH_TeleportPriceExponent = LLMessageStringTable::getInstance()->getString("TeleportPriceExponent"); +char* _PREHASH_Gain = LLMessageStringTable::getInstance()->getString("Gain"); +char* _PREHASH_PacketAck = LLMessageStringTable::getInstance()->getString("PacketAck"); +char* _PREHASH_PathSkew = LLMessageStringTable::getInstance()->getString("PathSkew"); +char* _PREHASH_SimulatorShutdownRequest = LLMessageStringTable::getInstance()->getString("SimulatorShutdownRequest"); +char* _PREHASH_NearestLandingRegionRequest = LLMessageStringTable::getInstance()->getString("NearestLandingRegionRequest"); +char* _PREHASH_OtherID = LLMessageStringTable::getInstance()->getString("OtherID"); +char* _PREHASH_MemberID = LLMessageStringTable::getInstance()->getString("MemberID"); +char* _PREHASH_MapLayerRequest = LLMessageStringTable::getInstance()->getString("MapLayerRequest"); +char* _PREHASH_ObjectScale = LLMessageStringTable::getInstance()->getString("ObjectScale"); +char* _PREHASH_TargetIP = LLMessageStringTable::getInstance()->getString("TargetIP"); +char* _PREHASH_Redo = LLMessageStringTable::getInstance()->getString("Redo"); +char* _PREHASH_MoneyBalance = LLMessageStringTable::getInstance()->getString("MoneyBalance"); +char* _PREHASH_TrackAgent = LLMessageStringTable::getInstance()->getString("TrackAgent"); +char* _PREHASH_MaxX = LLMessageStringTable::getInstance()->getString("MaxX"); +char* _PREHASH_Data = LLMessageStringTable::getInstance()->getString("Data"); +char* _PREHASH_MaxY = LLMessageStringTable::getInstance()->getString("MaxY"); +char* _PREHASH_TextureAnim = LLMessageStringTable::getInstance()->getString("TextureAnim"); +char* _PREHASH_ReturnIDs = LLMessageStringTable::getInstance()->getString("ReturnIDs"); +char* _PREHASH_Date = LLMessageStringTable::getInstance()->getString("Date"); +char* _PREHASH_AgentWearablesUpdate = LLMessageStringTable::getInstance()->getString("AgentWearablesUpdate"); +char* _PREHASH_AgentDataUpdate = LLMessageStringTable::getInstance()->getString("AgentDataUpdate"); +char* _PREHASH_GroupDataUpdate = LLMessageStringTable::getInstance()->getString("GroupDataUpdate"); +char* _PREHASH_Hash = LLMessageStringTable::getInstance()->getString("Hash"); +char* _PREHASH_AgentGroupDataUpdate = LLMessageStringTable::getInstance()->getString("AgentGroupDataUpdate"); +char* _PREHASH_Left = LLMessageStringTable::getInstance()->getString("Left"); +char* _PREHASH_Mask = LLMessageStringTable::getInstance()->getString("Mask"); +char* _PREHASH_ForceMouselook = LLMessageStringTable::getInstance()->getString("ForceMouselook"); +char* _PREHASH_Success = LLMessageStringTable::getInstance()->getString("Success"); +char* _PREHASH_ObjectGroup = LLMessageStringTable::getInstance()->getString("ObjectGroup"); +char* _PREHASH_SunHour = LLMessageStringTable::getInstance()->getString("SunHour"); +char* _PREHASH_MinX = LLMessageStringTable::getInstance()->getString("MinX"); +char* _PREHASH_ScriptSensorReply = LLMessageStringTable::getInstance()->getString("ScriptSensorReply"); +char* _PREHASH_MinY = LLMessageStringTable::getInstance()->getString("MinY"); +char* _PREHASH_Command = LLMessageStringTable::getInstance()->getString("Command"); +char* _PREHASH_Desc = LLMessageStringTable::getInstance()->getString("Desc"); +char* _PREHASH_AttachmentNeedsSave = LLMessageStringTable::getInstance()->getString("AttachmentNeedsSave"); +char* _PREHASH_HistoryItemData = LLMessageStringTable::getInstance()->getString("HistoryItemData"); +char* _PREHASH_AgentCachedTexture = LLMessageStringTable::getInstance()->getString("AgentCachedTexture"); +char* _PREHASH_Subject = LLMessageStringTable::getInstance()->getString("Subject"); +char* _PREHASH_East = LLMessageStringTable::getInstance()->getString("East"); +char* _PREHASH_QueryReplies = LLMessageStringTable::getInstance()->getString("QueryReplies"); +char* _PREHASH_ObjectCategory = LLMessageStringTable::getInstance()->getString("ObjectCategory"); +char* _PREHASH_Time = LLMessageStringTable::getInstance()->getString("Time"); +char* _PREHASH_CreateLandmarkForEvent = LLMessageStringTable::getInstance()->getString("CreateLandmarkForEvent"); +char* _PREHASH_ParentID = LLMessageStringTable::getInstance()->getString("ParentID"); +char* _PREHASH_Ping = LLMessageStringTable::getInstance()->getString("Ping"); +char* _PREHASH_Perp = LLMessageStringTable::getInstance()->getString("Perp"); +char* _PREHASH_Code = LLMessageStringTable::getInstance()->getString("Code"); +char* _PREHASH_InvType = LLMessageStringTable::getInstance()->getString("InvType"); +char* _PREHASH_AgentFOV = LLMessageStringTable::getInstance()->getString("AgentFOV"); +char* _PREHASH_Audible = LLMessageStringTable::getInstance()->getString("Audible"); +char* _PREHASH_AuctionData = LLMessageStringTable::getInstance()->getString("AuctionData"); +char* _PREHASH_IDBlock = LLMessageStringTable::getInstance()->getString("IDBlock"); +char* _PREHASH_West = LLMessageStringTable::getInstance()->getString("West"); +char* _PREHASH_Undo = LLMessageStringTable::getInstance()->getString("Undo"); +char* _PREHASH_TotalNumItems = LLMessageStringTable::getInstance()->getString("TotalNumItems"); +char* _PREHASH_Info = LLMessageStringTable::getInstance()->getString("Info"); +char* _PREHASH_Area = LLMessageStringTable::getInstance()->getString("Area"); +char* _PREHASH_SimCrashed = LLMessageStringTable::getInstance()->getString("SimCrashed"); +char* _PREHASH_Text = LLMessageStringTable::getInstance()->getString("Text"); +char* _PREHASH_PriceGroupCreate = LLMessageStringTable::getInstance()->getString("PriceGroupCreate"); +char* _PREHASH_ObjectShape = LLMessageStringTable::getInstance()->getString("ObjectShape"); +char* _PREHASH_GroupRoleDataReply = LLMessageStringTable::getInstance()->getString("GroupRoleDataReply"); +char* _PREHASH_MuteCRC = LLMessageStringTable::getInstance()->getString("MuteCRC"); +char* _PREHASH_Size = LLMessageStringTable::getInstance()->getString("Size"); +char* _PREHASH_FromAddress = LLMessageStringTable::getInstance()->getString("FromAddress"); +char* _PREHASH_Body = LLMessageStringTable::getInstance()->getString("Body"); +char* _PREHASH_FileData = LLMessageStringTable::getInstance()->getString("FileData"); +char* _PREHASH_List = LLMessageStringTable::getInstance()->getString("List"); +char* _PREHASH_KickUser = LLMessageStringTable::getInstance()->getString("KickUser"); +char* _PREHASH_OtherPrims = LLMessageStringTable::getInstance()->getString("OtherPrims"); +char* _PREHASH_RunTime = LLMessageStringTable::getInstance()->getString("RunTime"); +char* _PREHASH_GrantUserRights = LLMessageStringTable::getInstance()->getString("GrantUserRights"); +char* _PREHASH_RpcScriptRequestInboundForward = LLMessageStringTable::getInstance()->getString("RpcScriptRequestInboundForward"); +char* _PREHASH_More = LLMessageStringTable::getInstance()->getString("More"); +char* _PREHASH_Majority = LLMessageStringTable::getInstance()->getString("Majority"); +char* _PREHASH_MetersTraveled = LLMessageStringTable::getInstance()->getString("MetersTraveled"); +char* _PREHASH_Stat = LLMessageStringTable::getInstance()->getString("Stat"); +char* _PREHASH_SoundID = LLMessageStringTable::getInstance()->getString("SoundID"); +char* _PREHASH_Item = LLMessageStringTable::getInstance()->getString("Item"); +char* _PREHASH_User = LLMessageStringTable::getInstance()->getString("User"); +char* _PREHASH_Prey = LLMessageStringTable::getInstance()->getString("Prey"); +char* _PREHASH_RayStart = LLMessageStringTable::getInstance()->getString("RayStart"); +char* _PREHASH_UsecSinceStart = LLMessageStringTable::getInstance()->getString("UsecSinceStart"); +char* _PREHASH_ParcelData = LLMessageStringTable::getInstance()->getString("ParcelData"); +char* _PREHASH_CameraUpAxis = LLMessageStringTable::getInstance()->getString("CameraUpAxis"); +char* _PREHASH_ScriptDialog = LLMessageStringTable::getInstance()->getString("ScriptDialog"); +char* _PREHASH_MasterParcelData = LLMessageStringTable::getInstance()->getString("MasterParcelData"); +char* _PREHASH_Invalid = LLMessageStringTable::getInstance()->getString("Invalid"); +char* _PREHASH_ProfileCurve = LLMessageStringTable::getInstance()->getString("ProfileCurve"); +char* _PREHASH_ParcelAccessListUpdate = LLMessageStringTable::getInstance()->getString("ParcelAccessListUpdate"); +char* _PREHASH_MuteListUpdate = LLMessageStringTable::getInstance()->getString("MuteListUpdate"); +char* _PREHASH_SendPacket = LLMessageStringTable::getInstance()->getString("SendPacket"); +char* _PREHASH_SendXferPacket = LLMessageStringTable::getInstance()->getString("SendXferPacket"); +char* _PREHASH_RegionDenyIdentified = LLMessageStringTable::getInstance()->getString("RegionDenyIdentified"); +char* _PREHASH_NotecardItemID = LLMessageStringTable::getInstance()->getString("NotecardItemID"); +char* _PREHASH_LastName = LLMessageStringTable::getInstance()->getString("LastName"); +char* _PREHASH_From = LLMessageStringTable::getInstance()->getString("From"); +char* _PREHASH_RoleChange = LLMessageStringTable::getInstance()->getString("RoleChange"); +char* _PREHASH_Port = LLMessageStringTable::getInstance()->getString("Port"); +char* _PREHASH_MemberTitle = LLMessageStringTable::getInstance()->getString("MemberTitle"); +char* _PREHASH_LogParcelChanges = LLMessageStringTable::getInstance()->getString("LogParcelChanges"); +char* _PREHASH_AgentCachedTextureResponse = LLMessageStringTable::getInstance()->getString("AgentCachedTextureResponse"); +char* _PREHASH_DeRezObject = LLMessageStringTable::getInstance()->getString("DeRezObject"); +char* _PREHASH_IsTemporary = LLMessageStringTable::getInstance()->getString("IsTemporary"); +char* _PREHASH_InsigniaID = LLMessageStringTable::getInstance()->getString("InsigniaID"); +char* _PREHASH_CheckFlags = LLMessageStringTable::getInstance()->getString("CheckFlags"); +char* _PREHASH_EventID = LLMessageStringTable::getInstance()->getString("EventID"); +char* _PREHASH_Selected = LLMessageStringTable::getInstance()->getString("Selected"); +char* _PREHASH_FromAgentId = LLMessageStringTable::getInstance()->getString("FromAgentId"); +char* _PREHASH_Type = LLMessageStringTable::getInstance()->getString("Type"); +char* _PREHASH_ChatType = LLMessageStringTable::getInstance()->getString("ChatType"); +char* _PREHASH_ReportData = LLMessageStringTable::getInstance()->getString("ReportData"); +char* _PREHASH_RequestBlock = LLMessageStringTable::getInstance()->getString("RequestBlock"); +char* _PREHASH_GrantData = LLMessageStringTable::getInstance()->getString("GrantData"); +char* _PREHASH_DetachAttachmentIntoInv = LLMessageStringTable::getInstance()->getString("DetachAttachmentIntoInv"); +char* _PREHASH_ParcelDisableObjects = LLMessageStringTable::getInstance()->getString("ParcelDisableObjects"); +char* _PREHASH_Sections = LLMessageStringTable::getInstance()->getString("Sections"); +char* _PREHASH_GodLevel = LLMessageStringTable::getInstance()->getString("GodLevel"); +char* _PREHASH_PayPriceReply = LLMessageStringTable::getInstance()->getString("PayPriceReply"); +char* _PREHASH_QueryID = LLMessageStringTable::getInstance()->getString("QueryID"); +char* _PREHASH_CameraEyeOffset = LLMessageStringTable::getInstance()->getString("CameraEyeOffset"); +char* _PREHASH_AgentPosition = LLMessageStringTable::getInstance()->getString("AgentPosition"); +char* _PREHASH_GrabPosition = LLMessageStringTable::getInstance()->getString("GrabPosition"); +char* _PREHASH_OnlineNotification = LLMessageStringTable::getInstance()->getString("OnlineNotification"); +char* _PREHASH_OfflineNotification = LLMessageStringTable::getInstance()->getString("OfflineNotification"); +char* _PREHASH_SendPostcard = LLMessageStringTable::getInstance()->getString("SendPostcard"); +char* _PREHASH_RequestFlags = LLMessageStringTable::getInstance()->getString("RequestFlags"); +char* _PREHASH_GroupAccountSummaryRequest = LLMessageStringTable::getInstance()->getString("GroupAccountSummaryRequest"); +char* _PREHASH_GroupVoteHistoryRequest = LLMessageStringTable::getInstance()->getString("GroupVoteHistoryRequest"); +char* _PREHASH_ParamValue = LLMessageStringTable::getInstance()->getString("ParamValue"); +char* _PREHASH_MaxAgents = LLMessageStringTable::getInstance()->getString("MaxAgents"); +char* _PREHASH_CreateNewOutfitAttachments = LLMessageStringTable::getInstance()->getString("CreateNewOutfitAttachments"); +char* _PREHASH_RegionHandle = LLMessageStringTable::getInstance()->getString("RegionHandle"); +char* _PREHASH_TeleportProgress = LLMessageStringTable::getInstance()->getString("TeleportProgress"); +char* _PREHASH_AgentQuitCopy = LLMessageStringTable::getInstance()->getString("AgentQuitCopy"); +char* _PREHASH_AvatarInterestsUpdate = LLMessageStringTable::getInstance()->getString("AvatarInterestsUpdate"); +char* _PREHASH_GroupNoticeID = LLMessageStringTable::getInstance()->getString("GroupNoticeID"); +char* _PREHASH_ParcelName = LLMessageStringTable::getInstance()->getString("ParcelName"); +char* _PREHASH_PriceObjectRent = LLMessageStringTable::getInstance()->getString("PriceObjectRent"); +char* _PREHASH_OfferCallingCard = LLMessageStringTable::getInstance()->getString("OfferCallingCard"); +char* _PREHASH_AcceptCallingCard = LLMessageStringTable::getInstance()->getString("AcceptCallingCard"); +char* _PREHASH_DeclineCallingCard = LLMessageStringTable::getInstance()->getString("DeclineCallingCard"); +char* _PREHASH_AgentAccess = LLMessageStringTable::getInstance()->getString("AgentAccess"); +char* _PREHASH_DataHomeLocationReply = LLMessageStringTable::getInstance()->getString("DataHomeLocationReply"); +char* _PREHASH_EventLocationReply = LLMessageStringTable::getInstance()->getString("EventLocationReply"); +char* _PREHASH_TerseDateID = LLMessageStringTable::getInstance()->getString("TerseDateID"); +char* _PREHASH_ObjectOwner = LLMessageStringTable::getInstance()->getString("ObjectOwner"); +char* _PREHASH_AssetID = LLMessageStringTable::getInstance()->getString("AssetID"); +char* _PREHASH_AlertMessage = LLMessageStringTable::getInstance()->getString("AlertMessage"); +char* _PREHASH_AgentAlertMessage = LLMessageStringTable::getInstance()->getString("AgentAlertMessage"); +char* _PREHASH_EstateOwnerMessage = LLMessageStringTable::getInstance()->getString("EstateOwnerMessage"); +char* _PREHASH_ParcelMediaCommandMessage = LLMessageStringTable::getInstance()->getString("ParcelMediaCommandMessage"); +char* _PREHASH_Auction = LLMessageStringTable::getInstance()->getString("Auction"); +char* _PREHASH_Category = LLMessageStringTable::getInstance()->getString("Category"); +char* _PREHASH_FilePath = LLMessageStringTable::getInstance()->getString("FilePath"); +char* _PREHASH_ItemFlags = LLMessageStringTable::getInstance()->getString("ItemFlags"); +char* _PREHASH_Invoice = LLMessageStringTable::getInstance()->getString("Invoice"); +char* _PREHASH_IntervalDays = LLMessageStringTable::getInstance()->getString("IntervalDays"); +char* _PREHASH_PathScaleX = LLMessageStringTable::getInstance()->getString("PathScaleX"); +char* _PREHASH_FromTaskID = LLMessageStringTable::getInstance()->getString("FromTaskID"); +char* _PREHASH_PathScaleY = LLMessageStringTable::getInstance()->getString("PathScaleY"); +char* _PREHASH_TimeInfo = LLMessageStringTable::getInstance()->getString("TimeInfo"); +char* _PREHASH_PublicCount = LLMessageStringTable::getInstance()->getString("PublicCount"); +char* _PREHASH_ParcelJoin = LLMessageStringTable::getInstance()->getString("ParcelJoin"); +char* _PREHASH_GroupRolesCount = LLMessageStringTable::getInstance()->getString("GroupRolesCount"); +char* _PREHASH_SimulatorBlock = LLMessageStringTable::getInstance()->getString("SimulatorBlock"); +char* _PREHASH_GroupID = LLMessageStringTable::getInstance()->getString("GroupID"); +char* _PREHASH_AgentVel = LLMessageStringTable::getInstance()->getString("AgentVel"); +char* _PREHASH_RequestImage = LLMessageStringTable::getInstance()->getString("RequestImage"); +char* _PREHASH_NetStats = LLMessageStringTable::getInstance()->getString("NetStats"); +char* _PREHASH_AgentPos = LLMessageStringTable::getInstance()->getString("AgentPos"); +char* _PREHASH_AgentSit = LLMessageStringTable::getInstance()->getString("AgentSit"); +char* _PREHASH_Material = LLMessageStringTable::getInstance()->getString("Material"); +char* _PREHASH_ObjectDeGrab = LLMessageStringTable::getInstance()->getString("ObjectDeGrab"); +char* _PREHASH_VelocityInterpolateOff = LLMessageStringTable::getInstance()->getString("VelocityInterpolateOff"); +char* _PREHASH_AuthorizedBuyerID = LLMessageStringTable::getInstance()->getString("AuthorizedBuyerID"); +char* _PREHASH_AvatarPropertiesReply = LLMessageStringTable::getInstance()->getString("AvatarPropertiesReply"); +char* _PREHASH_GroupProfileReply = LLMessageStringTable::getInstance()->getString("GroupProfileReply"); +char* _PREHASH_SimOwner = LLMessageStringTable::getInstance()->getString("SimOwner"); +char* _PREHASH_SalePrice = LLMessageStringTable::getInstance()->getString("SalePrice"); +char* _PREHASH_Animation = LLMessageStringTable::getInstance()->getString("Animation"); +char* _PREHASH_OwnerID = LLMessageStringTable::getInstance()->getString("OwnerID"); +char* _PREHASH_NearestLandingRegionUpdated = LLMessageStringTable::getInstance()->getString("NearestLandingRegionUpdated"); +char* _PREHASH_PassToAgent = LLMessageStringTable::getInstance()->getString("PassToAgent"); +char* _PREHASH_PreyAgent = LLMessageStringTable::getInstance()->getString("PreyAgent"); +char* _PREHASH_SimStats = LLMessageStringTable::getInstance()->getString("SimStats"); +char* _PREHASH_LogoutReply = LLMessageStringTable::getInstance()->getString("LogoutReply"); +char* _PREHASH_FeatureDisabled = LLMessageStringTable::getInstance()->getString("FeatureDisabled"); +char* _PREHASH_PhysicalAvatarEventList = LLMessageStringTable::getInstance()->getString("PhysicalAvatarEventList"); +char* _PREHASH_ObjectLocalID = LLMessageStringTable::getInstance()->getString("ObjectLocalID"); +char* _PREHASH_Dropped = LLMessageStringTable::getInstance()->getString("Dropped"); +char* _PREHASH_WebProfilesDisabled = LLMessageStringTable::getInstance()->getString("WebProfilesDisabled"); +char* _PREHASH_Destination = LLMessageStringTable::getInstance()->getString("Destination"); +char* _PREHASH_MasterID = LLMessageStringTable::getInstance()->getString("MasterID"); +char* _PREHASH_TransferData = LLMessageStringTable::getInstance()->getString("TransferData"); +char* _PREHASH_WantToMask = LLMessageStringTable::getInstance()->getString("WantToMask"); +char* _PREHASH_ParcelSelectObjects = LLMessageStringTable::getInstance()->getString("ParcelSelectObjects"); +char* _PREHASH_ExtraParams = LLMessageStringTable::getInstance()->getString("ExtraParams"); +char* _PREHASH_CreatorID = LLMessageStringTable::getInstance()->getString("CreatorID"); +char* _PREHASH_Summary = LLMessageStringTable::getInstance()->getString("Summary"); +char* _PREHASH_BuyObjectInventory = LLMessageStringTable::getInstance()->getString("BuyObjectInventory"); +char* _PREHASH_FetchInventory = LLMessageStringTable::getInstance()->getString("FetchInventory"); +char* _PREHASH_InventoryID = LLMessageStringTable::getInstance()->getString("InventoryID"); +char* _PREHASH_PacketNumber = LLMessageStringTable::getInstance()->getString("PacketNumber"); +char* _PREHASH_SetFollowCamProperties = LLMessageStringTable::getInstance()->getString("SetFollowCamProperties"); +char* _PREHASH_ClearFollowCamProperties = LLMessageStringTable::getInstance()->getString("ClearFollowCamProperties"); +char* _PREHASH_SequenceID = LLMessageStringTable::getInstance()->getString("SequenceID"); +char* _PREHASH_DataServerLogout = LLMessageStringTable::getInstance()->getString("DataServerLogout"); +char* _PREHASH_NameValue = LLMessageStringTable::getInstance()->getString("NameValue"); +char* _PREHASH_PathShearX = LLMessageStringTable::getInstance()->getString("PathShearX"); +char* _PREHASH_PathShearY = LLMessageStringTable::getInstance()->getString("PathShearY"); +char* _PREHASH_Velocity = LLMessageStringTable::getInstance()->getString("Velocity"); +char* _PREHASH_SecPerYear = LLMessageStringTable::getInstance()->getString("SecPerYear"); +char* _PREHASH_FirstName = LLMessageStringTable::getInstance()->getString("FirstName"); +char* _PREHASH_AttachedSoundGainChange = LLMessageStringTable::getInstance()->getString("AttachedSoundGainChange"); +char* _PREHASH_LocationID = LLMessageStringTable::getInstance()->getString("LocationID"); +char* _PREHASH_Running = LLMessageStringTable::getInstance()->getString("Running"); +char* _PREHASH_AgentThrottle = LLMessageStringTable::getInstance()->getString("AgentThrottle"); +char* _PREHASH_NeighborList = LLMessageStringTable::getInstance()->getString("NeighborList"); +char* _PREHASH_PathTaperX = LLMessageStringTable::getInstance()->getString("PathTaperX"); +char* _PREHASH_PathTaperY = LLMessageStringTable::getInstance()->getString("PathTaperY"); +char* _PREHASH_AgentRelated = LLMessageStringTable::getInstance()->getString("AgentRelated"); +char* _PREHASH_GranterBlock = LLMessageStringTable::getInstance()->getString("GranterBlock"); +char* _PREHASH_UseCachedMuteList = LLMessageStringTable::getInstance()->getString("UseCachedMuteList"); +char* _PREHASH_FailStats = LLMessageStringTable::getInstance()->getString("FailStats"); +char* _PREHASH_Tempfile = LLMessageStringTable::getInstance()->getString("Tempfile"); +char* _PREHASH_BuyerID = LLMessageStringTable::getInstance()->getString("BuyerID"); +char* _PREHASH_DirPeopleReply = LLMessageStringTable::getInstance()->getString("DirPeopleReply"); +char* _PREHASH_TransferInfo = LLMessageStringTable::getInstance()->getString("TransferInfo"); +char* _PREHASH_AvatarPickerRequestBackend = LLMessageStringTable::getInstance()->getString("AvatarPickerRequestBackend"); +char* _PREHASH_AvatarPropertiesRequestBackend = LLMessageStringTable::getInstance()->getString("AvatarPropertiesRequestBackend"); +char* _PREHASH_UpdateData = LLMessageStringTable::getInstance()->getString("UpdateData"); +char* _PREHASH_SimFPS = LLMessageStringTable::getInstance()->getString("SimFPS"); +char* _PREHASH_ReporterID = LLMessageStringTable::getInstance()->getString("ReporterID"); +char* _PREHASH_ButtonLabel = LLMessageStringTable::getInstance()->getString("ButtonLabel"); +char* _PREHASH_GranterID = LLMessageStringTable::getInstance()->getString("GranterID"); +char* _PREHASH_WantToText = LLMessageStringTable::getInstance()->getString("WantToText"); +char* _PREHASH_ReportType = LLMessageStringTable::getInstance()->getString("ReportType"); +char* _PREHASH_SimulatorReady = LLMessageStringTable::getInstance()->getString("SimulatorReady"); +char* _PREHASH_DataBlock = LLMessageStringTable::getInstance()->getString("DataBlock"); +char* _PREHASH_AnimationSourceList = LLMessageStringTable::getInstance()->getString("AnimationSourceList"); +char* _PREHASH_SubscribeLoad = LLMessageStringTable::getInstance()->getString("SubscribeLoad"); +char* _PREHASH_UnsubscribeLoad = LLMessageStringTable::getInstance()->getString("UnsubscribeLoad"); +char* _PREHASH_Packet = LLMessageStringTable::getInstance()->getString("Packet"); +char* _PREHASH_UndoLand = LLMessageStringTable::getInstance()->getString("UndoLand"); +char* _PREHASH_SimAccess = LLMessageStringTable::getInstance()->getString("SimAccess"); +char* _PREHASH_AbuserID = LLMessageStringTable::getInstance()->getString("AbuserID"); +char* _PREHASH_MembershipFee = LLMessageStringTable::getInstance()->getString("MembershipFee"); +char* _PREHASH_InviteGroupResponse = LLMessageStringTable::getInstance()->getString("InviteGroupResponse"); +char* _PREHASH_CreateInventoryFolder = LLMessageStringTable::getInstance()->getString("CreateInventoryFolder"); +char* _PREHASH_UpdateInventoryFolder = LLMessageStringTable::getInstance()->getString("UpdateInventoryFolder"); +char* _PREHASH_MoveInventoryFolder = LLMessageStringTable::getInstance()->getString("MoveInventoryFolder"); +char* _PREHASH_RemoveInventoryFolder = LLMessageStringTable::getInstance()->getString("RemoveInventoryFolder"); +char* _PREHASH_MoneyData = LLMessageStringTable::getInstance()->getString("MoneyData"); +char* _PREHASH_ObjectDeselect = LLMessageStringTable::getInstance()->getString("ObjectDeselect"); +char* _PREHASH_NewAssetID = LLMessageStringTable::getInstance()->getString("NewAssetID"); +char* _PREHASH_ObjectAdd = LLMessageStringTable::getInstance()->getString("ObjectAdd"); +char* _PREHASH_RayEndIsIntersection = LLMessageStringTable::getInstance()->getString("RayEndIsIntersection"); +char* _PREHASH_CompleteAuction = LLMessageStringTable::getInstance()->getString("CompleteAuction"); +char* _PREHASH_CircuitCode = LLMessageStringTable::getInstance()->getString("CircuitCode"); +char* _PREHASH_AgentMovementComplete = LLMessageStringTable::getInstance()->getString("AgentMovementComplete"); +char* _PREHASH_ViewerIP = LLMessageStringTable::getInstance()->getString("ViewerIP"); +char* _PREHASH_Header = LLMessageStringTable::getInstance()->getString("Header"); +char* _PREHASH_GestureFlags = LLMessageStringTable::getInstance()->getString("GestureFlags"); +char* _PREHASH_XferID = LLMessageStringTable::getInstance()->getString("XferID"); +char* _PREHASH_StatValue = LLMessageStringTable::getInstance()->getString("StatValue"); +char* _PREHASH_TaskID = LLMessageStringTable::getInstance()->getString("TaskID"); +char* _PREHASH_PickID = LLMessageStringTable::getInstance()->getString("PickID"); +char* _PREHASH_RayEnd = LLMessageStringTable::getInstance()->getString("RayEnd"); +char* _PREHASH_Throttles = LLMessageStringTable::getInstance()->getString("Throttles"); +char* _PREHASH_RebakeAvatarTextures = LLMessageStringTable::getInstance()->getString("RebakeAvatarTextures"); +char* _PREHASH_UpAxis = LLMessageStringTable::getInstance()->getString("UpAxis"); +char* _PREHASH_AgentTextures = LLMessageStringTable::getInstance()->getString("AgentTextures"); +char* _PREHASH_NotecardData = LLMessageStringTable::getInstance()->getString("NotecardData"); +char* _PREHASH_Radius = LLMessageStringTable::getInstance()->getString("Radius"); +char* _PREHASH_OffCircuit = LLMessageStringTable::getInstance()->getString("OffCircuit"); +char* _PREHASH_Access = LLMessageStringTable::getInstance()->getString("Access"); +char* _PREHASH_TitleRoleID = LLMessageStringTable::getInstance()->getString("TitleRoleID"); +char* _PREHASH_SquareMetersCredit = LLMessageStringTable::getInstance()->getString("SquareMetersCredit"); +char* _PREHASH_Filename = LLMessageStringTable::getInstance()->getString("Filename"); +char* _PREHASH_ClassifiedInfoRequest = LLMessageStringTable::getInstance()->getString("ClassifiedInfoRequest"); +char* _PREHASH_ParcelInfoRequest = LLMessageStringTable::getInstance()->getString("ParcelInfoRequest"); +char* _PREHASH_ParcelObjectOwnersRequest = LLMessageStringTable::getInstance()->getString("ParcelObjectOwnersRequest"); +char* _PREHASH_TeleportLandmarkRequest = LLMessageStringTable::getInstance()->getString("TeleportLandmarkRequest"); +char* _PREHASH_EventInfoRequest = LLMessageStringTable::getInstance()->getString("EventInfoRequest"); +char* _PREHASH_MoneyBalanceRequest = LLMessageStringTable::getInstance()->getString("MoneyBalanceRequest"); +char* _PREHASH_GroupMembersRequest = LLMessageStringTable::getInstance()->getString("GroupMembersRequest"); +char* _PREHASH_GroupRoleMembersRequest = LLMessageStringTable::getInstance()->getString("GroupRoleMembersRequest"); +char* _PREHASH_ChatFromSimulator = LLMessageStringTable::getInstance()->getString("ChatFromSimulator"); +char* _PREHASH_OldFolderID = LLMessageStringTable::getInstance()->getString("OldFolderID"); +char* _PREHASH_UserInfoRequest = LLMessageStringTable::getInstance()->getString("UserInfoRequest"); +char* _PREHASH_TextureID = LLMessageStringTable::getInstance()->getString("TextureID"); +char* _PREHASH_ProfileURL = LLMessageStringTable::getInstance()->getString("ProfileURL"); +char* _PREHASH_Handle = LLMessageStringTable::getInstance()->getString("Handle"); +char* _PREHASH_ButtonIndex = LLMessageStringTable::getInstance()->getString("ButtonIndex"); +char* _PREHASH_GetScriptRunning = LLMessageStringTable::getInstance()->getString("GetScriptRunning"); +char* _PREHASH_SetScriptRunning = LLMessageStringTable::getInstance()->getString("SetScriptRunning"); +char* _PREHASH_Health = LLMessageStringTable::getInstance()->getString("Health"); +char* _PREHASH_CircuitInfo = LLMessageStringTable::getInstance()->getString("CircuitInfo"); +char* _PREHASH_ObjectBuy = LLMessageStringTable::getInstance()->getString("ObjectBuy"); +char* _PREHASH_ProfileEnd = LLMessageStringTable::getInstance()->getString("ProfileEnd"); +char* _PREHASH_Effect = LLMessageStringTable::getInstance()->getString("Effect"); +char* _PREHASH_TestMessage = LLMessageStringTable::getInstance()->getString("TestMessage"); +char* _PREHASH_ScriptMailRegistration = LLMessageStringTable::getInstance()->getString("ScriptMailRegistration"); +char* _PREHASH_AgentSetAppearance = LLMessageStringTable::getInstance()->getString("AgentSetAppearance"); +char* _PREHASH_AvatarAppearance = LLMessageStringTable::getInstance()->getString("AvatarAppearance"); +char* _PREHASH_RegionData = LLMessageStringTable::getInstance()->getString("RegionData"); +char* _PREHASH_RequestingRegionData = LLMessageStringTable::getInstance()->getString("RequestingRegionData"); +char* _PREHASH_LandingRegionData = LLMessageStringTable::getInstance()->getString("LandingRegionData"); +char* _PREHASH_SitTransform = LLMessageStringTable::getInstance()->getString("SitTransform"); +char* _PREHASH_TerrainBase0 = LLMessageStringTable::getInstance()->getString("TerrainBase0"); +char* _PREHASH_SkillsMask = LLMessageStringTable::getInstance()->getString("SkillsMask"); +char* _PREHASH_AtAxis = LLMessageStringTable::getInstance()->getString("AtAxis"); +char* _PREHASH_TerrainBase1 = LLMessageStringTable::getInstance()->getString("TerrainBase1"); +char* _PREHASH_Reason = LLMessageStringTable::getInstance()->getString("Reason"); +char* _PREHASH_TerrainBase2 = LLMessageStringTable::getInstance()->getString("TerrainBase2"); +char* _PREHASH_TerrainBase3 = LLMessageStringTable::getInstance()->getString("TerrainBase3"); +char* _PREHASH_Params = LLMessageStringTable::getInstance()->getString("Params"); +char* _PREHASH_PingID = LLMessageStringTable::getInstance()->getString("PingID"); +char* _PREHASH_Change = LLMessageStringTable::getInstance()->getString("Change"); +char* _PREHASH_Height = LLMessageStringTable::getInstance()->getString("Height"); +char* _PREHASH_Region = LLMessageStringTable::getInstance()->getString("Region"); +char* _PREHASH_TelehubInfo = LLMessageStringTable::getInstance()->getString("TelehubInfo"); +char* _PREHASH_StateSave = LLMessageStringTable::getInstance()->getString("StateSave"); +char* _PREHASH_RoleData = LLMessageStringTable::getInstance()->getString("RoleData"); +char* _PREHASH_AgentAnimation = LLMessageStringTable::getInstance()->getString("AgentAnimation"); +char* _PREHASH_AvatarAnimation = LLMessageStringTable::getInstance()->getString("AvatarAnimation"); +char* _PREHASH_LogDwellTime = LLMessageStringTable::getInstance()->getString("LogDwellTime"); +char* _PREHASH_ParcelGodMarkAsContent = LLMessageStringTable::getInstance()->getString("ParcelGodMarkAsContent"); +char* _PREHASH_UsePhysics = LLMessageStringTable::getInstance()->getString("UsePhysics"); +char* _PREHASH_RegionDenyTransacted = LLMessageStringTable::getInstance()->getString("RegionDenyTransacted"); +char* _PREHASH_JointType = LLMessageStringTable::getInstance()->getString("JointType"); +char* _PREHASH_ObjectTaxEstimate = LLMessageStringTable::getInstance()->getString("ObjectTaxEstimate"); +char* _PREHASH_LightTaxEstimate = LLMessageStringTable::getInstance()->getString("LightTaxEstimate"); +char* _PREHASH_LandTaxEstimate = LLMessageStringTable::getInstance()->getString("LandTaxEstimate"); +char* _PREHASH_TeleportLandingStatusChanged = LLMessageStringTable::getInstance()->getString("TeleportLandingStatusChanged"); +char* _PREHASH_GroupTaxEstimate = LLMessageStringTable::getInstance()->getString("GroupTaxEstimate"); +char* _PREHASH_AvgViewerFPS = LLMessageStringTable::getInstance()->getString("AvgViewerFPS"); +char* _PREHASH_Buttons = LLMessageStringTable::getInstance()->getString("Buttons"); +char* _PREHASH_Sender = LLMessageStringTable::getInstance()->getString("Sender"); +char* _PREHASH_Dialog = LLMessageStringTable::getInstance()->getString("Dialog"); +char* _PREHASH_TargetData = LLMessageStringTable::getInstance()->getString("TargetData"); +char* _PREHASH_DestID = LLMessageStringTable::getInstance()->getString("DestID"); +char* _PREHASH_PricePublicObjectDelete = LLMessageStringTable::getInstance()->getString("PricePublicObjectDelete"); +char* _PREHASH_ObjectDelete = LLMessageStringTable::getInstance()->getString("ObjectDelete"); +char* _PREHASH_Delete = LLMessageStringTable::getInstance()->getString("Delete"); +char* _PREHASH_EventGodDelete = LLMessageStringTable::getInstance()->getString("EventGodDelete"); +char* _PREHASH_LastTaxDate = LLMessageStringTable::getInstance()->getString("LastTaxDate"); +char* _PREHASH_MapImageID = LLMessageStringTable::getInstance()->getString("MapImageID"); +char* _PREHASH_EndDateTime = LLMessageStringTable::getInstance()->getString("EndDateTime"); +char* _PREHASH_TerrainDetail0 = LLMessageStringTable::getInstance()->getString("TerrainDetail0"); +char* _PREHASH_TerrainDetail1 = LLMessageStringTable::getInstance()->getString("TerrainDetail1"); +char* _PREHASH_TerrainDetail2 = LLMessageStringTable::getInstance()->getString("TerrainDetail2"); +char* _PREHASH_TerrainDetail3 = LLMessageStringTable::getInstance()->getString("TerrainDetail3"); +char* _PREHASH_Offset = LLMessageStringTable::getInstance()->getString("Offset"); +char* _PREHASH_ObjectDelink = LLMessageStringTable::getInstance()->getString("ObjectDelink"); +char* _PREHASH_TargetObject = LLMessageStringTable::getInstance()->getString("TargetObject"); +char* _PREHASH_IsEstateManager = LLMessageStringTable::getInstance()->getString("IsEstateManager"); +char* _PREHASH_CancelAuction = LLMessageStringTable::getInstance()->getString("CancelAuction"); +char* _PREHASH_ObjectDetach = LLMessageStringTable::getInstance()->getString("ObjectDetach"); +char* _PREHASH_Compressed = LLMessageStringTable::getInstance()->getString("Compressed"); +char* _PREHASH_PathBegin = LLMessageStringTable::getInstance()->getString("PathBegin"); +char* _PREHASH_BypassRaycast = LLMessageStringTable::getInstance()->getString("BypassRaycast"); +char* _PREHASH_WinnerID = LLMessageStringTable::getInstance()->getString("WinnerID"); +char* _PREHASH_ChannelType = LLMessageStringTable::getInstance()->getString("ChannelType"); +char* _PREHASH_NonExemptMembers = LLMessageStringTable::getInstance()->getString("NonExemptMembers"); +char* _PREHASH_Agents = LLMessageStringTable::getInstance()->getString("Agents"); +char* _PREHASH_MemberData = LLMessageStringTable::getInstance()->getString("MemberData"); +char* _PREHASH_ToGroupID = LLMessageStringTable::getInstance()->getString("ToGroupID"); +char* _PREHASH_ImageNotInDatabase = LLMessageStringTable::getInstance()->getString("ImageNotInDatabase"); +char* _PREHASH_StartDate = LLMessageStringTable::getInstance()->getString("StartDate"); +char* _PREHASH_AnimID = LLMessageStringTable::getInstance()->getString("AnimID"); +char* _PREHASH_Serial = LLMessageStringTable::getInstance()->getString("Serial"); +char* _PREHASH_AbuseRegionName = LLMessageStringTable::getInstance()->getString("AbuseRegionName"); +char* _PREHASH_ModifyLand = LLMessageStringTable::getInstance()->getString("ModifyLand"); +char* _PREHASH_Digest = LLMessageStringTable::getInstance()->getString("Digest"); +char* _PREHASH_Victim = LLMessageStringTable::getInstance()->getString("Victim"); +char* _PREHASH_Script = LLMessageStringTable::getInstance()->getString("Script"); +char* _PREHASH_PickInfoReply = LLMessageStringTable::getInstance()->getString("PickInfoReply"); +char* _PREHASH_MoneyBalanceReply = LLMessageStringTable::getInstance()->getString("MoneyBalanceReply"); +char* _PREHASH_RoutedMoneyBalanceReply = LLMessageStringTable::getInstance()->getString("RoutedMoneyBalanceReply"); +char* _PREHASH_RoleID = LLMessageStringTable::getInstance()->getString("RoleID"); +char* _PREHASH_RegionInfo = LLMessageStringTable::getInstance()->getString("RegionInfo"); +char* _PREHASH_GodUpdateRegionInfo = LLMessageStringTable::getInstance()->getString("GodUpdateRegionInfo"); +char* _PREHASH_StartAnim = LLMessageStringTable::getInstance()->getString("StartAnim"); +char* _PREHASH_Action = LLMessageStringTable::getInstance()->getString("Action"); +char* _PREHASH_Location = LLMessageStringTable::getInstance()->getString("Location"); +char* _PREHASH_Rights = LLMessageStringTable::getInstance()->getString("Rights"); +char* _PREHASH_SearchDir = LLMessageStringTable::getInstance()->getString("SearchDir"); +char* _PREHASH_TransferRequest = LLMessageStringTable::getInstance()->getString("TransferRequest"); +char* _PREHASH_ScriptSensorRequest = LLMessageStringTable::getInstance()->getString("ScriptSensorRequest"); +char* _PREHASH_MoneyTransferRequest = LLMessageStringTable::getInstance()->getString("MoneyTransferRequest"); +char* _PREHASH_EjectGroupMemberRequest = LLMessageStringTable::getInstance()->getString("EjectGroupMemberRequest"); +char* _PREHASH_SkillsText = LLMessageStringTable::getInstance()->getString("SkillsText"); +char* _PREHASH_Resent = LLMessageStringTable::getInstance()->getString("Resent"); +char* _PREHASH_Center = LLMessageStringTable::getInstance()->getString("Center"); +char* _PREHASH_SharedData = LLMessageStringTable::getInstance()->getString("SharedData"); +char* _PREHASH_PSBlock = LLMessageStringTable::getInstance()->getString("PSBlock"); +char* _PREHASH_UUIDNameBlock = LLMessageStringTable::getInstance()->getString("UUIDNameBlock"); +char* _PREHASH_GroupTitleUpdate = LLMessageStringTable::getInstance()->getString("GroupTitleUpdate"); +char* _PREHASH_Method = LLMessageStringTable::getInstance()->getString("Method"); +char* _PREHASH_TouchName = LLMessageStringTable::getInstance()->getString("TouchName"); +char* _PREHASH_UpdateType = LLMessageStringTable::getInstance()->getString("UpdateType"); +char* _PREHASH_KickedFromEstateID = LLMessageStringTable::getInstance()->getString("KickedFromEstateID"); +char* _PREHASH_CandidateID = LLMessageStringTable::getInstance()->getString("CandidateID"); +char* _PREHASH_ParamData = LLMessageStringTable::getInstance()->getString("ParamData"); +char* _PREHASH_GodlikeMessage = LLMessageStringTable::getInstance()->getString("GodlikeMessage"); +char* _PREHASH_SystemMessage = LLMessageStringTable::getInstance()->getString("SystemMessage"); +char* _PREHASH_BodyRotation = LLMessageStringTable::getInstance()->getString("BodyRotation"); +char* _PREHASH_SearchRegions = LLMessageStringTable::getInstance()->getString("SearchRegions"); +char* _PREHASH_AnimationData = LLMessageStringTable::getInstance()->getString("AnimationData"); +char* _PREHASH_StatID = LLMessageStringTable::getInstance()->getString("StatID"); +char* _PREHASH_ItemID = LLMessageStringTable::getInstance()->getString("ItemID"); +char* _PREHASH_ScriptDialogReply = LLMessageStringTable::getInstance()->getString("ScriptDialogReply"); +char* _PREHASH_RegionIDAndHandleReply = LLMessageStringTable::getInstance()->getString("RegionIDAndHandleReply"); +char* _PREHASH_CameraAtOffset = LLMessageStringTable::getInstance()->getString("CameraAtOffset"); +char* _PREHASH_VoteID = LLMessageStringTable::getInstance()->getString("VoteID"); +char* _PREHASH_ParcelGodForceOwner = LLMessageStringTable::getInstance()->getString("ParcelGodForceOwner"); +char* _PREHASH_Filter = LLMessageStringTable::getInstance()->getString("Filter"); +char* _PREHASH_InviteData = LLMessageStringTable::getInstance()->getString("InviteData"); +char* _PREHASH_PCode = LLMessageStringTable::getInstance()->getString("PCode"); +char* _PREHASH_SearchPos = LLMessageStringTable::getInstance()->getString("SearchPos"); +char* _PREHASH_PreyID = LLMessageStringTable::getInstance()->getString("PreyID"); +char* _PREHASH_TerrainLowerLimit = LLMessageStringTable::getInstance()->getString("TerrainLowerLimit"); +char* _PREHASH_EventFlags = LLMessageStringTable::getInstance()->getString("EventFlags"); +char* _PREHASH_TallyVotes = LLMessageStringTable::getInstance()->getString("TallyVotes"); +char* _PREHASH_Result = LLMessageStringTable::getInstance()->getString("Result"); +char* _PREHASH_LookAt = LLMessageStringTable::getInstance()->getString("LookAt"); +char* _PREHASH_SearchOrder = LLMessageStringTable::getInstance()->getString("SearchOrder"); +char* _PREHASH_PayButton = LLMessageStringTable::getInstance()->getString("PayButton"); +char* _PREHASH_SelfCount = LLMessageStringTable::getInstance()->getString("SelfCount"); +char* _PREHASH_PacketCount = LLMessageStringTable::getInstance()->getString("PacketCount"); +char* _PREHASH_ParcelBuyPass = LLMessageStringTable::getInstance()->getString("ParcelBuyPass"); +char* _PREHASH_OldItemID = LLMessageStringTable::getInstance()->getString("OldItemID"); +char* _PREHASH_RegionPort = LLMessageStringTable::getInstance()->getString("RegionPort"); +char* _PREHASH_PriceEnergyUnit = LLMessageStringTable::getInstance()->getString("PriceEnergyUnit"); +char* _PREHASH_Bitmap = LLMessageStringTable::getInstance()->getString("Bitmap"); +char* _PREHASH_CacheMissType = LLMessageStringTable::getInstance()->getString("CacheMissType"); +char* _PREHASH_VFileID = LLMessageStringTable::getInstance()->getString("VFileID"); +char* _PREHASH_GroupInsigniaID = LLMessageStringTable::getInstance()->getString("GroupInsigniaID"); +char* _PREHASH_Online = LLMessageStringTable::getInstance()->getString("Online"); +char* _PREHASH_KickFlags = LLMessageStringTable::getInstance()->getString("KickFlags"); +char* _PREHASH_CovenantID = LLMessageStringTable::getInstance()->getString("CovenantID"); +char* _PREHASH_SysCPU = LLMessageStringTable::getInstance()->getString("SysCPU"); +char* _PREHASH_EMail = LLMessageStringTable::getInstance()->getString("EMail"); +char* _PREHASH_AggregatePermTextures = LLMessageStringTable::getInstance()->getString("AggregatePermTextures"); +char* _PREHASH_ChatChannel = LLMessageStringTable::getInstance()->getString("ChatChannel"); +char* _PREHASH_ReturnID = LLMessageStringTable::getInstance()->getString("ReturnID"); +char* _PREHASH_ObjectAttach = LLMessageStringTable::getInstance()->getString("ObjectAttach"); +char* _PREHASH_TargetPort = LLMessageStringTable::getInstance()->getString("TargetPort"); +char* _PREHASH_ObjectSpinStop = LLMessageStringTable::getInstance()->getString("ObjectSpinStop"); +char* _PREHASH_FullID = LLMessageStringTable::getInstance()->getString("FullID"); +char* _PREHASH_ActivateGroup = LLMessageStringTable::getInstance()->getString("ActivateGroup"); +char* _PREHASH_SysGPU = LLMessageStringTable::getInstance()->getString("SysGPU"); +char* _PREHASH_AvatarInterestsReply = LLMessageStringTable::getInstance()->getString("AvatarInterestsReply"); +char* _PREHASH_StartLure = LLMessageStringTable::getInstance()->getString("StartLure"); +char* _PREHASH_SysRAM = LLMessageStringTable::getInstance()->getString("SysRAM"); +char* _PREHASH_ObjectPosition = LLMessageStringTable::getInstance()->getString("ObjectPosition"); +char* _PREHASH_SitPosition = LLMessageStringTable::getInstance()->getString("SitPosition"); +char* _PREHASH_StartTime = LLMessageStringTable::getInstance()->getString("StartTime"); +char* _PREHASH_BornOn = LLMessageStringTable::getInstance()->getString("BornOn"); +char* _PREHASH_CameraCollidePlane = LLMessageStringTable::getInstance()->getString("CameraCollidePlane"); +char* _PREHASH_EconomyDataRequest = LLMessageStringTable::getInstance()->getString("EconomyDataRequest"); +char* _PREHASH_TeleportLureRequest = LLMessageStringTable::getInstance()->getString("TeleportLureRequest"); +char* _PREHASH_FolderID = LLMessageStringTable::getInstance()->getString("FolderID"); +char* _PREHASH_RegionHandleRequest = LLMessageStringTable::getInstance()->getString("RegionHandleRequest"); +char* _PREHASH_ScriptDataRequest = LLMessageStringTable::getInstance()->getString("ScriptDataRequest"); +char* _PREHASH_GroupRoleDataRequest = LLMessageStringTable::getInstance()->getString("GroupRoleDataRequest"); +char* _PREHASH_GroupTitlesRequest = LLMessageStringTable::getInstance()->getString("GroupTitlesRequest"); +char* _PREHASH_AgentWearablesRequest = LLMessageStringTable::getInstance()->getString("AgentWearablesRequest"); +char* _PREHASH_MapBlockRequest = LLMessageStringTable::getInstance()->getString("MapBlockRequest"); +char* _PREHASH_LureID = LLMessageStringTable::getInstance()->getString("LureID"); +char* _PREHASH_CopyCenters = LLMessageStringTable::getInstance()->getString("CopyCenters"); +char* _PREHASH_ParamList = LLMessageStringTable::getInstance()->getString("ParamList"); +char* _PREHASH_InventorySerial = LLMessageStringTable::getInstance()->getString("InventorySerial"); +char* _PREHASH_EdgeDataPacket = LLMessageStringTable::getInstance()->getString("EdgeDataPacket"); +char* _PREHASH_AvatarPickerReply = LLMessageStringTable::getInstance()->getString("AvatarPickerReply"); +char* _PREHASH_ParcelDwellReply = LLMessageStringTable::getInstance()->getString("ParcelDwellReply"); +char* _PREHASH_IsForSale = LLMessageStringTable::getInstance()->getString("IsForSale"); +char* _PREHASH_MuteID = LLMessageStringTable::getInstance()->getString("MuteID"); +char* _PREHASH_MeanCollisionAlert = LLMessageStringTable::getInstance()->getString("MeanCollisionAlert"); +char* _PREHASH_CanAcceptTasks = LLMessageStringTable::getInstance()->getString("CanAcceptTasks"); +char* _PREHASH_ItemData = LLMessageStringTable::getInstance()->getString("ItemData"); +char* _PREHASH_AnimationList = LLMessageStringTable::getInstance()->getString("AnimationList"); +char* _PREHASH_Reputation = LLMessageStringTable::getInstance()->getString("Reputation"); +char* _PREHASH_IntValue = LLMessageStringTable::getInstance()->getString("IntValue"); +char* _PREHASH_TargetType = LLMessageStringTable::getInstance()->getString("TargetType"); +char* _PREHASH_Amount = LLMessageStringTable::getInstance()->getString("Amount"); +char* _PREHASH_HasAttachment = LLMessageStringTable::getInstance()->getString("HasAttachment"); +char* _PREHASH_UpdateAttachment = LLMessageStringTable::getInstance()->getString("UpdateAttachment"); +char* _PREHASH_RemoveAttachment = LLMessageStringTable::getInstance()->getString("RemoveAttachment"); +char* _PREHASH_HeightWidthBlock = LLMessageStringTable::getInstance()->getString("HeightWidthBlock"); +char* _PREHASH_RequestObjectPropertiesFamily = LLMessageStringTable::getInstance()->getString("RequestObjectPropertiesFamily"); +char* _PREHASH_ObjectPropertiesFamily = LLMessageStringTable::getInstance()->getString("ObjectPropertiesFamily"); +char* _PREHASH_UserData = LLMessageStringTable::getInstance()->getString("UserData"); +char* _PREHASH_IsReadable = LLMessageStringTable::getInstance()->getString("IsReadable"); +char* _PREHASH_PathCurve = LLMessageStringTable::getInstance()->getString("PathCurve"); +char* _PREHASH_Status = LLMessageStringTable::getInstance()->getString("Status"); +char* _PREHASH_FromGroup = LLMessageStringTable::getInstance()->getString("FromGroup"); +char* _PREHASH_AlreadyVoted = LLMessageStringTable::getInstance()->getString("AlreadyVoted"); +char* _PREHASH_PlacesReply = LLMessageStringTable::getInstance()->getString("PlacesReply"); +char* _PREHASH_DirPlacesReply = LLMessageStringTable::getInstance()->getString("DirPlacesReply"); +char* _PREHASH_ParcelBuy = LLMessageStringTable::getInstance()->getString("ParcelBuy"); +char* _PREHASH_DirFindQueryBackend = LLMessageStringTable::getInstance()->getString("DirFindQueryBackend"); +char* _PREHASH_DirPlacesQueryBackend = LLMessageStringTable::getInstance()->getString("DirPlacesQueryBackend"); +char* _PREHASH_DirClassifiedQueryBackend = LLMessageStringTable::getInstance()->getString("DirClassifiedQueryBackend"); +char* _PREHASH_DirLandQueryBackend = LLMessageStringTable::getInstance()->getString("DirLandQueryBackend"); +char* _PREHASH_DirPopularQueryBackend = LLMessageStringTable::getInstance()->getString("DirPopularQueryBackend"); +char* _PREHASH_HistoryData = LLMessageStringTable::getInstance()->getString("HistoryData"); +char* _PREHASH_SnapshotID = LLMessageStringTable::getInstance()->getString("SnapshotID"); +char* _PREHASH_Aspect = LLMessageStringTable::getInstance()->getString("Aspect"); +char* _PREHASH_ParamSize = LLMessageStringTable::getInstance()->getString("ParamSize"); +char* _PREHASH_VoteCast = LLMessageStringTable::getInstance()->getString("VoteCast"); +char* _PREHASH_CastsShadows = LLMessageStringTable::getInstance()->getString("CastsShadows"); +char* _PREHASH_EveryoneMask = LLMessageStringTable::getInstance()->getString("EveryoneMask"); +char* _PREHASH_ObjectSpinUpdate = LLMessageStringTable::getInstance()->getString("ObjectSpinUpdate"); +char* _PREHASH_MaturePublish = LLMessageStringTable::getInstance()->getString("MaturePublish"); +char* _PREHASH_UseExistingAsset = LLMessageStringTable::getInstance()->getString("UseExistingAsset"); +char* _PREHASH_Powers = LLMessageStringTable::getInstance()->getString("Powers"); +char* _PREHASH_ParcelLocalID = LLMessageStringTable::getInstance()->getString("ParcelLocalID"); +char* _PREHASH_TeleportCancel = LLMessageStringTable::getInstance()->getString("TeleportCancel"); +char* _PREHASH_UnixTime = LLMessageStringTable::getInstance()->getString("UnixTime"); +char* _PREHASH_QueryFlags = LLMessageStringTable::getInstance()->getString("QueryFlags"); +char* _PREHASH_AlwaysRun = LLMessageStringTable::getInstance()->getString("AlwaysRun"); +char* _PREHASH_Bottom = LLMessageStringTable::getInstance()->getString("Bottom"); +char* _PREHASH_ButtonData = LLMessageStringTable::getInstance()->getString("ButtonData"); +char* _PREHASH_SoundData = LLMessageStringTable::getInstance()->getString("SoundData"); +char* _PREHASH_ViewerStats = LLMessageStringTable::getInstance()->getString("ViewerStats"); +char* _PREHASH_RegionHandshake = LLMessageStringTable::getInstance()->getString("RegionHandshake"); +char* _PREHASH_ObjectDescription = LLMessageStringTable::getInstance()->getString("ObjectDescription"); +char* _PREHASH_Description = LLMessageStringTable::getInstance()->getString("Description"); +char* _PREHASH_ParamType = LLMessageStringTable::getInstance()->getString("ParamType"); +char* _PREHASH_UUIDNameReply = LLMessageStringTable::getInstance()->getString("UUIDNameReply"); +char* _PREHASH_UUIDGroupNameReply = LLMessageStringTable::getInstance()->getString("UUIDGroupNameReply"); +char* _PREHASH_SaveAssetIntoInventory = LLMessageStringTable::getInstance()->getString("SaveAssetIntoInventory"); +char* _PREHASH_UserInfo = LLMessageStringTable::getInstance()->getString("UserInfo"); +char* _PREHASH_AnimSequenceID = LLMessageStringTable::getInstance()->getString("AnimSequenceID"); +char* _PREHASH_NVPairs = LLMessageStringTable::getInstance()->getString("NVPairs"); +char* _PREHASH_GroupNoticesListRequest = LLMessageStringTable::getInstance()->getString("GroupNoticesListRequest"); +char* _PREHASH_ParcelAccessListRequest = LLMessageStringTable::getInstance()->getString("ParcelAccessListRequest"); +char* _PREHASH_MuteListRequest = LLMessageStringTable::getInstance()->getString("MuteListRequest"); +char* _PREHASH_RpcChannelRequest = LLMessageStringTable::getInstance()->getString("RpcChannelRequest"); +char* _PREHASH_LandStatRequest = LLMessageStringTable::getInstance()->getString("LandStatRequest"); +char* _PREHASH_PlacesQuery = LLMessageStringTable::getInstance()->getString("PlacesQuery"); +char* _PREHASH_DirPlacesQuery = LLMessageStringTable::getInstance()->getString("DirPlacesQuery"); +char* _PREHASH_SortOrder = LLMessageStringTable::getInstance()->getString("SortOrder"); +char* _PREHASH_Hunter = LLMessageStringTable::getInstance()->getString("Hunter"); +char* _PREHASH_SunAngVelocity = LLMessageStringTable::getInstance()->getString("SunAngVelocity"); +char* _PREHASH_BinaryBucket = LLMessageStringTable::getInstance()->getString("BinaryBucket"); +char* _PREHASH_ImagePacket = LLMessageStringTable::getInstance()->getString("ImagePacket"); +char* _PREHASH_StartGroupProposal = LLMessageStringTable::getInstance()->getString("StartGroupProposal"); +char* _PREHASH_EnergyLevel = LLMessageStringTable::getInstance()->getString("EnergyLevel"); +char* _PREHASH_PriceForListing = LLMessageStringTable::getInstance()->getString("PriceForListing"); +char* _PREHASH_Scale = LLMessageStringTable::getInstance()->getString("Scale"); +char* _PREHASH_EstateCovenantReply = LLMessageStringTable::getInstance()->getString("EstateCovenantReply"); +char* _PREHASH_ParentEstateID = LLMessageStringTable::getInstance()->getString("ParentEstateID"); +char* _PREHASH_Extra2 = LLMessageStringTable::getInstance()->getString("Extra2"); +char* _PREHASH_Throttle = LLMessageStringTable::getInstance()->getString("Throttle"); +char* _PREHASH_SimIP = LLMessageStringTable::getInstance()->getString("SimIP"); +char* _PREHASH_GodID = LLMessageStringTable::getInstance()->getString("GodID"); +char* _PREHASH_TeleportMinPrice = LLMessageStringTable::getInstance()->getString("TeleportMinPrice"); +char* _PREHASH_VoteItem = LLMessageStringTable::getInstance()->getString("VoteItem"); +char* _PREHASH_ObjectRotation = LLMessageStringTable::getInstance()->getString("ObjectRotation"); +char* _PREHASH_SitRotation = LLMessageStringTable::getInstance()->getString("SitRotation"); +char* _PREHASH_SnapSelection = LLMessageStringTable::getInstance()->getString("SnapSelection"); +char* _PREHASH_SoundTrigger = LLMessageStringTable::getInstance()->getString("SoundTrigger"); +char* _PREHASH_TerrainRaiseLimit = LLMessageStringTable::getInstance()->getString("TerrainRaiseLimit"); +char* _PREHASH_Quorum = LLMessageStringTable::getInstance()->getString("Quorum"); +char* _PREHASH_AgentBlock = LLMessageStringTable::getInstance()->getString("AgentBlock"); +char* _PREHASH_CommandBlock = LLMessageStringTable::getInstance()->getString("CommandBlock"); +char* _PREHASH_PricePublicObjectDecay = LLMessageStringTable::getInstance()->getString("PricePublicObjectDecay"); +char* _PREHASH_SpawnPointPos = LLMessageStringTable::getInstance()->getString("SpawnPointPos"); +char* _PREHASH_VolumeDetail = LLMessageStringTable::getInstance()->getString("VolumeDetail"); +char* _PREHASH_FromAgentName = LLMessageStringTable::getInstance()->getString("FromAgentName"); +char* _PREHASH_Range = LLMessageStringTable::getInstance()->getString("Range"); +char* _PREHASH_DirectoryVisibility = LLMessageStringTable::getInstance()->getString("DirectoryVisibility"); +char* _PREHASH_PublicIP = LLMessageStringTable::getInstance()->getString("PublicIP"); +char* _PREHASH_TeleportFailed = LLMessageStringTable::getInstance()->getString("TeleportFailed"); +char* _PREHASH_PreloadSound = LLMessageStringTable::getInstance()->getString("PreloadSound"); +char* _PREHASH_ScreenshotID = LLMessageStringTable::getInstance()->getString("ScreenshotID"); +char* _PREHASH_CovenantTimestamp = LLMessageStringTable::getInstance()->getString("CovenantTimestamp"); +char* _PREHASH_OldestUnacked = LLMessageStringTable::getInstance()->getString("OldestUnacked"); +char* _PREHASH_SimulatorIP = LLMessageStringTable::getInstance()->getString("SimulatorIP"); +char* _PREHASH_Value = LLMessageStringTable::getInstance()->getString("Value"); +char* _PREHASH_JointAxisOrAnchor = LLMessageStringTable::getInstance()->getString("JointAxisOrAnchor"); +char* _PREHASH_Test0 = LLMessageStringTable::getInstance()->getString("Test0"); +char* _PREHASH_Test1 = LLMessageStringTable::getInstance()->getString("Test1"); +char* _PREHASH_Test2 = LLMessageStringTable::getInstance()->getString("Test2"); +char* _PREHASH_SunPhase = LLMessageStringTable::getInstance()->getString("SunPhase"); +char* _PREHASH_ParcelDivide = LLMessageStringTable::getInstance()->getString("ParcelDivide"); +char* _PREHASH_PriceObjectClaim = LLMessageStringTable::getInstance()->getString("PriceObjectClaim"); +char* _PREHASH_Field = LLMessageStringTable::getInstance()->getString("Field"); +char* _PREHASH_Ratio = LLMessageStringTable::getInstance()->getString("Ratio"); +char* _PREHASH_JoinGroupReply = LLMessageStringTable::getInstance()->getString("JoinGroupReply"); +char* _PREHASH_LiveHelpGroupReply = LLMessageStringTable::getInstance()->getString("LiveHelpGroupReply"); +char* _PREHASH_Score = LLMessageStringTable::getInstance()->getString("Score"); +char* _PREHASH_Image = LLMessageStringTable::getInstance()->getString("Image"); +char* _PREHASH_ObjectClickAction = LLMessageStringTable::getInstance()->getString("ObjectClickAction"); +char* _PREHASH_Parameter = LLMessageStringTable::getInstance()->getString("Parameter"); +char* _PREHASH_Flags = LLMessageStringTable::getInstance()->getString("Flags"); +char* _PREHASH_Plane = LLMessageStringTable::getInstance()->getString("Plane"); +char* _PREHASH_Width = LLMessageStringTable::getInstance()->getString("Width"); +char* _PREHASH_Right = LLMessageStringTable::getInstance()->getString("Right"); +char* _PREHASH_DirFindQuery = LLMessageStringTable::getInstance()->getString("DirFindQuery"); +char* _PREHASH_Textures = LLMessageStringTable::getInstance()->getString("Textures"); +char* _PREHASH_EventData = LLMessageStringTable::getInstance()->getString("EventData"); +char* _PREHASH_Final = LLMessageStringTable::getInstance()->getString("Final"); +char* _PREHASH_System = LLMessageStringTable::getInstance()->getString("System"); +char* _PREHASH_TelehubPos = LLMessageStringTable::getInstance()->getString("TelehubPos"); +char* _PREHASH_ReportAutosaveCrash = LLMessageStringTable::getInstance()->getString("ReportAutosaveCrash"); +char* _PREHASH_CreateTrustedCircuit = LLMessageStringTable::getInstance()->getString("CreateTrustedCircuit"); +char* _PREHASH_DenyTrustedCircuit = LLMessageStringTable::getInstance()->getString("DenyTrustedCircuit"); +char* _PREHASH_RequestTrustedCircuit = LLMessageStringTable::getInstance()->getString("RequestTrustedCircuit"); +char* _PREHASH_Codec = LLMessageStringTable::getInstance()->getString("Codec"); +char* _PREHASH_Modal = LLMessageStringTable::getInstance()->getString("Modal"); +char* _PREHASH_ChildAgentUnknown = LLMessageStringTable::getInstance()->getString("ChildAgentUnknown"); +char* _PREHASH_LandingType = LLMessageStringTable::getInstance()->getString("LandingType"); +char* _PREHASH_ScriptRunningReply = LLMessageStringTable::getInstance()->getString("ScriptRunningReply"); +char* _PREHASH_Reply = LLMessageStringTable::getInstance()->getString("Reply"); +char* _PREHASH_GroupAccountDetailsReply = LLMessageStringTable::getInstance()->getString("GroupAccountDetailsReply"); +char* _PREHASH_TelehubRot = LLMessageStringTable::getInstance()->getString("TelehubRot"); +char* _PREHASH_AcceptFriendship = LLMessageStringTable::getInstance()->getString("AcceptFriendship"); +char* _PREHASH_ItemType = LLMessageStringTable::getInstance()->getString("ItemType"); +char* _PREHASH_DwellInfo = LLMessageStringTable::getInstance()->getString("DwellInfo"); +char* _PREHASH_AgentResume = LLMessageStringTable::getInstance()->getString("AgentResume"); +char* _PREHASH_MailFilter = LLMessageStringTable::getInstance()->getString("MailFilter"); +char* _PREHASH_Disconnect = LLMessageStringTable::getInstance()->getString("Disconnect"); +char* _PREHASH_SimPosition = LLMessageStringTable::getInstance()->getString("SimPosition"); +char* _PREHASH_SimWideTotalPrims = LLMessageStringTable::getInstance()->getString("SimWideTotalPrims"); +char* _PREHASH_Index = LLMessageStringTable::getInstance()->getString("Index"); +char* _PREHASH_SimFilename = LLMessageStringTable::getInstance()->getString("SimFilename"); +char* _PREHASH_LastOwnerID = LLMessageStringTable::getInstance()->getString("LastOwnerID"); +char* _PREHASH_GroupNoticeRequest = LLMessageStringTable::getInstance()->getString("GroupNoticeRequest"); +char* _PREHASH_EmailMessageRequest = LLMessageStringTable::getInstance()->getString("EmailMessageRequest"); +char* _PREHASH_MapItemRequest = LLMessageStringTable::getInstance()->getString("MapItemRequest"); +char* _PREHASH_AgentCount = LLMessageStringTable::getInstance()->getString("AgentCount"); +char* _PREHASH_MessageBlock = LLMessageStringTable::getInstance()->getString("MessageBlock"); +char* _PREHASH_FuseBlock = LLMessageStringTable::getInstance()->getString("FuseBlock"); +char* _PREHASH_AgentGroupData = LLMessageStringTable::getInstance()->getString("AgentGroupData"); +char* _PREHASH_ClassifiedInfoUpdate = LLMessageStringTable::getInstance()->getString("ClassifiedInfoUpdate"); +char* _PREHASH_RegionPos = LLMessageStringTable::getInstance()->getString("RegionPos"); +char* _PREHASH_ParcelMediaUpdate = LLMessageStringTable::getInstance()->getString("ParcelMediaUpdate"); +char* _PREHASH_NoticeID = LLMessageStringTable::getInstance()->getString("NoticeID"); +char* _PREHASH_GridX = LLMessageStringTable::getInstance()->getString("GridX"); +char* _PREHASH_GridY = LLMessageStringTable::getInstance()->getString("GridY"); +char* _PREHASH_Title = LLMessageStringTable::getInstance()->getString("Title"); +char* _PREHASH_AuctionID = LLMessageStringTable::getInstance()->getString("AuctionID"); +char* _PREHASH_VoteType = LLMessageStringTable::getInstance()->getString("VoteType"); +char* _PREHASH_CategoryID = LLMessageStringTable::getInstance()->getString("CategoryID"); +char* _PREHASH_Token = LLMessageStringTable::getInstance()->getString("Token"); +char* _PREHASH_AggregatePerms = LLMessageStringTable::getInstance()->getString("AggregatePerms"); +char* _PREHASH_ObjectSelect = LLMessageStringTable::getInstance()->getString("ObjectSelect"); +char* _PREHASH_ForceObjectSelect = LLMessageStringTable::getInstance()->getString("ForceObjectSelect"); +char* _PREHASH_Price = LLMessageStringTable::getInstance()->getString("Price"); +char* _PREHASH_SunDirection = LLMessageStringTable::getInstance()->getString("SunDirection"); +char* _PREHASH_FromName = LLMessageStringTable::getInstance()->getString("FromName"); +char* _PREHASH_ChangeInventoryItemFlags = LLMessageStringTable::getInstance()->getString("ChangeInventoryItemFlags"); +char* _PREHASH_Force = LLMessageStringTable::getInstance()->getString("Force"); +char* _PREHASH_TransactionBlock = LLMessageStringTable::getInstance()->getString("TransactionBlock"); +char* _PREHASH_PowersMask = LLMessageStringTable::getInstance()->getString("PowersMask"); +char* _PREHASH_Stamp = LLMessageStringTable::getInstance()->getString("Stamp"); +char* _PREHASH_TotalCredits = LLMessageStringTable::getInstance()->getString("TotalCredits"); +char* _PREHASH_State = LLMessageStringTable::getInstance()->getString("State"); +char* _PREHASH_TextureIndex = LLMessageStringTable::getInstance()->getString("TextureIndex"); +char* _PREHASH_InviteeID = LLMessageStringTable::getInstance()->getString("InviteeID"); +char* _PREHASH_ParcelReclaim = LLMessageStringTable::getInstance()->getString("ParcelReclaim"); +char* _PREHASH_Money = LLMessageStringTable::getInstance()->getString("Money"); +char* _PREHASH_PathTwist = LLMessageStringTable::getInstance()->getString("PathTwist"); +char* _PREHASH_AuthBuyerID = LLMessageStringTable::getInstance()->getString("AuthBuyerID"); +char* _PREHASH_Color = LLMessageStringTable::getInstance()->getString("Color"); +char* _PREHASH_SourceType = LLMessageStringTable::getInstance()->getString("SourceType"); +char* _PREHASH_World = LLMessageStringTable::getInstance()->getString("World"); +char* _PREHASH_QueryData = LLMessageStringTable::getInstance()->getString("QueryData"); +char* _PREHASH_Users = LLMessageStringTable::getInstance()->getString("Users"); +char* _PREHASH_SysOS = LLMessageStringTable::getInstance()->getString("SysOS"); +char* _PREHASH_Notes = LLMessageStringTable::getInstance()->getString("Notes"); +char* _PREHASH_AvatarID = LLMessageStringTable::getInstance()->getString("AvatarID"); +char* _PREHASH_FounderID = LLMessageStringTable::getInstance()->getString("FounderID"); +char* _PREHASH_EndPointID = LLMessageStringTable::getInstance()->getString("EndPointID"); +char* _PREHASH_LocationLookAt = LLMessageStringTable::getInstance()->getString("LocationLookAt"); +char* _PREHASH_Sound = LLMessageStringTable::getInstance()->getString("Sound"); +char* _PREHASH_Cover = LLMessageStringTable::getInstance()->getString("Cover"); +char* _PREHASH_TotalObjectCount = LLMessageStringTable::getInstance()->getString("TotalObjectCount"); +char* _PREHASH_TextureEntry = LLMessageStringTable::getInstance()->getString("TextureEntry"); +char* _PREHASH_SquareMetersCommitted = LLMessageStringTable::getInstance()->getString("SquareMetersCommitted"); +char* _PREHASH_ChannelID = LLMessageStringTable::getInstance()->getString("ChannelID"); +char* _PREHASH_Dwell = LLMessageStringTable::getInstance()->getString("Dwell"); +char* _PREHASH_North = LLMessageStringTable::getInstance()->getString("North"); +char* _PREHASH_AgentUpdate = LLMessageStringTable::getInstance()->getString("AgentUpdate"); +char* _PREHASH_PickGodDelete = LLMessageStringTable::getInstance()->getString("PickGodDelete"); +char* _PREHASH_HostName = LLMessageStringTable::getInstance()->getString("HostName"); +char* _PREHASH_PriceParcelClaim = LLMessageStringTable::getInstance()->getString("PriceParcelClaim"); +char* _PREHASH_ParcelClaim = LLMessageStringTable::getInstance()->getString("ParcelClaim"); +char* _PREHASH_AgentPowers = LLMessageStringTable::getInstance()->getString("AgentPowers"); +char* _PREHASH_ProfileHollow = LLMessageStringTable::getInstance()->getString("ProfileHollow"); +char* _PREHASH_GroupRoleChanges = LLMessageStringTable::getInstance()->getString("GroupRoleChanges"); +char* _PREHASH_Count = LLMessageStringTable::getInstance()->getString("Count"); +char* _PREHASH_South = LLMessageStringTable::getInstance()->getString("South"); +char* _PREHASH_ObjectUpdateCompressed = LLMessageStringTable::getInstance()->getString("ObjectUpdateCompressed"); +char* _PREHASH_MuteFlags = LLMessageStringTable::getInstance()->getString("MuteFlags"); +char* _PREHASH_Group = LLMessageStringTable::getInstance()->getString("Group"); +char* _PREHASH_AgentPause = LLMessageStringTable::getInstance()->getString("AgentPause"); +char* _PREHASH_LanguagesText = LLMessageStringTable::getInstance()->getString("LanguagesText"); +char* _PREHASH_Error = LLMessageStringTable::getInstance()->getString("Error"); +char* _PREHASH_InternalScriptMail = LLMessageStringTable::getInstance()->getString("InternalScriptMail"); +char* _PREHASH_FindAgent = LLMessageStringTable::getInstance()->getString("FindAgent"); +char* _PREHASH_AgentData = LLMessageStringTable::getInstance()->getString("AgentData"); +char* _PREHASH_FolderData = LLMessageStringTable::getInstance()->getString("FolderData"); +char* _PREHASH_AssetBlock = LLMessageStringTable::getInstance()->getString("AssetBlock"); +char* _PREHASH_AcceptNotices = LLMessageStringTable::getInstance()->getString("AcceptNotices"); +char* _PREHASH_SetGroupAcceptNotices = LLMessageStringTable::getInstance()->getString("SetGroupAcceptNotices"); +char* _PREHASH_CloseCircuit = LLMessageStringTable::getInstance()->getString("CloseCircuit"); +char* _PREHASH_TeleportFinish = LLMessageStringTable::getInstance()->getString("TeleportFinish"); +char* _PREHASH_PathRevolutions = LLMessageStringTable::getInstance()->getString("PathRevolutions"); +char* _PREHASH_ClassifiedInfoReply = LLMessageStringTable::getInstance()->getString("ClassifiedInfoReply"); +char* _PREHASH_ParcelInfoReply = LLMessageStringTable::getInstance()->getString("ParcelInfoReply"); +char* _PREHASH_AutosaveData = LLMessageStringTable::getInstance()->getString("AutosaveData"); +char* _PREHASH_SetStartLocation = LLMessageStringTable::getInstance()->getString("SetStartLocation"); +char* _PREHASH_PassHours = LLMessageStringTable::getInstance()->getString("PassHours"); +char* _PREHASH_AttachmentPt = LLMessageStringTable::getInstance()->getString("AttachmentPt"); +char* _PREHASH_ParcelFlags = LLMessageStringTable::getInstance()->getString("ParcelFlags"); +char* _PREHASH_NumVotes = LLMessageStringTable::getInstance()->getString("NumVotes"); +char* _PREHASH_AvatarPickerRequest = LLMessageStringTable::getInstance()->getString("AvatarPickerRequest"); +char* _PREHASH_TeleportLocationRequest = LLMessageStringTable::getInstance()->getString("TeleportLocationRequest"); +char* _PREHASH_DataHomeLocationRequest = LLMessageStringTable::getInstance()->getString("DataHomeLocationRequest"); +char* _PREHASH_EventNotificationAddRequest = LLMessageStringTable::getInstance()->getString("EventNotificationAddRequest"); +char* _PREHASH_ParcelDwellRequest = LLMessageStringTable::getInstance()->getString("ParcelDwellRequest"); +char* _PREHASH_EventLocationRequest = LLMessageStringTable::getInstance()->getString("EventLocationRequest"); +char* _PREHASH_SetStartLocationRequest = LLMessageStringTable::getInstance()->getString("SetStartLocationRequest"); +char* _PREHASH_QueryStart = LLMessageStringTable::getInstance()->getString("QueryStart"); +char* _PREHASH_EjectData = LLMessageStringTable::getInstance()->getString("EjectData"); +char* _PREHASH_AvatarTextureUpdate = LLMessageStringTable::getInstance()->getString("AvatarTextureUpdate"); +char* _PREHASH_RPCServerPort = LLMessageStringTable::getInstance()->getString("RPCServerPort"); +char* _PREHASH_Bytes = LLMessageStringTable::getInstance()->getString("Bytes"); +char* _PREHASH_Extra = LLMessageStringTable::getInstance()->getString("Extra"); +char* _PREHASH_ForceScriptControlRelease = LLMessageStringTable::getInstance()->getString("ForceScriptControlRelease"); +char* _PREHASH_ParcelRelease = LLMessageStringTable::getInstance()->getString("ParcelRelease"); +char* _PREHASH_VFileType = LLMessageStringTable::getInstance()->getString("VFileType"); +char* _PREHASH_EjectGroupMemberReply = LLMessageStringTable::getInstance()->getString("EjectGroupMemberReply"); +char* _PREHASH_ImageData = LLMessageStringTable::getInstance()->getString("ImageData"); +char* _PREHASH_SimulatorViewerTimeMessage = LLMessageStringTable::getInstance()->getString("SimulatorViewerTimeMessage"); +char* _PREHASH_Rotation = LLMessageStringTable::getInstance()->getString("Rotation"); +char* _PREHASH_Selection = LLMessageStringTable::getInstance()->getString("Selection"); +char* _PREHASH_TransactionData = LLMessageStringTable::getInstance()->getString("TransactionData"); +char* _PREHASH_OperationData = LLMessageStringTable::getInstance()->getString("OperationData"); +char* _PREHASH_ExpirationDate = LLMessageStringTable::getInstance()->getString("ExpirationDate"); +char* _PREHASH_ParcelDeedToGroup = LLMessageStringTable::getInstance()->getString("ParcelDeedToGroup"); +char* _PREHASH_AvatarPicksReply = LLMessageStringTable::getInstance()->getString("AvatarPicksReply"); +char* _PREHASH_GroupTitlesReply = LLMessageStringTable::getInstance()->getString("GroupTitlesReply"); +char* _PREHASH_AgentInfo = LLMessageStringTable::getInstance()->getString("AgentInfo"); +char* _PREHASH_MoneyTransferBackend = LLMessageStringTable::getInstance()->getString("MoneyTransferBackend"); +char* _PREHASH_NextOwnerMask = LLMessageStringTable::getInstance()->getString("NextOwnerMask"); +char* _PREHASH_MuteData = LLMessageStringTable::getInstance()->getString("MuteData"); +char* _PREHASH_PassPrice = LLMessageStringTable::getInstance()->getString("PassPrice"); +char* _PREHASH_SourceID = LLMessageStringTable::getInstance()->getString("SourceID"); +char* _PREHASH_ChangeUserRights = LLMessageStringTable::getInstance()->getString("ChangeUserRights"); +char* _PREHASH_TeleportFlags = LLMessageStringTable::getInstance()->getString("TeleportFlags"); +char* _PREHASH_SlaveParcelData = LLMessageStringTable::getInstance()->getString("SlaveParcelData"); +char* _PREHASH_AssetData = LLMessageStringTable::getInstance()->getString("AssetData"); +char* _PREHASH_MultipleObjectUpdate = LLMessageStringTable::getInstance()->getString("MultipleObjectUpdate"); +char* _PREHASH_ObjectUpdate = LLMessageStringTable::getInstance()->getString("ObjectUpdate"); +char* _PREHASH_ImprovedTerseObjectUpdate = LLMessageStringTable::getInstance()->getString("ImprovedTerseObjectUpdate"); +char* _PREHASH_ConfirmXferPacket = LLMessageStringTable::getInstance()->getString("ConfirmXferPacket"); +char* _PREHASH_StartPingCheck = LLMessageStringTable::getInstance()->getString("StartPingCheck"); +char* _PREHASH_SimWideDeletes = LLMessageStringTable::getInstance()->getString("SimWideDeletes"); +char* _PREHASH_LandStatReply = LLMessageStringTable::getInstance()->getString("LandStatReply"); +char* _PREHASH_IsPhantom = LLMessageStringTable::getInstance()->getString("IsPhantom"); +char* _PREHASH_AgentList = LLMessageStringTable::getInstance()->getString("AgentList"); +char* _PREHASH_SimApproved = LLMessageStringTable::getInstance()->getString("SimApproved"); +char* _PREHASH_RezObject = LLMessageStringTable::getInstance()->getString("RezObject"); +char* _PREHASH_TaskLocalID = LLMessageStringTable::getInstance()->getString("TaskLocalID"); +char* _PREHASH_ClaimDate = LLMessageStringTable::getInstance()->getString("ClaimDate"); +char* _PREHASH_MergeParcel = LLMessageStringTable::getInstance()->getString("MergeParcel"); +char* _PREHASH_Priority = LLMessageStringTable::getInstance()->getString("Priority"); +char* _PREHASH_QueryText = LLMessageStringTable::getInstance()->getString("QueryText"); +char* _PREHASH_GroupNoticeAdd = LLMessageStringTable::getInstance()->getString("GroupNoticeAdd"); +char* _PREHASH_ReturnType = LLMessageStringTable::getInstance()->getString("ReturnType"); +char* _PREHASH_FetchFolders = LLMessageStringTable::getInstance()->getString("FetchFolders"); +char* _PREHASH_SimulatorPublicHostBlock = LLMessageStringTable::getInstance()->getString("SimulatorPublicHostBlock"); +char* _PREHASH_HeaderData = LLMessageStringTable::getInstance()->getString("HeaderData"); +char* _PREHASH_RequestMultipleObjects = LLMessageStringTable::getInstance()->getString("RequestMultipleObjects"); +char* _PREHASH_RetrieveInstantMessages = LLMessageStringTable::getInstance()->getString("RetrieveInstantMessages"); +char* _PREHASH_OpenCircuit = LLMessageStringTable::getInstance()->getString("OpenCircuit"); +char* _PREHASH_CrossedRegion = LLMessageStringTable::getInstance()->getString("CrossedRegion"); +char* _PREHASH_DirGroupsReply = LLMessageStringTable::getInstance()->getString("DirGroupsReply"); +char* _PREHASH_AvatarGroupsReply = LLMessageStringTable::getInstance()->getString("AvatarGroupsReply"); +char* _PREHASH_EmailMessageReply = LLMessageStringTable::getInstance()->getString("EmailMessageReply"); +char* _PREHASH_GroupVoteHistoryItemReply = LLMessageStringTable::getInstance()->getString("GroupVoteHistoryItemReply"); +char* _PREHASH_ViewerPosition = LLMessageStringTable::getInstance()->getString("ViewerPosition"); +char* _PREHASH_Position = LLMessageStringTable::getInstance()->getString("Position"); +char* _PREHASH_ParentEstate = LLMessageStringTable::getInstance()->getString("ParentEstate"); +char* _PREHASH_EstateName = LLMessageStringTable::getInstance()->getString("EstateName"); +char* _PREHASH_MuteName = LLMessageStringTable::getInstance()->getString("MuteName"); +char* _PREHASH_ParcelRename = LLMessageStringTable::getInstance()->getString("ParcelRename"); +char* _PREHASH_ViewerFilename = LLMessageStringTable::getInstance()->getString("ViewerFilename"); +char* _PREHASH_UserReportInternal = LLMessageStringTable::getInstance()->getString("UserReportInternal"); +char* _PREHASH_AvatarPropertiesRequest = LLMessageStringTable::getInstance()->getString("AvatarPropertiesRequest"); +char* _PREHASH_ParcelPropertiesRequest = LLMessageStringTable::getInstance()->getString("ParcelPropertiesRequest"); +char* _PREHASH_GroupProfileRequest = LLMessageStringTable::getInstance()->getString("GroupProfileRequest"); +char* _PREHASH_AgentDataUpdateRequest = LLMessageStringTable::getInstance()->getString("AgentDataUpdateRequest"); +char* _PREHASH_PriceObjectScaleFactor = LLMessageStringTable::getInstance()->getString("PriceObjectScaleFactor"); +char* _PREHASH_OpenEnrollment = LLMessageStringTable::getInstance()->getString("OpenEnrollment"); +char* _PREHASH_GroupData = LLMessageStringTable::getInstance()->getString("GroupData"); +char* _PREHASH_RequestGodlikePowers = LLMessageStringTable::getInstance()->getString("RequestGodlikePowers"); +char* _PREHASH_GrantGodlikePowers = LLMessageStringTable::getInstance()->getString("GrantGodlikePowers"); +char* _PREHASH_TransactionID = LLMessageStringTable::getInstance()->getString("TransactionID"); +char* _PREHASH_DestinationID = LLMessageStringTable::getInstance()->getString("DestinationID"); +char* _PREHASH_Controls = LLMessageStringTable::getInstance()->getString("Controls"); +char* _PREHASH_FirstDetachAll = LLMessageStringTable::getInstance()->getString("FirstDetachAll"); +char* _PREHASH_EstateID = LLMessageStringTable::getInstance()->getString("EstateID"); +char* _PREHASH_ImprovedInstantMessage = LLMessageStringTable::getInstance()->getString("ImprovedInstantMessage"); +char* _PREHASH_CheckParcelSales = LLMessageStringTable::getInstance()->getString("CheckParcelSales"); +char* _PREHASH_ParcelSales = LLMessageStringTable::getInstance()->getString("ParcelSales"); +char* _PREHASH_CurrentInterval = LLMessageStringTable::getInstance()->getString("CurrentInterval"); +char* _PREHASH_PriceRentLight = LLMessageStringTable::getInstance()->getString("PriceRentLight"); +char* _PREHASH_MediaAutoScale = LLMessageStringTable::getInstance()->getString("MediaAutoScale"); +char* _PREHASH_NeighborBlock = LLMessageStringTable::getInstance()->getString("NeighborBlock"); +char* _PREHASH_LayerData = LLMessageStringTable::getInstance()->getString("LayerData"); +char* _PREHASH_NVPairData = LLMessageStringTable::getInstance()->getString("NVPairData"); +char* _PREHASH_TeleportLocal = LLMessageStringTable::getInstance()->getString("TeleportLocal"); +char* _PREHASH_EjecteeID = LLMessageStringTable::getInstance()->getString("EjecteeID"); +char* _PREHASH_VoteInitiator = LLMessageStringTable::getInstance()->getString("VoteInitiator"); +char* _PREHASH_TypeData = LLMessageStringTable::getInstance()->getString("TypeData"); +char* _PREHASH_OwnerIDs = LLMessageStringTable::getInstance()->getString("OwnerIDs"); +char* _PREHASH_SystemKickUser = LLMessageStringTable::getInstance()->getString("SystemKickUser"); +char* _PREHASH_TransactionTime = LLMessageStringTable::getInstance()->getString("TransactionTime"); +char* _PREHASH_TimeToLive = LLMessageStringTable::getInstance()->getString("TimeToLive"); +char* _PREHASH_OldAgentID = LLMessageStringTable::getInstance()->getString("OldAgentID"); +char* _PREHASH_MusicURL = LLMessageStringTable::getInstance()->getString("MusicURL"); +char* _PREHASH_ParcelPrimBonus = LLMessageStringTable::getInstance()->getString("ParcelPrimBonus"); +char* _PREHASH_EjectUser = LLMessageStringTable::getInstance()->getString("EjectUser"); +char* _PREHASH_CoarseLocationUpdate = LLMessageStringTable::getInstance()->getString("CoarseLocationUpdate"); +char* _PREHASH_ChildAgentPositionUpdate = LLMessageStringTable::getInstance()->getString("ChildAgentPositionUpdate"); +char* _PREHASH_StoreLocal = LLMessageStringTable::getInstance()->getString("StoreLocal"); +char* _PREHASH_GroupName = LLMessageStringTable::getInstance()->getString("GroupName"); +char* _PREHASH_PriceParcelRent = LLMessageStringTable::getInstance()->getString("PriceParcelRent"); +char* _PREHASH_SimStatus = LLMessageStringTable::getInstance()->getString("SimStatus"); +char* _PREHASH_TransactionSuccess = LLMessageStringTable::getInstance()->getString("TransactionSuccess"); +char* _PREHASH_LureType = LLMessageStringTable::getInstance()->getString("LureType"); +char* _PREHASH_GroupMask = LLMessageStringTable::getInstance()->getString("GroupMask"); +char* _PREHASH_SitObject = LLMessageStringTable::getInstance()->getString("SitObject"); +char* _PREHASH_Override = LLMessageStringTable::getInstance()->getString("Override"); +char* _PREHASH_LocomotionState = LLMessageStringTable::getInstance()->getString("LocomotionState"); +char* _PREHASH_PriceUpload = LLMessageStringTable::getInstance()->getString("PriceUpload"); +char* _PREHASH_RemoveParcel = LLMessageStringTable::getInstance()->getString("RemoveParcel"); +char* _PREHASH_ConfirmAuctionStart = LLMessageStringTable::getInstance()->getString("ConfirmAuctionStart"); +char* _PREHASH_RpcScriptRequestInbound = LLMessageStringTable::getInstance()->getString("RpcScriptRequestInbound"); +char* _PREHASH_ActiveGroupID = LLMessageStringTable::getInstance()->getString("ActiveGroupID"); +char* _PREHASH_ParcelReturnObjects = LLMessageStringTable::getInstance()->getString("ParcelReturnObjects"); +char* _PREHASH_TotalObjects = LLMessageStringTable::getInstance()->getString("TotalObjects"); +char* _PREHASH_ObjectExtraParams = LLMessageStringTable::getInstance()->getString("ObjectExtraParams"); +char* _PREHASH_Questions = LLMessageStringTable::getInstance()->getString("Questions"); +char* _PREHASH_TransferAbort = LLMessageStringTable::getInstance()->getString("TransferAbort"); +char* _PREHASH_TransferInventory = LLMessageStringTable::getInstance()->getString("TransferInventory"); +char* _PREHASH_RayTargetID = LLMessageStringTable::getInstance()->getString("RayTargetID"); +char* _PREHASH_ClaimPrice = LLMessageStringTable::getInstance()->getString("ClaimPrice"); +char* _PREHASH_ObjectProperties = LLMessageStringTable::getInstance()->getString("ObjectProperties"); +char* _PREHASH_ParcelProperties = LLMessageStringTable::getInstance()->getString("ParcelProperties"); +char* _PREHASH_EstateOwnerID = LLMessageStringTable::getInstance()->getString("EstateOwnerID"); +char* _PREHASH_LogoutRequest = LLMessageStringTable::getInstance()->getString("LogoutRequest"); +char* _PREHASH_AssetUploadRequest = LLMessageStringTable::getInstance()->getString("AssetUploadRequest"); +char* _PREHASH_TransactionType = LLMessageStringTable::getInstance()->getString("TransactionType"); +char* _PREHASH_AvatarPropertiesUpdate = LLMessageStringTable::getInstance()->getString("AvatarPropertiesUpdate"); +char* _PREHASH_ParcelPropertiesUpdate = LLMessageStringTable::getInstance()->getString("ParcelPropertiesUpdate"); +char* _PREHASH_FetchItems = LLMessageStringTable::getInstance()->getString("FetchItems"); +char* _PREHASH_AbortXfer = LLMessageStringTable::getInstance()->getString("AbortXfer"); +char* _PREHASH_DeRezAck = LLMessageStringTable::getInstance()->getString("DeRezAck"); +char* _PREHASH_TakeControls = LLMessageStringTable::getInstance()->getString("TakeControls"); +char* _PREHASH_DirLandReply = LLMessageStringTable::getInstance()->getString("DirLandReply"); +char* _PREHASH_MuteType = LLMessageStringTable::getInstance()->getString("MuteType"); +char* _PREHASH_IMViaEMail = LLMessageStringTable::getInstance()->getString("IMViaEMail"); +char* _PREHASH_RentPrice = LLMessageStringTable::getInstance()->getString("RentPrice"); +char* _PREHASH_GenericMessage = LLMessageStringTable::getInstance()->getString("GenericMessage"); +char* _PREHASH_ChildAgentAlive = LLMessageStringTable::getInstance()->getString("ChildAgentAlive"); +char* _PREHASH_AssetType = LLMessageStringTable::getInstance()->getString("AssetType"); +char* _PREHASH_SpawnPointBlock = LLMessageStringTable::getInstance()->getString("SpawnPointBlock"); +char* _PREHASH_AttachmentBlock = LLMessageStringTable::getInstance()->getString("AttachmentBlock"); +char* _PREHASH_ObjectMaterial = LLMessageStringTable::getInstance()->getString("ObjectMaterial"); +char* _PREHASH_OwnerName = LLMessageStringTable::getInstance()->getString("OwnerName"); +char* _PREHASH_AvatarNotesReply = LLMessageStringTable::getInstance()->getString("AvatarNotesReply"); +char* _PREHASH_CacheID = LLMessageStringTable::getInstance()->getString("CacheID"); +char* _PREHASH_OwnerMask = LLMessageStringTable::getInstance()->getString("OwnerMask"); +char* _PREHASH_TransferInventoryAck = LLMessageStringTable::getInstance()->getString("TransferInventoryAck"); +char* _PREHASH_RegionDenyAgeUnverified = LLMessageStringTable::getInstance()->getString("RegionDenyAgeUnverified"); +char* _PREHASH_AgeVerificationBlock = LLMessageStringTable::getInstance()->getString("AgeVerificationBlock"); - -void init_prehash_data() -{ - _PREHASH_X = gMessageStringTable.getString("X"); - _PREHASH_Y = gMessageStringTable.getString("Y"); - _PREHASH_Z = gMessageStringTable.getString("Z"); - _PREHASH_AddFlags = gMessageStringTable.getString("AddFlags"); - _PREHASH_FailureInfo = gMessageStringTable.getString("FailureInfo"); - _PREHASH_MapData = gMessageStringTable.getString("MapData"); - _PREHASH_AddItem = gMessageStringTable.getString("AddItem"); - _PREHASH_MeanCollision = gMessageStringTable.getString("MeanCollision"); - _PREHASH_RezScript = gMessageStringTable.getString("RezScript"); - _PREHASH_AvatarSitResponse = gMessageStringTable.getString("AvatarSitResponse"); - _PREHASH_InventoryAssetResponse = gMessageStringTable.getString("InventoryAssetResponse"); - _PREHASH_KillObject = gMessageStringTable.getString("KillObject"); - _PREHASH_ProposalID = gMessageStringTable.getString("ProposalID"); - _PREHASH_SerialNum = gMessageStringTable.getString("SerialNum"); - _PREHASH_Duration = gMessageStringTable.getString("Duration"); - _PREHASH_ScriptQuestion = gMessageStringTable.getString("ScriptQuestion"); - _PREHASH_AddCircuitCode = gMessageStringTable.getString("AddCircuitCode"); - _PREHASH_UseCircuitCode = gMessageStringTable.getString("UseCircuitCode"); - _PREHASH_ViewerCircuitCode = gMessageStringTable.getString("ViewerCircuitCode"); - _PREHASH_ScriptAnswerYes = gMessageStringTable.getString("ScriptAnswerYes"); - _PREHASH_PartnerID = gMessageStringTable.getString("PartnerID"); - _PREHASH_DirLandQuery = gMessageStringTable.getString("DirLandQuery"); - _PREHASH_TeleportStart = gMessageStringTable.getString("TeleportStart"); - _PREHASH_AboutText = gMessageStringTable.getString("AboutText"); - _PREHASH_VisualParam = gMessageStringTable.getString("VisualParam"); - _PREHASH_GroupPrims = gMessageStringTable.getString("GroupPrims"); - _PREHASH_SelectedPrims = gMessageStringTable.getString("SelectedPrims"); - _PREHASH_ID = gMessageStringTable.getString("ID"); - _PREHASH_UUIDNameRequest = gMessageStringTable.getString("UUIDNameRequest"); - _PREHASH_UUIDGroupNameRequest = gMessageStringTable.getString("UUIDGroupNameRequest"); - _PREHASH_GroupAccountTransactionsRequest = gMessageStringTable.getString("GroupAccountTransactionsRequest"); - _PREHASH_MapNameRequest = gMessageStringTable.getString("MapNameRequest"); - _PREHASH_UpdateSimulator = gMessageStringTable.getString("UpdateSimulator"); - _PREHASH_BillableFactor = gMessageStringTable.getString("BillableFactor"); - _PREHASH_ObjectBonusFactor = gMessageStringTable.getString("ObjectBonusFactor"); - _PREHASH_EnableSimulator = gMessageStringTable.getString("EnableSimulator"); - _PREHASH_DisableSimulator = gMessageStringTable.getString("DisableSimulator"); - _PREHASH_ConfirmEnableSimulator = gMessageStringTable.getString("ConfirmEnableSimulator"); - _PREHASH_LayerType = gMessageStringTable.getString("LayerType"); - _PREHASH_OwnerRole = gMessageStringTable.getString("OwnerRole"); - _PREHASH_ParcelOverlay = gMessageStringTable.getString("ParcelOverlay"); - _PREHASH_GroupOwned = gMessageStringTable.getString("GroupOwned"); - _PREHASH_IP = gMessageStringTable.getString("IP"); - _PREHASH_ChatFromViewer = gMessageStringTable.getString("ChatFromViewer"); - _PREHASH_AvgAgentsInView = gMessageStringTable.getString("AvgAgentsInView"); - _PREHASH_AgentsInView = gMessageStringTable.getString("AgentsInView"); - _PREHASH_GroupTitle = gMessageStringTable.getString("GroupTitle"); - _PREHASH_MapLayerReply = gMessageStringTable.getString("MapLayerReply"); - _PREHASH_CompoundMsgID = gMessageStringTable.getString("CompoundMsgID"); - _PREHASH_CameraConstraint = gMessageStringTable.getString("CameraConstraint"); - _PREHASH_DownloadTotals = gMessageStringTable.getString("DownloadTotals"); - _PREHASH_GenCounter = gMessageStringTable.getString("GenCounter"); - _PREHASH_FrozenData = gMessageStringTable.getString("FrozenData"); - _PREHASH_ChildAgentDying = gMessageStringTable.getString("ChildAgentDying"); - _PREHASH_To = gMessageStringTable.getString("To"); - _PREHASH_CopyInventoryFromNotecard = gMessageStringTable.getString("CopyInventoryFromNotecard"); - _PREHASH_RezObjectFromNotecard = gMessageStringTable.getString("RezObjectFromNotecard"); - _PREHASH_ParcelDirFeeCurrent = gMessageStringTable.getString("ParcelDirFeeCurrent"); - _PREHASH_SeedCapability = gMessageStringTable.getString("SeedCapability"); - _PREHASH_ObjectDuplicate = gMessageStringTable.getString("ObjectDuplicate"); - _PREHASH_InventoryData = gMessageStringTable.getString("InventoryData"); - _PREHASH_ReplyData = gMessageStringTable.getString("ReplyData"); - _PREHASH_ResetList = gMessageStringTable.getString("ResetList"); - _PREHASH_MediaID = gMessageStringTable.getString("MediaID"); - _PREHASH_RelatedRights = gMessageStringTable.getString("RelatedRights"); - _PREHASH_RedirectGridX = gMessageStringTable.getString("RedirectGridX"); - _PREHASH_RedirectGridY = gMessageStringTable.getString("RedirectGridY"); - _PREHASH_TransferID = gMessageStringTable.getString("TransferID"); - _PREHASH_TexturesChanged = gMessageStringTable.getString("TexturesChanged"); - _PREHASH_UserLookAt = gMessageStringTable.getString("UserLookAt"); - _PREHASH_TestBlock1 = gMessageStringTable.getString("TestBlock1"); - _PREHASH_SensedData = gMessageStringTable.getString("SensedData"); - _PREHASH_UpdateBlock = gMessageStringTable.getString("UpdateBlock"); - _PREHASH_ClassifiedGodDelete = gMessageStringTable.getString("ClassifiedGodDelete"); - _PREHASH_ObjectGrabUpdate = gMessageStringTable.getString("ObjectGrabUpdate"); - _PREHASH_LocationPos = gMessageStringTable.getString("LocationPos"); - _PREHASH_TaxDate = gMessageStringTable.getString("TaxDate"); - _PREHASH_StartDateTime = gMessageStringTable.getString("StartDateTime"); - _PREHASH_ObjectUpdateCached = gMessageStringTable.getString("ObjectUpdateCached"); - _PREHASH_Packets = gMessageStringTable.getString("Packets"); - _PREHASH_FailureType = gMessageStringTable.getString("FailureType"); - _PREHASH_UpdateGroupInfo = gMessageStringTable.getString("UpdateGroupInfo"); - _PREHASH_ObjectPermissions = gMessageStringTable.getString("ObjectPermissions"); - _PREHASH_RevokePermissions = gMessageStringTable.getString("RevokePermissions"); - _PREHASH_UpdateFlags = gMessageStringTable.getString("UpdateFlags"); - _PREHASH_ObjectExportSelected = gMessageStringTable.getString("ObjectExportSelected"); - _PREHASH_RezSelected = gMessageStringTable.getString("RezSelected"); - _PREHASH_AutoPilot = gMessageStringTable.getString("AutoPilot"); - _PREHASH_UpdateMuteListEntry = gMessageStringTable.getString("UpdateMuteListEntry"); - _PREHASH_RemoveMuteListEntry = gMessageStringTable.getString("RemoveMuteListEntry"); - _PREHASH_SetSimStatusInDatabase = gMessageStringTable.getString("SetSimStatusInDatabase"); - _PREHASH_SetSimPresenceInDatabase = gMessageStringTable.getString("SetSimPresenceInDatabase"); - _PREHASH_CameraProperty = gMessageStringTable.getString("CameraProperty"); - _PREHASH_BrushSize = gMessageStringTable.getString("BrushSize"); - _PREHASH_SimulatorSetMap = gMessageStringTable.getString("SimulatorSetMap"); - _PREHASH_RegionPresenceRequestByRegionID = gMessageStringTable.getString("RegionPresenceRequestByRegionID"); - _PREHASH_ParcelObjectOwnersReply = gMessageStringTable.getString("ParcelObjectOwnersReply"); - _PREHASH_GroupMembersReply = gMessageStringTable.getString("GroupMembersReply"); - _PREHASH_GroupRoleMembersReply = gMessageStringTable.getString("GroupRoleMembersReply"); - _PREHASH_RequestRegionInfo = gMessageStringTable.getString("RequestRegionInfo"); - _PREHASH_AABBMax = gMessageStringTable.getString("AABBMax"); - _PREHASH_RequestPayPrice = gMessageStringTable.getString("RequestPayPrice"); - _PREHASH_SimulatorPresentAtLocation = gMessageStringTable.getString("SimulatorPresentAtLocation"); - _PREHASH_AgentRequestSit = gMessageStringTable.getString("AgentRequestSit"); - _PREHASH_AABBMin = gMessageStringTable.getString("AABBMin"); - _PREHASH_ClassifiedFlags = gMessageStringTable.getString("ClassifiedFlags"); - _PREHASH_ControlFlags = gMessageStringTable.getString("ControlFlags"); - _PREHASH_TeleportRequest = gMessageStringTable.getString("TeleportRequest"); - _PREHASH_ScriptTeleportRequest = gMessageStringTable.getString("ScriptTeleportRequest"); - _PREHASH_EstateCovenantRequest = gMessageStringTable.getString("EstateCovenantRequest"); - _PREHASH_DateUTC = gMessageStringTable.getString("DateUTC"); - _PREHASH_TaskIDs = gMessageStringTable.getString("TaskIDs"); - _PREHASH_RequestResult = gMessageStringTable.getString("RequestResult"); - _PREHASH_CanAcceptAgents = gMessageStringTable.getString("CanAcceptAgents"); - _PREHASH_ObjectSaleInfo = gMessageStringTable.getString("ObjectSaleInfo"); - _PREHASH_KillChildAgents = gMessageStringTable.getString("KillChildAgents"); - _PREHASH_Balance = gMessageStringTable.getString("Balance"); - _PREHASH_DerezContainer = gMessageStringTable.getString("DerezContainer"); - _PREHASH_ObjectData = gMessageStringTable.getString("ObjectData"); - _PREHASH_CameraAtAxis = gMessageStringTable.getString("CameraAtAxis"); - _PREHASH_InfoBlock = gMessageStringTable.getString("InfoBlock"); - _PREHASH_OwnershipCost = gMessageStringTable.getString("OwnershipCost"); - _PREHASH_AvatarNotesUpdate = gMessageStringTable.getString("AvatarNotesUpdate"); - _PREHASH_PID = gMessageStringTable.getString("PID"); - _PREHASH_DirPopularReply = gMessageStringTable.getString("DirPopularReply"); - _PREHASH_TerrainHeightRange00 = gMessageStringTable.getString("TerrainHeightRange00"); - _PREHASH_SimData = gMessageStringTable.getString("SimData"); - _PREHASH_TerrainHeightRange01 = gMessageStringTable.getString("TerrainHeightRange01"); - _PREHASH_TerrainHeightRange10 = gMessageStringTable.getString("TerrainHeightRange10"); - _PREHASH_TerrainHeightRange11 = gMessageStringTable.getString("TerrainHeightRange11"); - _PREHASH_UpdateInventoryItem = gMessageStringTable.getString("UpdateInventoryItem"); - _PREHASH_UpdateCreateInventoryItem = gMessageStringTable.getString("UpdateCreateInventoryItem"); - _PREHASH_MoveInventoryItem = gMessageStringTable.getString("MoveInventoryItem"); - _PREHASH_CopyInventoryItem = gMessageStringTable.getString("CopyInventoryItem"); - _PREHASH_RemoveInventoryItem = gMessageStringTable.getString("RemoveInventoryItem"); - _PREHASH_CreateInventoryItem = gMessageStringTable.getString("CreateInventoryItem"); - _PREHASH_PathTwistBegin = gMessageStringTable.getString("PathTwistBegin"); - _PREHASH_CRC = gMessageStringTable.getString("CRC"); - _PREHASH_AttachmentPoint = gMessageStringTable.getString("AttachmentPoint"); - _PREHASH_TelehubBlock = gMessageStringTable.getString("TelehubBlock"); - _PREHASH_FOVBlock = gMessageStringTable.getString("FOVBlock"); - _PREHASH_StartLocationData = gMessageStringTable.getString("StartLocationData"); - _PREHASH_PositionData = gMessageStringTable.getString("PositionData"); - _PREHASH_TimeSinceLast = gMessageStringTable.getString("TimeSinceLast"); - _PREHASH_MapImage = gMessageStringTable.getString("MapImage"); - _PREHASH_Objects = gMessageStringTable.getString("Objects"); - _PREHASH_URL = gMessageStringTable.getString("URL"); - _PREHASH_CreationDate = gMessageStringTable.getString("CreationDate"); - _PREHASH_JointPivot = gMessageStringTable.getString("JointPivot"); - _PREHASH_FPS = gMessageStringTable.getString("FPS"); - _PREHASH_HasTelehub = gMessageStringTable.getString("HasTelehub"); - _PREHASH_PathEnd = gMessageStringTable.getString("PathEnd"); - _PREHASH_ScriptDataReply = gMessageStringTable.getString("ScriptDataReply"); - _PREHASH_MapBlockReply = gMessageStringTable.getString("MapBlockReply"); - _PREHASH_PropertiesData = gMessageStringTable.getString("PropertiesData"); - _PREHASH_ViewerEffect = gMessageStringTable.getString("ViewerEffect"); - _PREHASH_FreezeUser = gMessageStringTable.getString("FreezeUser"); - _PREHASH_OwnerPrims = gMessageStringTable.getString("OwnerPrims"); - _PREHASH_ObjectGrab = gMessageStringTable.getString("ObjectGrab"); - _PREHASH_ToAgentID = gMessageStringTable.getString("ToAgentID"); - _PREHASH_SimulatorMapUpdate = gMessageStringTable.getString("SimulatorMapUpdate"); - _PREHASH_TransferPacket = gMessageStringTable.getString("TransferPacket"); - _PREHASH_ObjectName = gMessageStringTable.getString("ObjectName"); - _PREHASH_GroupPowers = gMessageStringTable.getString("GroupPowers"); - _PREHASH_OriginalName = gMessageStringTable.getString("OriginalName"); - _PREHASH_CompletePingCheck = gMessageStringTable.getString("CompletePingCheck"); - _PREHASH_OnlineStatus = gMessageStringTable.getString("OnlineStatus"); - _PREHASH_ObjectDrop = gMessageStringTable.getString("ObjectDrop"); - _PREHASH_UseBigPackets = gMessageStringTable.getString("UseBigPackets"); - _PREHASH_GroupNoticesListReply = gMessageStringTable.getString("GroupNoticesListReply"); - _PREHASH_ParcelAccessListReply = gMessageStringTable.getString("ParcelAccessListReply"); - _PREHASH_RpcChannelReply = gMessageStringTable.getString("RpcChannelReply"); - _PREHASH_RegionPresenceResponse = gMessageStringTable.getString("RegionPresenceResponse"); - _PREHASH_CharterMember = gMessageStringTable.getString("CharterMember"); - _PREHASH_EdgeData = gMessageStringTable.getString("EdgeData"); - _PREHASH_NameData = gMessageStringTable.getString("NameData"); - _PREHASH_RegionPushOverride = gMessageStringTable.getString("RegionPushOverride"); - _PREHASH_SimName = gMessageStringTable.getString("SimName"); - _PREHASH_UserReport = gMessageStringTable.getString("UserReport"); - _PREHASH_DownloadPriority = gMessageStringTable.getString("DownloadPriority"); - _PREHASH_ToAgentId = gMessageStringTable.getString("ToAgentId"); - _PREHASH_DirPopularQuery = gMessageStringTable.getString("DirPopularQuery"); - _PREHASH_Mag = gMessageStringTable.getString("Mag"); - _PREHASH_ParcelPropertiesRequestByID = gMessageStringTable.getString("ParcelPropertiesRequestByID"); - _PREHASH_ObjectLink = gMessageStringTable.getString("ObjectLink"); - _PREHASH_RpcScriptReplyInbound = gMessageStringTable.getString("RpcScriptReplyInbound"); - _PREHASH_RezData = gMessageStringTable.getString("RezData"); - _PREHASH_RemoveInventoryObjects = gMessageStringTable.getString("RemoveInventoryObjects"); - _PREHASH_GroupProposalBallot = gMessageStringTable.getString("GroupProposalBallot"); - _PREHASH_RPCServerIP = gMessageStringTable.getString("RPCServerIP"); - _PREHASH_Far = gMessageStringTable.getString("Far"); - _PREHASH_GodSessionID = gMessageStringTable.getString("GodSessionID"); - _PREHASH_FLAboutText = gMessageStringTable.getString("FLAboutText"); - _PREHASH_RegionHandshakeReply = gMessageStringTable.getString("RegionHandshakeReply"); - _PREHASH_GroupActiveProposalItemReply = gMessageStringTable.getString("GroupActiveProposalItemReply"); - _PREHASH_MapItemReply = gMessageStringTable.getString("MapItemReply"); - _PREHASH_Seconds = gMessageStringTable.getString("Seconds"); - _PREHASH_UpdateUserInfo = gMessageStringTable.getString("UpdateUserInfo"); - _PREHASH_AggregatePermTexturesOwner = gMessageStringTable.getString("AggregatePermTexturesOwner"); - _PREHASH_Set = gMessageStringTable.getString("Set"); - _PREHASH_NewName = gMessageStringTable.getString("NewName"); - _PREHASH_Key = gMessageStringTable.getString("Key"); - _PREHASH_AgentID = gMessageStringTable.getString("AgentID"); - _PREHASH_EventNotificationRemoveRequest = gMessageStringTable.getString("EventNotificationRemoveRequest"); - _PREHASH_NewFolderID = gMessageStringTable.getString("NewFolderID"); - _PREHASH_Arc = gMessageStringTable.getString("Arc"); - _PREHASH_RegionX = gMessageStringTable.getString("RegionX"); - _PREHASH_RegionY = gMessageStringTable.getString("RegionY"); - _PREHASH_RequestData = gMessageStringTable.getString("RequestData"); - _PREHASH_Msg = gMessageStringTable.getString("Msg"); - _PREHASH_Top = gMessageStringTable.getString("Top"); - _PREHASH_MiscStats = gMessageStringTable.getString("MiscStats"); - _PREHASH_ImageID = gMessageStringTable.getString("ImageID"); - _PREHASH_DataPacket = gMessageStringTable.getString("DataPacket"); - _PREHASH_You = gMessageStringTable.getString("You"); - _PREHASH_ScriptControlChange = gMessageStringTable.getString("ScriptControlChange"); - _PREHASH_LoadURL = gMessageStringTable.getString("LoadURL"); - _PREHASH_SetCPURatio = gMessageStringTable.getString("SetCPURatio"); - _PREHASH_NameValueData = gMessageStringTable.getString("NameValueData"); - _PREHASH_AtomicPassObject = gMessageStringTable.getString("AtomicPassObject"); - _PREHASH_ErrorMessage = gMessageStringTable.getString("ErrorMessage"); - _PREHASH_ViewerFrozenMessage = gMessageStringTable.getString("ViewerFrozenMessage"); - _PREHASH_HealthMessage = gMessageStringTable.getString("HealthMessage"); - _PREHASH_LogTextMessage = gMessageStringTable.getString("LogTextMessage"); - _PREHASH_TimeDilation = gMessageStringTable.getString("TimeDilation"); - _PREHASH_RemoveContribution = gMessageStringTable.getString("RemoveContribution"); - _PREHASH_Contribution = gMessageStringTable.getString("Contribution"); - _PREHASH_SetGroupContribution = gMessageStringTable.getString("SetGroupContribution"); - _PREHASH_Offline = gMessageStringTable.getString("Offline"); - _PREHASH_AgentIsNowWearing = gMessageStringTable.getString("AgentIsNowWearing"); - _PREHASH_Members = gMessageStringTable.getString("Members"); - _PREHASH_FailedResends = gMessageStringTable.getString("FailedResends"); - _PREHASH_SecPerDay = gMessageStringTable.getString("SecPerDay"); - _PREHASH_CameraCenter = gMessageStringTable.getString("CameraCenter"); - _PREHASH_CameraLeftAxis = gMessageStringTable.getString("CameraLeftAxis"); - _PREHASH_ExBlock = gMessageStringTable.getString("ExBlock"); - _PREHASH_Channel = gMessageStringTable.getString("Channel"); - _PREHASH_NetTest = gMessageStringTable.getString("NetTest"); - _PREHASH_DiscardLevel = gMessageStringTable.getString("DiscardLevel"); - _PREHASH_LayerID = gMessageStringTable.getString("LayerID"); - _PREHASH_GrabOffset = gMessageStringTable.getString("GrabOffset"); - _PREHASH_SimPort = gMessageStringTable.getString("SimPort"); - _PREHASH_PricePerMeter = gMessageStringTable.getString("PricePerMeter"); - _PREHASH_RegionFlags = gMessageStringTable.getString("RegionFlags"); - _PREHASH_VoteResult = gMessageStringTable.getString("VoteResult"); - _PREHASH_ParcelDirFeeEstimate = gMessageStringTable.getString("ParcelDirFeeEstimate"); - _PREHASH_ModifyBlock = gMessageStringTable.getString("ModifyBlock"); - _PREHASH_InventoryBlock = gMessageStringTable.getString("InventoryBlock"); - _PREHASH_ReplyBlock = gMessageStringTable.getString("ReplyBlock"); - _PREHASH_ValidUntil = gMessageStringTable.getString("ValidUntil"); - _PREHASH_VelocityInterpolateOn = gMessageStringTable.getString("VelocityInterpolateOn"); - _PREHASH_ClassifiedDelete = gMessageStringTable.getString("ClassifiedDelete"); - _PREHASH_RegionDenyAnonymous = gMessageStringTable.getString("RegionDenyAnonymous"); - _PREHASH_FLImageID = gMessageStringTable.getString("FLImageID"); - _PREHASH_AllowPublish = gMessageStringTable.getString("AllowPublish"); - _PREHASH_SitName = gMessageStringTable.getString("SitName"); - _PREHASH_RegionsVisited = gMessageStringTable.getString("RegionsVisited"); - _PREHASH_DirClassifiedReply = gMessageStringTable.getString("DirClassifiedReply"); - _PREHASH_AvatarClassifiedReply = gMessageStringTable.getString("AvatarClassifiedReply"); - _PREHASH_MediaURL = gMessageStringTable.getString("MediaURL"); - _PREHASH_CompleteAgentMovement = gMessageStringTable.getString("CompleteAgentMovement"); - _PREHASH_ClassifiedID = gMessageStringTable.getString("ClassifiedID"); - _PREHASH_LocalID = gMessageStringTable.getString("LocalID"); - _PREHASH_SpaceIP = gMessageStringTable.getString("SpaceIP"); - _PREHASH_RemoveItem = gMessageStringTable.getString("RemoveItem"); - _PREHASH_LogFailedMoneyTransaction = gMessageStringTable.getString("LogFailedMoneyTransaction"); - _PREHASH_ViewerStartAuction = gMessageStringTable.getString("ViewerStartAuction"); - _PREHASH_StartAuction = gMessageStringTable.getString("StartAuction"); - _PREHASH_DuplicateFlags = gMessageStringTable.getString("DuplicateFlags"); - _PREHASH_RegionInfo2 = gMessageStringTable.getString("RegionInfo2"); - _PREHASH_TextColor = gMessageStringTable.getString("TextColor"); - _PREHASH_SlaveID = gMessageStringTable.getString("SlaveID"); - _PREHASH_Charter = gMessageStringTable.getString("Charter"); - _PREHASH_AlertData = gMessageStringTable.getString("AlertData"); - _PREHASH_TargetBlock = gMessageStringTable.getString("TargetBlock"); - _PREHASH_CheckParcelAuctions = gMessageStringTable.getString("CheckParcelAuctions"); - _PREHASH_ParcelAuctions = gMessageStringTable.getString("ParcelAuctions"); - _PREHASH_OwnerIsGroup = gMessageStringTable.getString("OwnerIsGroup"); - _PREHASH_NameValuePair = gMessageStringTable.getString("NameValuePair"); - _PREHASH_RemoveNameValuePair = gMessageStringTable.getString("RemoveNameValuePair"); - _PREHASH_BulkUpdateInventory = gMessageStringTable.getString("BulkUpdateInventory"); - _PREHASH_UpdateTaskInventory = gMessageStringTable.getString("UpdateTaskInventory"); - _PREHASH_RemoveTaskInventory = gMessageStringTable.getString("RemoveTaskInventory"); - _PREHASH_MoveTaskInventory = gMessageStringTable.getString("MoveTaskInventory"); - _PREHASH_RequestTaskInventory = gMessageStringTable.getString("RequestTaskInventory"); - _PREHASH_ReplyTaskInventory = gMessageStringTable.getString("ReplyTaskInventory"); - _PREHASH_AggregatePermInventory = gMessageStringTable.getString("AggregatePermInventory"); - _PREHASH_GroupAccountTransactionsReply = gMessageStringTable.getString("GroupAccountTransactionsReply"); - _PREHASH_SimulatorInfo = gMessageStringTable.getString("SimulatorInfo"); - _PREHASH_WearableData = gMessageStringTable.getString("WearableData"); - _PREHASH_Enabled = gMessageStringTable.getString("Enabled"); - _PREHASH_Savings = gMessageStringTable.getString("Savings"); - _PREHASH_SimulatorLoad = gMessageStringTable.getString("SimulatorLoad"); - _PREHASH_InternalRegionIP = gMessageStringTable.getString("InternalRegionIP"); - _PREHASH_ExternalRegionIP = gMessageStringTable.getString("ExternalRegionIP"); - _PREHASH_TotalPairs = gMessageStringTable.getString("TotalPairs"); - _PREHASH_CreateGroupRequest = gMessageStringTable.getString("CreateGroupRequest"); - _PREHASH_JoinGroupRequest = gMessageStringTable.getString("JoinGroupRequest"); - _PREHASH_LeaveGroupRequest = gMessageStringTable.getString("LeaveGroupRequest"); - _PREHASH_InviteGroupRequest = gMessageStringTable.getString("InviteGroupRequest"); - _PREHASH_LiveHelpGroupRequest = gMessageStringTable.getString("LiveHelpGroupRequest"); - _PREHASH_PriceParcelClaimFactor = gMessageStringTable.getString("PriceParcelClaimFactor"); - _PREHASH_BillableArea = gMessageStringTable.getString("BillableArea"); - _PREHASH_ObjectID = gMessageStringTable.getString("ObjectID"); - _PREHASH_ObjectFlagUpdate = gMessageStringTable.getString("ObjectFlagUpdate"); - _PREHASH_GroupRoleUpdate = gMessageStringTable.getString("GroupRoleUpdate"); - _PREHASH_RequestInventoryAsset = gMessageStringTable.getString("RequestInventoryAsset"); - _PREHASH_ChangedGrid = gMessageStringTable.getString("ChangedGrid"); - _PREHASH_AgentDropGroup = gMessageStringTable.getString("AgentDropGroup"); - _PREHASH_Details = gMessageStringTable.getString("Details"); - _PREHASH_LocationX = gMessageStringTable.getString("LocationX"); - _PREHASH_SaleType = gMessageStringTable.getString("SaleType"); - _PREHASH_LocationY = gMessageStringTable.getString("LocationY"); - _PREHASH_LocationZ = gMessageStringTable.getString("LocationZ"); - _PREHASH_EconomyData = gMessageStringTable.getString("EconomyData"); - _PREHASH_HeadRotation = gMessageStringTable.getString("HeadRotation"); - _PREHASH_DeleteOnCompletion = gMessageStringTable.getString("DeleteOnCompletion"); - _PREHASH_PublicPort = gMessageStringTable.getString("PublicPort"); - _PREHASH_DirClassifiedQuery = gMessageStringTable.getString("DirClassifiedQuery"); - _PREHASH_CallbackID = gMessageStringTable.getString("CallbackID"); - _PREHASH_RequestParcelTransfer = gMessageStringTable.getString("RequestParcelTransfer"); - _PREHASH_RoleCount = gMessageStringTable.getString("RoleCount"); - _PREHASH_ObjectCapacity = gMessageStringTable.getString("ObjectCapacity"); - _PREHASH_RequestID = gMessageStringTable.getString("RequestID"); - _PREHASH_RequestXfer = gMessageStringTable.getString("RequestXfer"); - _PREHASH_ObjectTaxCurrent = gMessageStringTable.getString("ObjectTaxCurrent"); - _PREHASH_LightTaxCurrent = gMessageStringTable.getString("LightTaxCurrent"); - _PREHASH_LandTaxCurrent = gMessageStringTable.getString("LandTaxCurrent"); - _PREHASH_GroupTaxCurrent = gMessageStringTable.getString("GroupTaxCurrent"); - _PREHASH_FetchInventoryDescendents = gMessageStringTable.getString("FetchInventoryDescendents"); - _PREHASH_InventoryDescendents = gMessageStringTable.getString("InventoryDescendents"); - _PREHASH_Descendents = gMessageStringTable.getString("Descendents"); - _PREHASH_PurgeInventoryDescendents = gMessageStringTable.getString("PurgeInventoryDescendents"); - _PREHASH_ShowDir = gMessageStringTable.getString("ShowDir"); - _PREHASH_IsOwner = gMessageStringTable.getString("IsOwner"); - _PREHASH_Timestamp = gMessageStringTable.getString("Timestamp"); - _PREHASH_GlobalPos = gMessageStringTable.getString("GlobalPos"); - _PREHASH_GrabOffsetInitial = gMessageStringTable.getString("GrabOffsetInitial"); - _PREHASH_IsTrial = gMessageStringTable.getString("IsTrial"); - _PREHASH_ObjectDuplicateOnRay = gMessageStringTable.getString("ObjectDuplicateOnRay"); - _PREHASH_GroupMembershipCount = gMessageStringTable.getString("GroupMembershipCount"); - _PREHASH_MethodData = gMessageStringTable.getString("MethodData"); - _PREHASH_ActivateGestures = gMessageStringTable.getString("ActivateGestures"); - _PREHASH_DeactivateGestures = gMessageStringTable.getString("DeactivateGestures"); - _PREHASH_ProposalData = gMessageStringTable.getString("ProposalData"); - _PREHASH_PosGlobal = gMessageStringTable.getString("PosGlobal"); - _PREHASH_SearchID = gMessageStringTable.getString("SearchID"); - _PREHASH_RezMultipleAttachmentsFromInv = gMessageStringTable.getString("RezMultipleAttachmentsFromInv"); - _PREHASH_SearchName = gMessageStringTable.getString("SearchName"); - _PREHASH_VersionString = gMessageStringTable.getString("VersionString"); - _PREHASH_CreateGroupReply = gMessageStringTable.getString("CreateGroupReply"); - _PREHASH_LeaveGroupReply = gMessageStringTable.getString("LeaveGroupReply"); - _PREHASH_ActualArea = gMessageStringTable.getString("ActualArea"); - _PREHASH_Message = gMessageStringTable.getString("Message"); - _PREHASH_ClickAction = gMessageStringTable.getString("ClickAction"); - _PREHASH_AssetUploadComplete = gMessageStringTable.getString("AssetUploadComplete"); - _PREHASH_RequestType = gMessageStringTable.getString("RequestType"); - _PREHASH_UUID = gMessageStringTable.getString("UUID"); - _PREHASH_BaseMask = gMessageStringTable.getString("BaseMask"); - _PREHASH_NetBlock = gMessageStringTable.getString("NetBlock"); - _PREHASH_GlobalX = gMessageStringTable.getString("GlobalX"); - _PREHASH_GlobalY = gMessageStringTable.getString("GlobalY"); - _PREHASH_CopyRotates = gMessageStringTable.getString("CopyRotates"); - _PREHASH_KickUserAck = gMessageStringTable.getString("KickUserAck"); - _PREHASH_TopPick = gMessageStringTable.getString("TopPick"); - _PREHASH_SessionID = gMessageStringTable.getString("SessionID"); - _PREHASH_GlobalZ = gMessageStringTable.getString("GlobalZ"); - _PREHASH_DeclineFriendship = gMessageStringTable.getString("DeclineFriendship"); - _PREHASH_FormFriendship = gMessageStringTable.getString("FormFriendship"); - _PREHASH_TerminateFriendship = gMessageStringTable.getString("TerminateFriendship"); - _PREHASH_TaskData = gMessageStringTable.getString("TaskData"); - _PREHASH_SimWideMaxPrims = gMessageStringTable.getString("SimWideMaxPrims"); - _PREHASH_TotalPrims = gMessageStringTable.getString("TotalPrims"); - _PREHASH_ProfileBegin = gMessageStringTable.getString("ProfileBegin"); - _PREHASH_Request = gMessageStringTable.getString("Request"); - _PREHASH_GroupAccountDetailsRequest = gMessageStringTable.getString("GroupAccountDetailsRequest"); - _PREHASH_GroupActiveProposalsRequest = gMessageStringTable.getString("GroupActiveProposalsRequest"); - _PREHASH_StringValue = gMessageStringTable.getString("StringValue"); - _PREHASH_Version = gMessageStringTable.getString("Version"); - _PREHASH_OtherCount = gMessageStringTable.getString("OtherCount"); - _PREHASH_MemberCount = gMessageStringTable.getString("MemberCount"); - _PREHASH_ChatData = gMessageStringTable.getString("ChatData"); - _PREHASH_IsGroupOwned = gMessageStringTable.getString("IsGroupOwned"); - _PREHASH_EnergyEfficiency = gMessageStringTable.getString("EnergyEfficiency"); - _PREHASH_PickInfoUpdate = gMessageStringTable.getString("PickInfoUpdate"); - _PREHASH_PickDelete = gMessageStringTable.getString("PickDelete"); - _PREHASH_ScriptReset = gMessageStringTable.getString("ScriptReset"); - _PREHASH_Requester = gMessageStringTable.getString("Requester"); - _PREHASH_ForSale = gMessageStringTable.getString("ForSale"); - _PREHASH_NearestLandingRegionReply = gMessageStringTable.getString("NearestLandingRegionReply"); - _PREHASH_ParcelID = gMessageStringTable.getString("ParcelID"); - _PREHASH_Godlike = gMessageStringTable.getString("Godlike"); - _PREHASH_TotalDebits = gMessageStringTable.getString("TotalDebits"); - _PREHASH_Direction = gMessageStringTable.getString("Direction"); - _PREHASH_HealthData = gMessageStringTable.getString("HealthData"); - _PREHASH_LeftAxis = gMessageStringTable.getString("LeftAxis"); - _PREHASH_LocationBlock = gMessageStringTable.getString("LocationBlock"); - _PREHASH_ObjectImage = gMessageStringTable.getString("ObjectImage"); - _PREHASH_TerrainStartHeight00 = gMessageStringTable.getString("TerrainStartHeight00"); - _PREHASH_TerrainStartHeight01 = gMessageStringTable.getString("TerrainStartHeight01"); - _PREHASH_TerrainStartHeight10 = gMessageStringTable.getString("TerrainStartHeight10"); - _PREHASH_TerrainStartHeight11 = gMessageStringTable.getString("TerrainStartHeight11"); - _PREHASH_WaterHeight = gMessageStringTable.getString("WaterHeight"); - _PREHASH_FetchInventoryReply = gMessageStringTable.getString("FetchInventoryReply"); - _PREHASH_GroupAccountSummaryReply = gMessageStringTable.getString("GroupAccountSummaryReply"); - _PREHASH_AttachedSound = gMessageStringTable.getString("AttachedSound"); - _PREHASH_ParamInUse = gMessageStringTable.getString("ParamInUse"); - _PREHASH_GodKickUser = gMessageStringTable.getString("GodKickUser"); - _PREHASH_PickName = gMessageStringTable.getString("PickName"); - _PREHASH_TaskName = gMessageStringTable.getString("TaskName"); - _PREHASH_ObjectCount = gMessageStringTable.getString("ObjectCount"); - _PREHASH_RegionPresenceRequestByHandle = gMessageStringTable.getString("RegionPresenceRequestByHandle"); - _PREHASH_RezSingleAttachmentFromInv = gMessageStringTable.getString("RezSingleAttachmentFromInv"); - _PREHASH_ChildAgentUpdate = gMessageStringTable.getString("ChildAgentUpdate"); - _PREHASH_IsOwnerGroup = gMessageStringTable.getString("IsOwnerGroup"); - _PREHASH_AgentHeightWidth = gMessageStringTable.getString("AgentHeightWidth"); - _PREHASH_VerticalAngle = gMessageStringTable.getString("VerticalAngle"); - _PREHASH_WearableType = gMessageStringTable.getString("WearableType"); - _PREHASH_AggregatePermNextOwner = gMessageStringTable.getString("AggregatePermNextOwner"); - _PREHASH_ShowInList = gMessageStringTable.getString("ShowInList"); - _PREHASH_UpdateParcel = gMessageStringTable.getString("UpdateParcel"); - _PREHASH_SetAlwaysRun = gMessageStringTable.getString("SetAlwaysRun"); - _PREHASH_NVPair = gMessageStringTable.getString("NVPair"); - _PREHASH_SearchType = gMessageStringTable.getString("SearchType"); - _PREHASH_ObjectSpinStart = gMessageStringTable.getString("ObjectSpinStart"); - _PREHASH_UseEstateSun = gMessageStringTable.getString("UseEstateSun"); - _PREHASH_RegionID = gMessageStringTable.getString("RegionID"); - _PREHASH_AbuseRegionID = gMessageStringTable.getString("AbuseRegionID"); - _PREHASH_Creator = gMessageStringTable.getString("Creator"); - _PREHASH_ProposalText = gMessageStringTable.getString("ProposalText"); - _PREHASH_DirEventsReply = gMessageStringTable.getString("DirEventsReply"); - _PREHASH_EventInfoReply = gMessageStringTable.getString("EventInfoReply"); - _PREHASH_UserInfoReply = gMessageStringTable.getString("UserInfoReply"); - _PREHASH_PathRadiusOffset = gMessageStringTable.getString("PathRadiusOffset"); - _PREHASH_TextureData = gMessageStringTable.getString("TextureData"); - _PREHASH_ChatPass = gMessageStringTable.getString("ChatPass"); - _PREHASH_TargetID = gMessageStringTable.getString("TargetID"); - _PREHASH_DefaultPayPrice = gMessageStringTable.getString("DefaultPayPrice"); - _PREHASH_UserLocation = gMessageStringTable.getString("UserLocation"); - _PREHASH_MaxPrims = gMessageStringTable.getString("MaxPrims"); - _PREHASH_LandmarkID = gMessageStringTable.getString("LandmarkID"); - _PREHASH_InitiateDownload = gMessageStringTable.getString("InitiateDownload"); - _PREHASH_Name = gMessageStringTable.getString("Name"); - _PREHASH_OtherCleanTime = gMessageStringTable.getString("OtherCleanTime"); - _PREHASH_ParcelSetOtherCleanTime = gMessageStringTable.getString("ParcelSetOtherCleanTime"); - _PREHASH_TeleportPriceExponent = gMessageStringTable.getString("TeleportPriceExponent"); - _PREHASH_Gain = gMessageStringTable.getString("Gain"); - _PREHASH_PacketAck = gMessageStringTable.getString("PacketAck"); - _PREHASH_PathSkew = gMessageStringTable.getString("PathSkew"); - _PREHASH_SimulatorShutdownRequest = gMessageStringTable.getString("SimulatorShutdownRequest"); - _PREHASH_NearestLandingRegionRequest = gMessageStringTable.getString("NearestLandingRegionRequest"); - _PREHASH_OtherID = gMessageStringTable.getString("OtherID"); - _PREHASH_MemberID = gMessageStringTable.getString("MemberID"); - _PREHASH_MapLayerRequest = gMessageStringTable.getString("MapLayerRequest"); - _PREHASH_ObjectScale = gMessageStringTable.getString("ObjectScale"); - _PREHASH_TargetIP = gMessageStringTable.getString("TargetIP"); - _PREHASH_Redo = gMessageStringTable.getString("Redo"); - _PREHASH_MoneyBalance = gMessageStringTable.getString("MoneyBalance"); - _PREHASH_TrackAgent = gMessageStringTable.getString("TrackAgent"); - _PREHASH_MaxX = gMessageStringTable.getString("MaxX"); - _PREHASH_Data = gMessageStringTable.getString("Data"); - _PREHASH_MaxY = gMessageStringTable.getString("MaxY"); - _PREHASH_TextureAnim = gMessageStringTable.getString("TextureAnim"); - _PREHASH_ReturnIDs = gMessageStringTable.getString("ReturnIDs"); - _PREHASH_Date = gMessageStringTable.getString("Date"); - _PREHASH_AgentWearablesUpdate = gMessageStringTable.getString("AgentWearablesUpdate"); - _PREHASH_AgentDataUpdate = gMessageStringTable.getString("AgentDataUpdate"); - _PREHASH_GroupDataUpdate = gMessageStringTable.getString("GroupDataUpdate"); - _PREHASH_Hash = gMessageStringTable.getString("Hash"); - _PREHASH_AgentGroupDataUpdate = gMessageStringTable.getString("AgentGroupDataUpdate"); - _PREHASH_Left = gMessageStringTable.getString("Left"); - _PREHASH_Mask = gMessageStringTable.getString("Mask"); - _PREHASH_ForceMouselook = gMessageStringTable.getString("ForceMouselook"); - _PREHASH_Success = gMessageStringTable.getString("Success"); - _PREHASH_ObjectGroup = gMessageStringTable.getString("ObjectGroup"); - _PREHASH_SunHour = gMessageStringTable.getString("SunHour"); - _PREHASH_MinX = gMessageStringTable.getString("MinX"); - _PREHASH_ScriptSensorReply = gMessageStringTable.getString("ScriptSensorReply"); - _PREHASH_MinY = gMessageStringTable.getString("MinY"); - _PREHASH_Command = gMessageStringTable.getString("Command"); - _PREHASH_Desc = gMessageStringTable.getString("Desc"); - _PREHASH_AttachmentNeedsSave = gMessageStringTable.getString("AttachmentNeedsSave"); - _PREHASH_HistoryItemData = gMessageStringTable.getString("HistoryItemData"); - _PREHASH_AgentCachedTexture = gMessageStringTable.getString("AgentCachedTexture"); - _PREHASH_Subject = gMessageStringTable.getString("Subject"); - _PREHASH_East = gMessageStringTable.getString("East"); - _PREHASH_QueryReplies = gMessageStringTable.getString("QueryReplies"); - _PREHASH_ObjectCategory = gMessageStringTable.getString("ObjectCategory"); - _PREHASH_Time = gMessageStringTable.getString("Time"); - _PREHASH_CreateLandmarkForEvent = gMessageStringTable.getString("CreateLandmarkForEvent"); - _PREHASH_ParentID = gMessageStringTable.getString("ParentID"); - _PREHASH_Ping = gMessageStringTable.getString("Ping"); - _PREHASH_Perp = gMessageStringTable.getString("Perp"); - _PREHASH_Code = gMessageStringTable.getString("Code"); - _PREHASH_InvType = gMessageStringTable.getString("InvType"); - _PREHASH_AgentFOV = gMessageStringTable.getString("AgentFOV"); - _PREHASH_Audible = gMessageStringTable.getString("Audible"); - _PREHASH_AuctionData = gMessageStringTable.getString("AuctionData"); - _PREHASH_IDBlock = gMessageStringTable.getString("IDBlock"); - _PREHASH_West = gMessageStringTable.getString("West"); - _PREHASH_Undo = gMessageStringTable.getString("Undo"); - _PREHASH_TotalNumItems = gMessageStringTable.getString("TotalNumItems"); - _PREHASH_Info = gMessageStringTable.getString("Info"); - _PREHASH_Area = gMessageStringTable.getString("Area"); - _PREHASH_SimCrashed = gMessageStringTable.getString("SimCrashed"); - _PREHASH_Text = gMessageStringTable.getString("Text"); - _PREHASH_PriceGroupCreate = gMessageStringTable.getString("PriceGroupCreate"); - _PREHASH_ObjectShape = gMessageStringTable.getString("ObjectShape"); - _PREHASH_GroupRoleDataReply = gMessageStringTable.getString("GroupRoleDataReply"); - _PREHASH_MuteCRC = gMessageStringTable.getString("MuteCRC"); - _PREHASH_Size = gMessageStringTable.getString("Size"); - _PREHASH_FromAddress = gMessageStringTable.getString("FromAddress"); - _PREHASH_Body = gMessageStringTable.getString("Body"); - _PREHASH_FileData = gMessageStringTable.getString("FileData"); - _PREHASH_List = gMessageStringTable.getString("List"); - _PREHASH_KickUser = gMessageStringTable.getString("KickUser"); - _PREHASH_OtherPrims = gMessageStringTable.getString("OtherPrims"); - _PREHASH_RunTime = gMessageStringTable.getString("RunTime"); - _PREHASH_GrantUserRights = gMessageStringTable.getString("GrantUserRights"); - _PREHASH_RpcScriptRequestInboundForward = gMessageStringTable.getString("RpcScriptRequestInboundForward"); - _PREHASH_More = gMessageStringTable.getString("More"); - _PREHASH_Majority = gMessageStringTable.getString("Majority"); - _PREHASH_MetersTraveled = gMessageStringTable.getString("MetersTraveled"); - _PREHASH_Stat = gMessageStringTable.getString("Stat"); - _PREHASH_SoundID = gMessageStringTable.getString("SoundID"); - _PREHASH_Item = gMessageStringTable.getString("Item"); - _PREHASH_User = gMessageStringTable.getString("User"); - _PREHASH_Prey = gMessageStringTable.getString("Prey"); - _PREHASH_RayStart = gMessageStringTable.getString("RayStart"); - _PREHASH_UsecSinceStart = gMessageStringTable.getString("UsecSinceStart"); - _PREHASH_ParcelData = gMessageStringTable.getString("ParcelData"); - _PREHASH_CameraUpAxis = gMessageStringTable.getString("CameraUpAxis"); - _PREHASH_ScriptDialog = gMessageStringTable.getString("ScriptDialog"); - _PREHASH_MasterParcelData = gMessageStringTable.getString("MasterParcelData"); - _PREHASH_Invalid = gMessageStringTable.getString("Invalid"); - _PREHASH_ProfileCurve = gMessageStringTable.getString("ProfileCurve"); - _PREHASH_ParcelAccessListUpdate = gMessageStringTable.getString("ParcelAccessListUpdate"); - _PREHASH_MuteListUpdate = gMessageStringTable.getString("MuteListUpdate"); - _PREHASH_SendPacket = gMessageStringTable.getString("SendPacket"); - _PREHASH_SendXferPacket = gMessageStringTable.getString("SendXferPacket"); - _PREHASH_RegionDenyIdentified = gMessageStringTable.getString("RegionDenyIdentified"); - _PREHASH_NotecardItemID = gMessageStringTable.getString("NotecardItemID"); - _PREHASH_LastName = gMessageStringTable.getString("LastName"); - _PREHASH_From = gMessageStringTable.getString("From"); - _PREHASH_RoleChange = gMessageStringTable.getString("RoleChange"); - _PREHASH_Port = gMessageStringTable.getString("Port"); - _PREHASH_MemberTitle = gMessageStringTable.getString("MemberTitle"); - _PREHASH_LogParcelChanges = gMessageStringTable.getString("LogParcelChanges"); - _PREHASH_AgentCachedTextureResponse = gMessageStringTable.getString("AgentCachedTextureResponse"); - _PREHASH_DeRezObject = gMessageStringTable.getString("DeRezObject"); - _PREHASH_IsTemporary = gMessageStringTable.getString("IsTemporary"); - _PREHASH_InsigniaID = gMessageStringTable.getString("InsigniaID"); - _PREHASH_CheckFlags = gMessageStringTable.getString("CheckFlags"); - _PREHASH_EventID = gMessageStringTable.getString("EventID"); - _PREHASH_Selected = gMessageStringTable.getString("Selected"); - _PREHASH_FromAgentId = gMessageStringTable.getString("FromAgentId"); - _PREHASH_Type = gMessageStringTable.getString("Type"); - _PREHASH_ChatType = gMessageStringTable.getString("ChatType"); - _PREHASH_ReportData = gMessageStringTable.getString("ReportData"); - _PREHASH_RequestBlock = gMessageStringTable.getString("RequestBlock"); - _PREHASH_GrantData = gMessageStringTable.getString("GrantData"); - _PREHASH_DetachAttachmentIntoInv = gMessageStringTable.getString("DetachAttachmentIntoInv"); - _PREHASH_ParcelDisableObjects = gMessageStringTable.getString("ParcelDisableObjects"); - _PREHASH_Sections = gMessageStringTable.getString("Sections"); - _PREHASH_GodLevel = gMessageStringTable.getString("GodLevel"); - _PREHASH_PayPriceReply = gMessageStringTable.getString("PayPriceReply"); - _PREHASH_QueryID = gMessageStringTable.getString("QueryID"); - _PREHASH_CameraEyeOffset = gMessageStringTable.getString("CameraEyeOffset"); - _PREHASH_AgentPosition = gMessageStringTable.getString("AgentPosition"); - _PREHASH_GrabPosition = gMessageStringTable.getString("GrabPosition"); - _PREHASH_OnlineNotification = gMessageStringTable.getString("OnlineNotification"); - _PREHASH_OfflineNotification = gMessageStringTable.getString("OfflineNotification"); - _PREHASH_SendPostcard = gMessageStringTable.getString("SendPostcard"); - _PREHASH_RequestFlags = gMessageStringTable.getString("RequestFlags"); - _PREHASH_GroupAccountSummaryRequest = gMessageStringTable.getString("GroupAccountSummaryRequest"); - _PREHASH_GroupVoteHistoryRequest = gMessageStringTable.getString("GroupVoteHistoryRequest"); - _PREHASH_ParamValue = gMessageStringTable.getString("ParamValue"); - _PREHASH_MaxAgents = gMessageStringTable.getString("MaxAgents"); - _PREHASH_CreateNewOutfitAttachments = gMessageStringTable.getString("CreateNewOutfitAttachments"); - _PREHASH_RegionHandle = gMessageStringTable.getString("RegionHandle"); - _PREHASH_TeleportProgress = gMessageStringTable.getString("TeleportProgress"); - _PREHASH_AgentQuitCopy = gMessageStringTable.getString("AgentQuitCopy"); - _PREHASH_AvatarInterestsUpdate = gMessageStringTable.getString("AvatarInterestsUpdate"); - _PREHASH_GroupNoticeID = gMessageStringTable.getString("GroupNoticeID"); - _PREHASH_ParcelName = gMessageStringTable.getString("ParcelName"); - _PREHASH_PriceObjectRent = gMessageStringTable.getString("PriceObjectRent"); - _PREHASH_OfferCallingCard = gMessageStringTable.getString("OfferCallingCard"); - _PREHASH_AcceptCallingCard = gMessageStringTable.getString("AcceptCallingCard"); - _PREHASH_DeclineCallingCard = gMessageStringTable.getString("DeclineCallingCard"); - _PREHASH_AgentAccess = gMessageStringTable.getString("AgentAccess"); - _PREHASH_DataHomeLocationReply = gMessageStringTable.getString("DataHomeLocationReply"); - _PREHASH_EventLocationReply = gMessageStringTable.getString("EventLocationReply"); - _PREHASH_TerseDateID = gMessageStringTable.getString("TerseDateID"); - _PREHASH_ObjectOwner = gMessageStringTable.getString("ObjectOwner"); - _PREHASH_AssetID = gMessageStringTable.getString("AssetID"); - _PREHASH_AlertMessage = gMessageStringTable.getString("AlertMessage"); - _PREHASH_AgentAlertMessage = gMessageStringTable.getString("AgentAlertMessage"); - _PREHASH_EstateOwnerMessage = gMessageStringTable.getString("EstateOwnerMessage"); - _PREHASH_ParcelMediaCommandMessage = gMessageStringTable.getString("ParcelMediaCommandMessage"); - _PREHASH_Auction = gMessageStringTable.getString("Auction"); - _PREHASH_Category = gMessageStringTable.getString("Category"); - _PREHASH_FilePath = gMessageStringTable.getString("FilePath"); - _PREHASH_ItemFlags = gMessageStringTable.getString("ItemFlags"); - _PREHASH_Invoice = gMessageStringTable.getString("Invoice"); - _PREHASH_IntervalDays = gMessageStringTable.getString("IntervalDays"); - _PREHASH_PathScaleX = gMessageStringTable.getString("PathScaleX"); - _PREHASH_FromTaskID = gMessageStringTable.getString("FromTaskID"); - _PREHASH_PathScaleY = gMessageStringTable.getString("PathScaleY"); - _PREHASH_TimeInfo = gMessageStringTable.getString("TimeInfo"); - _PREHASH_PublicCount = gMessageStringTable.getString("PublicCount"); - _PREHASH_ParcelJoin = gMessageStringTable.getString("ParcelJoin"); - _PREHASH_GroupRolesCount = gMessageStringTable.getString("GroupRolesCount"); - _PREHASH_SimulatorBlock = gMessageStringTable.getString("SimulatorBlock"); - _PREHASH_GroupID = gMessageStringTable.getString("GroupID"); - _PREHASH_AgentVel = gMessageStringTable.getString("AgentVel"); - _PREHASH_RequestImage = gMessageStringTable.getString("RequestImage"); - _PREHASH_NetStats = gMessageStringTable.getString("NetStats"); - _PREHASH_AgentPos = gMessageStringTable.getString("AgentPos"); - _PREHASH_AgentSit = gMessageStringTable.getString("AgentSit"); - _PREHASH_Material = gMessageStringTable.getString("Material"); - _PREHASH_ObjectDeGrab = gMessageStringTable.getString("ObjectDeGrab"); - _PREHASH_VelocityInterpolateOff = gMessageStringTable.getString("VelocityInterpolateOff"); - _PREHASH_AuthorizedBuyerID = gMessageStringTable.getString("AuthorizedBuyerID"); - _PREHASH_AvatarPropertiesReply = gMessageStringTable.getString("AvatarPropertiesReply"); - _PREHASH_GroupProfileReply = gMessageStringTable.getString("GroupProfileReply"); - _PREHASH_SimOwner = gMessageStringTable.getString("SimOwner"); - _PREHASH_SalePrice = gMessageStringTable.getString("SalePrice"); - _PREHASH_Animation = gMessageStringTable.getString("Animation"); - _PREHASH_OwnerID = gMessageStringTable.getString("OwnerID"); - _PREHASH_NearestLandingRegionUpdated = gMessageStringTable.getString("NearestLandingRegionUpdated"); - _PREHASH_PassToAgent = gMessageStringTable.getString("PassToAgent"); - _PREHASH_PreyAgent = gMessageStringTable.getString("PreyAgent"); - _PREHASH_SimStats = gMessageStringTable.getString("SimStats"); - _PREHASH_LogoutReply = gMessageStringTable.getString("LogoutReply"); - _PREHASH_FeatureDisabled = gMessageStringTable.getString("FeatureDisabled"); - _PREHASH_PhysicalAvatarEventList = gMessageStringTable.getString("PhysicalAvatarEventList"); - _PREHASH_ObjectLocalID = gMessageStringTable.getString("ObjectLocalID"); - _PREHASH_Dropped = gMessageStringTable.getString("Dropped"); - _PREHASH_WebProfilesDisabled = gMessageStringTable.getString("WebProfilesDisabled"); - _PREHASH_Destination = gMessageStringTable.getString("Destination"); - _PREHASH_MasterID = gMessageStringTable.getString("MasterID"); - _PREHASH_TransferData = gMessageStringTable.getString("TransferData"); - _PREHASH_WantToMask = gMessageStringTable.getString("WantToMask"); - _PREHASH_ParcelSelectObjects = gMessageStringTable.getString("ParcelSelectObjects"); - _PREHASH_ExtraParams = gMessageStringTable.getString("ExtraParams"); - _PREHASH_CreatorID = gMessageStringTable.getString("CreatorID"); - _PREHASH_Summary = gMessageStringTable.getString("Summary"); - _PREHASH_BuyObjectInventory = gMessageStringTable.getString("BuyObjectInventory"); - _PREHASH_FetchInventory = gMessageStringTable.getString("FetchInventory"); - _PREHASH_InventoryID = gMessageStringTable.getString("InventoryID"); - _PREHASH_PacketNumber = gMessageStringTable.getString("PacketNumber"); - _PREHASH_SetFollowCamProperties = gMessageStringTable.getString("SetFollowCamProperties"); - _PREHASH_ClearFollowCamProperties = gMessageStringTable.getString("ClearFollowCamProperties"); - _PREHASH_SequenceID = gMessageStringTable.getString("SequenceID"); - _PREHASH_DataServerLogout = gMessageStringTable.getString("DataServerLogout"); - _PREHASH_NameValue = gMessageStringTable.getString("NameValue"); - _PREHASH_PathShearX = gMessageStringTable.getString("PathShearX"); - _PREHASH_PathShearY = gMessageStringTable.getString("PathShearY"); - _PREHASH_Velocity = gMessageStringTable.getString("Velocity"); - _PREHASH_SecPerYear = gMessageStringTable.getString("SecPerYear"); - _PREHASH_FirstName = gMessageStringTable.getString("FirstName"); - _PREHASH_AttachedSoundGainChange = gMessageStringTable.getString("AttachedSoundGainChange"); - _PREHASH_LocationID = gMessageStringTable.getString("LocationID"); - _PREHASH_Running = gMessageStringTable.getString("Running"); - _PREHASH_AgentThrottle = gMessageStringTable.getString("AgentThrottle"); - _PREHASH_NeighborList = gMessageStringTable.getString("NeighborList"); - _PREHASH_PathTaperX = gMessageStringTable.getString("PathTaperX"); - _PREHASH_PathTaperY = gMessageStringTable.getString("PathTaperY"); - _PREHASH_AgentRelated = gMessageStringTable.getString("AgentRelated"); - _PREHASH_GranterBlock = gMessageStringTable.getString("GranterBlock"); - _PREHASH_UseCachedMuteList = gMessageStringTable.getString("UseCachedMuteList"); - _PREHASH_FailStats = gMessageStringTable.getString("FailStats"); - _PREHASH_Tempfile = gMessageStringTable.getString("Tempfile"); - _PREHASH_BuyerID = gMessageStringTable.getString("BuyerID"); - _PREHASH_DirPeopleReply = gMessageStringTable.getString("DirPeopleReply"); - _PREHASH_TransferInfo = gMessageStringTable.getString("TransferInfo"); - _PREHASH_AvatarPickerRequestBackend = gMessageStringTable.getString("AvatarPickerRequestBackend"); - _PREHASH_AvatarPropertiesRequestBackend = gMessageStringTable.getString("AvatarPropertiesRequestBackend"); - _PREHASH_UpdateData = gMessageStringTable.getString("UpdateData"); - _PREHASH_SimFPS = gMessageStringTable.getString("SimFPS"); - _PREHASH_ReporterID = gMessageStringTable.getString("ReporterID"); - _PREHASH_ButtonLabel = gMessageStringTable.getString("ButtonLabel"); - _PREHASH_GranterID = gMessageStringTable.getString("GranterID"); - _PREHASH_WantToText = gMessageStringTable.getString("WantToText"); - _PREHASH_ReportType = gMessageStringTable.getString("ReportType"); - _PREHASH_SimulatorReady = gMessageStringTable.getString("SimulatorReady"); - _PREHASH_DataBlock = gMessageStringTable.getString("DataBlock"); - _PREHASH_AnimationSourceList = gMessageStringTable.getString("AnimationSourceList"); - _PREHASH_SubscribeLoad = gMessageStringTable.getString("SubscribeLoad"); - _PREHASH_UnsubscribeLoad = gMessageStringTable.getString("UnsubscribeLoad"); - _PREHASH_Packet = gMessageStringTable.getString("Packet"); - _PREHASH_UndoLand = gMessageStringTable.getString("UndoLand"); - _PREHASH_SimAccess = gMessageStringTable.getString("SimAccess"); - _PREHASH_AbuserID = gMessageStringTable.getString("AbuserID"); - _PREHASH_MembershipFee = gMessageStringTable.getString("MembershipFee"); - _PREHASH_InviteGroupResponse = gMessageStringTable.getString("InviteGroupResponse"); - _PREHASH_CreateInventoryFolder = gMessageStringTable.getString("CreateInventoryFolder"); - _PREHASH_UpdateInventoryFolder = gMessageStringTable.getString("UpdateInventoryFolder"); - _PREHASH_MoveInventoryFolder = gMessageStringTable.getString("MoveInventoryFolder"); - _PREHASH_RemoveInventoryFolder = gMessageStringTable.getString("RemoveInventoryFolder"); - _PREHASH_MoneyData = gMessageStringTable.getString("MoneyData"); - _PREHASH_ObjectDeselect = gMessageStringTable.getString("ObjectDeselect"); - _PREHASH_NewAssetID = gMessageStringTable.getString("NewAssetID"); - _PREHASH_ObjectAdd = gMessageStringTable.getString("ObjectAdd"); - _PREHASH_RayEndIsIntersection = gMessageStringTable.getString("RayEndIsIntersection"); - _PREHASH_CompleteAuction = gMessageStringTable.getString("CompleteAuction"); - _PREHASH_CircuitCode = gMessageStringTable.getString("CircuitCode"); - _PREHASH_AgentMovementComplete = gMessageStringTable.getString("AgentMovementComplete"); - _PREHASH_ViewerIP = gMessageStringTable.getString("ViewerIP"); - _PREHASH_Header = gMessageStringTable.getString("Header"); - _PREHASH_GestureFlags = gMessageStringTable.getString("GestureFlags"); - _PREHASH_XferID = gMessageStringTable.getString("XferID"); - _PREHASH_StatValue = gMessageStringTable.getString("StatValue"); - _PREHASH_TaskID = gMessageStringTable.getString("TaskID"); - _PREHASH_PickID = gMessageStringTable.getString("PickID"); - _PREHASH_RayEnd = gMessageStringTable.getString("RayEnd"); - _PREHASH_Throttles = gMessageStringTable.getString("Throttles"); - _PREHASH_RebakeAvatarTextures = gMessageStringTable.getString("RebakeAvatarTextures"); - _PREHASH_UpAxis = gMessageStringTable.getString("UpAxis"); - _PREHASH_AgentTextures = gMessageStringTable.getString("AgentTextures"); - _PREHASH_NotecardData = gMessageStringTable.getString("NotecardData"); - _PREHASH_Radius = gMessageStringTable.getString("Radius"); - _PREHASH_OffCircuit = gMessageStringTable.getString("OffCircuit"); - _PREHASH_Access = gMessageStringTable.getString("Access"); - _PREHASH_TitleRoleID = gMessageStringTable.getString("TitleRoleID"); - _PREHASH_SquareMetersCredit = gMessageStringTable.getString("SquareMetersCredit"); - _PREHASH_Filename = gMessageStringTable.getString("Filename"); - _PREHASH_ClassifiedInfoRequest = gMessageStringTable.getString("ClassifiedInfoRequest"); - _PREHASH_ParcelInfoRequest = gMessageStringTable.getString("ParcelInfoRequest"); - _PREHASH_ParcelObjectOwnersRequest = gMessageStringTable.getString("ParcelObjectOwnersRequest"); - _PREHASH_TeleportLandmarkRequest = gMessageStringTable.getString("TeleportLandmarkRequest"); - _PREHASH_EventInfoRequest = gMessageStringTable.getString("EventInfoRequest"); - _PREHASH_MoneyBalanceRequest = gMessageStringTable.getString("MoneyBalanceRequest"); - _PREHASH_GroupMembersRequest = gMessageStringTable.getString("GroupMembersRequest"); - _PREHASH_GroupRoleMembersRequest = gMessageStringTable.getString("GroupRoleMembersRequest"); - _PREHASH_ChatFromSimulator = gMessageStringTable.getString("ChatFromSimulator"); - _PREHASH_OldFolderID = gMessageStringTable.getString("OldFolderID"); - _PREHASH_UserInfoRequest = gMessageStringTable.getString("UserInfoRequest"); - _PREHASH_TextureID = gMessageStringTable.getString("TextureID"); - _PREHASH_ProfileURL = gMessageStringTable.getString("ProfileURL"); - _PREHASH_Handle = gMessageStringTable.getString("Handle"); - _PREHASH_ButtonIndex = gMessageStringTable.getString("ButtonIndex"); - _PREHASH_GetScriptRunning = gMessageStringTable.getString("GetScriptRunning"); - _PREHASH_SetScriptRunning = gMessageStringTable.getString("SetScriptRunning"); - _PREHASH_Health = gMessageStringTable.getString("Health"); - _PREHASH_CircuitInfo = gMessageStringTable.getString("CircuitInfo"); - _PREHASH_ObjectBuy = gMessageStringTable.getString("ObjectBuy"); - _PREHASH_ProfileEnd = gMessageStringTable.getString("ProfileEnd"); - _PREHASH_Effect = gMessageStringTable.getString("Effect"); - _PREHASH_TestMessage = gMessageStringTable.getString("TestMessage"); - _PREHASH_ScriptMailRegistration = gMessageStringTable.getString("ScriptMailRegistration"); - _PREHASH_AgentSetAppearance = gMessageStringTable.getString("AgentSetAppearance"); - _PREHASH_AvatarAppearance = gMessageStringTable.getString("AvatarAppearance"); - _PREHASH_RegionData = gMessageStringTable.getString("RegionData"); - _PREHASH_RequestingRegionData = gMessageStringTable.getString("RequestingRegionData"); - _PREHASH_LandingRegionData = gMessageStringTable.getString("LandingRegionData"); - _PREHASH_SitTransform = gMessageStringTable.getString("SitTransform"); - _PREHASH_TerrainBase0 = gMessageStringTable.getString("TerrainBase0"); - _PREHASH_SkillsMask = gMessageStringTable.getString("SkillsMask"); - _PREHASH_AtAxis = gMessageStringTable.getString("AtAxis"); - _PREHASH_TerrainBase1 = gMessageStringTable.getString("TerrainBase1"); - _PREHASH_Reason = gMessageStringTable.getString("Reason"); - _PREHASH_TerrainBase2 = gMessageStringTable.getString("TerrainBase2"); - _PREHASH_TerrainBase3 = gMessageStringTable.getString("TerrainBase3"); - _PREHASH_Params = gMessageStringTable.getString("Params"); - _PREHASH_PingID = gMessageStringTable.getString("PingID"); - _PREHASH_Change = gMessageStringTable.getString("Change"); - _PREHASH_Height = gMessageStringTable.getString("Height"); - _PREHASH_Region = gMessageStringTable.getString("Region"); - _PREHASH_TelehubInfo = gMessageStringTable.getString("TelehubInfo"); - _PREHASH_StateSave = gMessageStringTable.getString("StateSave"); - _PREHASH_RoleData = gMessageStringTable.getString("RoleData"); - _PREHASH_AgentAnimation = gMessageStringTable.getString("AgentAnimation"); - _PREHASH_AvatarAnimation = gMessageStringTable.getString("AvatarAnimation"); - _PREHASH_LogDwellTime = gMessageStringTable.getString("LogDwellTime"); - _PREHASH_ParcelGodMarkAsContent = gMessageStringTable.getString("ParcelGodMarkAsContent"); - _PREHASH_UsePhysics = gMessageStringTable.getString("UsePhysics"); - _PREHASH_RegionDenyTransacted = gMessageStringTable.getString("RegionDenyTransacted"); - _PREHASH_JointType = gMessageStringTable.getString("JointType"); - _PREHASH_ObjectTaxEstimate = gMessageStringTable.getString("ObjectTaxEstimate"); - _PREHASH_LightTaxEstimate = gMessageStringTable.getString("LightTaxEstimate"); - _PREHASH_LandTaxEstimate = gMessageStringTable.getString("LandTaxEstimate"); - _PREHASH_TeleportLandingStatusChanged = gMessageStringTable.getString("TeleportLandingStatusChanged"); - _PREHASH_GroupTaxEstimate = gMessageStringTable.getString("GroupTaxEstimate"); - _PREHASH_AvgViewerFPS = gMessageStringTable.getString("AvgViewerFPS"); - _PREHASH_Buttons = gMessageStringTable.getString("Buttons"); - _PREHASH_Sender = gMessageStringTable.getString("Sender"); - _PREHASH_Dialog = gMessageStringTable.getString("Dialog"); - _PREHASH_TargetData = gMessageStringTable.getString("TargetData"); - _PREHASH_DestID = gMessageStringTable.getString("DestID"); - _PREHASH_PricePublicObjectDelete = gMessageStringTable.getString("PricePublicObjectDelete"); - _PREHASH_ObjectDelete = gMessageStringTable.getString("ObjectDelete"); - _PREHASH_Delete = gMessageStringTable.getString("Delete"); - _PREHASH_EventGodDelete = gMessageStringTable.getString("EventGodDelete"); - _PREHASH_LastTaxDate = gMessageStringTable.getString("LastTaxDate"); - _PREHASH_MapImageID = gMessageStringTable.getString("MapImageID"); - _PREHASH_EndDateTime = gMessageStringTable.getString("EndDateTime"); - _PREHASH_TerrainDetail0 = gMessageStringTable.getString("TerrainDetail0"); - _PREHASH_TerrainDetail1 = gMessageStringTable.getString("TerrainDetail1"); - _PREHASH_TerrainDetail2 = gMessageStringTable.getString("TerrainDetail2"); - _PREHASH_TerrainDetail3 = gMessageStringTable.getString("TerrainDetail3"); - _PREHASH_Offset = gMessageStringTable.getString("Offset"); - _PREHASH_ObjectDelink = gMessageStringTable.getString("ObjectDelink"); - _PREHASH_TargetObject = gMessageStringTable.getString("TargetObject"); - _PREHASH_IsEstateManager = gMessageStringTable.getString("IsEstateManager"); - _PREHASH_CancelAuction = gMessageStringTable.getString("CancelAuction"); - _PREHASH_ObjectDetach = gMessageStringTable.getString("ObjectDetach"); - _PREHASH_Compressed = gMessageStringTable.getString("Compressed"); - _PREHASH_PathBegin = gMessageStringTable.getString("PathBegin"); - _PREHASH_BypassRaycast = gMessageStringTable.getString("BypassRaycast"); - _PREHASH_WinnerID = gMessageStringTable.getString("WinnerID"); - _PREHASH_ChannelType = gMessageStringTable.getString("ChannelType"); - _PREHASH_NonExemptMembers = gMessageStringTable.getString("NonExemptMembers"); - _PREHASH_Agents = gMessageStringTable.getString("Agents"); - _PREHASH_MemberData = gMessageStringTable.getString("MemberData"); - _PREHASH_ToGroupID = gMessageStringTable.getString("ToGroupID"); - _PREHASH_ImageNotInDatabase = gMessageStringTable.getString("ImageNotInDatabase"); - _PREHASH_StartDate = gMessageStringTable.getString("StartDate"); - _PREHASH_AnimID = gMessageStringTable.getString("AnimID"); - _PREHASH_Serial = gMessageStringTable.getString("Serial"); - _PREHASH_AbuseRegionName = gMessageStringTable.getString("AbuseRegionName"); - _PREHASH_ModifyLand = gMessageStringTable.getString("ModifyLand"); - _PREHASH_Digest = gMessageStringTable.getString("Digest"); - _PREHASH_Victim = gMessageStringTable.getString("Victim"); - _PREHASH_Script = gMessageStringTable.getString("Script"); - _PREHASH_PickInfoReply = gMessageStringTable.getString("PickInfoReply"); - _PREHASH_MoneyBalanceReply = gMessageStringTable.getString("MoneyBalanceReply"); - _PREHASH_RoutedMoneyBalanceReply = gMessageStringTable.getString("RoutedMoneyBalanceReply"); - _PREHASH_RoleID = gMessageStringTable.getString("RoleID"); - _PREHASH_RegionInfo = gMessageStringTable.getString("RegionInfo"); - _PREHASH_GodUpdateRegionInfo = gMessageStringTable.getString("GodUpdateRegionInfo"); - _PREHASH_StartAnim = gMessageStringTable.getString("StartAnim"); - _PREHASH_Action = gMessageStringTable.getString("Action"); - _PREHASH_Location = gMessageStringTable.getString("Location"); - _PREHASH_Rights = gMessageStringTable.getString("Rights"); - _PREHASH_SearchDir = gMessageStringTable.getString("SearchDir"); - _PREHASH_TransferRequest = gMessageStringTable.getString("TransferRequest"); - _PREHASH_ScriptSensorRequest = gMessageStringTable.getString("ScriptSensorRequest"); - _PREHASH_MoneyTransferRequest = gMessageStringTable.getString("MoneyTransferRequest"); - _PREHASH_EjectGroupMemberRequest = gMessageStringTable.getString("EjectGroupMemberRequest"); - _PREHASH_SkillsText = gMessageStringTable.getString("SkillsText"); - _PREHASH_Resent = gMessageStringTable.getString("Resent"); - _PREHASH_Center = gMessageStringTable.getString("Center"); - _PREHASH_SharedData = gMessageStringTable.getString("SharedData"); - _PREHASH_PSBlock = gMessageStringTable.getString("PSBlock"); - _PREHASH_UUIDNameBlock = gMessageStringTable.getString("UUIDNameBlock"); - _PREHASH_GroupTitleUpdate = gMessageStringTable.getString("GroupTitleUpdate"); - _PREHASH_Method = gMessageStringTable.getString("Method"); - _PREHASH_TouchName = gMessageStringTable.getString("TouchName"); - _PREHASH_UpdateType = gMessageStringTable.getString("UpdateType"); - _PREHASH_KickedFromEstateID = gMessageStringTable.getString("KickedFromEstateID"); - _PREHASH_CandidateID = gMessageStringTable.getString("CandidateID"); - _PREHASH_ParamData = gMessageStringTable.getString("ParamData"); - _PREHASH_GodlikeMessage = gMessageStringTable.getString("GodlikeMessage"); - _PREHASH_SystemMessage = gMessageStringTable.getString("SystemMessage"); - _PREHASH_BodyRotation = gMessageStringTable.getString("BodyRotation"); - _PREHASH_SearchRegions = gMessageStringTable.getString("SearchRegions"); - _PREHASH_AnimationData = gMessageStringTable.getString("AnimationData"); - _PREHASH_StatID = gMessageStringTable.getString("StatID"); - _PREHASH_ItemID = gMessageStringTable.getString("ItemID"); - _PREHASH_ScriptDialogReply = gMessageStringTable.getString("ScriptDialogReply"); - _PREHASH_RegionIDAndHandleReply = gMessageStringTable.getString("RegionIDAndHandleReply"); - _PREHASH_CameraAtOffset = gMessageStringTable.getString("CameraAtOffset"); - _PREHASH_VoteID = gMessageStringTable.getString("VoteID"); - _PREHASH_ParcelGodForceOwner = gMessageStringTable.getString("ParcelGodForceOwner"); - _PREHASH_Filter = gMessageStringTable.getString("Filter"); - _PREHASH_InviteData = gMessageStringTable.getString("InviteData"); - _PREHASH_PCode = gMessageStringTable.getString("PCode"); - _PREHASH_SearchPos = gMessageStringTable.getString("SearchPos"); - _PREHASH_PreyID = gMessageStringTable.getString("PreyID"); - _PREHASH_TerrainLowerLimit = gMessageStringTable.getString("TerrainLowerLimit"); - _PREHASH_EventFlags = gMessageStringTable.getString("EventFlags"); - _PREHASH_TallyVotes = gMessageStringTable.getString("TallyVotes"); - _PREHASH_Result = gMessageStringTable.getString("Result"); - _PREHASH_LookAt = gMessageStringTable.getString("LookAt"); - _PREHASH_SearchOrder = gMessageStringTable.getString("SearchOrder"); - _PREHASH_PayButton = gMessageStringTable.getString("PayButton"); - _PREHASH_SelfCount = gMessageStringTable.getString("SelfCount"); - _PREHASH_PacketCount = gMessageStringTable.getString("PacketCount"); - _PREHASH_ParcelBuyPass = gMessageStringTable.getString("ParcelBuyPass"); - _PREHASH_OldItemID = gMessageStringTable.getString("OldItemID"); - _PREHASH_RegionPort = gMessageStringTable.getString("RegionPort"); - _PREHASH_PriceEnergyUnit = gMessageStringTable.getString("PriceEnergyUnit"); - _PREHASH_Bitmap = gMessageStringTable.getString("Bitmap"); - _PREHASH_CacheMissType = gMessageStringTable.getString("CacheMissType"); - _PREHASH_VFileID = gMessageStringTable.getString("VFileID"); - _PREHASH_GroupInsigniaID = gMessageStringTable.getString("GroupInsigniaID"); - _PREHASH_Online = gMessageStringTable.getString("Online"); - _PREHASH_KickFlags = gMessageStringTable.getString("KickFlags"); - _PREHASH_CovenantID = gMessageStringTable.getString("CovenantID"); - _PREHASH_SysCPU = gMessageStringTable.getString("SysCPU"); - _PREHASH_EMail = gMessageStringTable.getString("EMail"); - _PREHASH_AggregatePermTextures = gMessageStringTable.getString("AggregatePermTextures"); - _PREHASH_ChatChannel = gMessageStringTable.getString("ChatChannel"); - _PREHASH_ReturnID = gMessageStringTable.getString("ReturnID"); - _PREHASH_ObjectAttach = gMessageStringTable.getString("ObjectAttach"); - _PREHASH_TargetPort = gMessageStringTable.getString("TargetPort"); - _PREHASH_ObjectSpinStop = gMessageStringTable.getString("ObjectSpinStop"); - _PREHASH_FullID = gMessageStringTable.getString("FullID"); - _PREHASH_ActivateGroup = gMessageStringTable.getString("ActivateGroup"); - _PREHASH_SysGPU = gMessageStringTable.getString("SysGPU"); - _PREHASH_AvatarInterestsReply = gMessageStringTable.getString("AvatarInterestsReply"); - _PREHASH_StartLure = gMessageStringTable.getString("StartLure"); - _PREHASH_SysRAM = gMessageStringTable.getString("SysRAM"); - _PREHASH_ObjectPosition = gMessageStringTable.getString("ObjectPosition"); - _PREHASH_SitPosition = gMessageStringTable.getString("SitPosition"); - _PREHASH_StartTime = gMessageStringTable.getString("StartTime"); - _PREHASH_BornOn = gMessageStringTable.getString("BornOn"); - _PREHASH_CameraCollidePlane = gMessageStringTable.getString("CameraCollidePlane"); - _PREHASH_EconomyDataRequest = gMessageStringTable.getString("EconomyDataRequest"); - _PREHASH_TeleportLureRequest = gMessageStringTable.getString("TeleportLureRequest"); - _PREHASH_FolderID = gMessageStringTable.getString("FolderID"); - _PREHASH_RegionHandleRequest = gMessageStringTable.getString("RegionHandleRequest"); - _PREHASH_ScriptDataRequest = gMessageStringTable.getString("ScriptDataRequest"); - _PREHASH_GroupRoleDataRequest = gMessageStringTable.getString("GroupRoleDataRequest"); - _PREHASH_GroupTitlesRequest = gMessageStringTable.getString("GroupTitlesRequest"); - _PREHASH_AgentWearablesRequest = gMessageStringTable.getString("AgentWearablesRequest"); - _PREHASH_MapBlockRequest = gMessageStringTable.getString("MapBlockRequest"); - _PREHASH_LureID = gMessageStringTable.getString("LureID"); - _PREHASH_CopyCenters = gMessageStringTable.getString("CopyCenters"); - _PREHASH_ParamList = gMessageStringTable.getString("ParamList"); - _PREHASH_InventorySerial = gMessageStringTable.getString("InventorySerial"); - _PREHASH_EdgeDataPacket = gMessageStringTable.getString("EdgeDataPacket"); - _PREHASH_AvatarPickerReply = gMessageStringTable.getString("AvatarPickerReply"); - _PREHASH_ParcelDwellReply = gMessageStringTable.getString("ParcelDwellReply"); - _PREHASH_IsForSale = gMessageStringTable.getString("IsForSale"); - _PREHASH_MuteID = gMessageStringTable.getString("MuteID"); - _PREHASH_MeanCollisionAlert = gMessageStringTable.getString("MeanCollisionAlert"); - _PREHASH_CanAcceptTasks = gMessageStringTable.getString("CanAcceptTasks"); - _PREHASH_ItemData = gMessageStringTable.getString("ItemData"); - _PREHASH_AnimationList = gMessageStringTable.getString("AnimationList"); - _PREHASH_Reputation = gMessageStringTable.getString("Reputation"); - _PREHASH_IntValue = gMessageStringTable.getString("IntValue"); - _PREHASH_TargetType = gMessageStringTable.getString("TargetType"); - _PREHASH_Amount = gMessageStringTable.getString("Amount"); - _PREHASH_HasAttachment = gMessageStringTable.getString("HasAttachment"); - _PREHASH_UpdateAttachment = gMessageStringTable.getString("UpdateAttachment"); - _PREHASH_RemoveAttachment = gMessageStringTable.getString("RemoveAttachment"); - _PREHASH_HeightWidthBlock = gMessageStringTable.getString("HeightWidthBlock"); - _PREHASH_RequestObjectPropertiesFamily = gMessageStringTable.getString("RequestObjectPropertiesFamily"); - _PREHASH_ObjectPropertiesFamily = gMessageStringTable.getString("ObjectPropertiesFamily"); - _PREHASH_UserData = gMessageStringTable.getString("UserData"); - _PREHASH_IsReadable = gMessageStringTable.getString("IsReadable"); - _PREHASH_PathCurve = gMessageStringTable.getString("PathCurve"); - _PREHASH_Status = gMessageStringTable.getString("Status"); - _PREHASH_FromGroup = gMessageStringTable.getString("FromGroup"); - _PREHASH_AlreadyVoted = gMessageStringTable.getString("AlreadyVoted"); - _PREHASH_PlacesReply = gMessageStringTable.getString("PlacesReply"); - _PREHASH_DirPlacesReply = gMessageStringTable.getString("DirPlacesReply"); - _PREHASH_ParcelBuy = gMessageStringTable.getString("ParcelBuy"); - _PREHASH_DirFindQueryBackend = gMessageStringTable.getString("DirFindQueryBackend"); - _PREHASH_DirPlacesQueryBackend = gMessageStringTable.getString("DirPlacesQueryBackend"); - _PREHASH_DirClassifiedQueryBackend = gMessageStringTable.getString("DirClassifiedQueryBackend"); - _PREHASH_DirLandQueryBackend = gMessageStringTable.getString("DirLandQueryBackend"); - _PREHASH_DirPopularQueryBackend = gMessageStringTable.getString("DirPopularQueryBackend"); - _PREHASH_HistoryData = gMessageStringTable.getString("HistoryData"); - _PREHASH_SnapshotID = gMessageStringTable.getString("SnapshotID"); - _PREHASH_Aspect = gMessageStringTable.getString("Aspect"); - _PREHASH_ParamSize = gMessageStringTable.getString("ParamSize"); - _PREHASH_VoteCast = gMessageStringTable.getString("VoteCast"); - _PREHASH_CastsShadows = gMessageStringTable.getString("CastsShadows"); - _PREHASH_EveryoneMask = gMessageStringTable.getString("EveryoneMask"); - _PREHASH_ObjectSpinUpdate = gMessageStringTable.getString("ObjectSpinUpdate"); - _PREHASH_MaturePublish = gMessageStringTable.getString("MaturePublish"); - _PREHASH_UseExistingAsset = gMessageStringTable.getString("UseExistingAsset"); - _PREHASH_Powers = gMessageStringTable.getString("Powers"); - _PREHASH_ParcelLocalID = gMessageStringTable.getString("ParcelLocalID"); - _PREHASH_TeleportCancel = gMessageStringTable.getString("TeleportCancel"); - _PREHASH_UnixTime = gMessageStringTable.getString("UnixTime"); - _PREHASH_QueryFlags = gMessageStringTable.getString("QueryFlags"); - _PREHASH_AlwaysRun = gMessageStringTable.getString("AlwaysRun"); - _PREHASH_Bottom = gMessageStringTable.getString("Bottom"); - _PREHASH_ButtonData = gMessageStringTable.getString("ButtonData"); - _PREHASH_SoundData = gMessageStringTable.getString("SoundData"); - _PREHASH_ViewerStats = gMessageStringTable.getString("ViewerStats"); - _PREHASH_RegionHandshake = gMessageStringTable.getString("RegionHandshake"); - _PREHASH_ObjectDescription = gMessageStringTable.getString("ObjectDescription"); - _PREHASH_Description = gMessageStringTable.getString("Description"); - _PREHASH_ParamType = gMessageStringTable.getString("ParamType"); - _PREHASH_UUIDNameReply = gMessageStringTable.getString("UUIDNameReply"); - _PREHASH_UUIDGroupNameReply = gMessageStringTable.getString("UUIDGroupNameReply"); - _PREHASH_SaveAssetIntoInventory = gMessageStringTable.getString("SaveAssetIntoInventory"); - _PREHASH_UserInfo = gMessageStringTable.getString("UserInfo"); - _PREHASH_AnimSequenceID = gMessageStringTable.getString("AnimSequenceID"); - _PREHASH_NVPairs = gMessageStringTable.getString("NVPairs"); - _PREHASH_GroupNoticesListRequest = gMessageStringTable.getString("GroupNoticesListRequest"); - _PREHASH_ParcelAccessListRequest = gMessageStringTable.getString("ParcelAccessListRequest"); - _PREHASH_MuteListRequest = gMessageStringTable.getString("MuteListRequest"); - _PREHASH_RpcChannelRequest = gMessageStringTable.getString("RpcChannelRequest"); - _PREHASH_LandStatRequest = gMessageStringTable.getString("LandStatRequest"); - _PREHASH_PlacesQuery = gMessageStringTable.getString("PlacesQuery"); - _PREHASH_DirPlacesQuery = gMessageStringTable.getString("DirPlacesQuery"); - _PREHASH_SortOrder = gMessageStringTable.getString("SortOrder"); - _PREHASH_Hunter = gMessageStringTable.getString("Hunter"); - _PREHASH_SunAngVelocity = gMessageStringTable.getString("SunAngVelocity"); - _PREHASH_BinaryBucket = gMessageStringTable.getString("BinaryBucket"); - _PREHASH_ImagePacket = gMessageStringTable.getString("ImagePacket"); - _PREHASH_StartGroupProposal = gMessageStringTable.getString("StartGroupProposal"); - _PREHASH_EnergyLevel = gMessageStringTable.getString("EnergyLevel"); - _PREHASH_PriceForListing = gMessageStringTable.getString("PriceForListing"); - _PREHASH_Scale = gMessageStringTable.getString("Scale"); - _PREHASH_EstateCovenantReply = gMessageStringTable.getString("EstateCovenantReply"); - _PREHASH_ParentEstateID = gMessageStringTable.getString("ParentEstateID"); - _PREHASH_Extra2 = gMessageStringTable.getString("Extra2"); - _PREHASH_Throttle = gMessageStringTable.getString("Throttle"); - _PREHASH_SimIP = gMessageStringTable.getString("SimIP"); - _PREHASH_GodID = gMessageStringTable.getString("GodID"); - _PREHASH_TeleportMinPrice = gMessageStringTable.getString("TeleportMinPrice"); - _PREHASH_VoteItem = gMessageStringTable.getString("VoteItem"); - _PREHASH_ObjectRotation = gMessageStringTable.getString("ObjectRotation"); - _PREHASH_SitRotation = gMessageStringTable.getString("SitRotation"); - _PREHASH_SnapSelection = gMessageStringTable.getString("SnapSelection"); - _PREHASH_SoundTrigger = gMessageStringTable.getString("SoundTrigger"); - _PREHASH_TerrainRaiseLimit = gMessageStringTable.getString("TerrainRaiseLimit"); - _PREHASH_Quorum = gMessageStringTable.getString("Quorum"); - _PREHASH_AgentBlock = gMessageStringTable.getString("AgentBlock"); - _PREHASH_CommandBlock = gMessageStringTable.getString("CommandBlock"); - _PREHASH_PricePublicObjectDecay = gMessageStringTable.getString("PricePublicObjectDecay"); - _PREHASH_SpawnPointPos = gMessageStringTable.getString("SpawnPointPos"); - _PREHASH_VolumeDetail = gMessageStringTable.getString("VolumeDetail"); - _PREHASH_FromAgentName = gMessageStringTable.getString("FromAgentName"); - _PREHASH_Range = gMessageStringTable.getString("Range"); - _PREHASH_DirectoryVisibility = gMessageStringTable.getString("DirectoryVisibility"); - _PREHASH_PublicIP = gMessageStringTable.getString("PublicIP"); - _PREHASH_TeleportFailed = gMessageStringTable.getString("TeleportFailed"); - _PREHASH_PreloadSound = gMessageStringTable.getString("PreloadSound"); - _PREHASH_ScreenshotID = gMessageStringTable.getString("ScreenshotID"); - _PREHASH_CovenantTimestamp = gMessageStringTable.getString("CovenantTimestamp"); - _PREHASH_OldestUnacked = gMessageStringTable.getString("OldestUnacked"); - _PREHASH_SimulatorIP = gMessageStringTable.getString("SimulatorIP"); - _PREHASH_Value = gMessageStringTable.getString("Value"); - _PREHASH_JointAxisOrAnchor = gMessageStringTable.getString("JointAxisOrAnchor"); - _PREHASH_Test0 = gMessageStringTable.getString("Test0"); - _PREHASH_Test1 = gMessageStringTable.getString("Test1"); - _PREHASH_Test2 = gMessageStringTable.getString("Test2"); - _PREHASH_SunPhase = gMessageStringTable.getString("SunPhase"); - _PREHASH_ParcelDivide = gMessageStringTable.getString("ParcelDivide"); - _PREHASH_PriceObjectClaim = gMessageStringTable.getString("PriceObjectClaim"); - _PREHASH_Field = gMessageStringTable.getString("Field"); - _PREHASH_Ratio = gMessageStringTable.getString("Ratio"); - _PREHASH_JoinGroupReply = gMessageStringTable.getString("JoinGroupReply"); - _PREHASH_LiveHelpGroupReply = gMessageStringTable.getString("LiveHelpGroupReply"); - _PREHASH_Score = gMessageStringTable.getString("Score"); - _PREHASH_Image = gMessageStringTable.getString("Image"); - _PREHASH_ObjectClickAction = gMessageStringTable.getString("ObjectClickAction"); - _PREHASH_Parameter = gMessageStringTable.getString("Parameter"); - _PREHASH_Flags = gMessageStringTable.getString("Flags"); - _PREHASH_Plane = gMessageStringTable.getString("Plane"); - _PREHASH_Width = gMessageStringTable.getString("Width"); - _PREHASH_Right = gMessageStringTable.getString("Right"); - _PREHASH_DirFindQuery = gMessageStringTable.getString("DirFindQuery"); - _PREHASH_Textures = gMessageStringTable.getString("Textures"); - _PREHASH_EventData = gMessageStringTable.getString("EventData"); - _PREHASH_Final = gMessageStringTable.getString("Final"); - _PREHASH_System = gMessageStringTable.getString("System"); - _PREHASH_TelehubPos = gMessageStringTable.getString("TelehubPos"); - _PREHASH_ReportAutosaveCrash = gMessageStringTable.getString("ReportAutosaveCrash"); - _PREHASH_CreateTrustedCircuit = gMessageStringTable.getString("CreateTrustedCircuit"); - _PREHASH_DenyTrustedCircuit = gMessageStringTable.getString("DenyTrustedCircuit"); - _PREHASH_RequestTrustedCircuit = gMessageStringTable.getString("RequestTrustedCircuit"); - _PREHASH_Codec = gMessageStringTable.getString("Codec"); - _PREHASH_Modal = gMessageStringTable.getString("Modal"); - _PREHASH_ChildAgentUnknown = gMessageStringTable.getString("ChildAgentUnknown"); - _PREHASH_LandingType = gMessageStringTable.getString("LandingType"); - _PREHASH_ScriptRunningReply = gMessageStringTable.getString("ScriptRunningReply"); - _PREHASH_Reply = gMessageStringTable.getString("Reply"); - _PREHASH_GroupAccountDetailsReply = gMessageStringTable.getString("GroupAccountDetailsReply"); - _PREHASH_TelehubRot = gMessageStringTable.getString("TelehubRot"); - _PREHASH_AcceptFriendship = gMessageStringTable.getString("AcceptFriendship"); - _PREHASH_ItemType = gMessageStringTable.getString("ItemType"); - _PREHASH_DwellInfo = gMessageStringTable.getString("DwellInfo"); - _PREHASH_AgentResume = gMessageStringTable.getString("AgentResume"); - _PREHASH_MailFilter = gMessageStringTable.getString("MailFilter"); - _PREHASH_Disconnect = gMessageStringTable.getString("Disconnect"); - _PREHASH_SimPosition = gMessageStringTable.getString("SimPosition"); - _PREHASH_SimWideTotalPrims = gMessageStringTable.getString("SimWideTotalPrims"); - _PREHASH_Index = gMessageStringTable.getString("Index"); - _PREHASH_SimFilename = gMessageStringTable.getString("SimFilename"); - _PREHASH_LastOwnerID = gMessageStringTable.getString("LastOwnerID"); - _PREHASH_GroupNoticeRequest = gMessageStringTable.getString("GroupNoticeRequest"); - _PREHASH_EmailMessageRequest = gMessageStringTable.getString("EmailMessageRequest"); - _PREHASH_MapItemRequest = gMessageStringTable.getString("MapItemRequest"); - _PREHASH_AgentCount = gMessageStringTable.getString("AgentCount"); - _PREHASH_MessageBlock = gMessageStringTable.getString("MessageBlock"); - _PREHASH_FuseBlock = gMessageStringTable.getString("FuseBlock"); - _PREHASH_AgentGroupData = gMessageStringTable.getString("AgentGroupData"); - _PREHASH_ClassifiedInfoUpdate = gMessageStringTable.getString("ClassifiedInfoUpdate"); - _PREHASH_RegionPos = gMessageStringTable.getString("RegionPos"); - _PREHASH_ParcelMediaUpdate = gMessageStringTable.getString("ParcelMediaUpdate"); - _PREHASH_NoticeID = gMessageStringTable.getString("NoticeID"); - _PREHASH_GridX = gMessageStringTable.getString("GridX"); - _PREHASH_GridY = gMessageStringTable.getString("GridY"); - _PREHASH_Title = gMessageStringTable.getString("Title"); - _PREHASH_AuctionID = gMessageStringTable.getString("AuctionID"); - _PREHASH_VoteType = gMessageStringTable.getString("VoteType"); - _PREHASH_CategoryID = gMessageStringTable.getString("CategoryID"); - _PREHASH_Token = gMessageStringTable.getString("Token"); - _PREHASH_AggregatePerms = gMessageStringTable.getString("AggregatePerms"); - _PREHASH_ObjectSelect = gMessageStringTable.getString("ObjectSelect"); - _PREHASH_ForceObjectSelect = gMessageStringTable.getString("ForceObjectSelect"); - _PREHASH_Price = gMessageStringTable.getString("Price"); - _PREHASH_SunDirection = gMessageStringTable.getString("SunDirection"); - _PREHASH_FromName = gMessageStringTable.getString("FromName"); - _PREHASH_ChangeInventoryItemFlags = gMessageStringTable.getString("ChangeInventoryItemFlags"); - _PREHASH_Force = gMessageStringTable.getString("Force"); - _PREHASH_TransactionBlock = gMessageStringTable.getString("TransactionBlock"); - _PREHASH_PowersMask = gMessageStringTable.getString("PowersMask"); - _PREHASH_Stamp = gMessageStringTable.getString("Stamp"); - _PREHASH_TotalCredits = gMessageStringTable.getString("TotalCredits"); - _PREHASH_State = gMessageStringTable.getString("State"); - _PREHASH_TextureIndex = gMessageStringTable.getString("TextureIndex"); - _PREHASH_InviteeID = gMessageStringTable.getString("InviteeID"); - _PREHASH_ParcelReclaim = gMessageStringTable.getString("ParcelReclaim"); - _PREHASH_Money = gMessageStringTable.getString("Money"); - _PREHASH_PathTwist = gMessageStringTable.getString("PathTwist"); - _PREHASH_AuthBuyerID = gMessageStringTable.getString("AuthBuyerID"); - _PREHASH_Color = gMessageStringTable.getString("Color"); - _PREHASH_SourceType = gMessageStringTable.getString("SourceType"); - _PREHASH_World = gMessageStringTable.getString("World"); - _PREHASH_QueryData = gMessageStringTable.getString("QueryData"); - _PREHASH_Users = gMessageStringTable.getString("Users"); - _PREHASH_SysOS = gMessageStringTable.getString("SysOS"); - _PREHASH_Notes = gMessageStringTable.getString("Notes"); - _PREHASH_AvatarID = gMessageStringTable.getString("AvatarID"); - _PREHASH_FounderID = gMessageStringTable.getString("FounderID"); - _PREHASH_EndPointID = gMessageStringTable.getString("EndPointID"); - _PREHASH_LocationLookAt = gMessageStringTable.getString("LocationLookAt"); - _PREHASH_Sound = gMessageStringTable.getString("Sound"); - _PREHASH_Cover = gMessageStringTable.getString("Cover"); - _PREHASH_TotalObjectCount = gMessageStringTable.getString("TotalObjectCount"); - _PREHASH_TextureEntry = gMessageStringTable.getString("TextureEntry"); - _PREHASH_SquareMetersCommitted = gMessageStringTable.getString("SquareMetersCommitted"); - _PREHASH_ChannelID = gMessageStringTable.getString("ChannelID"); - _PREHASH_Dwell = gMessageStringTable.getString("Dwell"); - _PREHASH_North = gMessageStringTable.getString("North"); - _PREHASH_AgentUpdate = gMessageStringTable.getString("AgentUpdate"); - _PREHASH_PickGodDelete = gMessageStringTable.getString("PickGodDelete"); - _PREHASH_HostName = gMessageStringTable.getString("HostName"); - _PREHASH_PriceParcelClaim = gMessageStringTable.getString("PriceParcelClaim"); - _PREHASH_ParcelClaim = gMessageStringTable.getString("ParcelClaim"); - _PREHASH_AgentPowers = gMessageStringTable.getString("AgentPowers"); - _PREHASH_ProfileHollow = gMessageStringTable.getString("ProfileHollow"); - _PREHASH_GroupRoleChanges = gMessageStringTable.getString("GroupRoleChanges"); - _PREHASH_Count = gMessageStringTable.getString("Count"); - _PREHASH_South = gMessageStringTable.getString("South"); - _PREHASH_ObjectUpdateCompressed = gMessageStringTable.getString("ObjectUpdateCompressed"); - _PREHASH_MuteFlags = gMessageStringTable.getString("MuteFlags"); - _PREHASH_Group = gMessageStringTable.getString("Group"); - _PREHASH_AgentPause = gMessageStringTable.getString("AgentPause"); - _PREHASH_LanguagesText = gMessageStringTable.getString("LanguagesText"); - _PREHASH_Error = gMessageStringTable.getString("Error"); - _PREHASH_InternalScriptMail = gMessageStringTable.getString("InternalScriptMail"); - _PREHASH_FindAgent = gMessageStringTable.getString("FindAgent"); - _PREHASH_AgentData = gMessageStringTable.getString("AgentData"); - _PREHASH_FolderData = gMessageStringTable.getString("FolderData"); - _PREHASH_AssetBlock = gMessageStringTable.getString("AssetBlock"); - _PREHASH_AcceptNotices = gMessageStringTable.getString("AcceptNotices"); - _PREHASH_SetGroupAcceptNotices = gMessageStringTable.getString("SetGroupAcceptNotices"); - _PREHASH_CloseCircuit = gMessageStringTable.getString("CloseCircuit"); - _PREHASH_TeleportFinish = gMessageStringTable.getString("TeleportFinish"); - _PREHASH_PathRevolutions = gMessageStringTable.getString("PathRevolutions"); - _PREHASH_ClassifiedInfoReply = gMessageStringTable.getString("ClassifiedInfoReply"); - _PREHASH_ParcelInfoReply = gMessageStringTable.getString("ParcelInfoReply"); - _PREHASH_AutosaveData = gMessageStringTable.getString("AutosaveData"); - _PREHASH_SetStartLocation = gMessageStringTable.getString("SetStartLocation"); - _PREHASH_PassHours = gMessageStringTable.getString("PassHours"); - _PREHASH_AttachmentPt = gMessageStringTable.getString("AttachmentPt"); - _PREHASH_ParcelFlags = gMessageStringTable.getString("ParcelFlags"); - _PREHASH_NumVotes = gMessageStringTable.getString("NumVotes"); - _PREHASH_AvatarPickerRequest = gMessageStringTable.getString("AvatarPickerRequest"); - _PREHASH_TeleportLocationRequest = gMessageStringTable.getString("TeleportLocationRequest"); - _PREHASH_DataHomeLocationRequest = gMessageStringTable.getString("DataHomeLocationRequest"); - _PREHASH_EventNotificationAddRequest = gMessageStringTable.getString("EventNotificationAddRequest"); - _PREHASH_ParcelDwellRequest = gMessageStringTable.getString("ParcelDwellRequest"); - _PREHASH_EventLocationRequest = gMessageStringTable.getString("EventLocationRequest"); - _PREHASH_SetStartLocationRequest = gMessageStringTable.getString("SetStartLocationRequest"); - _PREHASH_QueryStart = gMessageStringTable.getString("QueryStart"); - _PREHASH_EjectData = gMessageStringTable.getString("EjectData"); - _PREHASH_AvatarTextureUpdate = gMessageStringTable.getString("AvatarTextureUpdate"); - _PREHASH_RPCServerPort = gMessageStringTable.getString("RPCServerPort"); - _PREHASH_Bytes = gMessageStringTable.getString("Bytes"); - _PREHASH_Extra = gMessageStringTable.getString("Extra"); - _PREHASH_ForceScriptControlRelease = gMessageStringTable.getString("ForceScriptControlRelease"); - _PREHASH_ParcelRelease = gMessageStringTable.getString("ParcelRelease"); - _PREHASH_VFileType = gMessageStringTable.getString("VFileType"); - _PREHASH_EjectGroupMemberReply = gMessageStringTable.getString("EjectGroupMemberReply"); - _PREHASH_ImageData = gMessageStringTable.getString("ImageData"); - _PREHASH_SimulatorViewerTimeMessage = gMessageStringTable.getString("SimulatorViewerTimeMessage"); - _PREHASH_Rotation = gMessageStringTable.getString("Rotation"); - _PREHASH_Selection = gMessageStringTable.getString("Selection"); - _PREHASH_TransactionData = gMessageStringTable.getString("TransactionData"); - _PREHASH_OperationData = gMessageStringTable.getString("OperationData"); - _PREHASH_ExpirationDate = gMessageStringTable.getString("ExpirationDate"); - _PREHASH_ParcelDeedToGroup = gMessageStringTable.getString("ParcelDeedToGroup"); - _PREHASH_AvatarPicksReply = gMessageStringTable.getString("AvatarPicksReply"); - _PREHASH_GroupTitlesReply = gMessageStringTable.getString("GroupTitlesReply"); - _PREHASH_AgentInfo = gMessageStringTable.getString("AgentInfo"); - _PREHASH_MoneyTransferBackend = gMessageStringTable.getString("MoneyTransferBackend"); - _PREHASH_NextOwnerMask = gMessageStringTable.getString("NextOwnerMask"); - _PREHASH_MuteData = gMessageStringTable.getString("MuteData"); - _PREHASH_PassPrice = gMessageStringTable.getString("PassPrice"); - _PREHASH_SourceID = gMessageStringTable.getString("SourceID"); - _PREHASH_ChangeUserRights = gMessageStringTable.getString("ChangeUserRights"); - _PREHASH_TeleportFlags = gMessageStringTable.getString("TeleportFlags"); - _PREHASH_SlaveParcelData = gMessageStringTable.getString("SlaveParcelData"); - _PREHASH_AssetData = gMessageStringTable.getString("AssetData"); - _PREHASH_MultipleObjectUpdate = gMessageStringTable.getString("MultipleObjectUpdate"); - _PREHASH_ObjectUpdate = gMessageStringTable.getString("ObjectUpdate"); - _PREHASH_ImprovedTerseObjectUpdate = gMessageStringTable.getString("ImprovedTerseObjectUpdate"); - _PREHASH_ConfirmXferPacket = gMessageStringTable.getString("ConfirmXferPacket"); - _PREHASH_StartPingCheck = gMessageStringTable.getString("StartPingCheck"); - _PREHASH_SimWideDeletes = gMessageStringTable.getString("SimWideDeletes"); - _PREHASH_LandStatReply = gMessageStringTable.getString("LandStatReply"); - _PREHASH_IsPhantom = gMessageStringTable.getString("IsPhantom"); - _PREHASH_AgentList = gMessageStringTable.getString("AgentList"); - _PREHASH_SimApproved = gMessageStringTable.getString("SimApproved"); - _PREHASH_RezObject = gMessageStringTable.getString("RezObject"); - _PREHASH_TaskLocalID = gMessageStringTable.getString("TaskLocalID"); - _PREHASH_ClaimDate = gMessageStringTable.getString("ClaimDate"); - _PREHASH_MergeParcel = gMessageStringTable.getString("MergeParcel"); - _PREHASH_Priority = gMessageStringTable.getString("Priority"); - _PREHASH_QueryText = gMessageStringTable.getString("QueryText"); - _PREHASH_GroupNoticeAdd = gMessageStringTable.getString("GroupNoticeAdd"); - _PREHASH_ReturnType = gMessageStringTable.getString("ReturnType"); - _PREHASH_FetchFolders = gMessageStringTable.getString("FetchFolders"); - _PREHASH_SimulatorPublicHostBlock = gMessageStringTable.getString("SimulatorPublicHostBlock"); - _PREHASH_HeaderData = gMessageStringTable.getString("HeaderData"); - _PREHASH_RequestMultipleObjects = gMessageStringTable.getString("RequestMultipleObjects"); - _PREHASH_RetrieveInstantMessages = gMessageStringTable.getString("RetrieveInstantMessages"); - _PREHASH_OpenCircuit = gMessageStringTable.getString("OpenCircuit"); - _PREHASH_CrossedRegion = gMessageStringTable.getString("CrossedRegion"); - _PREHASH_DirGroupsReply = gMessageStringTable.getString("DirGroupsReply"); - _PREHASH_AvatarGroupsReply = gMessageStringTable.getString("AvatarGroupsReply"); - _PREHASH_EmailMessageReply = gMessageStringTable.getString("EmailMessageReply"); - _PREHASH_GroupVoteHistoryItemReply = gMessageStringTable.getString("GroupVoteHistoryItemReply"); - _PREHASH_ViewerPosition = gMessageStringTable.getString("ViewerPosition"); - _PREHASH_Position = gMessageStringTable.getString("Position"); - _PREHASH_ParentEstate = gMessageStringTable.getString("ParentEstate"); - _PREHASH_EstateName = gMessageStringTable.getString("EstateName"); - _PREHASH_MuteName = gMessageStringTable.getString("MuteName"); - _PREHASH_ParcelRename = gMessageStringTable.getString("ParcelRename"); - _PREHASH_ViewerFilename = gMessageStringTable.getString("ViewerFilename"); - _PREHASH_UserReportInternal = gMessageStringTable.getString("UserReportInternal"); - _PREHASH_AvatarPropertiesRequest = gMessageStringTable.getString("AvatarPropertiesRequest"); - _PREHASH_ParcelPropertiesRequest = gMessageStringTable.getString("ParcelPropertiesRequest"); - _PREHASH_GroupProfileRequest = gMessageStringTable.getString("GroupProfileRequest"); - _PREHASH_AgentDataUpdateRequest = gMessageStringTable.getString("AgentDataUpdateRequest"); - _PREHASH_PriceObjectScaleFactor = gMessageStringTable.getString("PriceObjectScaleFactor"); - _PREHASH_OpenEnrollment = gMessageStringTable.getString("OpenEnrollment"); - _PREHASH_GroupData = gMessageStringTable.getString("GroupData"); - _PREHASH_RequestGodlikePowers = gMessageStringTable.getString("RequestGodlikePowers"); - _PREHASH_GrantGodlikePowers = gMessageStringTable.getString("GrantGodlikePowers"); - _PREHASH_TransactionID = gMessageStringTable.getString("TransactionID"); - _PREHASH_DestinationID = gMessageStringTable.getString("DestinationID"); - _PREHASH_Controls = gMessageStringTable.getString("Controls"); - _PREHASH_FirstDetachAll = gMessageStringTable.getString("FirstDetachAll"); - _PREHASH_EstateID = gMessageStringTable.getString("EstateID"); - _PREHASH_ImprovedInstantMessage = gMessageStringTable.getString("ImprovedInstantMessage"); - _PREHASH_CheckParcelSales = gMessageStringTable.getString("CheckParcelSales"); - _PREHASH_ParcelSales = gMessageStringTable.getString("ParcelSales"); - _PREHASH_CurrentInterval = gMessageStringTable.getString("CurrentInterval"); - _PREHASH_PriceRentLight = gMessageStringTable.getString("PriceRentLight"); - _PREHASH_MediaAutoScale = gMessageStringTable.getString("MediaAutoScale"); - _PREHASH_NeighborBlock = gMessageStringTable.getString("NeighborBlock"); - _PREHASH_LayerData = gMessageStringTable.getString("LayerData"); - _PREHASH_NVPairData = gMessageStringTable.getString("NVPairData"); - _PREHASH_TeleportLocal = gMessageStringTable.getString("TeleportLocal"); - _PREHASH_EjecteeID = gMessageStringTable.getString("EjecteeID"); - _PREHASH_VoteInitiator = gMessageStringTable.getString("VoteInitiator"); - _PREHASH_TypeData = gMessageStringTable.getString("TypeData"); - _PREHASH_OwnerIDs = gMessageStringTable.getString("OwnerIDs"); - _PREHASH_SystemKickUser = gMessageStringTable.getString("SystemKickUser"); - _PREHASH_TransactionTime = gMessageStringTable.getString("TransactionTime"); - _PREHASH_TimeToLive = gMessageStringTable.getString("TimeToLive"); - _PREHASH_OldAgentID = gMessageStringTable.getString("OldAgentID"); - _PREHASH_MusicURL = gMessageStringTable.getString("MusicURL"); - _PREHASH_ParcelPrimBonus = gMessageStringTable.getString("ParcelPrimBonus"); - _PREHASH_EjectUser = gMessageStringTable.getString("EjectUser"); - _PREHASH_CoarseLocationUpdate = gMessageStringTable.getString("CoarseLocationUpdate"); - _PREHASH_ChildAgentPositionUpdate = gMessageStringTable.getString("ChildAgentPositionUpdate"); - _PREHASH_StoreLocal = gMessageStringTable.getString("StoreLocal"); - _PREHASH_GroupName = gMessageStringTable.getString("GroupName"); - _PREHASH_PriceParcelRent = gMessageStringTable.getString("PriceParcelRent"); - _PREHASH_SimStatus = gMessageStringTable.getString("SimStatus"); - _PREHASH_TransactionSuccess = gMessageStringTable.getString("TransactionSuccess"); - _PREHASH_LureType = gMessageStringTable.getString("LureType"); - _PREHASH_GroupMask = gMessageStringTable.getString("GroupMask"); - _PREHASH_SitObject = gMessageStringTable.getString("SitObject"); - _PREHASH_Override = gMessageStringTable.getString("Override"); - _PREHASH_LocomotionState = gMessageStringTable.getString("LocomotionState"); - _PREHASH_PriceUpload = gMessageStringTable.getString("PriceUpload"); - _PREHASH_RemoveParcel = gMessageStringTable.getString("RemoveParcel"); - _PREHASH_ConfirmAuctionStart = gMessageStringTable.getString("ConfirmAuctionStart"); - _PREHASH_RpcScriptRequestInbound = gMessageStringTable.getString("RpcScriptRequestInbound"); - _PREHASH_ActiveGroupID = gMessageStringTable.getString("ActiveGroupID"); - _PREHASH_ParcelReturnObjects = gMessageStringTable.getString("ParcelReturnObjects"); - _PREHASH_TotalObjects = gMessageStringTable.getString("TotalObjects"); - _PREHASH_ObjectExtraParams = gMessageStringTable.getString("ObjectExtraParams"); - _PREHASH_Questions = gMessageStringTable.getString("Questions"); - _PREHASH_TransferAbort = gMessageStringTable.getString("TransferAbort"); - _PREHASH_TransferInventory = gMessageStringTable.getString("TransferInventory"); - _PREHASH_RayTargetID = gMessageStringTable.getString("RayTargetID"); - _PREHASH_ClaimPrice = gMessageStringTable.getString("ClaimPrice"); - _PREHASH_ObjectProperties = gMessageStringTable.getString("ObjectProperties"); - _PREHASH_ParcelProperties = gMessageStringTable.getString("ParcelProperties"); - _PREHASH_EstateOwnerID = gMessageStringTable.getString("EstateOwnerID"); - _PREHASH_LogoutRequest = gMessageStringTable.getString("LogoutRequest"); - _PREHASH_AssetUploadRequest = gMessageStringTable.getString("AssetUploadRequest"); - _PREHASH_TransactionType = gMessageStringTable.getString("TransactionType"); - _PREHASH_AvatarPropertiesUpdate = gMessageStringTable.getString("AvatarPropertiesUpdate"); - _PREHASH_ParcelPropertiesUpdate = gMessageStringTable.getString("ParcelPropertiesUpdate"); - _PREHASH_FetchItems = gMessageStringTable.getString("FetchItems"); - _PREHASH_AbortXfer = gMessageStringTable.getString("AbortXfer"); - _PREHASH_DeRezAck = gMessageStringTable.getString("DeRezAck"); - _PREHASH_TakeControls = gMessageStringTable.getString("TakeControls"); - _PREHASH_DirLandReply = gMessageStringTable.getString("DirLandReply"); - _PREHASH_MuteType = gMessageStringTable.getString("MuteType"); - _PREHASH_IMViaEMail = gMessageStringTable.getString("IMViaEMail"); - _PREHASH_RentPrice = gMessageStringTable.getString("RentPrice"); - _PREHASH_GenericMessage = gMessageStringTable.getString("GenericMessage"); - _PREHASH_ChildAgentAlive = gMessageStringTable.getString("ChildAgentAlive"); - _PREHASH_AssetType = gMessageStringTable.getString("AssetType"); - _PREHASH_SpawnPointBlock = gMessageStringTable.getString("SpawnPointBlock"); - _PREHASH_AttachmentBlock = gMessageStringTable.getString("AttachmentBlock"); - _PREHASH_ObjectMaterial = gMessageStringTable.getString("ObjectMaterial"); - _PREHASH_OwnerName = gMessageStringTable.getString("OwnerName"); - _PREHASH_AvatarNotesReply = gMessageStringTable.getString("AvatarNotesReply"); - _PREHASH_CacheID = gMessageStringTable.getString("CacheID"); - _PREHASH_OwnerMask = gMessageStringTable.getString("OwnerMask"); - _PREHASH_TransferInventoryAck = gMessageStringTable.getString("TransferInventoryAck"); - _PREHASH_RegionDenyAgeUnverified = gMessageStringTable.getString("RegionDenyAgeUnverified"); - _PREHASH_AgeVerificationBlock = gMessageStringTable.getString("AgeVerificationBlock"); -} diff --git a/linden/indra/llmessage/message_prehash.h b/linden/indra/llmessage/message_prehash.h index 1a22fba..e65d539 100644 --- a/linden/indra/llmessage/message_prehash.h +++ b/linden/indra/llmessage/message_prehash.h @@ -1373,10 +1373,4 @@ extern char * _PREHASH_RegionDenyAgeUnverified; extern char * _PREHASH_AgeVerificationBlock; -void init_prehash_data(); - - - - - #endif diff --git a/linden/indra/llmessage/message_string_table.cpp b/linden/indra/llmessage/message_string_table.cpp index 36d1de0..e4da828 100644 --- a/linden/indra/llmessage/message_string_table.cpp +++ b/linden/indra/llmessage/message_string_table.cpp @@ -46,8 +46,6 @@ inline U32 message_hash_my_string(const char *str) } -LLMessageStringTable gMessageStringTable; - LLMessageStringTable::LLMessageStringTable() : mUsed(0) diff --git a/linden/indra/llprimitive/llmaterialtable.cpp b/linden/indra/llprimitive/llmaterialtable.cpp index 537c968..5e45e44 100644 --- a/linden/indra/llprimitive/llmaterialtable.cpp +++ b/linden/indra/llprimitive/llmaterialtable.cpp @@ -39,6 +39,54 @@ LLMaterialTable LLMaterialTable::basic(1); +/* + Old Havok 1 constants + +// these are the approximately correct friction values for various materials +// however Havok1's friction dynamics are not very correct, so the effective +// friction coefficients that result from these numbers are approximately +// 25-50% too low, more incorrect for the lower values. +F32 const LLMaterialTable::FRICTION_MIN = 0.2f; +F32 const LLMaterialTable::FRICTION_GLASS = 0.2f; // borosilicate glass +F32 const LLMaterialTable::FRICTION_LIGHT = 0.2f; // +F32 const LLMaterialTable::FRICTION_METAL = 0.3f; // steel +F32 const LLMaterialTable::FRICTION_PLASTIC = 0.4f; // HDPE +F32 const LLMaterialTable::FRICTION_WOOD = 0.6f; // southern pine +F32 const LLMaterialTable::FRICTION_FLESH = 0.60f; // saltwater +F32 const LLMaterialTable::FRICTION_LAND = 0.78f; // dirt +F32 const LLMaterialTable::FRICTION_STONE = 0.8f; // concrete +F32 const LLMaterialTable::FRICTION_RUBBER = 0.9f; // +F32 const LLMaterialTable::FRICTION_MAX = 0.95f; // +*/ + +// #if LL_CURRENT_HAVOK_VERSION == LL_HAVOK_VERSION_460 +// Havok4 has more correct friction dynamics, however here we have to use +// the "incorrect" equivalents for the legacy Havok1 behavior +F32 const LLMaterialTable::FRICTION_MIN = 0.15f; +F32 const LLMaterialTable::FRICTION_GLASS = 0.13f; // borosilicate glass +F32 const LLMaterialTable::FRICTION_LIGHT = 0.14f; // +F32 const LLMaterialTable::FRICTION_METAL = 0.22f; // steel +F32 const LLMaterialTable::FRICTION_PLASTIC = 0.3f; // HDPE +F32 const LLMaterialTable::FRICTION_WOOD = 0.44f; // southern pine +F32 const LLMaterialTable::FRICTION_FLESH = 0.46f; // saltwater +F32 const LLMaterialTable::FRICTION_LAND = 0.58f; // dirt +F32 const LLMaterialTable::FRICTION_STONE = 0.6f; // concrete +F32 const LLMaterialTable::FRICTION_RUBBER = 0.67f; // +F32 const LLMaterialTable::FRICTION_MAX = 0.71f; // +// #endif + +F32 const LLMaterialTable::RESTITUTION_MIN = 0.02f; +F32 const LLMaterialTable::RESTITUTION_LAND = LLMaterialTable::RESTITUTION_MIN; +F32 const LLMaterialTable::RESTITUTION_FLESH = 0.2f; // saltwater +F32 const LLMaterialTable::RESTITUTION_STONE = 0.4f; // concrete +F32 const LLMaterialTable::RESTITUTION_METAL = 0.4f; // steel +F32 const LLMaterialTable::RESTITUTION_WOOD = 0.5f; // southern pine +F32 const LLMaterialTable::RESTITUTION_GLASS = 0.7f; // borosilicate glass +F32 const LLMaterialTable::RESTITUTION_PLASTIC = 0.7f; // HDPE +F32 const LLMaterialTable::RESTITUTION_LIGHT = 0.7f; // +F32 const LLMaterialTable::RESTITUTION_RUBBER = 0.9f; // +F32 const LLMaterialTable::RESTITUTION_MAX = 0.95f; + F32 const LLMaterialTable::DEFAULT_FRICTION = 0.5f; F32 const LLMaterialTable::DEFAULT_RESTITUTION = 0.4f; diff --git a/linden/indra/llprimitive/llmaterialtable.h b/linden/indra/llprimitive/llmaterialtable.h index b48c832..863fb25 100644 --- a/linden/indra/llprimitive/llmaterialtable.h +++ b/linden/indra/llprimitive/llmaterialtable.h @@ -33,11 +33,36 @@ #define LL_LLMATERIALTABLE_H #include "lluuid.h" -#include "linked_lists.h" #include "llstring.h" +#include + const U32 LLMATERIAL_INFO_NAME_LENGTH = 256; +// We've moved toward more reasonable mass values for the Havok4 engine. +// The LEGACY_DEFAULT_OBJECT_DENSITY is used to maintain support for +// legacy scripts code (llGetMass()) and script energy consumption. +const F32 DEFAULT_OBJECT_DENSITY = 1000.0f; // per m^3 +const F32 LEGACY_DEFAULT_OBJECT_DENSITY = 10.0f; + +// Avatars density depends on the collision shape used. The approximate +// legacy volumes of avatars are: +// Body_Length Body_Width Body_Fat Leg_Length Volume(m^3) +// ------------------------------------------------------- +// min | min | min | min | 0.123 | +// max | max | max | max | 0.208 | +// +// Either the avatar shape must be tweaked to match those volumes +// or the DEFAULT_AVATAR_DENSITY must be adjusted to achieve the +// legacy mass. +// +// The current density appears to be low because the mass and +// inertia are computed as if the avatar were a cylinder which +// has more volume than the actual collision shape of the avatar. +// See the physics engine mass properties code for more info. +const F32 DEFAULT_AVATAR_DENSITY = 445.3f; // was 444.24f; + + class LLMaterialInfo { public: @@ -84,9 +109,33 @@ public: class LLMaterialTable { public: + static const F32 FRICTION_MIN; + static const F32 FRICTION_GLASS; + static const F32 FRICTION_LIGHT; + static const F32 FRICTION_METAL; + static const F32 FRICTION_PLASTIC; + static const F32 FRICTION_WOOD; + static const F32 FRICTION_LAND; + static const F32 FRICTION_STONE; + static const F32 FRICTION_FLESH; + static const F32 FRICTION_RUBBER; + static const F32 FRICTION_MAX; + + static const F32 RESTITUTION_MIN; + static const F32 RESTITUTION_LAND; + static const F32 RESTITUTION_FLESH; + static const F32 RESTITUTION_STONE; + static const F32 RESTITUTION_METAL; + static const F32 RESTITUTION_WOOD; + static const F32 RESTITUTION_GLASS; + static const F32 RESTITUTION_PLASTIC; + static const F32 RESTITUTION_LIGHT; + static const F32 RESTITUTION_RUBBER; + static const F32 RESTITUTION_MAX; + typedef std::list info_list_t; info_list_t mMaterialInfoList; - + LLUUID *mCollisionSoundMatrix; LLUUID *mSlidingSoundMatrix; LLUUID *mRollingSoundMatrix; @@ -117,8 +166,8 @@ public: char* getName(U8 mcode); F32 getDensity(U8 mcode); // kg/m^3, 0 if not found - F32 getFriction(U8 mcode); // havok values - F32 getRestitution(U8 mcode); // havok values + F32 getFriction(U8 mcode); // physics values + F32 getRestitution(U8 mcode); // physics values F32 getHPMod(U8 mcode); F32 getDamageMod(U8 mcode); F32 getEPMod(U8 mcode); diff --git a/linden/indra/llprimitive/llprimitive.cpp b/linden/indra/llprimitive/llprimitive.cpp index 91d3c4e..a906926 100644 --- a/linden/indra/llprimitive/llprimitive.cpp +++ b/linden/indra/llprimitive/llprimitive.cpp @@ -113,9 +113,38 @@ const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE = FALSE; const char *SCULPT_DEFAULT_TEXTURE = "be293869-d0d9-0a69-5989-ad27f1946fd4"; // old inverted texture: "7595d345-a24c-e7ef-f0bd-78793792133e"; +//static +// LEGACY: by default we use the LLVolumeMgr::gVolumeMgr global +// TODO -- eliminate this global from the codebase! +LLVolumeMgr* LLPrimitive::sVolumeManager = NULL; + +// static +void LLPrimitive::setVolumeManager( LLVolumeMgr* volume_manager ) +{ + if ( !volume_manager || sVolumeManager ) + { + llerrs << "Unable to set LLPrimitive::sVolumeManager to NULL" << llendl; + } + sVolumeManager = volume_manager; +} + +// static +bool LLPrimitive::cleanupVolumeManager() +{ + BOOL res = FALSE; + if (sVolumeManager) + { + res = sVolumeManager->cleanup(); + delete sVolumeManager; + sVolumeManager = NULL; + } + return res; +} + //=============================================================== LLPrimitive::LLPrimitive() +: mMiscFlags(0) { mPrimitiveCode = 0; @@ -149,7 +178,7 @@ LLPrimitive::~LLPrimitive() // Cleanup handled by volume manager if (mVolumep) { - gVolumeMgr->cleanupVolume(mVolumep); + sVolumeManager->cleanupVolume(mVolumep); } mVolumep = NULL; } @@ -162,7 +191,7 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) if (retval) { - retval->init(p_code); + retval->init_primitive(p_code); } else { @@ -173,7 +202,7 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code) } //=============================================================== -void LLPrimitive::init(LLPCode p_code) +void LLPrimitive::init_primitive(LLPCode p_code) { if (mNumTEs) { @@ -533,6 +562,8 @@ S32 LLPrimitive::setTEGlow(const U8 te, const F32 glow) LLPCode LLPrimitive::legacyToPCode(const U8 legacy) { + // TODO: Should this default to something valid? + // Maybe volume? LLPCode pcode = 0; switch (legacy) @@ -621,7 +652,7 @@ LLPCode LLPrimitive::legacyToPCode(const U8 legacy) pcode = LL_PCODE_TREE_NEW; break; default: - llwarns << "Unknown legacy code " << legacy << "!" << llendl; + llwarns << "Unknown legacy code " << legacy << " [" << (S32)legacy << "]!" << llendl; } return pcode; @@ -904,10 +935,10 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai } } - volumep = gVolumeMgr->getVolume(volume_params, detail); + volumep = sVolumeManager->getVolume(volume_params, detail); if (volumep == mVolumep) { - gVolumeMgr->cleanupVolume( volumep ); // gVolumeMgr->getVolume() creates a reference, but we don't need a second one. + sVolumeManager->cleanupVolume( volumep ); // LLVolumeMgr::getVolume() creates a reference, but we don't need a second one. return TRUE; } } @@ -950,7 +981,7 @@ BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detai // build the new object - gVolumeMgr->cleanupVolume(mVolumep); + sVolumeManager->cleanupVolume(mVolumep); mVolumep = volumep; U32 new_face_mask = mVolumep->mFaceMask; diff --git a/linden/indra/llprimitive/llprimitive.h b/linden/indra/llprimitive/llprimitive.h index 3b43e8f..e698a31 100644 --- a/linden/indra/llprimitive/llprimitive.h +++ b/linden/indra/llprimitive/llprimitive.h @@ -48,6 +48,7 @@ class LLColor4; class LLColor3; class LLTextureEntry; class LLDataPacker; +class LLVolumeMgr; enum LLGeomType // NOTE: same vals as GL Ids { @@ -269,11 +270,32 @@ public: class LLPrimitive : public LLXform { public: + + // HACK for removing LLPrimitive's dependency on gVolumeMgr global. + // If a different LLVolumeManager is instantiated and set early enough + // then the LLPrimitive class will use it instead of gVolumeMgr. + static LLVolumeMgr* getVolumeManager() { return sVolumeManager; } + static void setVolumeManager( LLVolumeMgr* volume_manager); + static bool cleanupVolumeManager(); + + // these flags influence how the RigidBody representation is built + static const U32 PRIM_FLAG_PHANTOM = 0x1 << 0; + static const U32 PRIM_FLAG_VOLUME_DETECT = 0x1 << 1; + static const U32 PRIM_FLAG_DYNAMIC = 0x1 << 2; + static const U32 PRIM_FLAG_AVATAR = 0x1 << 3; + static const U32 PRIM_FLAG_SCULPT = 0x1 << 4; + // not used yet, but soon + static const U32 PRIM_FLAG_COLLISION_CALLBACK = 0x1 << 5; + static const U32 PRIM_FLAG_CONVEX = 0x1 << 6; + static const U32 PRIM_FLAG_DEFAULT_VOLUME = 0x1 << 7; + static const U32 PRIM_FLAG_SITTING = 0x1 << 8; + static const U32 PRIM_FLAG_SITTING_ON_GROUND = 0x1 << 9; // Set along with PRIM_FLAG_SITTING + LLPrimitive(); virtual ~LLPrimitive(); static LLPrimitive *createPrimitive(LLPCode p_code); - void init(LLPCode p_code); + void init_primitive(LLPCode p_code); void setPCode(const LLPCode pcode); const LLVolume *getVolumeConst() const { return mVolumep; } // HACK for Windoze confusion about ostream operator in LLVolume @@ -369,8 +391,15 @@ public: void setTextureList(LLTextureEntry *listp); - inline BOOL isAvatar() const; - + inline BOOL isAvatar() const; + inline BOOL isSittingAvatar() const; + inline BOOL isSittingAvatarOnGround() const; + + void setFlags(U32 flags) { mMiscFlags = flags; } + void addFlags(U32 flags) { mMiscFlags |= flags; } + void removeFlags(U32 flags) { mMiscFlags &= ~flags; } + U32 getFlags() const { return mMiscFlags; } + static const char *pCodeToString(const LLPCode pcode); static LLPCode legacyToPCode(const U8 legacy); static U8 pCodeToLegacy(const LLPCode pcode); @@ -388,11 +417,28 @@ protected: LLTextureEntry *mTextureList; // list of texture GUIDs, scales, offsets U8 mMaterial; // Material code U8 mNumTEs; // # of faces on the primitve + U32 mMiscFlags; // home for misc bools + + static LLVolumeMgr* sVolumeManager; }; inline BOOL LLPrimitive::isAvatar() const { - return mPrimitiveCode == LL_PCODE_LEGACY_AVATAR; + return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode ) ? TRUE : FALSE; +} + +inline BOOL LLPrimitive::isSittingAvatar() const +{ + // this is only used server-side + return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode + && ((getFlags() & (PRIM_FLAG_SITTING | PRIM_FLAG_SITTING_ON_GROUND)) != 0) ) ? TRUE : FALSE; +} + +inline BOOL LLPrimitive::isSittingAvatarOnGround() const +{ + // this is only used server-side + return ( LL_PCODE_LEGACY_AVATAR == mPrimitiveCode + && ((getFlags() & PRIM_FLAG_SITTING_ON_GROUND) != 0) ) ? TRUE : FALSE; } // static diff --git a/linden/indra/llprimitive/llprimitive.vcproj b/linden/indra/llprimitive/llprimitive.vcproj index b04d938..620ace4 100644 --- a/linden/indra/llprimitive/llprimitive.vcproj +++ b/linden/indra/llprimitive/llprimitive.vcproj @@ -19,8 +19,8 @@ + + +#include +#include +#include + +// common includes +#include "stdtypes.h" +#include "v3math.h" +#include "llquaternion.h" +#include "llsphere.h" + + +const F32 MAX_OBJECT_SPAN = 54.f; // max distance from outside edge of an object to the farthest edge +const F32 OBJECT_SPAN_BONUS = 2.f; // infinitesimally small prims can always link up to this distance +const S32 MAX_PRIMS_PER_OBJECT = 255; + + +template < typename DATA_TYPE > +class LLPrimLinkInfo +{ +public: + LLPrimLinkInfo(); + LLPrimLinkInfo( DATA_TYPE data, const LLSphere& sphere ); + ~LLPrimLinkInfo(); + + void set( DATA_TYPE data, const LLSphere& sphere ); + void append( DATA_TYPE data, const LLSphere& sphere ); + void getData( std::list< DATA_TYPE >& data_list ) const; + F32 getDiameter() const; + LLVector3 getCenter() const; + + // returns 'true' if this info can link with other_info + bool canLink( const LLPrimLinkInfo< DATA_TYPE >& other_info ); + + S32 getPrimCount() const { return mDataMap.size(); } + + void mergeLinkableSet( typename std::list< LLPrimLinkInfo < DATA_TYPE > >& unlinked ); + + void transform(const LLVector3& position, const LLQuaternion& rotation); + +private: + // returns number of merges made + S32 merge(LLPrimLinkInfo< DATA_TYPE >& other_info); + + // returns number of collapses made + static S32 collapse(typename std::list< LLPrimLinkInfo < DATA_TYPE > >& unlinked ); + + void computeBoundingSphere(); + + // Internal utility to encapsulate the link rules + F32 get_max_linkable_span(const LLSphere& first, const LLSphere& second); + F32 get_span(const LLSphere& first, const LLSphere& second); + +private: + std::map< DATA_TYPE, LLSphere > mDataMap; + LLSphere mBoundingSphere; +}; + + + +template < typename DATA_TYPE > +LLPrimLinkInfo< DATA_TYPE >::LLPrimLinkInfo() +: mBoundingSphere( LLVector3(0.f, 0.f, 0.f), 0.f ) +{ +} + +template < typename DATA_TYPE > +LLPrimLinkInfo< DATA_TYPE >::LLPrimLinkInfo( DATA_TYPE data, const LLSphere& sphere) +: mBoundingSphere(sphere) +{ + mDataMap[data] = sphere; +} + +template < typename DATA_TYPE > +LLPrimLinkInfo< DATA_TYPE >::~LLPrimLinkInfo() +{ + mDataMap.clear(); +} + +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE>::set( DATA_TYPE data, const LLSphere& sphere ) +{ + if (!mDataMap.empty()) + { + mDataMap.clear(); + } + mDataMap[data] = sphere; + mBoundingSphere = sphere; +} + +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE>::append( DATA_TYPE data, const LLSphere& sphere ) +{ + mDataMap[data] = sphere; + if (!mBoundingSphere.contains(sphere)) + { + computeBoundingSphere(); + } +} + +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE >::getData( std::list< DATA_TYPE >& data_list) const +{ + typename std::map< DATA_TYPE, LLSphere >::const_iterator map_itr; + for (map_itr = mDataMap.begin(); map_itr != mDataMap.end(); ++map_itr) + { + data_list.push_back(map_itr->first); + } +} + +template < typename DATA_TYPE > +F32 LLPrimLinkInfo< DATA_TYPE >::getDiameter() const +{ + return 2.f * mBoundingSphere.getRadius(); +} + +template < typename DATA_TYPE > +LLVector3 LLPrimLinkInfo< DATA_TYPE >::getCenter() const +{ + return mBoundingSphere.getCenter(); +} + +template < typename DATA_TYPE > +F32 LLPrimLinkInfo< DATA_TYPE >::get_max_linkable_span(const LLSphere& first, const LLSphere& second) +{ + F32 max_span = 3.f * (first.getRadius() + second.getRadius()) + OBJECT_SPAN_BONUS; + if (max_span > MAX_OBJECT_SPAN) + { + max_span = MAX_OBJECT_SPAN; + } + + return max_span; +} + +template < typename DATA_TYPE > +F32 LLPrimLinkInfo< DATA_TYPE >::get_span(const LLSphere& first, const LLSphere& second) +{ + F32 span = (first.getCenter() - second.getCenter()).length() + + first.getRadius() + second.getRadius(); + return span; +} + +// static +// returns 'true' if this info can link with any part of other_info +template < typename DATA_TYPE > +bool LLPrimLinkInfo< DATA_TYPE >::canLink(const LLPrimLinkInfo& other_info) +{ + F32 max_span = get_max_linkable_span(mBoundingSphere, other_info.mBoundingSphere); + + F32 span = get_span(mBoundingSphere, other_info.mBoundingSphere); + + if (span <= max_span) + { + // The entire other_info fits inside the max span. + return TRUE; + } + else if (span > max_span + 2.f * other_info.mBoundingSphere.getRadius()) + { + // there is no way any piece of other_info could link with this one + return FALSE; + } + + // there may be a piece of other_info that is linkable + typename std::map< DATA_TYPE, LLSphere >::const_iterator map_itr; + for (map_itr = other_info.mDataMap.begin(); map_itr != other_info.mDataMap.end(); ++map_itr) + { + const LLSphere& other_sphere = (*map_itr).second; + max_span = get_max_linkable_span(mBoundingSphere, other_sphere); + + span = get_span(mBoundingSphere, other_sphere); + + if (span <= max_span) + { + // found one piece that is linkable + return TRUE; + } + } + return FALSE; +} + +// merges elements of 'unlinked' +// returns number of links made (NOT final prim count, NOR linked prim count) +// and removes any linkable infos from 'unlinked' +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE >::mergeLinkableSet(std::list< LLPrimLinkInfo< DATA_TYPE > > & unlinked) +{ + bool linked_something = true; + while (linked_something) + { + linked_something = false; + + typename std::list< LLPrimLinkInfo< DATA_TYPE > >::iterator other_itr = unlinked.begin(); + while ( other_itr != unlinked.end() + && getPrimCount() < MAX_PRIMS_PER_OBJECT ) + { + S32 merge_count = merge(*other_itr); + if (merge_count > 0) + { + linked_something = true; + } + if (0 == (*other_itr).getPrimCount()) + { + unlinked.erase(other_itr++); + } + else + { + ++other_itr; + } + } + if (!linked_something + && unlinked.size() > 1) + { + S32 collapse_count = collapse(unlinked); + if (collapse_count > 0) + { + linked_something = true; + } + } + } +} + +// transforms all of the spheres into a new reference frame +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE >::transform(const LLVector3& position, const LLQuaternion& rotation) +{ + typename std::map< DATA_TYPE, LLSphere >::iterator map_itr; + for (map_itr = mDataMap.begin(); map_itr != mDataMap.end(); ++map_itr) + { + (*map_itr).second.setCenter((*map_itr).second.getCenter() * rotation + position); + } + mBoundingSphere.setCenter(mBoundingSphere.getCenter() * rotation + position); +} + +// private +// returns number of links made +template < typename DATA_TYPE > +S32 LLPrimLinkInfo< DATA_TYPE >::merge(LLPrimLinkInfo& other_info) +{ + S32 link_count = 0; + +// F32 other_radius = other_info.mBoundingSphere.getRadius(); +// other_info.computeBoundingSphere(); +// if ( other_radius != other_info.mBoundingSphere.getRadius() ) +// { +// llinfos << "Other bounding sphere changed!!" << llendl; +// } + +// F32 this_radius = mBoundingSphere.getRadius(); +// computeBoundingSphere(); +// if ( this_radius != mBoundingSphere.getRadius() ) +// { +// llinfos << "This bounding sphere changed!!" << llendl; +// } + + + F32 max_span = get_max_linkable_span(mBoundingSphere, other_info.mBoundingSphere); + + // F32 center_dist = (mBoundingSphere.getCenter() - other_info.mBoundingSphere.getCenter()).length(); + // llinfos << "objects are " << center_dist << "m apart" << llendl; + F32 span = get_span(mBoundingSphere, other_info.mBoundingSphere); + + F32 span_limit = max_span + (2.f * other_info.mBoundingSphere.getRadius()); + if (span > span_limit) + { + // there is no way any piece of other_info could link with this one + // llinfos << "span too large: " << span << " vs. " << span_limit << llendl; + return 0; + } + + bool completely_linkable = (span <= max_span) ? true : false; + + typename std::map< DATA_TYPE, LLSphere >::iterator map_itr = other_info.mDataMap.begin(); + while (map_itr != other_info.mDataMap.end() + && getPrimCount() < MAX_PRIMS_PER_OBJECT ) + { + DATA_TYPE other_data = (*map_itr).first; + LLSphere& other_sphere = (*map_itr).second; + + if (!completely_linkable) + { + max_span = get_max_linkable_span(mBoundingSphere, other_sphere); + + F32 span = get_span(mBoundingSphere, other_sphere); + + if (span > max_span) + { + ++map_itr; + continue; + } + } + + mDataMap[other_data] = other_sphere; + ++link_count; + + if (!mBoundingSphere.contains(other_sphere) ) + { + computeBoundingSphere(); + } + + // remove from the other info + other_info.mDataMap.erase(map_itr++); + } + + if (link_count > 0 && other_info.getPrimCount() > 0) + { + other_info.computeBoundingSphere(); + } + return link_count; +} + +// links any linkable elements of unlinked +template < typename DATA_TYPE > +S32 LLPrimLinkInfo< DATA_TYPE >::collapse(std::list< LLPrimLinkInfo< DATA_TYPE > > & unlinked) +{ + S32 link_count = 0; + bool linked_something = true; + while (linked_something) + { + linked_something = false; + + typename std::list< LLPrimLinkInfo< DATA_TYPE > >::iterator this_itr = unlinked.begin(); + typename std::list< LLPrimLinkInfo< DATA_TYPE > >::iterator other_itr = this_itr; + ++other_itr; + while ( other_itr != unlinked.end() ) + + { + S32 merge_count = (*this_itr).merge(*other_itr); + if (merge_count > 0) + { + linked_something = true; + link_count += merge_count; + } + if (0 == (*other_itr).getPrimCount()) + { + unlinked.erase(other_itr++); + } + else + { + ++other_itr; + } + } + } + return link_count; +} + + +template < typename DATA_TYPE > +void LLPrimLinkInfo< DATA_TYPE >::computeBoundingSphere() +{ + std::vector< LLSphere > sphere_list; + typename std::map< DATA_TYPE, LLSphere >::const_iterator map_itr; + for (map_itr = mDataMap.begin(); map_itr != mDataMap.end(); ++map_itr) + { + sphere_list.push_back(map_itr->second); + } + mBoundingSphere = LLSphere::getBoundingSphere(sphere_list); +} + + +#endif + diff --git a/linden/indra/llrender/llfontgl.cpp b/linden/indra/llrender/llfontgl.cpp index 9298e8c..53e8c2b 100644 --- a/linden/indra/llrender/llfontgl.cpp +++ b/linden/indra/llrender/llfontgl.cpp @@ -47,6 +47,7 @@ F32 LLFontGL::sVertDPI = 96.f; F32 LLFontGL::sHorizDPI = 96.f; F32 LLFontGL::sScaleX = 1.f; F32 LLFontGL::sScaleY = 1.f; +BOOL LLFontGL::sDisplayFont = TRUE ; LLString LLFontGL::sAppDir; LLFontGL* LLFontGL::sMonospace = NULL; @@ -559,6 +560,11 @@ S32 LLFontGL::render(const LLWString &wstr, BOOL use_embedded, BOOL use_ellipses) const { + if(!sDisplayFont) //do not display texts + { + return wstr.length() ; + } + LLGLEnable tex(GL_TEXTURE_2D); if (wstr.empty()) diff --git a/linden/indra/llrender/llfontgl.h b/linden/indra/llrender/llfontgl.h index ce55385..4df1063 100644 --- a/linden/indra/llrender/llfontgl.h +++ b/linden/indra/llrender/llfontgl.h @@ -204,6 +204,8 @@ public: static LLString nameFromVAlign(LLFontGL::VAlign align); static LLFontGL::VAlign vAlignFromName(const LLString& name); + static void setFontDisplay(BOOL flag) { sDisplayFont = flag ; } + protected: struct embedded_data_t { @@ -222,6 +224,7 @@ public: static F32 sHorizDPI; static F32 sScaleX; static F32 sScaleY; + static BOOL sDisplayFont ; static LLString sAppDir; // For loading fonts static LLFontGL* sMonospace; // medium @@ -246,7 +249,7 @@ public: protected: /*virtual*/ BOOL addChar(const llwchar wch); static LLString getFontPathLocal(); - static LLString getFontPathSystem(); + static LLString getFontPathSystem(); protected: LLPointer mRawImageGLp; diff --git a/linden/indra/llrender/llrendertarget.cpp b/linden/indra/llrender/llrendertarget.cpp index 974e0a2..d95c8aa 100644 --- a/linden/indra/llrender/llrendertarget.cpp +++ b/linden/indra/llrender/llrendertarget.cpp @@ -49,8 +49,9 @@ LLRenderTarget::~LLRenderTarget() release(); } -void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage, BOOL force_fbo) +void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage, BOOL use_fbo) { + stop_glerror(); mResX = resx; mResY = resy; @@ -79,32 +80,45 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 stop_glerror(); - if (sUseFBO || force_fbo) + if ((sUseFBO || use_fbo) && gGLManager.mHasFramebufferObject) { + if (depth) { - glGenRenderbuffersEXT(1, (GLuint *) &mDepth); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, mDepth); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,GL_DEPTH_COMPONENT,mResX,mResY); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); + stop_glerror(); + allocateDepth(); + stop_glerror(); } glGenFramebuffersEXT(1, (GLuint *) &mFBO); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, mFBO); if (mDepth) { - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, - GL_RENDERBUFFER_EXT, mDepth); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, mUsage, mDepth, 0); + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, mUsage, mDepth, 0); + stop_glerror(); } + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, mUsage, mTex, 0); - + stop_glerror(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + stop_glerror(); } } +void LLRenderTarget::allocateDepth() +{ + glGenTextures(1, (GLuint *) &mDepth); + glBindTexture(mUsage, mDepth); + glTexParameteri(mUsage, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(mUsage, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexImage2D(mUsage, 0, GL_DEPTH24_STENCIL8_EXT, mResX, mResY, 0, GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT, NULL); +} + void LLRenderTarget::release() { if (mFBO) @@ -121,7 +135,7 @@ void LLRenderTarget::release() if (mDepth) { - glDeleteRenderbuffersEXT(1, (GLuint *) &mDepth); + glDeleteTextures(1, (GLuint *) &mDepth); mDepth = 0; } } @@ -141,7 +155,7 @@ void LLRenderTarget::clear() U32 mask = GL_COLOR_BUFFER_BIT; if (mUseDepth) { - mask |= GL_DEPTH_BUFFER_BIT; + mask |= GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT; } if (mFBO) { @@ -160,13 +174,34 @@ void LLRenderTarget::bindTexture() glBindTexture(mUsage, mTex); } -void LLRenderTarget::flush() +void LLRenderTarget::bindDepth() +{ + glBindTexture(mUsage, mDepth); +} + + +void LLRenderTarget::flush(BOOL fetch_depth) { gGL.flush(); if (!mFBO) { bindTexture(); glCopyTexSubImage2D(mUsage, 0, 0, 0, 0, 0, mResX, mResY); + + if (fetch_depth) + { + if (!mDepth) + { + allocateDepth(); + } + + bindDepth(); + glCopyTexImage2D(mUsage, 0, GL_DEPTH24_STENCIL8_EXT, 0, 0, mResX, mResY, 0); + } + } + else + { + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); } } diff --git a/linden/indra/llrender/llrendertarget.h b/linden/indra/llrender/llrendertarget.h index cc36146..918a604 100644 --- a/linden/indra/llrender/llrendertarget.h +++ b/linden/indra/llrender/llrendertarget.h @@ -37,7 +37,7 @@ /* SAMPLE USAGE: - LLFBOTarget target; + LLRenderTarget target; ... @@ -46,7 +46,7 @@ //render to contents of offscreen buffer target.bindTarget(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + target.clear(); ... ... target.flush(); @@ -71,7 +71,10 @@ public: //allocate resources for rendering //must be called before use //multiple calls will release previously allocated resources - void allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage = GL_TEXTURE_2D, BOOL force_fbo = FALSE); + void allocate(U32 resx, U32 resy, U32 color_fmt, BOOL depth, U32 usage = GL_TEXTURE_2D, BOOL use_fbo = TRUE); + + //allocate a depth texture + void allocateDepth(); //free any allocated resources //safe to call redundantly @@ -80,7 +83,7 @@ public: //bind target for rendering //applies appropriate viewport void bindTarget(); - + //clear render targer, clears depth buffer if present, //uses scissor rect if in copy-to-texture mode void clear(); @@ -88,14 +91,25 @@ public: //get applied viewport void getViewport(S32* viewport); + //get X resolution + U32 getWidth() const { return mResX; } + + //get Y resolution + U32 getHeight() const { return mResY; } + //bind results of render for sampling void bindTexture(); + //bind results of render for sampling depth buffer + void bindDepth(); + //flush rendering operations //must be called when rendering is complete //should be used 1:1 with bindTarget // call bindTarget once, do all your rendering, call flush once - void flush(); + // if fetch_depth is TRUE, every effort will be made to copy the depth buffer into + // the current depth texture. A depth texture will be allocated if needed. + void flush(BOOL fetch_depth = FALSE); //Returns TRUE if target is ready to be rendered into. //That is, if the target has been allocated with at least @@ -108,8 +122,11 @@ private: U32 mTex; U32 mFBO; U32 mDepth; + U32 mStencil; BOOL mUseDepth; + BOOL mRenderDepth; U32 mUsage; + }; #endif diff --git a/linden/indra/llui/llalertdialog.cpp b/linden/indra/llui/llalertdialog.cpp index e60ef42..4ca9dc8 100644 --- a/linden/indra/llui/llalertdialog.cpp +++ b/linden/indra/llui/llalertdialog.cpp @@ -186,7 +186,7 @@ bool LLAlertDialog::show() { mOptionChosen = mDefaultOption; llinfos << "Alert: " << mLabel << llendl; - delete this; + close(); return false; } } @@ -208,7 +208,7 @@ bool LLAlertDialog::show() case IGNORE_SHOW_AGAIN: break; } - delete this; + close(); return false; } } @@ -231,7 +231,7 @@ bool LLAlertDialog::show() { gFloaterView->bringToFront(iter->second); mUnique = FALSE; // don't remove entry from map on destruction - delete this; + close(); return false; } sUniqueActiveMap[mLabel] = this; @@ -270,7 +270,7 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa setBackgroundVisible(TRUE); setBackgroundOpaque(TRUE); - const LLFontGL* font = gResMgr->getRes( font_name ); + const LLFontGL* font = LLResMgr::getInstance()->getRes( font_name ); const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); const S32 EDITOR_HEIGHT = 20; @@ -399,7 +399,7 @@ void LLAlertDialog::createDialog(const std::vector* optionsp, S32 defa bool LLAlertDialog::setCheckBox( const LLString& check_title, const LLString& check_control ) { - const LLFontGL* font = gResMgr->getRes( font_name ); + const LLFontGL* font = LLResMgr::getInstance()->getRes( font_name ); const S32 LINE_HEIGHT = llfloor(font->getLineHeight() + 0.99f); // Extend dialog for "check next time" @@ -444,8 +444,23 @@ void LLAlertDialog::setVisible( BOOL visible ) } } +void LLAlertDialog::onClose(bool app_quitting) +{ + LLModalDialog::onClose(app_quitting); + handleCallbacks(); +} + LLAlertDialog::~LLAlertDialog() { + delete[] mButtonData; + if (mUnique) + { + sUniqueActiveMap.erase(mLabel); + } +} + +void LLAlertDialog::handleCallbacks() +{ if (mOptionChosen >= 0) { if (mTextCallback && mLineEditor) @@ -465,7 +480,7 @@ LLAlertDialog::~LLAlertDialog() sURLLoader->load(mURL); } } - + // Only change warn state if we actually warned. if (mCheck && sSettings->getWarning(mIgnoreLabel)) @@ -490,13 +505,7 @@ LLAlertDialog::~LLAlertDialog() } } } - delete[] mButtonData; - if (mUnique) - { - sUniqueActiveMap.erase(mLabel); - } } - BOOL LLAlertDialog::hasTitleBar() const { return (getTitle() != "" && getTitle() != " ") // has title @@ -504,16 +513,11 @@ BOOL LLAlertDialog::hasTitleBar() const || isCloseable(); } -BOOL LLAlertDialog::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLAlertDialog::handleKeyHere(KEY key, MASK mask ) { if( KEY_RETURN == key && mask == MASK_NONE ) { - // Warning: handleKeyHere may result in the default button - // being committed, which will destroy this object. - // Everything works, but the call stack will pass through - // the very end of functions that belong to deleted objects. - // Should find a less fragile way to do this. - LLModalDialog::handleKeyHere( key, mask , called_from_parent ); + LLModalDialog::handleKeyHere( key, mask ); return TRUE; } else if (KEY_RIGHT == key) @@ -538,7 +542,7 @@ BOOL LLAlertDialog::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) } else { - return LLModalDialog::handleKeyHere( key, mask , called_from_parent ); + return LLModalDialog::handleKeyHere( key, mask ); } } @@ -551,16 +555,14 @@ void LLAlertDialog::draw() mDefaultBtnTimer.stop(); // prevent this block from being run more than once setDefaultBtn(mButtonData[mDefaultOption].mButton); } - if (getVisible()) - { - LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); - S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); - gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, - shadow_color, shadow_lines); + LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); + S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); - LLModalDialog::draw(); - } + gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, + shadow_color, shadow_lines); + + LLModalDialog::draw(); } void LLAlertDialog::setOptionEnabled( S32 option, BOOL enable ) diff --git a/linden/indra/llui/llalertdialog.h b/linden/indra/llui/llalertdialog.h index 4978d71..8633164 100644 --- a/linden/indra/llui/llalertdialog.h +++ b/linden/indra/llui/llalertdialog.h @@ -68,10 +68,11 @@ public: LLAlertDialog( const LLAlertDialogTemplate* xml_template, const LLString::format_map_t& args, alert_callback_t callback = NULL, void *user_data = NULL); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ); + virtual BOOL handleKeyHere(KEY key, MASK mask ); virtual void draw(); virtual void setVisible( BOOL visible ); + virtual void onClose(bool app_quitting); bool setCheckBox( const LLString&, const LLString& ); void setOptionEnabled( S32 option, BOOL enable ); @@ -126,7 +127,9 @@ private: const LLString& msg, const LLString::format_map_t& args, const LLString& edit_text); - virtual ~LLAlertDialog(); // No you can't kill it. It can only kill itself. + virtual ~LLAlertDialog(); + void handleCallbacks(); + // No you can't kill it. It can only kill itself. // Does it have a readable title label, or minimize or close buttons? BOOL hasTitleBar() const; diff --git a/linden/indra/llui/llbutton.cpp b/linden/indra/llui/llbutton.cpp index 4af40ff..3ada389 100644 --- a/linden/indra/llui/llbutton.cpp +++ b/linden/indra/llui/llbutton.cpp @@ -50,6 +50,8 @@ #include "llwindow.h" #include "llglimmediate.h" +static LLRegisterWidget r("button"); + // globals loaded from settings.xml S32 LLBUTTON_ORIG_H_PAD = 6; // Pre-zoomable UI S32 LLBUTTON_H_PAD = 0; @@ -222,18 +224,6 @@ LLButton::~LLButton() } } -// virtual -EWidgetType LLButton::getWidgetType() const -{ - return WIDGET_TYPE_BUTTON; -} - -// virtual -LLString LLButton::getWidgetTag() const -{ - return LL_BUTTON_TAG; -} - // HACK: Committing a button is the same as instantly clicking it. // virtual void LLButton::onCommit() @@ -277,10 +267,11 @@ void LLButton::onCommit() -BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) +BOOL LLButton::handleUnicodeCharHere(llwchar uni_char) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && !called_from_parent && ' ' == uni_char && !gKeyboard->getKeyRepeated(' ')) + if(' ' == uni_char + && !gKeyboard->getKeyRepeated(' ')) { if (mIsToggle) { @@ -296,24 +287,21 @@ BOOL LLButton::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) return handled; } -BOOL LLButton::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLButton::handleKeyHere(KEY key, MASK mask ) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && !called_from_parent ) + if( mCommitOnReturn && KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) { - if( mCommitOnReturn && KEY_RETURN == key && mask == MASK_NONE && !gKeyboard->getKeyRepeated(key)) + if (mIsToggle) { - if (mIsToggle) - { - toggleState(); - } + toggleState(); + } - handled = TRUE; + handled = TRUE; - if (mClickedCallback) - { - (*mClickedCallback)( mCallbackUserData ); - } + if (mClickedCallback) + { + (*mClickedCallback)( mCallbackUserData ); } } return handled; @@ -391,8 +379,6 @@ BOOL LLButton::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) { - BOOL handled = FALSE; - LLMouseHandler* other_captor = gFocusMgr.getMouseCapture(); mNeedsHighlight = other_captor == NULL || other_captor == this || @@ -409,358 +395,333 @@ BOOL LLButton::handleHover(S32 x, S32 y, MASK mask) } // We only handle the click if the click both started and ended within us - if( hasMouseCapture() ) - { - handled = TRUE; - } - else if( getVisible() ) - { - // Opaque - handled = TRUE; - } + getWindow()->setCursor(UI_CURSOR_ARROW); + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; - if( handled ) - { - getWindow()->setCursor(UI_CURSOR_ARROW); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << llendl; - } - - return handled; + return TRUE; } // virtual void LLButton::draw() { - if( getVisible() ) + BOOL flash = FALSE; + if( mFlashing ) { - BOOL flash = FALSE; - if( mFlashing ) - { - F32 elapsed = mFlashingTimer.getElapsedTimeF32(); - S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f); - // flash on or off? - flash = (flash_count % 2 == 0) || flash_count > (F32)LLUI::sConfigGroup->getS32("ButtonFlashCount"); - } + F32 elapsed = mFlashingTimer.getElapsedTimeF32(); + S32 flash_count = S32(elapsed * LLUI::sConfigGroup->getF32("ButtonFlashRate") * 2.f); + // flash on or off? + flash = (flash_count % 2 == 0) || flash_count > S32((F32)LLUI::sConfigGroup->getS32("ButtonFlashCount") * 2.f); + } - BOOL pressed_by_keyboard = FALSE; - if (hasFocus()) - { - pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN)); - } + BOOL pressed_by_keyboard = FALSE; + if (hasFocus()) + { + pressed_by_keyboard = gKeyboard->getKeyDown(' ') || (mCommitOnReturn && gKeyboard->getKeyDown(KEY_RETURN)); + } - // Unselected image assignments - S32 local_mouse_x; - S32 local_mouse_y; - LLCoordWindow cursor_pos_window; - getWindow()->getCursorPosition(&cursor_pos_window); - LLCoordGL cursor_pos_gl; - getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); - cursor_pos_gl.mX = llround((F32)cursor_pos_gl.mX / LLUI::sGLScaleFactor.mV[VX]); - cursor_pos_gl.mY = llround((F32)cursor_pos_gl.mY / LLUI::sGLScaleFactor.mV[VY]); - screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); - - BOOL pressed = pressed_by_keyboard - || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) - || mToggleState; - - BOOL use_glow_effect = FALSE; - if ( mNeedsHighlight || flash ) + // Unselected image assignments + S32 local_mouse_x; + S32 local_mouse_y; + LLCoordWindow cursor_pos_window; + getWindow()->getCursorPosition(&cursor_pos_window); + LLCoordGL cursor_pos_gl; + getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); + cursor_pos_gl.mX = llround((F32)cursor_pos_gl.mX / LLUI::sGLScaleFactor.mV[VX]); + cursor_pos_gl.mY = llround((F32)cursor_pos_gl.mY / LLUI::sGLScaleFactor.mV[VY]); + screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); + + BOOL pressed = pressed_by_keyboard + || (hasMouseCapture() && pointInView(local_mouse_x, local_mouse_y)) + || mToggleState; + + BOOL use_glow_effect = FALSE; + if ( mNeedsHighlight || flash ) + { + if (pressed) { - if (pressed) + if (mImageHoverSelected) { - if (mImageHoverSelected) - { - mImagep = mImageHoverSelected; - } - else - { - mImagep = mImageSelected; - use_glow_effect = TRUE; - } + mImagep = mImageHoverSelected; } else { - if (mImageHoverUnselected) - { - mImagep = mImageHoverUnselected; - } - else - { - mImagep = mImageUnselected; - use_glow_effect = TRUE; - } + mImagep = mImageSelected; + use_glow_effect = TRUE; } } - else if ( pressed ) - { - mImagep = mImageSelected; - } else { - mImagep = mImageUnselected; + if (mImageHoverUnselected) + { + mImagep = mImageHoverUnselected; + } + else + { + mImagep = mImageUnselected; + use_glow_effect = TRUE; + } } + } + else if ( pressed ) + { + mImagep = mImageSelected; + } + else + { + mImagep = mImageUnselected; + } - // Override if more data is available - // HACK: Use gray checked state to mean either: - // enabled and tentative - // or - // disabled but checked - if (!mImageDisabledSelected.isNull() && ( (getEnabled() && getTentative()) || (!getEnabled() && pressed ) ) ) - { - mImagep = mImageDisabledSelected; - } - else if (!mImageDisabled.isNull() && !getEnabled() && !pressed) - { - mImagep = mImageDisabled; - } + // Override if more data is available + // HACK: Use gray checked state to mean either: + // enabled and tentative + // or + // disabled but checked + if (!mImageDisabledSelected.isNull() + && + ( (getEnabled() && getTentative()) + || (!getEnabled() && pressed ) ) ) + { + mImagep = mImageDisabledSelected; + } + else if (!mImageDisabled.isNull() + && !getEnabled() + && !pressed) + { + mImagep = mImageDisabled; + } - if (mNeedsHighlight && !mImagep) - { - use_glow_effect = TRUE; - } + if (mNeedsHighlight && !mImagep) + { + use_glow_effect = TRUE; + } - // Figure out appropriate color for the text - LLColor4 label_color; + // Figure out appropriate color for the text + LLColor4 label_color; - // label changes when button state changes, not when pressed - if ( getEnabled() ) + // label changes when button state changes, not when pressed + if ( getEnabled() ) + { + if ( mToggleState ) { - if ( mToggleState ) - { - label_color = mSelectedLabelColor; - } - else - { - label_color = mUnselectedLabelColor; - } + label_color = mSelectedLabelColor; } else { - if ( mToggleState ) - { - label_color = mDisabledSelectedLabelColor; - } - else - { - label_color = mDisabledLabelColor; - } + label_color = mUnselectedLabelColor; } - - // Unselected label assignments - LLWString label; - - if( mToggleState ) + } + else + { + if ( mToggleState ) { - if( getEnabled() || mDisabledSelectedLabel.empty() ) - { - label = mSelectedLabel; - } - else - { - label = mDisabledSelectedLabel; - } + label_color = mDisabledSelectedLabelColor; } else { - if( getEnabled() || mDisabledLabel.empty() ) - { - label = mUnselectedLabel; - } - else - { - label = mDisabledLabel; - } + label_color = mDisabledLabelColor; } - - // draw default button border - if (getEnabled() && mBorderEnabled && gFocusMgr.getAppHasFocus()) // because we're the default button in a panel + } + + // Unselected label assignments + LLWString label; + + if( mToggleState ) + { + if( getEnabled() || mDisabledSelectedLabel.empty() ) { - drawBorder(LLUI::sColorsGroup->getColor( "ButtonBorderColor" ), BORDER_SIZE); + label = mSelectedLabel; } - - // overlay with keyboard focus border - if (hasFocus()) + else { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - drawBorder(gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt))); + label = mDisabledSelectedLabel; } - - if (use_glow_effect) + } + else + { + if( getEnabled() || mDisabledLabel.empty() ) { - mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); + label = mUnselectedLabel; } else { - mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f)); + label = mDisabledLabel; } + } - // Draw button image, if available. - // Otherwise draw basic rectangular button. - if( mImagep.notNull() && !mScaleImage) + // overlay with keyboard focus border + if (hasFocus()) + { + F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); + drawBorder(gFocusMgr.getFocusColor(), llround(lerp(1.f, 3.f, lerp_amt))); + } + + if (use_glow_effect) + { + mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); + } + else + { + mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f)); + } + + // Draw button image, if available. + // Otherwise draw basic rectangular button. + if (mImagep.notNull()) + { + if ( mScaleImage) { - mImagep->draw(0, 0, getEnabled() ? mImageColor : mDisabledImageColor ); + mImagep->draw(getLocalRect(), getEnabled() ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); - mImagep->drawSolid(0, 0, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + mImagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } else - if ( mImagep.notNull() && mScaleImage) { - mImagep->draw(0, 0, getRect().getWidth(), getRect().getHeight(), getEnabled() ? mImageColor : mDisabledImageColor ); + mImagep->draw(0, 0, getEnabled() ? mImageColor : mDisabledImageColor ); if (mCurGlowStrength > 0.01f) { - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); - mImagep->drawSolid(0, 0, getRect().getWidth(), getRect().getHeight(), LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + mImagep->drawSolid(0, 0, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } } - else - { - // no image - llwarns << "No image for button " << getName() << llendl; - // draw it in pink so we can find it - gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1, FALSE); - } - - // let overlay image and text play well together - S32 text_left = mLeftHPad; - S32 text_right = getRect().getWidth() - mRightHPad; - S32 text_width = getRect().getWidth() - mLeftHPad - mRightHPad; - - // draw overlay image - if (mImageOverlay.notNull()) - { - // get max width and height (discard level 0) - S32 overlay_width = mImageOverlay->getWidth(); - S32 overlay_height = mImageOverlay->getHeight(); + } + else + { + // no image + llwarns << "No image for button " << getName() << llendl; + // draw it in pink so we can find it + gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, LLColor4::pink1, FALSE); + } - F32 scale_factor = llmin((F32)getRect().getWidth() / (F32)overlay_width, (F32)getRect().getHeight() / (F32)overlay_height, 1.f); - overlay_width = llround((F32)overlay_width * scale_factor); - overlay_height = llround((F32)overlay_height * scale_factor); + // let overlay image and text play well together + S32 text_left = mLeftHPad; + S32 text_right = getRect().getWidth() - mRightHPad; + S32 text_width = getRect().getWidth() - mLeftHPad - mRightHPad; - S32 center_x = getLocalRect().getCenterX(); - S32 center_y = getLocalRect().getCenterY(); + // draw overlay image + if (mImageOverlay.notNull()) + { + // get max width and height (discard level 0) + S32 overlay_width = mImageOverlay->getWidth(); + S32 overlay_height = mImageOverlay->getHeight(); - //FUGLY HACK FOR "DEPRESSED" BUTTONS - if (pressed) - { - center_y--; - center_x++; - } + F32 scale_factor = llmin((F32)getRect().getWidth() / (F32)overlay_width, (F32)getRect().getHeight() / (F32)overlay_height, 1.f); + overlay_width = llround((F32)overlay_width * scale_factor); + overlay_height = llround((F32)overlay_height * scale_factor); - // fade out overlay images on disabled buttons - LLColor4 overlay_color = mImageOverlayColor; - if (!getEnabled()) - { - overlay_color.mV[VALPHA] = 0.5f; - } + S32 center_x = getLocalRect().getCenterX(); + S32 center_y = getLocalRect().getCenterY(); - switch(mImageOverlayAlignment) - { - case LLFontGL::LEFT: - text_left += overlay_width + 1; - text_width -= overlay_width + 1; - mImageOverlay->draw( - mLeftHPad, - center_y - (overlay_height / 2), - overlay_width, - overlay_height, - overlay_color); - break; - case LLFontGL::HCENTER: - mImageOverlay->draw( - center_x - (overlay_width / 2), - center_y - (overlay_height / 2), - overlay_width, - overlay_height, - overlay_color); - break; - case LLFontGL::RIGHT: - text_right -= overlay_width + 1; - text_width -= overlay_width + 1; - mImageOverlay->draw( - getRect().getWidth() - mRightHPad - overlay_width, - center_y - (overlay_height / 2), - overlay_width, - overlay_height, - overlay_color); - break; - default: - // draw nothing - break; - } + //FUGLY HACK FOR "DEPRESSED" BUTTONS + if (pressed) + { + center_y--; + center_x++; } - // Draw label - if( !label.empty() ) + // fade out overlay images on disabled buttons + LLColor4 overlay_color = mImageOverlayColor; + if (!getEnabled()) { - LLWString::trim(label); + overlay_color.mV[VALPHA] = 0.5f; + } - S32 x; - switch( mHAlign ) - { - case LLFontGL::RIGHT: - x = text_right; - break; - case LLFontGL::HCENTER: - x = getRect().getWidth() / 2; - break; - case LLFontGL::LEFT: - default: - x = text_left; - break; - } + switch(mImageOverlayAlignment) + { + case LLFontGL::LEFT: + text_left += overlay_width + 1; + text_width -= overlay_width + 1; + mImageOverlay->draw( + mLeftHPad, + center_y - (overlay_height / 2), + overlay_width, + overlay_height, + overlay_color); + break; + case LLFontGL::HCENTER: + mImageOverlay->draw( + center_x - (overlay_width / 2), + center_y - (overlay_height / 2), + overlay_width, + overlay_height, + overlay_color); + break; + case LLFontGL::RIGHT: + text_right -= overlay_width + 1; + text_width -= overlay_width + 1; + mImageOverlay->draw( + getRect().getWidth() - mRightHPad - overlay_width, + center_y - (overlay_height / 2), + overlay_width, + overlay_height, + overlay_color); + break; + default: + // draw nothing + break; + } + } - S32 y_offset = 2 + (getRect().getHeight() - 20)/2; - - if (pressed) - { - y_offset--; - x++; - } + // Draw label + if( !label.empty() ) + { + LLWString::trim(label); - mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), - label_color, - mHAlign, LLFontGL::BOTTOM, - mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL, - U32_MAX, text_width, - NULL, FALSE, FALSE); + S32 x; + switch( mHAlign ) + { + case LLFontGL::RIGHT: + x = text_right; + break; + case LLFontGL::HCENTER: + x = getRect().getWidth() / 2; + break; + case LLFontGL::LEFT: + default: + x = text_left; + break; } - if (sDebugRects - || (LLView::sEditingUI && this == LLView::sEditingUIView)) + S32 y_offset = 2 + (getRect().getHeight() - 20)/2; + + if (pressed) { - drawDebugRect(); + y_offset--; + x++; } + + mGLFont->render(label, 0, (F32)x, (F32)(LLBUTTON_V_PAD + y_offset), + label_color, + mHAlign, LLFontGL::BOTTOM, + mDropShadowedText ? LLFontGL::DROP_SHADOW_SOFT : LLFontGL::NORMAL, + U32_MAX, text_width, + NULL, FALSE, FALSE); } + + if (sDebugRects + || (LLView::sEditingUI && this == LLView::sEditingUIView)) + { + drawDebugRect(); + } + // reset hover status for next frame mNeedsHighlight = FALSE; } void LLButton::drawBorder(const LLColor4& color, S32 size) { - S32 left = -size; - S32 top = getRect().getHeight() + size; - S32 right = getRect().getWidth() + size; - S32 bottom = -size; - - if (mImagep.isNull()) - { - gl_rect_2d(left, top, right, bottom, color, FALSE); - return; - } - if (mScaleImage) { - mImagep->drawSolid(left, bottom, right-left, top-bottom, color); + mImagep->drawBorder(getLocalRect(), color, size); } else { - mImagep->drawSolid(left, bottom, mImagep->getWidth() + size * 2, mImagep->getHeight() + size * 2, color); + mImagep->drawBorder(0, 0, color, size); } } @@ -778,9 +739,8 @@ void LLButton::setToggleState(BOOL b) { if( b != mToggleState ) { - mToggleState = b; - LLValueChangedEvent *evt = new LLValueChangedEvent(this, mToggleState); - fireEvent(evt, ""); + setControlValue(b); // will fire LLControlVariable callbacks (if any) + mToggleState = b; // may or may not be redundant } } @@ -924,7 +884,7 @@ void LLButton::setImageOverlay(const LLString &image_name, LLFontGL::HAlign alig } else { - mImageOverlay = LLUI::getUIImageByName(image_name); + mImageOverlay = LLUI::getUIImage(image_name); mImageOverlayAlignment = alignment; mImageOverlayColor = color; } @@ -957,37 +917,37 @@ S32 round_up(S32 grid, S32 value) void LLButton::setImageUnselected(const LLString &image_name) { - setImageUnselected(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageUnselected(LLUI::getUIImage(image_name)); mImageUnselectedName = image_name; } void LLButton::setImageSelected(const LLString &image_name) { - setImageSelected(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageSelected(LLUI::getUIImage(image_name)); mImageSelectedName = image_name; } void LLButton::setImageHoverSelected(const LLString &image_name) { - setImageHoverSelected(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageHoverSelected(LLUI::getUIImage(image_name)); mImageHoverSelectedName = image_name; } void LLButton::setImageHoverUnselected(const LLString &image_name) { - setImageHoverUnselected(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageHoverUnselected(LLUI::getUIImage(image_name)); mImageHoverUnselectedName = image_name; } void LLButton::setImageDisabled(const LLString &image_name) { - setImageDisabled(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageDisabled(LLUI::getUIImage(image_name)); mImageDisabledName = image_name; } void LLButton::setImageDisabledSelected(const LLString &image_name) { - setImageDisabledSelected(image_name.empty() ? NULL : LLUI::getUIImageByName(image_name)); + setImageDisabledSelected(LLUI::getUIImage(image_name)); mImageDisabledSelectedName = image_name; } @@ -1038,7 +998,7 @@ void clicked_help(void* data) return; } - LLUI::sHtmlHelp->show(self->getHelpURL(), ""); + LLUI::sHtmlHelp->show(self->getHelpURL()); } // static diff --git a/linden/indra/llui/llbutton.h b/linden/indra/llui/llbutton.h index 18f4e07..a101a3c 100644 --- a/linden/indra/llui/llbutton.h +++ b/linden/indra/llui/llbutton.h @@ -87,16 +87,15 @@ public: virtual ~LLButton(); void init(void (*click_callback)(void*), void *callback_data, const LLFontGL* font, const LLString& control_name); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; + void addImageAttributeToXML(LLXMLNodePtr node, const LLString& imageName, const LLUUID& imageID,const LLString& xmlTagName) const; virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleUnicodeCharHere(llwchar uni_char); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); @@ -104,7 +103,6 @@ public: virtual void onMouseCaptureLost(); - // HACK: "committing" a button is the same as clicking on it. virtual void onCommit(); void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; } diff --git a/linden/indra/llui/llcheckboxctrl.cpp b/linden/indra/llui/llcheckboxctrl.cpp index ecb6342..33de4da 100644 --- a/linden/indra/llui/llcheckboxctrl.cpp +++ b/linden/indra/llui/llcheckboxctrl.cpp @@ -45,10 +45,11 @@ #include "llfontgl.h" #include "lltextbox.h" #include "llkeyboard.h" -#include "llviewborder.h" const U32 MAX_STRING_LENGTH = 10; +static LLRegisterWidget r("check_box"); + LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect, const LLString& label, diff --git a/linden/indra/llui/llcheckboxctrl.h b/linden/indra/llui/llcheckboxctrl.h index 6df0e77..6518272 100644 --- a/linden/indra/llui/llcheckboxctrl.h +++ b/linden/indra/llui/llcheckboxctrl.h @@ -75,8 +75,7 @@ public: virtual ~LLCheckBoxCtrl(); // LLView interface - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_CHECKBOX; } - virtual LLString getWidgetTag() const { return LL_CHECK_BOX_CTRL_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); diff --git a/linden/indra/llui/llcombobox.cpp b/linden/indra/llui/llcombobox.cpp index c486042..0523a11 100644 --- a/linden/indra/llui/llcombobox.cpp +++ b/linden/indra/llui/llcombobox.cpp @@ -57,6 +57,8 @@ S32 LLCOMBOBOX_HEIGHT = 0; S32 LLCOMBOBOX_WIDTH = 0; S32 MAX_COMBO_WIDTH = 500; +static LLRegisterWidget r1("combo_box"); + LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString& label, void (*commit_callback)(LLUICtrl*,void*), void *callback_userdata @@ -74,9 +76,10 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString { // Always use text box // Text label button - mButton = new LLButton("comboxbox button", - LLRect(), label, NULL, LLString::null, - NULL, this); + mButton = new LLButton(label, + LLRect(), + LLString::null, + NULL, this); mButton->setImageUnselected("square_btn_32x128.tga"); mButton->setImageSelected("square_btn_selected_32x128.tga"); mButton->setImageDisabled("square_btn_32x128.tga"); @@ -99,13 +102,7 @@ LLComboBox::LLComboBox( const LLString& name, const LLRect &rect, const LLString mList->setCommitOnKeyboardMovement(FALSE); addChild(mList); - LLRect border_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - mBorder = new LLViewBorder( "combo border", border_rect ); - addChild( mBorder ); - mBorder->setFollowsAll(); - - LLUUID arrow_image_id( LLUI::sAssetsGroup->getString("combobox_arrow.tga") ); - mArrowImage = LLUI::sImageProvider->getImageByID(arrow_image_id); + mArrowImage = LLUI::sImageProvider->getUIImage("combobox_arrow.tga"); mButton->setImageOverlay("combobox_arrow.tga", LLFontGL::RIGHT); updateLayout(); @@ -447,7 +444,7 @@ void LLComboBox::setButtonVisible(BOOL visible) LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); if (visible) { - text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth(0)) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); + text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); } //mTextEntry->setRect(text_entry_rect); mTextEntry->reshape(text_entry_rect.getWidth(), text_entry_rect.getHeight(), TRUE); @@ -456,15 +453,10 @@ void LLComboBox::setButtonVisible(BOOL visible) void LLComboBox::draw() { - if( getVisible() ) - { - mBorder->setKeyboardFocusHighlight(hasFocus()); - - mButton->setEnabled(getEnabled() /*&& !mList->isEmpty()*/); + mButton->setEnabled(getEnabled() /*&& !mList->isEmpty()*/); - // Draw children normally - LLUICtrl::draw(); - } + // Draw children normally + LLUICtrl::draw(); } BOOL LLComboBox::setCurrentByIndex( S32 index ) @@ -494,14 +486,14 @@ void LLComboBox::updateLayout() if (mAllowTextEntry) { S32 shadow_size = LLUI::sConfigGroup->getS32("DropShadowButton"); - mButton->setRect(LLRect( getRect().getWidth() - llmax(8,mArrowImage->getWidth(0)) - 2 * shadow_size, + mButton->setRect(LLRect( getRect().getWidth() - llmax(8,mArrowImage->getWidth()) - 2 * shadow_size, rect.mTop, rect.mRight, rect.mBottom)); mButton->setTabStop(FALSE); if (!mTextEntry) { LLRect text_entry_rect(0, getRect().getHeight(), getRect().getWidth(), 0); - text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth(0)) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); + text_entry_rect.mRight -= llmax(8,mArrowImage->getWidth()) + 2 * LLUI::sConfigGroup->getS32("DropShadowButton"); // clear label on button LLString cur_label = mButton->getLabelSelected(); mTextEntry = new LLLineEditor("combo_text_entry", @@ -512,11 +504,7 @@ void LLComboBox::updateLayout() onTextCommit, onTextEntry, NULL, - this, - NULL, // prevalidate func - LLViewBorder::BEVEL_NONE, - LLViewBorder::STYLE_LINE, - 0); // no border + this); mTextEntry->setSelectAllonFocusReceived(TRUE); mTextEntry->setHandleEditKeysDirectly(TRUE); mTextEntry->setCommitOnFocusLost(FALSE); @@ -761,7 +749,7 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_ tool_tip = getToolTip(); if (tool_tip.empty()) { - tool_tip = getValue().asString(); + tool_tip = getSelectedItemLabel(); } } @@ -780,10 +768,10 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_ return TRUE; } -BOOL LLComboBox::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLComboBox::handleKeyHere(KEY key, MASK mask) { BOOL result = FALSE; - if (gFocusMgr.childHasKeyboardFocus(this)) + if (hasFocus()) { //give list a chance to pop up and handle key LLScrollListItem* last_selected_item = mList->getLastSelectedItem(); @@ -792,7 +780,7 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) // highlight the original selection before potentially selecting a new item mList->highlightNthItem(mList->getItemIndex(last_selected_item)); } - result = mList->handleKeyHere(key, mask, FALSE); + result = mList->handleKeyHere(key, mask); // if selection has changed, pop open list if (mList->getLastSelectedItem() != last_selected_item) { @@ -802,7 +790,7 @@ BOOL LLComboBox::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) return result; } -BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) +BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char) { BOOL result = FALSE; if (gFocusMgr.childHasKeyboardFocus(this)) @@ -816,7 +804,7 @@ BOOL LLComboBox::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent // highlight the original selection before potentially selecting a new item mList->highlightNthItem(mList->getItemIndex(last_selected_item)); } - result = mList->handleUnicodeCharHere(uni_char, called_from_parent); + result = mList->handleUnicodeCharHere(uni_char); if (mList->getLastSelectedItem() != last_selected_item) { showList(); @@ -1095,6 +1083,8 @@ BOOL LLComboBox::selectItemRange( S32 first, S32 last ) // LLFlyoutButton // +static LLRegisterWidget r2("flyout_button"); + const S32 FLYOUT_BUTTON_ARROW_WIDTH = 24; LLFlyoutButton::LLFlyoutButton( @@ -1109,9 +1099,8 @@ LLFlyoutButton::LLFlyoutButton( { // Always use text box // Text label button - mActionButton = new LLButton("flyout_button_main", - LLRect(), label, NULL, LLString::null, - NULL, this); + mActionButton = new LLButton(label, + LLRect(), LLString::null, NULL, this); mActionButton->setScaleImage(TRUE); mActionButton->setClickedCallback(onActionButtonClick); @@ -1120,24 +1109,24 @@ LLFlyoutButton::LLFlyoutButton( mActionButton->setLabel(label); addChild(mActionButton); - mActionButtonImage = LLUI::getUIImageByName("flyout_btn_left.tga"); - mExpanderButtonImage = LLUI::getUIImageByName("flyout_btn_right.tga"); - mActionButtonImageSelected = LLUI::getUIImageByName("flyout_btn_left_selected.tga"); - mExpanderButtonImageSelected = LLUI::getUIImageByName("flyout_btn_right_selected.tga"); + mActionButtonImage = LLUI::getUIImage("flyout_btn_left.tga"); + mExpanderButtonImage = LLUI::getUIImage("flyout_btn_right.tga"); + mActionButtonImageSelected = LLUI::getUIImage("flyout_btn_left_selected.tga"); + mExpanderButtonImageSelected = LLUI::getUIImage("flyout_btn_right_selected.tga"); + mActionButtonImageDisabled = LLUI::getUIImage("flyout_btn_left_disabled.tga"); + mExpanderButtonImageDisabled = LLUI::getUIImage("flyout_btn_right_disabled.tga"); mActionButton->setImageSelected(mActionButtonImageSelected); mActionButton->setImageUnselected(mActionButtonImage); - mActionButton->setImageDisabled(LLPointer(NULL)); + mActionButton->setImageDisabled(mActionButtonImageDisabled); mActionButton->setImageDisabledSelected(LLPointer(NULL)); mButton->setImageSelected(mExpanderButtonImageSelected); mButton->setImageUnselected(mExpanderButtonImage); - mButton->setImageDisabled(LLPointer(NULL)); + mButton->setImageDisabled(mExpanderButtonImageDisabled); mButton->setImageDisabledSelected(LLPointer(NULL)); mButton->setRightHPad(6); - mBorder->setVisible(FALSE); - updateLayout(); } diff --git a/linden/indra/llui/llcombobox.h b/linden/indra/llui/llcombobox.h index f9ca4d2..b35d078 100644 --- a/linden/indra/llui/llcombobox.h +++ b/linden/indra/llui/llcombobox.h @@ -73,8 +73,7 @@ public: virtual ~LLComboBox(); // LLView interface - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_COMBO_BOX; } - virtual LLString getWidgetTag() const { return LL_COMBO_BOX_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); @@ -85,8 +84,8 @@ public: virtual void setEnabled(BOOL enabled); virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); - virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); + virtual BOOL handleUnicodeCharHere(llwchar uni_char); // LLUICtrl interface virtual void clear(); // select nothing @@ -187,9 +186,8 @@ public: protected: LLButton* mButton; LLScrollListCtrl* mList; - LLViewBorder* mBorder; EPreferredPosition mListPosition; - LLPointer mArrowImage; + LLPointer mArrowImage; private: S32 mButtonPadding; @@ -211,9 +209,6 @@ public: void (*commit_callback)(LLUICtrl*, void*) = NULL, void *callback_userdata = NULL); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLYOUT_BUTTON; } - virtual LLString getWidgetTag() const { return LL_FLYOUT_BUTTON_TAG; } - virtual void updateLayout(); virtual void draw(); virtual void setEnabled(BOOL enabled); @@ -230,6 +225,8 @@ protected: LLPointer mExpanderButtonImage; LLPointer mActionButtonImageSelected; LLPointer mExpanderButtonImageSelected; + LLPointer mActionButtonImageDisabled; + LLPointer mExpanderButtonImageDisabled; BOOL mToggleState; }; diff --git a/linden/indra/llui/lldraghandle.cpp b/linden/indra/llui/lldraghandle.cpp index 516afc6..f033371 100644 --- a/linden/indra/llui/lldraghandle.cpp +++ b/linden/indra/llui/lldraghandle.cpp @@ -101,16 +101,6 @@ LLDragHandleTop::LLDragHandleTop(const LLString& name, const LLRect &rect, const setTitle( title ); } -EWidgetType LLDragHandleTop::getWidgetType() const -{ - return WIDGET_TYPE_DRAG_HANDLE_TOP; -} - -LLString LLDragHandleTop::getWidgetTag() const -{ - return LL_DRAG_HANDLE_TOP_TAG; -} - LLDragHandleLeft::LLDragHandleLeft(const LLString& name, const LLRect &rect, const LLString& title) : LLDragHandle(name, rect, title) { @@ -118,22 +108,12 @@ LLDragHandleLeft::LLDragHandleLeft(const LLString& name, const LLRect &rect, con setTitle( title ); } -EWidgetType LLDragHandleLeft::getWidgetType() const -{ - return WIDGET_TYPE_DRAG_HANDLE_LEFT; -} - -LLString LLDragHandleLeft::getWidgetTag() const -{ - return LL_DRAG_HANDLE_LEFT_TAG; -} - void LLDragHandleTop::setTitle(const LLString& title) { LLString trimmed_title = title; LLString::trim(trimmed_title); - const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF ); + const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ); LLTextBox* titlebox = new LLTextBox( "Drag Handle Title", getRect(), trimmed_title, font ); titlebox->setFollows(FOLLOWS_TOP | FOLLOWS_LEFT | FOLLOWS_RIGHT); titlebox->setFontStyle(LLFontGL::DROP_SHADOW_SOFT); @@ -262,7 +242,7 @@ void LLDragHandleTop::reshapeTitleBox() { return; } - const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF ); + const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ); S32 title_width = font->getWidth( getTitleBox()->getText() ) + TITLE_PAD; if (getMaxTitleWidth() > 0) title_width = llmin(title_width, getMaxTitleWidth()); @@ -372,7 +352,7 @@ BOOL LLDragHandle::handleHover(S32 x, S32 y, MASK mask) lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" <setCursor(UI_CURSOR_ARROW); lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; diff --git a/linden/indra/llui/lldraghandle.h b/linden/indra/llui/lldraghandle.h index 88e16dc..fc10639 100644 --- a/linden/indra/llui/lldraghandle.h +++ b/linden/indra/llui/lldraghandle.h @@ -90,9 +90,6 @@ class LLDragHandleTop public: LLDragHandleTop(const LLString& name, const LLRect& rect, const LLString& title ); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; - virtual void setTitle( const LLString& title ); virtual const LLString& getTitle() const; virtual void draw(); @@ -110,9 +107,6 @@ class LLDragHandleLeft public: LLDragHandleLeft(const LLString& name, const LLRect& rect, const LLString& title ); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; - virtual void setTitle( const LLString& title ); virtual const LLString& getTitle() const; virtual void draw(); diff --git a/linden/indra/llui/llfloater.cpp b/linden/indra/llui/llfloater.cpp index 1e825d3..5142bf4 100644 --- a/linden/indra/llui/llfloater.cpp +++ b/linden/indra/llui/llfloater.cpp @@ -50,7 +50,6 @@ #include "lltextbox.h" #include "llresmgr.h" #include "llui.h" -#include "llviewborder.h" #include "llwindow.h" #include "llstl.h" #include "llcontrol.h" @@ -131,8 +130,9 @@ LLFloaterView* gFloaterView = NULL; LLFloater::LLFloater() : //FIXME: we should initialize *all* member variables here mResizable(FALSE), - mDragOnLeft(FALSE) - + mDragOnLeft(FALSE), + mMinWidth(0), + mMinHeight(0) { // automatically take focus when opened mAutoFocus = TRUE; @@ -656,7 +656,8 @@ void LLFloater::setTitle( const LLString& title ) { return; } - mDragHandle->setTitle( title ); + if (mDragHandle) + mDragHandle->setTitle( title ); } const LLString& LLFloater::getTitle() const @@ -802,24 +803,10 @@ void LLFloater::setMinimized(BOOL minimize) mButtonsEnabled[BUTTON_RESTORE] = TRUE; } - mMinimizedHiddenChildren.clear(); - // hide all children - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) - { - LLView* viewp = *child_it; - if (!viewp->getVisible()) - { - mMinimizedHiddenChildren.push_back(viewp->getHandle()); - } - viewp->setVisible(FALSE); - } - - // except the special controls if (mDragHandle) { mDragHandle->setVisible(TRUE); } - setBorderVisible(TRUE); for(handle_set_iter_t dependent_it = mDependents.begin(); @@ -843,6 +830,12 @@ void LLFloater::setMinimized(BOOL minimize) // Lose keyboard focus when minimized releaseFocus(); + for (S32 i = 0; i < 4; i++) + { + if (mResizeBar[i]) mResizeBar[i]->setEnabled(FALSE); + if (mResizeHandle[i]) mResizeHandle[i]->setEnabled(FALSE); + } + mMinimized = TRUE; // Reshape *after* setting mMinimized @@ -867,24 +860,6 @@ void LLFloater::setMinimized(BOOL minimize) mButtonsEnabled[BUTTON_RESTORE] = FALSE; } - // show all children - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) - { - LLView* viewp = *child_it; - viewp->setVisible(TRUE); - } - - std::vector >::iterator itor = mMinimizedHiddenChildren.begin(); - for ( ; itor != mMinimizedHiddenChildren.end(); ++itor) - { - LLView* viewp = itor->get(); - if(viewp) - { - viewp->setVisible(FALSE); - } - } - mMinimizedHiddenChildren.clear(); - // show dependent floater for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); @@ -898,6 +873,12 @@ void LLFloater::setMinimized(BOOL minimize) } } + for (S32 i = 0; i < 4; i++) + { + if (mResizeBar[i]) mResizeBar[i]->setEnabled(isResizable()); + if (mResizeHandle[i]) mResizeHandle[i]->setEnabled(isResizable()); + } + mMinimized = FALSE; // Reshape *after* setting mMinimized @@ -954,7 +935,8 @@ void LLFloater::setIsChrome(BOOL is_chrome) } // no titles displayed on "chrome" floaters - mDragHandle->setTitleVisible(!is_chrome); + if (mDragHandle) + mDragHandle->setTitleVisible(!is_chrome); LLPanel::setIsChrome(is_chrome); } @@ -965,7 +947,8 @@ void LLFloater::setForeground(BOOL front) if (front != mForeground) { mForeground = front; - mDragHandle->setForeground( front ); + if (mDragHandle) + mDragHandle->setForeground( front ); if (!front) { @@ -1310,49 +1293,72 @@ void LLFloater::onClickClose( void* userdata ) // virtual void LLFloater::draw() { - if( getVisible() ) + // draw background + if( isBackgroundVisible() ) { - // draw background - if( isBackgroundVisible() ) - { - S32 left = LLPANEL_BORDER_WIDTH; - S32 top = getRect().getHeight() - LLPANEL_BORDER_WIDTH; - S32 right = getRect().getWidth() - LLPANEL_BORDER_WIDTH; - S32 bottom = LLPANEL_BORDER_WIDTH; + S32 left = LLPANEL_BORDER_WIDTH; + S32 top = getRect().getHeight() - LLPANEL_BORDER_WIDTH; + S32 right = getRect().getWidth() - LLPANEL_BORDER_WIDTH; + S32 bottom = LLPANEL_BORDER_WIDTH; - LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); - F32 shadow_offset = (F32)LLUI::sConfigGroup->getS32("DropShadowFloater"); - if (!isBackgroundOpaque()) - { - shadow_offset *= 0.2f; - shadow_color.mV[VALPHA] *= 0.5f; - } - gl_drop_shadow(left, top, right, bottom, - shadow_color, - llround(shadow_offset)); + LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); + F32 shadow_offset = (F32)LLUI::sConfigGroup->getS32("DropShadowFloater"); + if (!isBackgroundOpaque()) + { + shadow_offset *= 0.2f; + shadow_color.mV[VALPHA] *= 0.5f; + } + gl_drop_shadow(left, top, right, bottom, + shadow_color, + llround(shadow_offset)); - // No transparent windows in simple UI - if (isBackgroundOpaque()) - { - gl_rect_2d( left, top, right, bottom, getBackgroundColor() ); - } - else - { - gl_rect_2d( left, top, right, bottom, getTransparentColor() ); - } + // No transparent windows in simple UI + if (isBackgroundOpaque()) + { + gl_rect_2d( left, top, right, bottom, getBackgroundColor() ); + } + else + { + gl_rect_2d( left, top, right, bottom, getTransparentColor() ); + } - if(gFocusMgr.childHasKeyboardFocus(this) && !getIsChrome() && !getTitle().empty()) - { - // draw highlight on title bar to indicate focus. RDW - const LLFontGL* font = gResMgr->getRes( LLFONT_SANSSERIF ); - LLRect r = getRect(); - gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1, - LLUI::sColorsGroup->getColor("TitleBarFocusColor"), 0, TRUE); - } + if(gFocusMgr.childHasKeyboardFocus(this) && !getIsChrome() && !getTitle().empty()) + { + // draw highlight on title bar to indicate focus. RDW + const LLFontGL* font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF ); + LLRect r = getRect(); + gl_rect_2d_offset_local(0, r.getHeight(), r.getWidth(), r.getHeight() - (S32)font->getLineHeight() - 1, + LLUI::sColorsGroup->getColor("TitleBarFocusColor"), 0, TRUE); } + } - LLPanel::updateDefaultBtn(); + LLPanel::updateDefaultBtn(); + if( getDefaultButton() ) + { + if (hasFocus() && getDefaultButton()->getEnabled()) + { + LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); + // is this button a direct descendent and not a nested widget (e.g. checkbox)? + BOOL focus_is_child_button = dynamic_cast(focus_ctrl) != NULL && focus_ctrl->getParent() == this; + // only enable default button when current focus is not a button + getDefaultButton()->setBorderEnabled(!focus_is_child_button); + } + else + { + getDefaultButton()->setBorderEnabled(FALSE); + } + } + if (isMinimized()) + { + for (S32 i = 0; i < BUTTON_COUNT; i++) + { + drawChild(mButtons[i]); + } + drawChild(mDragHandle); + } + else + { // draw children LLView* focused_child = gFocusMgr.getKeyboardFocus(); BOOL focused_child_visible = FALSE; @@ -1365,36 +1371,35 @@ void LLFloater::draw() // don't call LLPanel::draw() since we've implemented custom background rendering LLView::draw(); - if( isBackgroundVisible() ) - { - // add in a border to improve spacialized visual aclarity ;) - // use lines instead of gl_rect_2d so we can round the edges as per james' recommendation - LLUI::setLineWidth(1.5f); - LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? LLUI::sColorsGroup->getColor("FloaterFocusBorderColor") : LLUI::sColorsGroup->getColor("FloaterUnfocusBorderColor"); - gl_rect_2d_offset_local(0, getRect().getHeight() + 1, getRect().getWidth() + 1, 0, outlineColor, -LLPANEL_BORDER_WIDTH, FALSE); - LLUI::setLineWidth(1.f); - } - if (focused_child_visible) { focused_child->setVisible(TRUE); } drawChild(focused_child); + } - // update tearoff button for torn off floaters - // when last host goes away - if (mCanTearOff && !getHost()) + if( isBackgroundVisible() ) + { + // add in a border to improve spacialized visual aclarity ;) + // use lines instead of gl_rect_2d so we can round the edges as per james' recommendation + LLUI::setLineWidth(1.5f); + LLColor4 outlineColor = gFocusMgr.childHasKeyboardFocus(this) ? LLUI::sColorsGroup->getColor("FloaterFocusBorderColor") : LLUI::sColorsGroup->getColor("FloaterUnfocusBorderColor"); + gl_rect_2d_offset_local(0, getRect().getHeight() + 1, getRect().getWidth() + 1, 0, outlineColor, -LLPANEL_BORDER_WIDTH, FALSE); + LLUI::setLineWidth(1.f); + } + + // update tearoff button for torn off floaters + // when last host goes away + if (mCanTearOff && !getHost()) + { + LLFloater* old_host = mLastHostHandle.get(); + if (!old_host) { - LLFloater* old_host = mLastHostHandle.get(); - if (!old_host) - { - setCanTearOff(FALSE); - } + setCanTearOff(FALSE); } } } - void LLFloater::setCanMinimize(BOOL can_minimize) { // removing minimize/restore button programmatically, @@ -1540,7 +1545,13 @@ void LLFloater::updateButtons() S32 button_count = 0; for (S32 i = 0; i < BUTTON_COUNT; i++) { - if (mButtonsEnabled[i]) + mButtons[i]->setEnabled(mButtonsEnabled[i]); + + if (mButtonsEnabled[i] + //*HACK: always render close button for hosted floaters + // so that users don't accidentally hit the button when closing multiple windows + // in the chatterbox + || (i == BUTTON_CLOSE && mButtonScale != 1.f)) { button_count++; @@ -1564,18 +1575,16 @@ void LLFloater::updateButtons() mButtons[i]->setRect(btn_rect); mButtons[i]->setVisible(TRUE); - mButtons[i]->setEnabled(TRUE); // the restore button should have a tab stop so that it takes action when you Ctrl-Tab to a minimized floater mButtons[i]->setTabStop(i == BUTTON_RESTORE); } else if (mButtons[i]) { mButtons[i]->setVisible(FALSE); - mButtons[i]->setEnabled(FALSE); } } - - mDragHandle->setMaxTitleWidth(getRect().getWidth() - (button_count * (LLFLOATER_CLOSE_BOX_SIZE + 1))); + if (mDragHandle) + mDragHandle->setMaxTitleWidth(getRect().getWidth() - (button_count * (LLFLOATER_CLOSE_BOX_SIZE + 1))); } void LLFloater::buildButtons() @@ -2076,7 +2085,7 @@ void LLFloaterView::closeAllChildren(bool app_quitting) // Attempt to close floater. This will cause the "do you want to save" // dialogs to appear. - if (floaterp->canClose()) + if (floaterp->canClose() && !floaterp->isDead()) { floaterp->close(app_quitting); } @@ -2093,7 +2102,7 @@ BOOL LLFloaterView::allChildrenClosed() LLView* viewp = *it; LLFloater* floaterp = (LLFloater*)viewp; - if (floaterp->getVisible() && floaterp->canClose()) + if (floaterp->getVisible() && !floaterp->isDead() && floaterp->canClose()) { return false; } @@ -2332,7 +2341,9 @@ void LLFloaterView::popVisibleAll(const skip_list_t& skip_list) LLMultiFloater::LLMultiFloater() : mTabContainer(NULL), mTabPos(LLTabContainer::TOP), - mAutoResize(TRUE) + mAutoResize(TRUE), + mOrigMinWidth(0), + mOrigMinHeight(0) { } @@ -2340,7 +2351,9 @@ LLMultiFloater::LLMultiFloater() : LLMultiFloater::LLMultiFloater(LLTabContainer::TabPosition tab_pos) : mTabContainer(NULL), mTabPos(tab_pos), - mAutoResize(TRUE) + mAutoResize(TRUE), + mOrigMinWidth(0), + mOrigMinHeight(0) { } @@ -2349,7 +2362,9 @@ LLMultiFloater::LLMultiFloater(const LLString &name) : LLFloater(name), mTabContainer(NULL), mTabPos(LLTabContainer::TOP), - mAutoResize(FALSE) + mAutoResize(FALSE), + mOrigMinWidth(0), + mOrigMinHeight(0) { } @@ -2361,7 +2376,9 @@ LLMultiFloater::LLMultiFloater( LLFloater(name, rect, name), mTabContainer(NULL), mTabPos(LLTabContainer::TOP), - mAutoResize(auto_resize) + mAutoResize(auto_resize), + mOrigMinWidth(0), + mOrigMinHeight(0) { mTabContainer = new LLTabContainer("Preview Tabs", LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), @@ -2385,7 +2402,9 @@ LLMultiFloater::LLMultiFloater( LLFloater(name, rect_control, name), mTabContainer(NULL), mTabPos(tab_pos), - mAutoResize(auto_resize) + mAutoResize(auto_resize), + mOrigMinWidth(0), + mOrigMinHeight(0) { mTabContainer = new LLTabContainer("Preview Tabs", LLRect(LLPANEL_BORDER_WIDTH, getRect().getHeight() - LLFLOATER_HEADER_SIZE, getRect().getWidth() - LLPANEL_BORDER_WIDTH, 0), @@ -2678,24 +2697,20 @@ void LLMultiFloater::setVisible(BOOL visible) } } -BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask) { - if (getEnabled() - && mask == MASK_CONTROL) + if (key == 'W' && mask == MASK_CONTROL) { - if (key == 'W') + LLFloater* floater = getActiveFloater(); + // is user closeable and is system closeable + if (floater && floater->canClose() && floater->isCloseable()) { - LLFloater* floater = getActiveFloater(); - // is user closeable and is system closeable - if (floater && floater->canClose() && floater->isCloseable()) - { - floater->close(); - } - return TRUE; + floater->close(); } + return TRUE; } - return LLFloater::handleKeyHere(key, mask, called_from_parent); + return LLFloater::handleKeyHere(key, mask); } LLFloater* LLMultiFloater::getActiveFloater() @@ -2763,15 +2778,18 @@ void LLMultiFloater::setCanResize(BOOL can_resize) BOOL LLMultiFloater::postBuild() { + // remember any original xml minimum size + getResizeLimits(&mOrigMinWidth, &mOrigMinHeight); + if (mTabContainer) { return TRUE; } - requires("Preview Tabs", WIDGET_TYPE_TAB_CONTAINER); + requires("Preview Tabs"); if (checkRequirements()) { - mTabContainer = LLUICtrlFactory::getTabContainerByName(this, "Preview Tabs"); + mTabContainer = getChild("Preview Tabs"); return TRUE; } @@ -2780,10 +2798,11 @@ BOOL LLMultiFloater::postBuild() void LLMultiFloater::updateResizeLimits() { - S32 new_min_width = 0; - S32 new_min_height = 0; - S32 tab_idx; - for (tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) + // initialize minimum size constraint to the original xml values. + S32 new_min_width = mOrigMinWidth; + S32 new_min_height = mOrigMinHeight; + // possibly increase minimum size constraint due to children's minimums. + for (S32 tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) { LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); if (floaterp) diff --git a/linden/indra/llui/llfloater.h b/linden/indra/llui/llfloater.h index f0bbcaf..8068741 100644 --- a/linden/indra/llui/llfloater.h +++ b/linden/indra/llui/llfloater.h @@ -50,7 +50,7 @@ class LLMultiFloater; const S32 LLFLOATER_VPAD = 6; const S32 LLFLOATER_HPAD = 6; const S32 LLFLOATER_CLOSE_BOX_SIZE = 16; -const S32 LLFLOATER_HEADER_SIZE = 16; +const S32 LLFLOATER_HEADER_SIZE = 18; const BOOL RESIZE_YES = TRUE; const BOOL RESIZE_NO = FALSE; @@ -122,8 +122,6 @@ public: virtual void initFloater(const LLString& title, BOOL resizable, S32 min_width, S32 min_height, BOOL drag_on_left, BOOL minimizable, BOOL close_btn); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER; } - virtual LLString getWidgetTag() const { return LL_FLOATER_TAG; }; virtual void open(); /* Flawfinder: ignore */ @@ -187,6 +185,8 @@ public: // Defaults to destroy(). virtual void onClose(bool app_quitting) { destroy(); } + // This cannot be "const" until all derived floater canClose() + // methods are const as well. JC virtual BOOL canClose() { return TRUE; } virtual void setVisible(BOOL visible); @@ -302,9 +302,6 @@ class LLFloaterView : public LLUICtrl public: LLFloaterView( const LLString& name, const LLRect& rect ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_FLOATER_VIEW; } - virtual LLString getWidgetTag() const { return LL_FLOATER_VIEW_TAG; } - /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); void reshapeFloater(S32 width, S32 height, BOOL called_from_parent, BOOL adjust_vertical); @@ -373,9 +370,7 @@ public: /*virtual*/ void onClose(bool app_quitting); /*virtual*/ void draw(); /*virtual*/ void setVisible(BOOL visible); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ EWidgetType getWidgetType() const { return WIDGET_TYPE_MULTI_FLOATER; } - /*virtual*/ LLString getWidgetTag() const { return LL_MULTI_FLOATER_TAG; }; + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); virtual void setCanResize(BOOL can_resize); virtual void growToFit(S32 content_width, S32 content_height); @@ -418,6 +413,7 @@ protected: LLTabContainer::TabPosition mTabPos; BOOL mAutoResize; + S32 mOrigMinWidth, mOrigMinHeight; // logically const but initialized late }; // visibility policy specialized for floaters diff --git a/linden/indra/llui/llfocusmgr.cpp b/linden/indra/llui/llfocusmgr.cpp index 0634513..e2d1f46 100644 --- a/linden/indra/llui/llfocusmgr.cpp +++ b/linden/indra/llui/llfocusmgr.cpp @@ -46,6 +46,7 @@ LLFocusMgr::LLFocusMgr() mKeyboardFocus( NULL ), mLastKeyboardFocus( NULL ), mDefaultKeyboardFocus( NULL ), + mKeystrokesOnly(FALSE), mTopCtrl( NULL ), mFocusWeight(0.f), mAppHasFocus(TRUE) // Macs don't seem to notify us that we've gotten focus, so default to true @@ -85,7 +86,7 @@ void LLFocusMgr::releaseFocusIfNeeded( const LLView* view ) } -void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock) +void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock, BOOL keystrokes_only) { if (mLockedView && (new_focus == NULL || @@ -98,6 +99,8 @@ void LLFocusMgr::setKeyboardFocus(LLUICtrl* new_focus, BOOL lock) //llinfos << "Keyboard focus handled by " << (new_focus ? new_focus->getName() : "nothing") << llendl; + mKeystrokesOnly = keystrokes_only; + if( new_focus != mKeyboardFocus ) { mLastKeyboardFocus = mKeyboardFocus; diff --git a/linden/indra/llui/llfocusmgr.h b/linden/indra/llui/llfocusmgr.h index 842c874..49aba93 100644 --- a/linden/indra/llui/llfocusmgr.h +++ b/linden/indra/llui/llfocusmgr.h @@ -54,13 +54,17 @@ public: BOOL childHasMouseCapture( const LLView* parent ) const; // Keyboard Focus - void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE); // new_focus = NULL to release the focus. + void setKeyboardFocus(LLUICtrl* new_focus, BOOL lock = FALSE, BOOL keystrokes_only = FALSE); // new_focus = NULL to release the focus. LLUICtrl* getKeyboardFocus() const { return mKeyboardFocus; } LLUICtrl* getLastKeyboardFocus() const { return mLastKeyboardFocus; } BOOL childHasKeyboardFocus( const LLView* parent ) const; void removeKeyboardFocusWithoutCallback( const LLView* focus ); + BOOL getKeystrokesOnly() { return mKeystrokesOnly; } + void setKeystrokesOnly(BOOL keystrokes_only) { mKeystrokesOnly = keystrokes_only; } + F32 getFocusTime() const { return mFocusTimer.getElapsedTimeF32(); } F32 getFocusFlashAmt() const; + S32 getFocusFlashWidth() const { return llround(lerp(1.f, 3.f, getFocusFlashAmt())); } LLColor4 getFocusColor() const; void triggerFocusFlash(); BOOL getAppHasFocus() const { return mAppHasFocus; } @@ -96,6 +100,7 @@ private: LLUICtrl* mKeyboardFocus; // Keyboard events are preemptively routed to this object LLUICtrl* mLastKeyboardFocus; // who last had focus LLUICtrl* mDefaultKeyboardFocus; + BOOL mKeystrokesOnly; // Top View LLUICtrl* mTopCtrl; diff --git a/linden/indra/llui/llhtmlhelp.h b/linden/indra/llui/llhtmlhelp.h index d4ec9e3..254faa2 100644 --- a/linden/indra/llui/llhtmlhelp.h +++ b/linden/indra/llui/llhtmlhelp.h @@ -36,7 +36,8 @@ class LLHtmlHelp { public: virtual ~LLHtmlHelp() {} - virtual void show(std::string start_url, std::string title) = 0; + virtual void show() = 0; + virtual void show(std::string help_url) = 0; }; #endif // LL_LLFLOATERHTMLHELP_H diff --git a/linden/indra/llui/lliconctrl.cpp b/linden/indra/llui/lliconctrl.cpp index 6a1d77c..f35de85 100644 --- a/linden/indra/llui/lliconctrl.cpp +++ b/linden/indra/llui/lliconctrl.cpp @@ -42,14 +42,15 @@ const F32 RESOLUTION_BUMP = 1.f; +static LLRegisterWidget r("icon"); + LLIconCtrl::LLIconCtrl(const LLString& name, const LLRect &rect, const LLUUID &image_id) : LLUICtrl(name, rect, FALSE, // mouse opaque NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP), - mColor( LLColor4::white ), - mImageName("") + mColor( LLColor4::white ) { setImage( image_id ); setTabStop(FALSE); @@ -64,9 +65,7 @@ LLIconCtrl::LLIconCtrl(const LLString& name, const LLRect &rect, const LLString mColor( LLColor4::white ), mImageName(image_name) { - LLUUID image_id; - image_id.set(LLUI::sAssetsGroup->getString( image_name )); - setImage( image_id ); + setImage( image_name ); setTabStop(FALSE); } @@ -77,32 +76,52 @@ LLIconCtrl::~LLIconCtrl() } -void LLIconCtrl::setImage(const LLUUID &image_id) +void LLIconCtrl::setImage(const LLString& image_name) { - mImageID = image_id; + //RN: support UUIDs masquerading as strings + if (LLUUID::validate(image_name)) + { + mImageID = LLUUID(image_name); + + setImage(mImageID); + } + else + { + mImageName = image_name; + mImagep = LLUI::sImageProvider->getUIImage(image_name); + mImageID.setNull(); + } +} + +void LLIconCtrl::setImage(const LLUUID& image_id) +{ + mImageName.clear(); mImagep = LLUI::sImageProvider->getUIImageByID(image_id); + mImageID = image_id; } void LLIconCtrl::draw() { - if( getVisible() ) + if( mImagep.notNull() ) { - if( mImagep.notNull() ) - { - mImagep->draw(0, 0, - getRect().getWidth(), getRect().getHeight(), - mColor ); - } - - LLUICtrl::draw(); + mImagep->draw(getLocalRect(), mColor ); } + + LLUICtrl::draw(); } // virtual void LLIconCtrl::setValue(const LLSD& value ) { - setImage(value.asUUID()); + if (value.isUUID()) + { + setImage(value.asUUID()); + } + else + { + setImage(value.asString()); + } } // virtual @@ -135,18 +154,16 @@ LLView* LLIconCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory * LLRect rect; createRect(node, rect, parent, LLRect()); - LLUUID image_id; + LLString image_name; if (node->hasAttribute("image_name")) { - LLString image_name; node->getAttributeString("image_name", image_name); - image_id.set(LLUI::sAssetsGroup->getString( image_name )); } LLColor4 color(LLColor4::white); LLUICtrlFactory::getAttributeColor(node,"color", color); - LLIconCtrl* icon = new LLIconCtrl(name, rect, image_id); + LLIconCtrl* icon = new LLIconCtrl(name, rect, image_name); icon->setColor(color); diff --git a/linden/indra/llui/lliconctrl.h b/linden/indra/llui/lliconctrl.h index b0c191f..055b504 100644 --- a/linden/indra/llui/lliconctrl.h +++ b/linden/indra/llui/lliconctrl.h @@ -51,14 +51,14 @@ public: LLIconCtrl(const LLString& name, const LLRect &rect, const LLUUID &image_id); LLIconCtrl(const LLString& name, const LLRect &rect, const LLString &image_name); virtual ~LLIconCtrl(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_ICON; } - virtual LLString getWidgetTag() const { return LL_ICON_CTRL_TAG; } // llview overrides virtual void draw(); - void setImage(const LLUUID &image_id); + void setImage(const LLString& image_name); + void setImage(const LLUUID& image_name); const LLUUID &getImage() const { return mImageID; } + LLString getImageName() const { return mImageName; } // Takes a UUID, wraps get/setImage virtual void setValue(const LLSD& value ); diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index 1c96bc4..aeb906c 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp @@ -70,7 +70,6 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 SCROLL_INCREMENT_ADD = 0; // make space for typing const S32 SCROLL_INCREMENT_DEL = 4; // make space for baskspacing const F32 AUTO_SCROLL_TIME = 0.05f; -const F32 LABEL_HPAD = 5.f; const F32 PREEDIT_MARKER_BRIGHTNESS = 0.4f; const S32 PREEDIT_MARKER_GAP = 1; @@ -81,6 +80,10 @@ const S32 PREEDIT_STANDOUT_GAP = 1; const S32 PREEDIT_STANDOUT_POSITION = 2; const S32 PREEDIT_STANDOUT_THICKNESS = 2; +static LLRegisterWidget r1("line_editor"); + +/* static */ LLPointer LLLineEditor::sImage; + // // Member functions // @@ -101,8 +104,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mMaxLengthBytes(max_length_bytes), mCursorPos( 0 ), mScrollHPos( 0 ), - mBorderLeft(0), - mBorderRight(0), + mTextPadLeft(0), + mTextPadRight(0), mCommitOnFocusLost( TRUE ), mRevertOnEsc( TRUE ), mKeystrokeCallback( keystroke_callback ), @@ -128,7 +131,8 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mHandleEditKeysDirectly( FALSE ), mSelectAllonFocusReceived( FALSE ), mPassDelete(FALSE), - mReadOnly(FALSE) + mReadOnly(FALSE), + mImage( sImage ) { llassert( max_length_bytes > 0 ); @@ -151,8 +155,7 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, setFocusLostCallback(focus_lost_callback); - mMinHPixels = mBorderThickness + UI_LINEEDITOR_H_PAD + mBorderLeft; - mMaxHPixels = getRect().getWidth() - mMinHPixels - mBorderThickness - mBorderRight; + setTextPadding(0, 0); mScrollTimer.reset(); @@ -166,6 +169,12 @@ LLLineEditor::LLLineEditor(const LLString& name, const LLRect& rect, mBorder = new LLViewBorder( "line ed border", border_rect, border_bevel, border_style, mBorderThickness ); addChild( mBorder ); mBorder->setFollows(FOLLOWS_LEFT|FOLLOWS_RIGHT|FOLLOWS_TOP|FOLLOWS_BOTTOM); + + if( ! sImage) + { + sImage = LLUI::getUIImage("sm_rounded_corners_simple.tga"); + } + mImage = sImage; } @@ -243,9 +252,9 @@ void LLLineEditor::updateHistory() void LLLineEditor::reshape(S32 width, S32 height, BOOL called_from_parent) { - LLUICtrl::reshape(width, height, called_from_parent ); - - mMaxHPixels = getRect().getWidth() - 2 * (mBorderThickness + UI_LINEEDITOR_H_PAD) + 1 - mBorderRight; + LLUICtrl::reshape(width, height, called_from_parent); + setTextPadding(mTextPadLeft, mTextPadRight); // For clamping side-effect. + setCursor(mCursorPos); // For clamping side-effect. } void LLLineEditor::setEnabled(BOOL enabled) @@ -262,12 +271,12 @@ void LLLineEditor::setMaxTextLength(S32 max_text_length) mMaxLengthBytes = max_len; } -void LLLineEditor::setBorderWidth(S32 left, S32 right) +void LLLineEditor::setTextPadding(S32 left, S32 right) { - mBorderLeft = llclamp(left, 0, getRect().getWidth()); - mBorderRight = llclamp(right, 0, getRect().getWidth()); - mMinHPixels = mBorderThickness + UI_LINEEDITOR_H_PAD + mBorderLeft; - mMaxHPixels = getRect().getWidth() - mMinHPixels - mBorderThickness - mBorderRight; + mTextPadLeft = llclamp(left, 0, getRect().getWidth()); + mTextPadRight = llclamp(right, 0, getRect().getWidth()); + mMinHPixels = UI_LINEEDITOR_H_PAD + mTextPadLeft; + mMaxHPixels = getRect().getWidth() - mMinHPixels - mTextPadRight; } @@ -483,9 +492,10 @@ BOOL LLLineEditor::handleDoubleClick(S32 x, S32 y, MASK mask) BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) { - if (x < mBorderLeft || x > (getRect().getWidth() - mBorderRight)) + // Check first whether the "clear search" button wants to deal with this. + if(childrenHandleMouseDown(x, y, mask) != NULL) { - return LLUICtrl::handleMouseDown(x, y, mask); + return TRUE; } if (mSelectAllonFocusReceived && gFocusMgr.getKeyboardFocus() != this) @@ -563,61 +573,62 @@ BOOL LLLineEditor::handleMouseDown(S32 x, S32 y, MASK mask) BOOL LLLineEditor::handleHover(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; - if (!hasMouseCapture() && (x < mBorderLeft || x > (getRect().getWidth() - mBorderRight))) + // Check first whether the "clear search" button wants to deal with this. + if(!hasMouseCapture()) { - return LLUICtrl::handleHover(x, y, mask); + if(childrenHandleHover(x, y, mask) != NULL) + { + return TRUE; + } } - if( getVisible() ) + if( (hasMouseCapture()) && mIsSelecting ) { - if( (hasMouseCapture()) && mIsSelecting ) + if (x != mLastSelectionX || y != mLastSelectionY) { - if (x != mLastSelectionX || y != mLastSelectionY) + mLastSelectionX = x; + mLastSelectionY = y; + } + // Scroll if mouse cursor outside of bounds + if (mScrollTimer.hasExpired()) + { + S32 increment = llround(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME); + mScrollTimer.reset(); + mScrollTimer.setTimerExpirySec(AUTO_SCROLL_TIME); + if( (x < mMinHPixels) && (mScrollHPos > 0 ) ) { - mLastSelectionX = x; - mLastSelectionY = y; + // Scroll to the left + mScrollHPos = llclamp(mScrollHPos - increment, 0, mText.length()); } - // Scroll if mouse cursor outside of bounds - if (mScrollTimer.hasExpired()) + else + if( (x > mMaxHPixels) && (mCursorPos < (S32)mText.length()) ) { - S32 increment = llround(mScrollTimer.getElapsedTimeF32() / AUTO_SCROLL_TIME); - mScrollTimer.reset(); - mScrollTimer.setTimerExpirySec(AUTO_SCROLL_TIME); - if( (x < mMinHPixels) && (mScrollHPos > 0 ) ) - { - // Scroll to the left - mScrollHPos = llclamp(mScrollHPos - increment, 0, mText.length()); - } - else - if( (x > mMaxHPixels) && (mCursorPos < (S32)mText.length()) ) + // If scrolling one pixel would make a difference... + S32 pixels_after_scrolling_one_char = findPixelNearestPos(1); + if( pixels_after_scrolling_one_char >= mMaxHPixels ) { - // If scrolling one pixel would make a difference... - S32 pixels_after_scrolling_one_char = findPixelNearestPos(1); - if( pixels_after_scrolling_one_char >= mMaxHPixels ) - { - // ...scroll to the right - mScrollHPos = llclamp(mScrollHPos + increment, 0, mText.length()); - } + // ...scroll to the right + mScrollHPos = llclamp(mScrollHPos + increment, 0, mText.length()); } } + } - setCursorAtLocalPos( x ); - mSelectionEnd = getCursor(); + setCursorAtLocalPos( x ); + mSelectionEnd = getCursor(); - // delay cursor flashing - mKeystrokeTimer.reset(); + // delay cursor flashing + mKeystrokeTimer.reset(); - getWindow()->setCursor(UI_CURSOR_IBEAM); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; - handled = TRUE; - } + getWindow()->setCursor(UI_CURSOR_IBEAM); + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + handled = TRUE; + } - if( !handled ) - { - getWindow()->setCursor(UI_CURSOR_IBEAM); - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; - handled = TRUE; - } + if( !handled ) + { + getWindow()->setCursor(UI_CURSOR_IBEAM); + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + handled = TRUE; } return handled; @@ -634,9 +645,10 @@ BOOL LLLineEditor::handleMouseUp(S32 x, S32 y, MASK mask) handled = TRUE; } - if (!handled && (x < mBorderLeft || x > (getRect().getWidth() - mBorderRight))) + // Check first whether the "clear search" button wants to deal with this. + if(!handled && childrenHandleMouseUp(x, y, mask) != NULL) { - return LLUICtrl::handleMouseUp(x, y, mask); + return TRUE; } if( mIsSelecting ) @@ -1223,12 +1235,12 @@ BOOL LLLineEditor::handleSpecialKey(KEY key, MASK mask) } -BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask ) { BOOL handled = FALSE; BOOL selection_modified = FALSE; - if ( (gFocusMgr.getKeyboardFocus() == this) && getVisible()) + if ( gFocusMgr.getKeyboardFocus() == this ) { LLLineEditorRollback rollback( this ); @@ -1291,7 +1303,7 @@ BOOL LLLineEditor::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) } -BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) +BOOL LLLineEditor::handleUnicodeCharHere(llwchar uni_char) { if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL { @@ -1381,11 +1393,6 @@ void LLLineEditor::doDelete() void LLLineEditor::draw() { - if( !getVisible() ) - { - return; - } - S32 text_len = mText.length(); LLString saved_text; @@ -1406,6 +1413,13 @@ void LLLineEditor::draw() LLColor4 bg_color = mReadOnlyBgColor; +#if 0 // for when we're ready for image art. + if( hasFocus()) + { + mImage->drawBorder(0, 0, getRect().getWidth(), getRect().getHeight(), gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + } + mImage->draw(getLocalRect(), mReadOnly ? mReadOnlyBgColor : mWriteableBgColor ); +#else // the old programmer art. // drawing solids requires texturing be disabled { LLGLSNoTexture no_texture; @@ -1423,6 +1437,7 @@ void LLLineEditor::draw() } gl_rect_2d(background, bg_color); } +#endif // draw text @@ -1560,10 +1575,14 @@ void LLLineEditor::draw() mMaxHPixels - llround(rendered_pixels_right), &rendered_pixels_right); } +#if 0 // for when we're ready for image art. + mBorder->setVisible(FALSE); // no more programmatic art. +#endif // If we're editing... if( gFocusMgr.getKeyboardFocus() == this) { + //mBorder->setVisible(TRUE); // ok, programmer art just this once. // (Flash the cursor every half second) if (gShowTextEditCursor && !mReadOnly) { @@ -1616,7 +1635,7 @@ void LLLineEditor::draw() if (0 == mText.length()) { mGLFont->render(mLabel.getWString(), 0, - LABEL_HPAD, (F32)text_bottom, + mMinHPixels, (F32)text_bottom, label_color, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, @@ -1757,7 +1776,7 @@ BOOL LLLineEditor::prevalidateFloat(const LLWString &str) if( 0 < len ) { // May be a comma or period, depending on the locale - llwchar decimal_point = (llwchar)gResMgr->getDecimalPoint(); + llwchar decimal_point = (llwchar)LLResMgr::getInstance()->getDecimalPoint(); S32 i = 0; @@ -1806,7 +1825,7 @@ BOOL LLLineEditor::postvalidateFloat(const LLString &str) } // May be a comma or period, depending on the locale - llwchar decimal_point = (llwchar)gResMgr->getDecimalPoint(); + llwchar decimal_point = (llwchar)LLResMgr::getInstance()->getDecimalPoint(); for( ; i < len; i++ ) { @@ -2244,8 +2263,27 @@ LLView* LLLineEditor::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory return line_editor; } +//static +void LLLineEditor::cleanupClass() +{ + sImage = NULL; +} + +/* static */ +LLPointer LLLineEditor::parseImage(LLString name, LLXMLNodePtr from, LLPointer def) +{ + LLString xml_name; + if (from->hasAttribute(name)) from->getAttributeString(name, xml_name); + if (xml_name == LLString::null) return def; + LLPointer image = LLUI::getUIImage(xml_name); + return image.isNull() ? def : image; +} + void LLLineEditor::setColorParameters(LLXMLNodePtr node) { + // overrides default image if supplied. + mImage = parseImage("image", node, mImage); + LLColor4 color; if (LLUICtrlFactory::getAttributeColor(node,"cursor_color", color)) { @@ -2510,6 +2548,9 @@ S32 LLLineEditor::getPreeditFontSize() const } +static LLRegisterWidget r2("search_editor"); + + LLSearchEditor::LLSearchEditor(const LLString& name, const LLRect& rect, S32 max_length_bytes, @@ -2539,7 +2580,7 @@ LLSearchEditor::LLSearchEditor(const LLString& name, LLRect clear_btn_rect(rect.getWidth() - btn_width, rect.getHeight(), rect.getWidth(), 0); mClearSearchButton = new LLButton("clear search", clear_btn_rect, - "closebox.tga", + "icn_clear_lineeditor.tga", "UIImgBtnCloseInactiveUUID", LLString::null, onClearSearch, @@ -2552,9 +2593,42 @@ LLSearchEditor::LLSearchEditor(const LLString& name, mClearSearchButton->setTabStop(FALSE); mSearchEdit->addChild(mClearSearchButton); - mSearchEdit->setBorderWidth(0, btn_width); + mSearchEdit->setTextPadding(0, btn_width); +} + + +//virtual +void LLSearchEditor::setValue(const LLSD& value ) +{ + mSearchEdit->setValue(value); +} + +//virtual +LLSD LLSearchEditor::getValue() const +{ + return mSearchEdit->getValue(); } +//virtual +BOOL LLSearchEditor::setTextArg( const LLString& key, const LLStringExplicit& text ) +{ + return mSearchEdit->setTextArg(key, text); +} + +//virtual +BOOL LLSearchEditor::setLabelArg( const LLString& key, const LLStringExplicit& text ) +{ + return mSearchEdit->setLabelArg(key, text); +} + +//virtual +void LLSearchEditor::clear() +{ + if (mSearchEdit) + { + mSearchEdit->clear(); + } +} void LLSearchEditor::draw() { diff --git a/linden/indra/llui/lllineeditor.h b/linden/indra/llui/lllineeditor.h index ba3c697..bf0dcb5 100644 --- a/linden/indra/llui/lllineeditor.h +++ b/linden/indra/llui/lllineeditor.h @@ -78,19 +78,19 @@ public: S32 border_thickness = 1); virtual ~LLLineEditor(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_LINE_EDITOR; } - virtual LLString getWidgetTag() const { return LL_LINE_EDITOR_TAG; }; + virtual LLXMLNodePtr getXML(bool save_children = true) const; void setColorParameters(LLXMLNodePtr node); static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); + static void cleanupClass(); // mousehandler overrides /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleDoubleClick(S32 x,S32 y,MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ); - /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); + /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char); /*virtual*/ void onMouseCaptureLost(); // LLEditMenuHandler overrides @@ -189,8 +189,8 @@ public: void setKeystrokeCallback(void (*keystroke_callback)(LLLineEditor* caller, void* user_data)); - void setMaxTextLength(S32 max_text_length); - void setBorderWidth(S32 left, S32 right); + void setMaxTextLength(S32 max_text_length); + void setTextPadding(S32 left, S32 right); // Used to specify room for children before or after text. static BOOL isPartOfWord(llwchar c); // Prevalidation controls which keystrokes can affect the editor @@ -212,7 +212,7 @@ public: void updateHistory(); // stores current line in history private: - // private helper classes + // private helper methods void removeChar(); void addChar(const llwchar c); void setCursorAtLocalPos(S32 local_mouse_x); @@ -254,10 +254,10 @@ protected: S32 mCursorPos; // I-beam is just after the mCursorPos-th character. S32 mScrollHPos; // Horizontal offset from the start of mText. Used for scrolling. LLFrameTimer mScrollTimer; + S32 mTextPadLeft; // Used to reserve space before the beginning of the text for children. + S32 mTextPadRight; // Used to reserve space after the end of the text for children. S32 mMinHPixels; S32 mMaxHPixels; - S32 mBorderLeft; - S32 mBorderRight; BOOL mCommitOnFocusLost; BOOL mRevertOnEsc; @@ -302,6 +302,15 @@ protected: std::vector mPreeditPositions; LLPreeditor::standouts_t mPreeditStandouts; +private: + // Utility on top of LLUI::getUIImage, looks up a named image in a given XML node and returns it if possible + // or returns a given default image if anything in the process fails. + static LLPointer parseImage(LLString name, LLXMLNodePtr from, LLPointer def); + // Global instance used as default for member instance below. + static LLPointer sImage; + // Instances that by default point to the statics but can be overidden in XML. + LLPointer mImage; + // private helper class class LLLineEditorRollback { @@ -359,8 +368,6 @@ public: /*virtual*/ void draw(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SEARCH_EDITOR; } - virtual LLString getWidgetTag() const { return LL_SEARCH_EDITOR_TAG; } static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); void setText(const LLStringExplicit &new_text) { mSearchEdit->setText(new_text); } @@ -368,12 +375,11 @@ public: void setSearchCallback(void (*search_callback)(const LLString& search_string, void* user_data), void* data) { mSearchCallback = search_callback; mCallbackUserData = data; } // LLUICtrl interface - virtual void setValue(const LLSD& value ) { mSearchEdit->setValue(value); } - virtual LLSD getValue() const { return mSearchEdit->getValue(); } - virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setTextArg( key, text); } - virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ) { return mSearchEdit->setLabelArg(key, text); } - virtual void clear() { if (mSearchEdit) mSearchEdit->clear(); } - + virtual void setValue(const LLSD& value ); + virtual LLSD getValue() const; + virtual BOOL setTextArg( const LLString& key, const LLStringExplicit& text ); + virtual BOOL setLabelArg( const LLString& key, const LLStringExplicit& text ); + virtual void clear(); private: static void onSearchEdit(LLLineEditor* caller, void* user_data ); diff --git a/linden/indra/llui/llmenugl.cpp b/linden/indra/llui/llmenugl.cpp index cb54476..f2486f1 100644 --- a/linden/indra/llui/llmenugl.cpp +++ b/linden/indra/llui/llmenugl.cpp @@ -188,31 +188,6 @@ LLXMLNodePtr LLMenuItemGL::getXML(bool save_children) const return node; } -BOOL LLMenuItemGL::handleKey(KEY key, MASK mask, BOOL called_from_parent) -{ - // modified from LLView::handleKey - // ignore visibility, as keyboard accelerators should still trigger menu items - // even when they are not visible - // also, ignore enabled flag for self, as that can change based on menu callbacks - BOOL handled = FALSE; - - if( called_from_parent ) - { - // Downward traversal - if (getEnabled()) - { - handled = childrenHandleKey( key, mask ) != NULL; - } - } - - if( !handled ) - { - handled = handleKeyHere( key, mask, called_from_parent ); - } - - return handled; -} - BOOL LLMenuItemGL::handleAcceleratorKey(KEY key, MASK mask) { if( getEnabled() && (!gKeyboard->getKeyRepeated(key) || mAllowKeyRepeat) && (key == mAcceleratorKey) && (mask == (mAcceleratorMask & MASK_NORMALKEYS)) ) @@ -400,7 +375,7 @@ void LLMenuItemGL::doIt( void ) } -BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask ) { if (getHighlight() && getMenu()->isOpen()) @@ -436,29 +411,21 @@ BOOL LLMenuItemGL::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) BOOL LLMenuItemGL::handleMouseUp( S32 x, S32 y, MASK ) { - if (getEnabled()) - { - // switch to mouse navigation mode - LLMenuGL::setKeyboardMode(FALSE); + // switch to mouse navigation mode + LLMenuGL::setKeyboardMode(FALSE); - doIt(); - make_ui_sound("UISndClickRelease"); - return TRUE; - } - return FALSE; + doIt(); + make_ui_sound("UISndClickRelease"); + return TRUE; } BOOL LLMenuItemGL::handleMouseDown( S32 x, S32 y, MASK ) { - if (getEnabled()) - { - // switch to mouse navigation mode - LLMenuGL::setKeyboardMode(FALSE); + // switch to mouse navigation mode + LLMenuGL::setKeyboardMode(FALSE); - setHighlight(TRUE); - return TRUE; - } - return FALSE; + setHighlight(TRUE); + return TRUE; } @@ -560,9 +527,6 @@ public: virtual LLString getType() const { return "separator"; } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_SEPARATOR; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_SEPARATOR_GL_TAG; } - // doIt() - do the primary funcationality of the menu item. virtual void doIt( void ) {} @@ -641,9 +605,6 @@ class LLMenuItemVerticalSeparatorGL public: LLMenuItemVerticalSeparatorGL( void ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_SEPARATOR_VERTICAL; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_VERTICAL_SEPARATOR_GL_TAG; } - virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask) { return FALSE; } }; @@ -739,8 +700,6 @@ public: { setEnabled(FALSE); } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_BLANK; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_BLANK_GL_TAG; } virtual void doIt( void ) {} virtual void draw( void ) {} }; @@ -827,57 +786,33 @@ void LLMenuItemCallGL::setEnabledControl(LLString enabled_control, LLView *conte // Register new listener if (!enabled_control.empty()) { - LLControlBase *control = context->findControl(enabled_control); - if (control) - { - LLSD state = control->registerListener(this, "ENABLED"); - setEnabled(state); - } - else + LLControlVariable *control = context->findControl(enabled_control); + if (!control) { context->addBoolControl(enabled_control, getEnabled()); control = context->findControl(enabled_control); - control->registerListener(this, "ENABLED"); + llassert_always(control); } + control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("enabled"))); + setEnabled(control->getValue()); } } -void LLMenuItemCallGL::setVisibleControl(LLString enabled_control, LLView *context) +void LLMenuItemCallGL::setVisibleControl(LLString visible_control, LLView *context) { // Register new listener - if (!enabled_control.empty()) + if (!visible_control.empty()) { - LLControlBase *control = context->findControl(enabled_control); - if (control) + LLControlVariable *control = context->findControl(visible_control); + if (!control) { - LLSD state = control->registerListener(this, "VISIBLE"); - setVisible(state); + context->addBoolControl(visible_control, getVisible()); + control = context->findControl(visible_control); + llassert_always(control); } - else - { - context->addBoolControl(enabled_control, getEnabled()); - control = context->findControl(enabled_control); - control->registerListener(this, "VISIBLE"); - } - } -} - -// virtual -bool LLMenuItemCallGL::handleEvent(LLPointer event, const LLSD& userdata) -{ - if (userdata.asString() == "ENABLED" && event->desc() == "value_changed") - { - LLSD state = event->getValue(); - setEnabled(state); - return TRUE; + control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("visible"))); + setVisible(control->getValue()); } - if (userdata.asString() == "VISIBLE" && event->desc() == "value_changed") - { - LLSD state = event->getValue(); - setVisible(state); - return TRUE; - } - return LLMenuItemGL::handleEvent(event, userdata); } // virtual @@ -1000,44 +935,35 @@ LLMenuItemCheckGL::LLMenuItemCheckGL ( const LLString& name, setControlName(control_name, context); } -void LLMenuItemCheckGL::setCheckedControl(LLString checked_control, LLView *context) +//virtual +void LLMenuItemCheckGL::setValue(const LLSD& value) { - // Register new listener - if (!checked_control.empty()) + mChecked = value.asBoolean(); + if(mChecked) { - LLControlBase *control = context->findControl(checked_control); - if (control) - { - LLSD state = control->registerListener(this, "CHECKED"); - mChecked = state; - } - else - { - context->addBoolControl(checked_control, mChecked); - control = context->findControl(checked_control); - control->registerListener(this, "CHECKED"); - } + mDrawBoolLabel = BOOLEAN_TRUE_PREFIX; + } + else + { + mDrawBoolLabel.clear(); } } -// virtual -bool LLMenuItemCheckGL::handleEvent(LLPointer event, const LLSD& userdata) +void LLMenuItemCheckGL::setCheckedControl(LLString checked_control, LLView *context) { - if (userdata.asString() == "CHECKED" && event->desc() == "value_changed") + // Register new listener + if (!checked_control.empty()) { - LLSD state = event->getValue(); - mChecked = state; - if(mChecked) - { - mDrawBoolLabel = BOOLEAN_TRUE_PREFIX; - } - else + LLControlVariable *control = context->findControl(checked_control); + if (!control) { - mDrawBoolLabel.clear(); + context->addBoolControl(checked_control, mChecked); + control = context->findControl(checked_control); + llassert_always(control); } - return TRUE; + control->getSignal()->connect(boost::bind(&LLView::controlListener, _1, getHandle(), std::string("value"))); + mChecked = control->getValue(); } - return LLMenuItemCallGL::handleEvent(event, userdata); } // virtual @@ -1119,29 +1045,31 @@ LLMenuItemBranchGL::LLMenuItemBranchGL( const LLString& name, const LLString& la } // virtual -LLView* LLMenuItemBranchGL::getChildByName(const LLString& name, BOOL recurse) const +LLView* LLMenuItemBranchGL::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const { + // richard: this is redundant with parent, remove if (mBranch->getName() == name) { return mBranch; } // Always recurse on branches - return mBranch->getChild(name, recurse); + LLView* child = mBranch->getChildView(name, recurse, FALSE); + if (!child) + { + child = LLView::getChildView(name, recurse, create_if_missing); + } + return child; } // virtual BOOL LLMenuItemBranchGL::handleMouseUp(S32 x, S32 y, MASK mask) { - if (getEnabled()) - { - // switch to mouse navigation mode - LLMenuGL::setKeyboardMode(FALSE); + // switch to mouse navigation mode + LLMenuGL::setKeyboardMode(FALSE); - doIt(); - make_ui_sound("UISndClickRelease"); - return TRUE; - } - return FALSE; + doIt(); + make_ui_sound("UISndClickRelease"); + return TRUE; } BOOL LLMenuItemBranchGL::handleAcceleratorKey(KEY key, MASK mask) @@ -1299,7 +1227,7 @@ void LLMenuItemBranchGL::onVisibilityChange( BOOL new_visibility ) LLMenuItemGL::onVisibilityChange(new_visibility); } -BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask ) { if (getMenu()->getVisible() && mBranch->getVisible() && key == KEY_LEFT) { @@ -1318,8 +1246,7 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask, BOOL called_from_par return handled; } - if (getEnabled() && - getHighlight() && + if (getHighlight() && getMenu()->isOpen() && key == KEY_RIGHT && !mBranch->getHighlightedItem()) { @@ -1333,7 +1260,7 @@ BOOL LLMenuItemBranchGL::handleKeyHere( KEY key, MASK mask, BOOL called_from_par } } - return LLMenuItemGL::handleKeyHere(key, mask, called_from_parent); + return LLMenuItemGL::handleKeyHere(key, mask); } void LLMenuItemBranchGL::openMenu() @@ -1403,9 +1330,6 @@ public: LLMenuItemBranchDownGL( const LLString& name, const LLString& label, LLMenuGL* branch, KEY key = KEY_NONE, MASK mask = MASK_NONE ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_BRANCH_DOWN; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_BRANCH_DOWN_GL_TAG; } - virtual LLString getType() const { return "menu"; } // returns the normal width of this control in pixels - this is @@ -1429,7 +1353,7 @@ public: virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual void draw( void ); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleAcceleratorKey(KEY key, MASK mask); }; @@ -1566,7 +1490,7 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask) return handled; } -BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask) { BOOL menu_open = getBranch()->getVisible(); // don't do keyboard navigation of top-level menus unless in keyboard mode, or menu expanded @@ -1605,7 +1529,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_ // switch to keyboard navigation mode LLMenuGL::setKeyboardMode(TRUE); - if (getEnabled() && !isActive()) + if (!isActive()) { doIt(); } @@ -1617,7 +1541,7 @@ BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_ // switch to keyboard navigation mode LLMenuGL::setKeyboardMode(TRUE); - if (getEnabled() && !isActive()) + if (!isActive()) { doIt(); } @@ -1690,6 +1614,8 @@ void LLMenuItemBranchDownGL::draw( void ) /// Class LLMenuGL ///============================================================================ +static LLRegisterWidget r1("menu"); + // Default constructor LLMenuGL::LLMenuGL( const LLString& name, const LLString& label, LLHandle parent_floater_handle ) : LLUICtrl( name, LLRect(), FALSE, NULL, NULL ), @@ -1946,7 +1872,7 @@ void LLMenuGL::parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory { continue; } - LLControlBase *control = parent->findControl(control_name); + LLControlVariable *control = parent->findControl(control_name); if (!control) { parent->addBoolControl(control_name, FALSE); @@ -2685,8 +2611,8 @@ LLMenuItemGL* LLMenuGL::highlightNextItem(LLMenuItemGL* cur_item, BOOL skip_disa while(1) { - // skip separators and disabled items - if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getType() != SEPARATOR_NAME) + // skip separators and disabled/invisible items + if ((*next_item_iter)->getEnabled() && (*next_item_iter)->getVisible() && (*next_item_iter)->getType() != SEPARATOR_NAME) { if (cur_item) { @@ -2751,8 +2677,8 @@ LLMenuItemGL* LLMenuGL::highlightPrevItem(LLMenuItemGL* cur_item, BOOL skip_disa while(1) { - // skip separators and disabled items - if ((*prev_item_iter)->getEnabled() && (*prev_item_iter)->getName() != SEPARATOR_NAME) + // skip separators and disabled/invisible items + if ((*prev_item_iter)->getEnabled() && (*prev_item_iter)->getVisible() && (*prev_item_iter)->getName() != SEPARATOR_NAME) { (*prev_item_iter)->setHighlight(TRUE); return (*prev_item_iter); @@ -2801,37 +2727,6 @@ void LLMenuGL::updateParent(LLView* parentp) } } -// LLView functionality -BOOL LLMenuGL::handleKey( KEY key, MASK mask, BOOL called_from_parent ) -{ - BOOL handled = FALSE; - - // Pass down even if not visible - if( getEnabled() && called_from_parent ) - { - for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) - { - LLView* viewp = *child_it; - if (viewp->handleKey(key, mask, TRUE)) - { - handled = TRUE; - break; - } - } - } - - if( !handled ) - { - handled = handleKeyHere( key, mask, called_from_parent ); - if (handled && LLView::sDebugKeys) - { - llinfos << "Key handled by " << getName() << llendl; - } - } - - return handled; -} - BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask) { // don't handle if not enabled @@ -2854,7 +2749,7 @@ BOOL LLMenuGL::handleAcceleratorKey(KEY key, MASK mask) return FALSE; } -BOOL LLMenuGL::handleUnicodeCharHere( llwchar uni_char, BOOL called_from_parent ) +BOOL LLMenuGL::handleUnicodeCharHere( llwchar uni_char ) { if (jumpKeysActive()) { @@ -2980,17 +2875,19 @@ void LLMenuGL::setVisible(BOOL visible) LLMenuGL* LLMenuGL::getChildMenuByName(const LLString& name, BOOL recurse) const { - LLView* view = getChildByName(name, recurse); + LLView* view = getChildView(name, recurse, FALSE); if (view) { - if (view->getWidgetType() == WIDGET_TYPE_MENU_ITEM_BRANCH) + LLMenuItemBranchGL* branch = dynamic_cast(view); + if (branch) { - LLMenuItemBranchGL *branch = (LLMenuItemBranchGL *)view; return branch->getBranch(); } - if (view->getWidgetType() == WIDGET_TYPE_MENU || view->getWidgetType() == WIDGET_TYPE_PIE_MENU) + + LLMenuGL* menup = dynamic_cast(view); + if (menup) { - return (LLMenuGL*)view; + return menup; } } llwarns << "Child Menu " << name << " not found in menu " << getName() << llendl; @@ -3070,9 +2967,6 @@ class LLPieMenuBranch : public LLMenuItemGL public: LLPieMenuBranch(const LLString& name, const LLString& label, LLPieMenu* branch); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_PIE_MENU_BRANCH; } - virtual LLString getWidgetTag() const { return LL_PIE_MENU_BRANCH_TAG; } - // called to rebuild the draw label virtual void buildDrawLabel( void ); @@ -3842,6 +3736,8 @@ void LLPieMenu::hide(BOOL item_selected) /// Class LLMenuBarGL ///============================================================================ +static LLRegisterWidget r2("menu_bar"); + // Default constructor LLMenuBarGL::LLMenuBarGL( const LLString& name ) : LLMenuGL ( name, name ) { @@ -3897,9 +3793,10 @@ LLView* LLMenuBarGL::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory LLMenuBarGL *menubar = new LLMenuBarGL(name); LLHandle parent_handle; - if (parent->getWidgetType() == WIDGET_TYPE_FLOATER) + LLFloater* parent_floater = dynamic_cast(parent); + if (parent_floater) { - parent_handle = ((LLFloater*)parent)->getHandle(); + parent_handle = parent_floater->getHandle(); } // We need to have the rect early so that it's around when building @@ -3991,7 +3888,7 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask) return result; } -BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask) { if(key == KEY_ALT && !gKeyboard->getKeyRepeated(key) && LLUI::sConfigGroup->getBOOL("UseAltKeyForMenus")) { @@ -4005,7 +3902,7 @@ BOOL LLMenuBarGL::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) // before processing any other key, check to see if ALT key has triggered menu access checkMenuTrigger(); - return LLMenuGL::handleKeyHere(key, mask, called_from_parent); + return LLMenuGL::handleKeyHere(key, mask); } BOOL LLMenuBarGL::handleJumpKey(KEY key) @@ -4295,7 +4192,7 @@ BOOL LLMenuHolderGL::hasVisibleMenu() const for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it) { LLView* viewp = *child_it; - if (viewp->getVisible() && viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR) + if (viewp->getVisible() && dynamic_cast(viewp) == NULL) { return TRUE; } @@ -4319,7 +4216,7 @@ BOOL LLMenuHolderGL::hideMenus() { LLView* viewp = *child_it; // clicks off of menu do not hide menu bar - if (viewp->getWidgetType() != WIDGET_TYPE_MENU_BAR && viewp->getVisible()) + if (dynamic_cast(viewp) == NULL && viewp->getVisible()) { viewp->setVisible(FALSE); } @@ -4429,7 +4326,7 @@ BOOL LLTearOffMenu::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) return mMenu->handleUnicodeChar(uni_char, TRUE); } -BOOL LLTearOffMenu::handleKey(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLTearOffMenu::handleKeyHere(KEY key, MASK mask) { if (!mMenu->getHighlightedItem()) { diff --git a/linden/indra/llui/llmenugl.h b/linden/indra/llui/llmenugl.h index cd39006..e7b009a 100644 --- a/linden/indra/llui/llmenugl.h +++ b/linden/indra/llui/llmenugl.h @@ -91,14 +91,11 @@ public: LLMenuItemGL( const LLString& name, const LLString& label, KEY key = KEY_NONE, MASK = MASK_NONE ); virtual void setValue(const LLSD& value) { setLabel(value.asString()); } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_TAG; } virtual LLXMLNodePtr getXML(bool save_children = true) const; virtual LLString getType() const { return "item"; } - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleAcceleratorKey(KEY key, MASK mask); @@ -165,7 +162,7 @@ public: virtual void setEnabledSubMenus(BOOL enable){}; // LLView Functionality - virtual BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ); + virtual BOOL handleKeyHere( KEY key, MASK mask ); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask ); virtual void draw( void ); @@ -225,7 +222,7 @@ private: // calls a user defined callback. //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -class LLMenuItemCallGL : public LLMenuItemGL +class LLMenuItemCallGL : public LLMenuItemGL, public LLObservable { public: // normal constructor @@ -267,8 +264,6 @@ public: virtual LLString getType() const { return "call"; } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_CALL; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_CALL_GL_TAG; } void setEnabledControl(LLString enabled_control, LLView *context); void setVisibleControl(LLString enabled_control, LLView *context); @@ -291,7 +286,6 @@ public: //virtual void draw(); - virtual bool handleEvent(LLPointer event, const LLSD& userdata); private: menu_callback mCallback; @@ -341,17 +335,13 @@ public: void setCheckedControl(LLString checked_control, LLView *context); - virtual void setValue(const LLSD& value) { mChecked = value.asBoolean(); } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_CHECK; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_CHECK_GL_TAG; } + virtual void setValue(const LLSD& value); virtual LLString getType() const { return "check"; } // called to rebuild the draw label virtual void buildDrawLabel( void ); - virtual bool handleEvent(LLPointer event, const LLSD& userdata); - private: check_callback mCheckCallback; BOOL mChecked; @@ -408,6 +398,8 @@ class LLMenuGL // TODO: The menu and menu item classes share a great deal of functionality and perhaps should be united. // I think it may make the most sense to make LLMenuGL be a subclass of LLMenuItemGL. -MG { + // let branching menu items use my protected traversal methods + friend class LLMenuItemBranchGL; public: LLMenuGL( const LLString& name, const LLString& label, LLHandle parent_floater = LLHandle()); LLMenuGL( const LLString& label, LLHandle parent_floater = LLHandle() ); @@ -417,13 +409,9 @@ public: void parseChildXML(LLXMLNodePtr child, LLView *parent, LLUICtrlFactory *factory); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU; } - virtual LLString getWidgetTag() const { return LL_MENU_GL_TAG; } // LLView Functionality - virtual BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent ); - //virtual BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ); - virtual BOOL handleUnicodeCharHere( llwchar uni_char, BOOL called_from_parent ); + virtual BOOL handleUnicodeCharHere( llwchar uni_char ); virtual BOOL handleHover( S32 x, S32 y, MASK mask ); virtual void draw( void ); virtual void drawBackground(LLMenuItemGL* itemp, LLColor4& color); @@ -579,9 +567,6 @@ public: virtual LLString getType() const { return "menu"; } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_ITEM_BRANCH; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_BRANCH_GL_TAG; } - virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleAcceleratorKey(KEY key, MASK mask); @@ -602,7 +587,7 @@ public: // active. This is used for behavior transfer. virtual void setHighlight( BOOL highlight ); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL isActive() const { return isOpen() && mBranch->getHighlightedItem(); } @@ -621,8 +606,7 @@ public: virtual void openMenu(); -protected: - virtual LLView* getChildByName(const LLString& name, BOOL recurse) const; + virtual LLView* getChildView(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; private: LLMenuGL* mBranch; @@ -643,16 +627,12 @@ public: LLPieMenu(const LLString& name); virtual ~LLPieMenu() {} - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_PIE_MENU; } - virtual LLString getWidgetTag() const { return LL_PIE_MENU_TAG; } - void initXML(LLXMLNodePtr node, LLView *context, LLUICtrlFactory *factory); // LLView Functionality // can't set visibility directly, must call show or hide virtual void setVisible(BOOL visible); - //virtual BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent ); virtual BOOL handleHover( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseDown( S32 x, S32 y, MASK mask ); virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); @@ -672,7 +652,6 @@ public: void show(S32 x, S32 y, BOOL mouse_down); void hide(BOOL item_selected); - private: LLMenuItemGL *pieItemFromXY(S32 x, S32 y); S32 pieItemIndexFromXY(S32 x, S32 y); @@ -708,11 +687,8 @@ public: virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_BAR; } - virtual LLString getWidgetTag() const { return LL_MENU_BAR_GL_TAG; } - virtual BOOL handleAcceleratorKey(KEY key, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleJumpKey(KEY key); // rearrange the child rects so they fit the shape of the menu @@ -754,9 +730,6 @@ public: LLMenuHolderGL(const LLString& name, const LLRect& rect, BOOL mouse_opaque, U32 follows = FOLLOWS_NONE); virtual ~LLMenuHolderGL() {} - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MENU_HOLDER; } - virtual LLString getWidgetTag() const { return LL_MENU_HOLDER_GL_TAG; } - virtual BOOL hideMenus(); void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); void setCanHide(BOOL can_hide) { mCanHide = can_hide; } @@ -794,7 +767,7 @@ public: virtual void onFocusReceived(); virtual void onFocusLost(); virtual BOOL handleUnicodeChar(llwchar uni_char, BOOL called_from_parent); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void translate(S32 x, S32 y); private: @@ -816,9 +789,6 @@ class LLMenuItemTearOffGL : public LLMenuItemGL public: LLMenuItemTearOffGL( LLHandle parent_floater_handle = LLHandle()); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_TEAROFF_MENU; } - virtual LLString getWidgetTag() const { return LL_MENU_ITEM_TEAR_OFF_GL_TAG; } - virtual LLString getType() const { return "tearoff_menu"; } virtual void doIt(void); diff --git a/linden/indra/llui/llmodaldialog.cpp b/linden/indra/llui/llmodaldialog.cpp index 392c122..160495d 100644 --- a/linden/indra/llui/llmodaldialog.cpp +++ b/linden/indra/llui/llmodaldialog.cpp @@ -211,11 +211,9 @@ BOOL LLModalDialog::handleRightMouseDown(S32 x, S32 y, MASK mask) } -BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLModalDialog::handleKeyHere(KEY key, MASK mask ) { - childrenHandleKey(key, mask); - - LLFloater::handleKeyHere(key, mask, called_from_parent ); + LLFloater::handleKeyHere(key, mask ); if (mModal) { @@ -246,33 +244,30 @@ void LLModalDialog::onClose(bool app_quitting) // virtual void LLModalDialog::draw() { - if (getVisible()) - { - LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); - S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); + LLColor4 shadow_color = LLUI::sColorsGroup->getColor("ColorDropShadow"); + S32 shadow_lines = LLUI::sConfigGroup->getS32("DropShadowFloater"); + + gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, + shadow_color, shadow_lines); - gl_drop_shadow( 0, getRect().getHeight(), getRect().getWidth(), 0, - shadow_color, shadow_lines); + LLFloater::draw(); + + if (mModal) + { + // If we've lost focus to a non-child, get it back ASAP. + if( gFocusMgr.getTopCtrl() != this ) + { + gFocusMgr.setTopCtrl( this ); + } - LLFloater::draw(); + if( !gFocusMgr.childHasKeyboardFocus( this ) ) + { + setFocus(TRUE); + } - if (mModal) + if( !gFocusMgr.childHasMouseCapture( this ) ) { - // If we've lost focus to a non-child, get it back ASAP. - if( gFocusMgr.getTopCtrl() != this ) - { - gFocusMgr.setTopCtrl( this ); - } - - if( !gFocusMgr.childHasKeyboardFocus( this ) ) - { - setFocus(TRUE); - } - - if( !gFocusMgr.childHasMouseCapture( this ) ) - { - gFocusMgr.setMouseCapture( this ); - } + gFocusMgr.setMouseCapture( this ); } } } diff --git a/linden/indra/llui/llmodaldialog.h b/linden/indra/llui/llmodaldialog.h index 0199498..77bd9db 100644 --- a/linden/indra/llui/llmodaldialog.h +++ b/linden/indra/llui/llmodaldialog.h @@ -60,7 +60,7 @@ public: /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask ); /*virtual*/ void onClose(bool app_quitting); diff --git a/linden/indra/llui/llmultislider.cpp b/linden/indra/llui/llmultislider.cpp index d0c9002..dfa36fa 100644 --- a/linden/indra/llui/llmultislider.cpp +++ b/linden/indra/llui/llmultislider.cpp @@ -43,6 +43,8 @@ #include +static LLRegisterWidget r("multi_slider_bar"); + const S32 MULTI_THUMB_WIDTH = 8; const S32 MULTI_TRACK_HEIGHT = 6; const F32 FLOAT_THRESHOLD = 0.00001f; @@ -98,16 +100,6 @@ LLMultiSlider::LLMultiSlider( setValue(getValue()); } -EWidgetType LLMultiSlider::getWidgetType() const -{ - return WIDGET_TYPE_MULTI_SLIDER_BAR; -} - -LLString LLMultiSlider::getWidgetTag() const -{ - return LL_MULTI_SLIDER_TAG; -} - void LLMultiSlider::setSliderValue(const LLString& name, F32 value, BOOL from_event) { // exit if not there @@ -403,31 +395,28 @@ BOOL LLMultiSlider::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } -BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLMultiSlider::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && !called_from_parent ) + switch(key) { - switch(key) - { - case KEY_UP: - case KEY_DOWN: - // eat up and down keys to be consistent - handled = TRUE; - break; - case KEY_LEFT: - setCurSliderValue(getCurSliderValue() - getIncrement()); - onCommit(); - handled = TRUE; - break; - case KEY_RIGHT: - setCurSliderValue(getCurSliderValue() + getIncrement()); - onCommit(); - handled = TRUE; - break; - default: - break; - } + case KEY_UP: + case KEY_DOWN: + // eat up and down keys to be consistent + handled = TRUE; + break; + case KEY_LEFT: + setCurSliderValue(getCurSliderValue() - getIncrement()); + onCommit(); + handled = TRUE; + break; + case KEY_RIGHT: + setCurSliderValue(getCurSliderValue() + getIncrement()); + onCommit(); + handled = TRUE; + break; + default: + break; } return handled; } @@ -438,177 +427,142 @@ void LLMultiSlider::draw() std::map::iterator mIt; std::map::iterator curSldrIt; - if( getVisible() ) - { - // Draw background and thumb. - // drawing solids requires texturing be disabled - LLGLSNoTexture no_texture; + // Draw background and thumb. - LLRect rect(mDragStartThumbRect); + // drawing solids requires texturing be disabled + LLGLSNoTexture no_texture; - F32 opacity = getEnabled() ? 1.f : 0.3f; + LLRect rect(mDragStartThumbRect); - // Track - LLUUID thumb_image_id; - thumb_image_id.set(LLUI::sAssetsGroup->getString("rounded_square.tga")); - LLPointer thumb_imagep(LLUI::sImageProvider->getUIImageByID(thumb_image_id)->getImage()); + F32 opacity = getEnabled() ? 1.f : 0.3f; - S32 height_offset = (getRect().getHeight() - MULTI_TRACK_HEIGHT) / 2; - LLRect track_rect(0, getRect().getHeight() - height_offset, getRect().getWidth(), height_offset ); + // Track + LLUIImagePtr thumb_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga"); + S32 height_offset = (getRect().getHeight() - MULTI_TRACK_HEIGHT) / 2; + LLRect track_rect(0, getRect().getHeight() - height_offset, getRect().getWidth(), height_offset ); - if(mDrawTrack) - { - track_rect.stretch(-1); - gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 16, 16, track_rect.getWidth(), track_rect.getHeight(), - thumb_imagep, mTrackColor % opacity); - } - // if we're supposed to use a drawn triangle - // simple gl call for the triangle - if(mUseTriangle) { + if(mDrawTrack) + { + track_rect.stretch(-1); + thumb_imagep->draw(track_rect, mTrackColor % opacity); + } - for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { + // if we're supposed to use a drawn triangle + // simple gl call for the triangle + if(mUseTriangle) { - gl_triangle_2d( - mIt->second.mLeft - EXTRA_TRIANGLE_WIDTH, - mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT, - mIt->second.mRight + EXTRA_TRIANGLE_WIDTH, - mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT, - mIt->second.mLeft + mIt->second.getWidth() / 2, - mIt->second.mBottom - EXTRA_TRIANGLE_HEIGHT, - mTriangleColor, TRUE); - } + for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { + + gl_triangle_2d( + mIt->second.mLeft - EXTRA_TRIANGLE_WIDTH, + mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT, + mIt->second.mRight + EXTRA_TRIANGLE_WIDTH, + mIt->second.mTop + EXTRA_TRIANGLE_HEIGHT, + mIt->second.mLeft + mIt->second.getWidth() / 2, + mIt->second.mBottom - EXTRA_TRIANGLE_HEIGHT, + mTriangleColor, TRUE); } - else if (!thumb_imagep) - { - // draw all the thumbs - curSldrIt = mThumbRects.end(); - for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { + } + else if (!thumb_imagep) + { + // draw all the thumbs + curSldrIt = mThumbRects.end(); + for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { + + // choose the color + curThumbColor = mThumbCenterColor; + if(mIt->first == mCurSlider) { - // choose the color - curThumbColor = mThumbCenterColor; - if(mIt->first == mCurSlider) { - - curSldrIt = mIt; - continue; - //curThumbColor = mThumbCenterSelectedColor; - } - - // the draw command - gl_rect_2d(mIt->second, curThumbColor, TRUE); + curSldrIt = mIt; + continue; + //curThumbColor = mThumbCenterSelectedColor; } - // now draw the current slider - if(curSldrIt != mThumbRects.end()) { - gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor, TRUE); - } + // the draw command + gl_rect_2d(mIt->second, curThumbColor, TRUE); + } - // and draw the drag start - if (gFocusMgr.getMouseCapture() == this) - { - gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE); - } + // now draw the current slider + if(curSldrIt != mThumbRects.end()) { + gl_rect_2d(curSldrIt->second, mThumbCenterSelectedColor, TRUE); } - else if( gFocusMgr.getMouseCapture() == this ) + + // and draw the drag start + if (gFocusMgr.getMouseCapture() == this) { - // draw drag start - gl_draw_scaled_image_with_border(mDragStartThumbRect.mLeft, - mDragStartThumbRect.mBottom, 16, 16, - mDragStartThumbRect.getWidth(), - mDragStartThumbRect.getHeight(), - thumb_imagep, mThumbCenterColor % 0.3f, TRUE); - - // draw the highlight - if (hasFocus()) + gl_rect_2d(mDragStartThumbRect, mThumbCenterColor % opacity, FALSE); + } + } + else if( gFocusMgr.getMouseCapture() == this ) + { + // draw drag start + thumb_imagep->drawSolid(mDragStartThumbRect, mThumbCenterColor % 0.3f); + + // draw the highlight + if (hasFocus()) + { + thumb_imagep->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + } + + // draw the thumbs + curSldrIt = mThumbRects.end(); + for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) + { + // choose the color + curThumbColor = mThumbCenterColor; + if(mIt->first == mCurSlider) { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - LLRect highlight_rect = mThumbRects[mCurSlider]; - highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, - highlight_rect.mBottom, 16, 16, highlight_rect.getWidth(), - highlight_rect.getHeight(), - thumb_imagep, gFocusMgr.getFocusColor()); + // don't draw now, draw last + curSldrIt = mIt; + continue; } + + // the draw command + thumb_imagep->drawSolid(mIt->second, curThumbColor); + } + + // draw cur slider last + if(curSldrIt != mThumbRects.end()) + { + thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor); + } + + } + else + { + // draw highlight + if (hasFocus()) + { + thumb_imagep->drawBorder(mThumbRects[mCurSlider], gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + } - // draw the thumbs - curSldrIt = mThumbRects.end(); - for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { - - // choose the color - curThumbColor = mThumbCenterColor; - if(mIt->first == mCurSlider) { - // don't draw now, draw last - curSldrIt = mIt; - continue; - } - - // the draw command - gl_draw_scaled_image_with_border( - mIt->second.mLeft, - mIt->second.mBottom, 16, 16, - mIt->second.getWidth(), - mIt->second.getHeight(), thumb_imagep, - curThumbColor, TRUE); - } + // draw thumbs + curSldrIt = mThumbRects.end(); + for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) + { - // draw cur slider last - if(curSldrIt != mThumbRects.end()) { - gl_draw_scaled_image_with_border( - curSldrIt->second.mLeft, - curSldrIt->second.mBottom, 16, 16, - curSldrIt->second.getWidth(), - curSldrIt->second.getHeight(), thumb_imagep, - mThumbCenterSelectedColor, TRUE); - } + // choose the color + curThumbColor = mThumbCenterColor; + if(mIt->first == mCurSlider) + { + curSldrIt = mIt; + continue; + //curThumbColor = mThumbCenterSelectedColor; + } + thumb_imagep->drawSolid(mIt->second, curThumbColor % opacity); } - else - { - // draw highlight - if (hasFocus()) - { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - LLRect highlight_rect = mThumbRects[mCurSlider]; - highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 16, 16, highlight_rect.getWidth(), highlight_rect.getHeight(), - thumb_imagep, gFocusMgr.getFocusColor()); - } - // draw thumbs - curSldrIt = mThumbRects.end(); - for(mIt = mThumbRects.begin(); mIt != mThumbRects.end(); mIt++) { - - // choose the color - curThumbColor = mThumbCenterColor; - if(mIt->first == mCurSlider) { - curSldrIt = mIt; - continue; - //curThumbColor = mThumbCenterSelectedColor; - } - - // the draw command - gl_draw_scaled_image_with_border( - mIt->second.mLeft, - mIt->second.mBottom, 16, 16, - mIt->second.getWidth(), - mIt->second.getHeight(), thumb_imagep, - curThumbColor % opacity, TRUE); - } - - if(curSldrIt != mThumbRects.end()) { - gl_draw_scaled_image_with_border( - curSldrIt->second.mLeft, - curSldrIt->second.mBottom, 16, 16, - curSldrIt->second.getWidth(), - curSldrIt->second.getHeight(), thumb_imagep, - mThumbCenterSelectedColor % opacity, TRUE); - } + if(curSldrIt != mThumbRects.end()) + { + thumb_imagep->drawSolid(curSldrIt->second, mThumbCenterSelectedColor % opacity); } - - LLUICtrl::draw(); } + + LLUICtrl::draw(); } // virtual diff --git a/linden/indra/llui/llmultislider.h b/linden/indra/llui/llmultislider.h index 7cd5061..df6153a 100644 --- a/linden/indra/llui/llmultislider.h +++ b/linden/indra/llui/llmultislider.h @@ -55,8 +55,6 @@ public: BOOL use_triangle, const LLString& control_name = LLString::null ); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); @@ -94,7 +92,7 @@ public: virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void draw(); protected: diff --git a/linden/indra/llui/llmultisliderctrl.cpp b/linden/indra/llui/llmultisliderctrl.cpp index 47e21d8..c242d18 100644 --- a/linden/indra/llui/llmultisliderctrl.cpp +++ b/linden/indra/llui/llmultisliderctrl.cpp @@ -50,6 +50,8 @@ #include "llfocusmgr.h" #include "llresmgr.h" +static LLRegisterWidget r("multi_slider"); + const U32 MAX_STRING_LENGTH = 10; diff --git a/linden/indra/llui/llmultisliderctrl.h b/linden/indra/llui/llmultisliderctrl.h index 5e2d13c..6a298c8 100644 --- a/linden/indra/llui/llmultisliderctrl.h +++ b/linden/indra/llui/llmultisliderctrl.h @@ -71,8 +71,6 @@ public: const LLString& control_which = LLString::null ); virtual ~LLMultiSliderCtrl(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_MULTI_SLIDER; } - virtual LLString getWidgetTag() const { return LL_MULTI_SLIDER_CTRL_TAG; } virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); diff --git a/linden/indra/llui/llpanel.cpp b/linden/indra/llui/llpanel.cpp index 567d29e..7db3725 100644 --- a/linden/indra/llui/llpanel.cpp +++ b/linden/indra/llui/llpanel.cpp @@ -65,6 +65,8 @@ LLPanel::alert_queue_t LLPanel::sAlertQueue; const S32 RESIZE_BAR_OVERLAP = 1; const S32 RESIZE_BAR_HEIGHT = 3; +static LLRegisterWidget r1("panel"); + void LLPanel::init() { // mRectControl @@ -126,18 +128,6 @@ LLPanel::~LLPanel() } // virtual -EWidgetType LLPanel::getWidgetType() const -{ - return WIDGET_TYPE_PANEL; -} - -// virtual -LLString LLPanel::getWidgetTag() const -{ - return LL_PANEL_TAG; -} - -// virtual BOOL LLPanel::isPanel() const { return TRUE; @@ -227,7 +217,8 @@ void LLPanel::updateDefaultBtn() if (gFocusMgr.childHasKeyboardFocus( this ) && mDefaultBtn->getEnabled()) { LLUICtrl* focus_ctrl = gFocusMgr.getKeyboardFocus(); - BOOL focus_is_child_button = focus_ctrl->getWidgetType() == WIDGET_TYPE_BUTTON && static_cast(focus_ctrl)->getCommitOnReturn(); + LLButton* buttonp = dynamic_cast(focus_ctrl); + BOOL focus_is_child_button = buttonp && buttonp->getCommitOnReturn(); // only enable default button when current focus is not a return-capturing button mDefaultBtn->setBorderEnabled(!focus_is_child_button); } @@ -259,7 +250,7 @@ void LLPanel::setDefaultBtn(LLButton* btn) void LLPanel::setDefaultBtn(const LLString& id) { - LLButton *button = LLUICtrlFactory::getButtonByName(this, id); + LLButton *button = getChild(id); if (button) { setDefaultBtn(button); @@ -270,77 +261,6 @@ void LLPanel::setDefaultBtn(const LLString& id) } } -BOOL LLPanel::handleKey(KEY key, MASK mask, BOOL called_from_parent) -{ - BOOL handled = FALSE; - if (getVisible() && getEnabled()) - { - if( (mask == MASK_SHIFT) && (KEY_TAB == key)) - { - //SHIFT-TAB - LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); - if (cur_focus && gFocusMgr.childHasKeyboardFocus(this)) - { - LLUICtrl* focus_root = cur_focus; - while(cur_focus->getParentUICtrl()) - { - cur_focus = cur_focus->getParentUICtrl(); - if (cur_focus->isFocusRoot()) - { - // this is the root-most focus root found so far - focus_root = cur_focus; - } - } - handled = focus_root->focusPrevItem(FALSE); - } - else if (!cur_focus && isFocusRoot()) - { - handled = focusLastItem(); - if (!handled) - { - setFocus(TRUE); - handled = TRUE; - } - } - } - else - if( (mask == MASK_NONE ) && (KEY_TAB == key)) - { - //TAB - LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); - if (cur_focus && gFocusMgr.childHasKeyboardFocus(this)) - { - LLUICtrl* focus_root = cur_focus; - while(cur_focus->getParentUICtrl()) - { - cur_focus = cur_focus->getParentUICtrl(); - if (cur_focus->isFocusRoot()) - { - focus_root = cur_focus; - } - } - handled = focus_root->focusNextItem(FALSE); - } - else if (!cur_focus && isFocusRoot()) - { - handled = focusFirstItem(); - if (!handled) - { - setFocus(TRUE); - handled = TRUE; - } - } - } - } - - if (!handled) - { - handled = LLView::handleKey(key, mask, called_from_parent); - } - - return handled; -} - void LLPanel::addCtrl( LLUICtrl* ctrl, S32 tab_group) { mLastTabGroup = tab_group; @@ -355,83 +275,90 @@ void LLPanel::addCtrlAtEnd( LLUICtrl* ctrl, S32 tab_group) LLView::addCtrlAtEnd(ctrl, tab_group); } -BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLPanel::handleKeyHere( KEY key, MASK mask ) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && - gFocusMgr.childHasKeyboardFocus(this) && !called_from_parent ) - { - // handle user hitting ESC to defocus - if (key == KEY_ESCAPE) - { - gFocusMgr.setKeyboardFocus(NULL); - return TRUE; - } + LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); - LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); - // If we have a default button, click it when - // return is pressed, unless current focus is a return-capturing button - // in which case *that* button will handle the return key - if (cur_focus && !(cur_focus->getWidgetType() == WIDGET_TYPE_BUTTON && static_cast(cur_focus)->getCommitOnReturn())) + // handle user hitting ESC to defocus + if (key == KEY_ESCAPE) + { + gFocusMgr.setKeyboardFocus(NULL); + return TRUE; + } + else if( (mask == MASK_SHIFT) && (KEY_TAB == key)) + { + //SHIFT-TAB + if (cur_focus) { - // RETURN key means hit default button in this case - if (key == KEY_RETURN && mask == MASK_NONE - && mDefaultBtn != NULL - && mDefaultBtn->getVisible() - && mDefaultBtn->getEnabled()) + LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); + if (focus_root) { - mDefaultBtn->onCommit(); - handled = TRUE; + handled = focus_root->focusPrevItem(FALSE); } } - - if (key == KEY_RETURN && mask == MASK_NONE) + } + else if( (mask == MASK_NONE ) && (KEY_TAB == key)) + { + //TAB + if (cur_focus) { - // set keyboard focus to self to trigger commitOnFocusLost behavior on current ctrl - if (cur_focus && cur_focus->acceptsTextInput()) + LLUICtrl* focus_root = cur_focus->findRootMostFocusRoot(); + if (focus_root) { - cur_focus->onCommit(); - handled = TRUE; + handled = focus_root->focusNextItem(FALSE); } } } - return handled; -} - -void LLPanel::requires(LLString name, EWidgetType type) -{ - mRequirements[name] = type; -} - -BOOL LLPanel::checkRequirements() const -{ - BOOL retval = TRUE; - LLString message; + // If we have a default button, click it when + // return is pressed, unless current focus is a return-capturing button + // in which case *that* button will handle the return key + LLButton* focused_button = dynamic_cast(cur_focus); + if (cur_focus && !(focused_button && focused_button->getCommitOnReturn())) + { + // RETURN key means hit default button in this case + if (key == KEY_RETURN && mask == MASK_NONE + && mDefaultBtn != NULL + && mDefaultBtn->getVisible() + && mDefaultBtn->getEnabled()) + { + mDefaultBtn->onCommit(); + handled = TRUE; + } + } - for (requirements_map_t::const_iterator i = mRequirements.begin(); i != mRequirements.end(); ++i) + if (key == KEY_RETURN && mask == MASK_NONE) { - if (!this->getCtrlByNameAndType(i->first, i->second)) + // set keyboard focus to self to trigger commitOnFocusLost behavior on current ctrl + if (cur_focus && cur_focus->acceptsTextInput()) { - retval = FALSE; - message += i->first + " " + LLUICtrlFactory::getWidgetType(i->second) + "\n"; + cur_focus->onCommit(); + handled = TRUE; } } - if (!retval) + return handled; +} + +BOOL LLPanel::checkRequirements() +{ + if (!mRequirementsError.empty()) { LLString::format_map_t args; - args["[COMPONENTS]"] = message; + args["[COMPONENTS]"] = mRequirementsError; args["[FLOATER]"] = getName(); llwarns << getName() << " failed requirements check on: \n" - << message << llendl; + << mRequirementsError << llendl; alertXml("FailedRequirementsCheck", args); + mRequirementsError.clear(); + return FALSE; } - return retval; + return TRUE; } //static @@ -494,30 +421,6 @@ void LLPanel::setBorderVisible(BOOL b) } } -LLUICtrl* LLPanel::getCtrlByNameAndType(const LLString& name, EWidgetType type) const -{ - LLView* view = getChildByName(name, TRUE); - if (view && view->isCtrl()) - { - if (type == WIDGET_TYPE_DONTCARE || view->getWidgetType() == type) - { - return (LLUICtrl*)view; - } - else - { - llwarns << "Widget " << name << " has improper type in panel " << getName() << "\n" - << "Is: \t\t" << view->getWidgetType() << "\n" - << "Should be: \t" << type - << llendl; - } - } - else - { - childNotFound(name); - } - return NULL; -} - // virtual LLXMLNodePtr LLPanel::getXML(bool save_children) const { @@ -973,7 +876,7 @@ BOOL LLPanel::childSetLabelArg(const LLString& id, const LLString& key, const LL BOOL LLPanel::childSetToolTipArg(const LLString& id, const LLString& key, const LLStringExplicit& text) { - LLView* child = getChildByName(id, true); + LLView* child = getChildView(id, true, FALSE); if (child) { return child->setToolTipArg(key, text); @@ -1001,7 +904,7 @@ void LLPanel::childSetMaxValue(const LLString& id, LLSD max_value) void LLPanel::childShowTab(const LLString& id, const LLString& tabname, bool visible) { - LLTabContainer* child = LLUICtrlFactory::getTabContainerByName(this, id); + LLTabContainer* child = getChild(id); if (child) { child->selectTabByName(tabname); @@ -1010,7 +913,7 @@ void LLPanel::childShowTab(const LLString& id, const LLString& tabname, bool vis LLPanel *LLPanel::childGetVisibleTab(const LLString& id) const { - LLTabContainer* child = LLUICtrlFactory::getTabContainerByName(this, id); + LLTabContainer* child = getChild(id); if (child) { return child->getCurrentPanel(); @@ -1020,7 +923,7 @@ LLPanel *LLPanel::childGetVisibleTab(const LLString& id) const void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabname, void (*on_tab_clicked)(void*, bool), void *userdata) { - LLTabContainer* child = LLUICtrlFactory::getTabContainerByName(this, id); + LLTabContainer* child = getChild(id); if (child) { LLPanel *panel = child->getPanelByName(tabname); @@ -1034,7 +937,7 @@ void LLPanel::childSetTabChangeCallback(const LLString& id, const LLString& tabn void LLPanel::childSetKeystrokeCallback(const LLString& id, void (*keystroke_callback)(LLLineEditor* caller, void* user_data), void *user_data) { - LLLineEditor* child = LLUICtrlFactory::getLineEditorByName(this, id); + LLLineEditor* child = getChild(id); if (child) { child->setKeystrokeCallback(keystroke_callback); @@ -1047,7 +950,7 @@ void LLPanel::childSetKeystrokeCallback(const LLString& id, void (*keystroke_cal void LLPanel::childSetPrevalidate(const LLString& id, BOOL (*func)(const LLWString &) ) { - LLLineEditor* child = LLUICtrlFactory::getLineEditorByName(this, id); + LLLineEditor* child = getChild(id); if (child) { child->setPrevalidate(func); @@ -1056,7 +959,7 @@ void LLPanel::childSetPrevalidate(const LLString& id, BOOL (*func)(const LLWStri void LLPanel::childSetWrappedText(const LLString& id, const LLString& text, bool visible) { - LLTextBox* child = (LLTextBox*)getCtrlByNameAndType(id, WIDGET_TYPE_TEXT_BOX); + LLTextBox* child = getChild(id); if (child) { child->setVisible(visible); @@ -1066,7 +969,7 @@ void LLPanel::childSetWrappedText(const LLString& id, const LLString& text, bool void LLPanel::childSetAction(const LLString& id, void(*function)(void*), void* value) { - LLButton* button = (LLButton*)getCtrlByNameAndType(id, WIDGET_TYPE_BUTTON); + LLButton* button = getChild(id); if (button) { button->setClickedCallback(function, value); @@ -1075,7 +978,7 @@ void LLPanel::childSetAction(const LLString& id, void(*function)(void*), void* v void LLPanel::childSetActionTextbox(const LLString& id, void(*function)(void*)) { - LLTextBox* textbox = (LLTextBox*)getCtrlByNameAndType(id, WIDGET_TYPE_TEXT_BOX); + LLTextBox* textbox = getChild(id); if (textbox) { textbox->setClickedCallback(function); @@ -1092,13 +995,18 @@ void LLPanel::childSetControlName(const LLString& id, const LLString& control_na } //virtual -LLView* LLPanel::getChildByName(const LLString& name, BOOL recurse) const +LLView* LLPanel::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const { - LLView* view = LLUICtrl::getChildByName(name, recurse); + // just get child, don't try to create a dummy one + LLView* view = LLUICtrl::getChildView(name, recurse, FALSE); if (!view && !recurse) { childNotFound(name); } + if (!view && create_if_missing) + { + view = createDummyWidget(name); + } return view; } @@ -1191,6 +1099,8 @@ struct LLLayoutStack::LLEmbeddedPanel F32 mVisibleAmt; }; +static LLRegisterWidget r2("layout_stack"); + LLLayoutStack::LLLayoutStack(eLayoutOrientation orientation) : mOrientation(orientation), mMinWidth(0), @@ -1204,19 +1114,6 @@ LLLayoutStack::~LLLayoutStack() std::for_each(mPanels.begin(), mPanels.end(), DeletePointer()); } -// virtual -EWidgetType LLLayoutStack::getWidgetType() const -{ - return WIDGET_TYPE_LAYOUT_STACK; -} - -// virtual -LLString LLLayoutStack::getWidgetTag() const -{ - return LL_LAYOUT_STACK_TAG; -} - - void LLLayoutStack::draw() { updateLayout(); @@ -1304,18 +1201,18 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor LLXMLNodePtr child; for (child = node->getFirstChild(); child.notNull(); child = child->getNextSibling()) { + S32 min_width = 0; + S32 min_height = 0; + BOOL auto_resize = TRUE; + + child->getAttributeS32("min_width", min_width); + child->getAttributeS32("min_height", min_height); + child->getAttributeBOOL("auto_resize", auto_resize); + if (child->hasName("layout_panel")) { - S32 min_width = 0; - S32 min_height = 0; - BOOL auto_resize = TRUE; BOOL user_resize = TRUE; - - child->getAttributeS32("min_width", min_width); - child->getAttributeS32("min_height", min_height); - child->getAttributeBOOL("auto_resize", auto_resize); child->getAttributeBOOL("user_resize", user_resize); - LLPanel* panelp = (LLPanel*)LLPanel::fromXML(child, layout_stackp, factory); if (panelp) { @@ -1323,6 +1220,26 @@ LLView* LLLayoutStack::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize); } } + else + { + BOOL user_resize = FALSE; + child->getAttributeBOOL("user_resize", user_resize); + + LLPanel* panelp = new LLPanel("auto_panel"); + LLView* new_child = factory->createWidget(panelp, child); + if (new_child) + { + // put child in new embedded panel + layout_stackp->addPanel(panelp, min_width, min_height, auto_resize, user_resize); + // resize panel to contain widget and move widget to be contained in panel + panelp->setRect(new_child->getRect()); + new_child->setOrigin(0, 0); + } + else + { + panelp->die(); + } + } } layout_stackp->updateLayout(); @@ -1411,6 +1328,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize) if (mOrientation == HORIZONTAL) { + // enforce minimize size constraint by default + if (panelp->getRect().getWidth() < (*panel_it)->mMinWidth) + { + panelp->reshape((*panel_it)->mMinWidth, panelp->getRect().getHeight()); + } total_width += llround(panelp->getRect().getWidth() * (*panel_it)->mVisibleAmt); // want n-1 panel gaps for n panels if (panel_it != mPanels.begin()) @@ -1420,6 +1342,11 @@ void LLLayoutStack::updateLayout(BOOL force_resize) } else //VERTICAL { + // enforce minimize size constraint by default + if (panelp->getRect().getHeight() < (*panel_it)->mMinHeight) + { + panelp->reshape(panelp->getRect().getWidth(), (*panel_it)->mMinHeight); + } total_height += llround(panelp->getRect().getHeight() * (*panel_it)->mVisibleAmt); if (panel_it != mPanels.begin()) { @@ -1438,6 +1365,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize) { continue; } + // if currently resizing a panel or the panel is flagged as not automatically resizing // only track total available headroom, but don't use it for automatic resize logic if ((*panel_it)->mResizeBar->hasMouseCapture() @@ -1469,6 +1397,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize) } } + // calculate how many pixels need to be distributed among layout panels // positive means panels need to grow, negative means shrink S32 pixels_to_distribute; if (mOrientation == HORIZONTAL) @@ -1480,6 +1409,7 @@ void LLLayoutStack::updateLayout(BOOL force_resize) pixels_to_distribute = getRect().getHeight() - total_height; } + // now we distribute the pixels... S32 cur_x = 0; S32 cur_y = getRect().getHeight(); @@ -1505,13 +1435,17 @@ void LLLayoutStack::updateLayout(BOOL force_resize) if (pixels_to_distribute < 0) { // shrink proportionally to amount over minimum - delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * (F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available) : 0; + // so we can do this in one pass + delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_width - (*panel_it)->mMinWidth) / (F32)shrink_headroom_available)) : 0; + shrink_headroom_available -= (cur_width - (*panel_it)->mMinWidth); } else { // grow all elements equally delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels); + num_resizable_panels--; } + pixels_to_distribute -= delta_size; new_width = llmax((*panel_it)->mMinWidth, cur_width + delta_size); } else @@ -1524,12 +1458,16 @@ void LLLayoutStack::updateLayout(BOOL force_resize) if (pixels_to_distribute < 0) { // shrink proportionally to amount over minimum - delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * (F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available) : 0; + // so we can do this in one pass + delta_size = (shrink_headroom_available > 0) ? llround((F32)pixels_to_distribute * ((F32)(cur_height - (*panel_it)->mMinHeight) / (F32)shrink_headroom_available)) : 0; + shrink_headroom_available -= (cur_height - (*panel_it)->mMinHeight); } else { delta_size = llround((F32)pixels_to_distribute / (F32)num_resizable_panels); + num_resizable_panels--; } + pixels_to_distribute -= delta_size; new_height = llmax((*panel_it)->mMinHeight, cur_height + delta_size); } else diff --git a/linden/indra/llui/llpanel.h b/linden/indra/llui/llpanel.h index e0f48ca..c7627ff 100644 --- a/linden/indra/llui/llpanel.h +++ b/linden/indra/llui/llpanel.h @@ -82,13 +82,12 @@ public: /*virtual*/ ~LLPanel(); // LLView interface - /*virtual*/ EWidgetType getWidgetType() const; - /*virtual*/ LLString getWidgetTag() const; /*virtual*/ BOOL isPanel() const; /*virtual*/ void draw(); - /*virtual*/ BOOL handleKey( KEY key, MASK mask, BOOL called_from_parent ); - /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ); + /*virtual*/ BOOL handleKeyHere( KEY key, MASK mask ); /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; + // Override to set not found list: + virtual LLView* getChildView(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; // From LLFocusableElement /*virtual*/ void setFocus( BOOL b ); @@ -106,8 +105,21 @@ public: BOOL hasBorder() const { return mBorder != NULL; } void setBorderVisible( BOOL b ); - void requires(LLString name, EWidgetType type = WIDGET_TYPE_DONTCARE); - BOOL checkRequirements() const; + template void requires(LLString name) + { + // check for widget with matching type and name + if (LLView::getChild(name) == NULL) + { + mRequirementsError += name + "\n"; + } + } + + // requires LLView by default + void requires(LLString name) + { + requires(name); + } + BOOL checkRequirements(); void setBackgroundColor( const LLColor4& color ) { mBgColorOpaque = color; } const LLColor4& getBackgroundColor() const { return mBgColorOpaque; } @@ -133,8 +145,6 @@ public: S32 getLastTabGroup() const { return mLastTabGroup; } - LLUICtrl* getCtrlByNameAndType(const LLString& name, EWidgetType type) const; - const LLCallbackMap::map_t& getFactoryMap() const { return mFactoryMap; } BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); @@ -226,9 +236,6 @@ protected: LLButton* getDefaultButton() { return mDefaultBtn; } LLCallbackMap::map_t mFactoryMap; - // Override to set not found list: - virtual LLView* getChildByName(const LLString& name, BOOL recurse = FALSE) const; - private: // common construction logic void init(); @@ -257,8 +264,7 @@ private: typedef std::map ui_string_map_t; ui_string_map_t mUIStrings; - typedef std::map requirements_map_t; - requirements_map_t mRequirements; + LLString mRequirementsError; typedef std::queue alert_queue_t; static alert_queue_t sAlertQueue; @@ -281,9 +287,6 @@ public: /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; /*virtual*/ void removeCtrl(LLUICtrl* ctrl); - virtual EWidgetType getWidgetType() const; - virtual LLString getWidgetTag() const; - static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); S32 getMinWidth() const { return mMinWidth; } @@ -291,16 +294,17 @@ public: void addPanel(LLPanel* panel, S32 min_width, S32 min_height, BOOL auto_resize, BOOL user_resize, S32 index = S32_MAX); void removePanel(LLPanel* panel); - void updateLayout(BOOL force_resize = FALSE); private: + struct LLEmbeddedPanel; + + void updateLayout(BOOL force_resize = FALSE); void calcMinExtents(); S32 getDefaultHeight(S32 cur_height); S32 getDefaultWidth(S32 cur_width); const eLayoutOrientation mOrientation; - struct LLEmbeddedPanel; typedef std::vector e_panel_list_t; e_panel_list_t mPanels; LLEmbeddedPanel* findEmbeddedPanel(LLPanel* panelp) const; diff --git a/linden/indra/llui/llradiogroup.cpp b/linden/indra/llui/llradiogroup.cpp index 039fe81..d7373f1 100644 --- a/linden/indra/llui/llradiogroup.cpp +++ b/linden/indra/llui/llradiogroup.cpp @@ -42,6 +42,7 @@ #include "llui.h" #include "llfocusmgr.h" +static LLRegisterWidget r("radio_group"); LLRadioGroup::LLRadioGroup(const LLString& name, const LLRect& rect, const LLString& control_name, @@ -161,11 +162,11 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event) return TRUE; } -BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLRadioGroup::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; // do any of the tab buttons have keyboard focus? - if (getEnabled() && !called_from_parent && mask == MASK_NONE) + if (mask == MASK_NONE) { switch(key) { diff --git a/linden/indra/llui/llradiogroup.h b/linden/indra/llui/llradiogroup.h index 87591a4..e208b79 100644 --- a/linden/indra/llui/llradiogroup.h +++ b/linden/indra/llui/llradiogroup.h @@ -82,10 +82,8 @@ public: BOOL border = TRUE); virtual ~LLRadioGroup(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_RADIO_GROUP; } - virtual LLString getWidgetTag() const { return LL_RADIO_GROUP_TAG; } - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void setEnabled(BOOL enabled); virtual LLXMLNodePtr getXML(bool save_children = true) const; diff --git a/linden/indra/llui/llresizebar.cpp b/linden/indra/llui/llresizebar.cpp index b4933bd..e89bfee 100644 --- a/linden/indra/llui/llresizebar.cpp +++ b/linden/indra/llui/llresizebar.cpp @@ -85,16 +85,13 @@ LLResizeBar::LLResizeBar( const LLString& name, LLView* resizing_view, const LLR BOOL LLResizeBar::handleMouseDown(S32 x, S32 y, MASK mask) { - if( getEnabled() ) - { - // Route future Mouse messages here preemptively. (Release on mouse up.) - // No handler needed for focus lost since this clas has no state that depends on it. - gFocusMgr.setMouseCapture( this ); + // Route future Mouse messages here preemptively. (Release on mouse up.) + // No handler needed for focus lost since this clas has no state that depends on it. + gFocusMgr.setMouseCapture( this ); - localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); - mLastMouseScreenX = mDragLastScreenX; - mLastMouseScreenY = mDragLastScreenY; - } + localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); + mLastMouseScreenX = mDragLastScreenX; + mLastMouseScreenY = mDragLastScreenY; return TRUE; } diff --git a/linden/indra/llui/llresizebar.h b/linden/indra/llui/llresizebar.h index 5446811..d03dafa 100644 --- a/linden/indra/llui/llresizebar.h +++ b/linden/indra/llui/llresizebar.h @@ -42,9 +42,6 @@ public: LLResizeBar(const LLString& name, LLView* resizing_view, const LLRect& rect, S32 min_size, S32 max_size, Side side ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_RESIZE_BAR; } - virtual LLString getWidgetTag() const { return LL_RESIZE_BAR_TAG; } - // virtual void draw(); No appearance virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); diff --git a/linden/indra/llui/llresizehandle.cpp b/linden/indra/llui/llresizehandle.cpp index d3e066b..3aa968f 100644 --- a/linden/indra/llui/llresizehandle.cpp +++ b/linden/indra/llui/llresizehandle.cpp @@ -59,8 +59,7 @@ LLResizeHandle::LLResizeHandle( const LLString& name, const LLRect& rect, S32 mi if( RIGHT_BOTTOM == mCorner) { - LLUUID image_id(LLUI::sConfigGroup->getString("UIImgResizeBottomRightUUID")); - mImage = LLUI::sImageProvider->getImageByID(image_id); + mImage = LLUI::sImageProvider->getUIImage("UIImgResizeBottomRightUUID"); } switch( mCorner ) @@ -78,19 +77,16 @@ LLResizeHandle::LLResizeHandle( const LLString& name, const LLRect& rect, S32 mi BOOL LLResizeHandle::handleMouseDown(S32 x, S32 y, MASK mask) { BOOL handled = FALSE; - if( getVisible() && pointInHandle(x, y) ) + if( pointInHandle(x, y) ) { handled = TRUE; - if( getEnabled() ) - { - // Route future Mouse messages here preemptively. (Release on mouse up.) - // No handler needed for focus lost since this clas has no state that depends on it. - gFocusMgr.setMouseCapture( this ); + // Route future Mouse messages here preemptively. (Release on mouse up.) + // No handler needed for focus lost since this clas has no state that depends on it. + gFocusMgr.setMouseCapture( this ); - localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); - mLastMouseScreenX = mDragLastScreenX; - mLastMouseScreenY = mDragLastScreenY; - } + localPointToScreen(x, y, &mDragLastScreenX, &mDragLastScreenY); + mLastMouseScreenX = mDragLastScreenX; + mLastMouseScreenY = mDragLastScreenY; } return handled; @@ -107,8 +103,7 @@ BOOL LLResizeHandle::handleMouseUp(S32 x, S32 y, MASK mask) gFocusMgr.setMouseCapture( NULL ); handled = TRUE; } - else - if( getVisible() && pointInHandle(x, y) ) + else if( pointInHandle(x, y) ) { handled = TRUE; } @@ -284,7 +279,7 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask) } else // don't have mouse capture { - if( getVisible() && pointInHandle( x, y ) ) + if( pointInHandle( x, y ) ) { handled = TRUE; } @@ -314,7 +309,7 @@ void LLResizeHandle::draw() { if( mImage.notNull() && getVisible() && (RIGHT_BOTTOM == mCorner) ) { - gl_draw_image( 0, 0, mImage ); + mImage->draw(0, 0); } } diff --git a/linden/indra/llui/llresizehandle.h b/linden/indra/llui/llresizehandle.h index 77ebcb9..5302612 100644 --- a/linden/indra/llui/llresizehandle.h +++ b/linden/indra/llui/llresizehandle.h @@ -46,9 +46,6 @@ public: LLResizeHandle(const LLString& name, const LLRect& rect, S32 min_width, S32 min_height, ECorner corner = RIGHT_BOTTOM ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_RESIZE_HANDLE; } - virtual LLString getWidgetTag() const { return LL_RESIZE_HANDLE_TAG; } - virtual void draw(); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); @@ -64,7 +61,7 @@ private: S32 mLastMouseScreenX; S32 mLastMouseScreenY; LLCoordGL mLastMouseDir; - LLPointer mImage; + LLPointer mImage; S32 mMinWidth; S32 mMinHeight; const ECorner mCorner; diff --git a/linden/indra/llui/llresmgr.cpp b/linden/indra/llui/llresmgr.cpp index 83ad440..b5b9174 100644 --- a/linden/indra/llui/llresmgr.cpp +++ b/linden/indra/llui/llresmgr.cpp @@ -39,8 +39,6 @@ #include "llerror.h" #include "llstring.h" -// Global singleton -LLResMgr* gResMgr = NULL; LLResMgr::LLResMgr() { diff --git a/linden/indra/llui/llresmgr.h b/linden/indra/llui/llresmgr.h index 810d386..f9ec115 100644 --- a/linden/indra/llui/llresmgr.h +++ b/linden/indra/llui/llresmgr.h @@ -36,6 +36,7 @@ #include "locale.h" #include "stdtypes.h" #include "llstring.h" +#include "llmemory.h" enum LLLOCALE_ID { @@ -44,67 +45,6 @@ enum LLLOCALE_ID LLLOCALE_COUNT // Number of values in this enum. Keep at end. }; -/* -enum LLSTR_ID -{ - LLSTR_HELLO, - LLSTR_GOODBYE, - LLSTR_CHAT_LABEL, - LLSTR_STATUS_LABEL, - LLSTR_X, - LLSTR_Y, - LLSTR_Z, - LLSTR_POSITION, - LLSTR_SCALE, - LLSTR_ROTATION, - LLSTR_HAS_PHYSICS, - LLSTR_SCRIPT, - LLSTR_HELP, - LLSTR_REMOVE, - LLSTR_CLEAR, - LLSTR_APPLY, - LLSTR_CANCEL, - LLSTR_MATERIAL, - LLSTR_FACE, - LLSTR_TEXTURE, - LLSTR_TEXTURE_SIZE, - LLSTR_TEXTURE_OFFSET, - LLSTR_TEXTURE_ROTATION, - LLSTR_U, - LLSTR_V, - LLSTR_OWNERSHIP, - LLSTR_PUBLIC, - LLSTR_PRIVATE, - LLSTR_REVERT, - LLSTR_INSERT_SAMPLE, - LLSTR_SET_TEXTURE, - LLSTR_EDIT_SCRIPT, - LLSTR_MOUSELOOK_INSTRUCTIONS, - LLSTR_EDIT_FACE_INSTRUCTIONS, - LLSTR_CLOSE, - LLSTR_MOVE, - LLSTR_ROTATE, - LLSTR_RESIZE, - LLSTR_PLACE_BOX, - LLSTR_PLACE_PRISM, - LLSTR_PLACE_PYRAMID, - LLSTR_PLACE_TETRAHEDRON, - LLSTR_PLACE_CYLINDER, - LLSTR_PLACE_HALF_CYLINDER, - LLSTR_PLACE_CONE, - LLSTR_PLACE_HALF_CONE, - LLSTR_PLACE_SPHERE, - LLSTR_PLACE_HALF_SPHERE, - LLSTR_PLACE_BIRD, - LLSTR_PLACE_SNAKE, - LLSTR_PLACE_ROCK, - LLSTR_PLACE_TREE, - LLSTR_PLACE_GRASS, - LLSTR_MODIFY_LAND, - LLSTR_COUNT // Number of values in this enum. Keep at end. -}; -*/ - enum LLFONT_ID { LLFONT_OCRA, @@ -117,7 +57,7 @@ enum LLFONT_ID class LLFontGL; -class LLResMgr +class LLResMgr : public LLSingleton { public: LLResMgr(); @@ -162,6 +102,4 @@ private: LLString mPrevLocaleString; }; -extern LLResMgr* gResMgr; - #endif // LL_RESMGR_ diff --git a/linden/indra/llui/llrootview.h b/linden/indra/llui/llrootview.h index 5f130b9..f4c047c 100644 --- a/linden/indra/llui/llrootview.h +++ b/linden/indra/llui/llrootview.h @@ -38,9 +38,6 @@ class LLRootView : public LLView { public: LLRootView(const LLString& name, const LLRect& rect, BOOL mouse_opaque, U32 follows=FOLLOWS_NONE); - - /*virtual*/ EWidgetType getWidgetType() const { return WIDGET_TYPE_ROOT_VIEW; } - /*virtual*/ LLString getWidgetTag() const { return LL_ROOT_VIEW_TAG; } }; #endif diff --git a/linden/indra/llui/llscrollbar.cpp b/linden/indra/llui/llscrollbar.cpp index cf64742..cdabda0 100644 --- a/linden/indra/llui/llscrollbar.cpp +++ b/linden/indra/llui/llscrollbar.cpp @@ -414,17 +414,8 @@ BOOL LLScrollbar::handleHover(S32 x, S32 y, MASK mask) BOOL LLScrollbar::handleScrollWheel(S32 x, S32 y, S32 clicks) { - BOOL handled = FALSE; - if( getVisible() && getRect().localPointInRect( x, y ) ) - { - if( getEnabled() ) - { - changeLine( clicks * mStepSize, TRUE ); - } - handled = TRUE; - } - - return handled; + changeLine( clicks * mStepSize, TRUE ); + return TRUE; } BOOL LLScrollbar::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, @@ -475,85 +466,68 @@ void LLScrollbar::reshape(S32 width, S32 height, BOOL called_from_parent) void LLScrollbar::draw() { - if( getVisible() ) + S32 local_mouse_x; + S32 local_mouse_y; + LLCoordWindow cursor_pos_window; + getWindow()->getCursorPosition(&cursor_pos_window); + LLCoordGL cursor_pos_gl; + getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); + + screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); + BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; + BOOL hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); + if (hovered) { - S32 local_mouse_x; - S32 local_mouse_y; - LLCoordWindow cursor_pos_window; - getWindow()->getCursorPosition(&cursor_pos_window); - LLCoordGL cursor_pos_gl; - getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); - - screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &local_mouse_x, &local_mouse_y); - BOOL other_captor = gFocusMgr.getMouseCapture() && gFocusMgr.getMouseCapture() != this; - BOOL hovered = getEnabled() && !other_captor && (hasMouseCapture() || mThumbRect.pointInRect(local_mouse_x, local_mouse_y)); - if (hovered) - { - mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); - } - else - { - mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f)); - } + mCurGlowStrength = lerp(mCurGlowStrength, mHoverGlowStrength, LLCriticalDamp::getInterpolant(0.05f)); + } + else + { + mCurGlowStrength = lerp(mCurGlowStrength, 0.f, LLCriticalDamp::getInterpolant(0.05f)); + } - // Draw background and thumb. - LLUUID rounded_rect_image_id; - rounded_rect_image_id.set(LLUI::sAssetsGroup->getString("rounded_square.tga")); - LLImageGL* rounded_rect_imagep = LLUI::sImageProvider->getImageByID(rounded_rect_image_id); + // Draw background and thumb. + LLUIImage* rounded_rect_imagep = LLUI::sImageProvider->getUIImage("rounded_square.tga"); - if (!rounded_rect_imagep) - { - gl_rect_2d(mOrientation == HORIZONTAL ? SCROLLBAR_SIZE : 0, - mOrientation == VERTICAL ? getRect().getHeight() - 2 * SCROLLBAR_SIZE : getRect().getHeight(), - mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * SCROLLBAR_SIZE : getRect().getWidth(), - mOrientation == VERTICAL ? SCROLLBAR_SIZE : 0, mTrackColor, TRUE); + if (!rounded_rect_imagep) + { + gl_rect_2d(mOrientation == HORIZONTAL ? SCROLLBAR_SIZE : 0, + mOrientation == VERTICAL ? getRect().getHeight() - 2 * SCROLLBAR_SIZE : getRect().getHeight(), + mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * SCROLLBAR_SIZE : getRect().getWidth(), + mOrientation == VERTICAL ? SCROLLBAR_SIZE : 0, mTrackColor, TRUE); - gl_rect_2d(mThumbRect, mThumbColor, TRUE); + gl_rect_2d(mThumbRect, mThumbColor, TRUE); - } - else - { - // Background - gl_draw_scaled_image_with_border(mOrientation == HORIZONTAL ? SCROLLBAR_SIZE : 0, - mOrientation == VERTICAL ? SCROLLBAR_SIZE : 0, - 16, - 16, - mOrientation == HORIZONTAL ? getRect().getWidth() - 2 * SCROLLBAR_SIZE : getRect().getWidth(), - mOrientation == VERTICAL ? getRect().getHeight() - 2 * SCROLLBAR_SIZE : getRect().getHeight(), - rounded_rect_imagep, - mTrackColor, - TRUE); - - // Thumb - LLRect outline_rect = mThumbRect; - outline_rect.stretch(2); - - if (gFocusMgr.getKeyboardFocus() == this) - { - gl_draw_scaled_image_with_border(outline_rect.mLeft, outline_rect.mBottom, 16, 16, outline_rect.getWidth(), outline_rect.getHeight(), - rounded_rect_imagep, gFocusMgr.getFocusColor() ); - } + } + else + { + // Thumb + LLRect outline_rect = mThumbRect; + outline_rect.stretch(2); - gl_draw_scaled_image_with_border(mThumbRect.mLeft, mThumbRect.mBottom, 16, 16, mThumbRect.getWidth(), mThumbRect.getHeight(), - rounded_rect_imagep, mThumbColor ); - if (mCurGlowStrength > 0.01f) - { - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE); - gl_draw_scaled_image_with_border(mThumbRect.mLeft, mThumbRect.mBottom, 16, 16, mThumbRect.getWidth(), mThumbRect.getHeight(), - rounded_rect_imagep, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength), TRUE); - gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - } + if (gFocusMgr.getKeyboardFocus() == this) + { + rounded_rect_imagep->draw(outline_rect, gFocusMgr.getFocusColor()); } - BOOL was_scrolled_to_bottom = (getDocPos() == getDocPosMax()); - if (mOnScrollEndCallback && was_scrolled_to_bottom) + rounded_rect_imagep->draw(mThumbRect, mThumbColor); + if (mCurGlowStrength > 0.01f) { - mOnScrollEndCallback(mOnScrollEndData); + glBlendFunc(GL_SRC_ALPHA, GL_ONE); + rounded_rect_imagep->drawSolid(mThumbRect, LLColor4(1.f, 1.f, 1.f, mCurGlowStrength)); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } - // Draw children - LLView::draw(); + } + + BOOL was_scrolled_to_bottom = (getDocPos() == getDocPosMax()); + if (mOnScrollEndCallback && was_scrolled_to_bottom) + { + mOnScrollEndCallback(mOnScrollEndData); + } + + // Draw children + LLView::draw(); } // end draw @@ -582,42 +556,39 @@ void LLScrollbar::setValue(const LLSD& value) } -BOOL LLScrollbar::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLScrollbar::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && !called_from_parent ) + switch( key ) { - switch( key ) - { - case KEY_HOME: - changeLine( -mDocPos, TRUE ); - handled = TRUE; - break; - - case KEY_END: - changeLine( getDocPosMax() - mDocPos, TRUE ); - handled = TRUE; - break; - - case KEY_DOWN: - changeLine( mStepSize, TRUE ); - handled = TRUE; - break; - - case KEY_UP: - changeLine( - mStepSize, TRUE ); - handled = TRUE; - break; - - case KEY_PAGE_DOWN: - pageDown(1); - break; - - case KEY_PAGE_UP: - pageUp(1); - break; - } + case KEY_HOME: + changeLine( -mDocPos, TRUE ); + handled = TRUE; + break; + + case KEY_END: + changeLine( getDocPosMax() - mDocPos, TRUE ); + handled = TRUE; + break; + + case KEY_DOWN: + changeLine( mStepSize, TRUE ); + handled = TRUE; + break; + + case KEY_UP: + changeLine( - mStepSize, TRUE ); + handled = TRUE; + break; + + case KEY_PAGE_DOWN: + pageDown(1); + break; + + case KEY_PAGE_UP: + pageUp(1); + break; } return handled; diff --git a/linden/indra/llui/llscrollbar.h b/linden/indra/llui/llscrollbar.h index b4586c3..52f19d1 100644 --- a/linden/indra/llui/llscrollbar.h +++ b/linden/indra/llui/llscrollbar.h @@ -62,11 +62,8 @@ public: virtual void setValue(const LLSD& value); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SCROLLBAR; } - virtual LLString getWidgetTag() const { return LL_SCROLLBAR_TAG; } - // Overrides from LLView - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); diff --git a/linden/indra/llui/llscrollcontainer.cpp b/linden/indra/llui/llscrollcontainer.cpp index 15b59d4..a6c1c6d 100644 --- a/linden/indra/llui/llscrollcontainer.cpp +++ b/linden/indra/llui/llscrollcontainer.cpp @@ -61,6 +61,8 @@ static const F32 AUTO_SCROLL_RATE_ACCEL = 120.f; /// Class LLScrollableContainerView ///---------------------------------------------------------------------------- +static LLRegisterWidget r("scroll_container"); + // Default constructor LLScrollableContainerView::LLScrollableContainerView( const LLString& name, const LLRect& rect, @@ -210,63 +212,33 @@ void LLScrollableContainerView::reshape(S32 width, S32 height, } } -BOOL LLScrollableContainerView::handleKey( KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLScrollableContainerView::handleKeyHere(KEY key, MASK mask) { - if( getVisible() && getEnabled() ) + for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) { - if( called_from_parent ) - { - // Downward traversal - - // Don't pass keys to scrollbars on downward. - - // Handle 'child' view. - if( mScrolledView && mScrolledView->handleKey(key, mask, TRUE) ) - { - return TRUE; - } - } - else + if( mScrollbar[i]->handleKeyHere(key, mask) ) { - // Upward traversal - - for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) - { - // Note: the scrollbar _is_ actually being called from it's parent. Here - // we're delgating LLScrollableContainerView's upward traversal to the scrollbars - if( mScrollbar[i]->handleKey(key, mask, TRUE) ) - { - return TRUE; - } - } - - if (getParent()) - { - return getParent()->handleKey( key, mask, FALSE ); - } + return TRUE; } - } + } return FALSE; } BOOL LLScrollableContainerView::handleScrollWheel( S32 x, S32 y, S32 clicks ) { - if( getEnabled() ) + for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) { - for( S32 i = 0; i < SCROLLBAR_COUNT; i++ ) - { - // Note: tries vertical and then horizontal + // Note: tries vertical and then horizontal - // Pretend the mouse is over the scrollbar - if( mScrollbar[i]->handleScrollWheel( 0, 0, clicks ) ) - { - return TRUE; - } + // Pretend the mouse is over the scrollbar + if( mScrollbar[i]->handleScrollWheel( 0, 0, clicks ) ) + { + return TRUE; } } - // Opaque + // Eat scroll wheel event (to avoid scrolling nested containers?) return TRUE; } @@ -446,80 +418,78 @@ void LLScrollableContainerView::draw() // clear this flag to be set on next call to handleDragAndDrop mAutoScrolling = FALSE; - if( getVisible() ) + // auto-focus when scrollbar active + // this allows us to capture user intent (i.e. stop automatically scrolling the view/etc) + if (!gFocusMgr.childHasKeyboardFocus(this) && + (mScrollbar[VERTICAL]->hasMouseCapture() || mScrollbar[HORIZONTAL]->hasMouseCapture())) { - // auto-focus when scrollbar active - // this allows us to capture user intent (i.e. stop automatically scrolling the view/etc) - if (!gFocusMgr.childHasKeyboardFocus(this) && - (mScrollbar[VERTICAL]->hasMouseCapture() || mScrollbar[HORIZONTAL]->hasMouseCapture())) - { - focusFirstItem(); - } + focusFirstItem(); + } - // Draw background - if( mIsOpaque ) + // Draw background + if( mIsOpaque ) + { + LLGLSNoTexture no_texture; + glColor4fv( mBackgroundColor.mV ); + gl_rect_2d( mInnerRect ); + } + + // Draw mScrolledViews and update scroll bars. + // get a scissor region ready, and draw the scrolling view. The + // scissor region ensures that we don't draw outside of the bounds + // of the rectangle. + if( mScrolledView ) + { + updateScroll(); + + // Draw the scrolled area. { - LLGLSNoTexture no_texture; - gGL.color4fv( mBackgroundColor.mV ); - gl_rect_2d( mInnerRect ); + S32 visible_width = 0; + S32 visible_height = 0; + BOOL show_v_scrollbar = FALSE; + BOOL show_h_scrollbar = FALSE; + calcVisibleSize( mScrolledView->getRect(), &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); + + LLLocalClipRect clip(LLRect(mInnerRect.mLeft, + mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0) + visible_height, + visible_width, + mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0) + )); + drawChild(mScrolledView); } - - // Draw mScrolledViews and update scroll bars. - // get a scissor region ready, and draw the scrolling view. The - // scissor region ensures that we don't draw outside of the bounds - // of the rectangle. - if( mScrolledView ) - { - updateScroll(); + } - // Draw the scrolled area. - { - S32 visible_width = 0; - S32 visible_height = 0; - BOOL show_v_scrollbar = FALSE; - BOOL show_h_scrollbar = FALSE; - calcVisibleSize( mScrolledView->getRect(), &visible_width, &visible_height, &show_h_scrollbar, &show_v_scrollbar ); - - LLLocalClipRect clip(LLRect(mInnerRect.mLeft, - mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0) + visible_height, - visible_width, - mInnerRect.mBottom + (show_h_scrollbar ? SCROLLBAR_SIZE : 0) - )); - drawChild(mScrolledView); - } - } + // Highlight border if a child of this container has keyboard focus + if( mBorder->getVisible() ) + { + mBorder->setKeyboardFocusHighlight( gFocusMgr.childHasKeyboardFocus(this) ); + } - // Highlight border if a child of this container has keyboard focus - if( mBorder->getVisible() ) + // Draw all children except mScrolledView + // Note: scrollbars have been adjusted by above drawing code + for (child_list_const_reverse_iter_t child_iter = getChildList()->rbegin(); + child_iter != getChildList()->rend(); ++child_iter) + { + LLView *viewp = *child_iter; + if( sDebugRects ) { - mBorder->setKeyboardFocusHighlight( gFocusMgr.childHasKeyboardFocus(this) ); + sDepth++; } - - // Draw all children except mScrolledView - // Note: scrollbars have been adjusted by above drawing code - for (child_list_const_reverse_iter_t child_iter = getChildList()->rbegin(); - child_iter != getChildList()->rend(); ++child_iter) + if( (viewp != mScrolledView) && viewp->getVisible() ) { - LLView *viewp = *child_iter; - if( sDebugRects ) - { - sDepth++; - } - if( (viewp != mScrolledView) && viewp->getVisible() ) - { - drawChild(viewp); - } - if( sDebugRects ) - { - sDepth--; - } + drawChild(viewp); } - - if (sDebugRects) + if( sDebugRects ) { - drawDebugRect(); + sDepth--; } } + + if (sDebugRects) + { + drawDebugRect(); + } + } // end draw void LLScrollableContainerView::updateScroll() diff --git a/linden/indra/llui/llscrollcontainer.h b/linden/indra/llui/llscrollcontainer.h index 51b1527..b6999e6 100644 --- a/linden/indra/llui/llscrollcontainer.h +++ b/linden/indra/llui/llscrollcontainer.h @@ -70,8 +70,6 @@ public: void setScrolledView(LLView* view) { mScrolledView = view; } virtual void setValue(const LLSD& value) { mInnerRect.setValue(value); } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SCROLL_CONTAINER; } - virtual LLString getWidgetTag() const { return LL_SCROLLABLE_CONTAINER_VIEW_TAG; } void calcVisibleSize( S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const; void calcVisibleSize( const LLRect& doc_rect, S32 *visible_width, S32 *visible_height, BOOL* show_h_scrollbar, BOOL* show_v_scrollbar ) const; @@ -90,7 +88,7 @@ public: // LLView functionality virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual BOOL handleScrollWheel( S32 x, S32 y, S32 clicks ); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, diff --git a/linden/indra/llui/llscrollingpanellist.cpp b/linden/indra/llui/llscrollingpanellist.cpp index 8f85bc8..c9cdf3f 100644 --- a/linden/indra/llui/llscrollingpanellist.cpp +++ b/linden/indra/llui/llscrollingpanellist.cpp @@ -34,6 +34,9 @@ #include "llscrollingpanellist.h" +static LLRegisterWidget r("scrolling_panel_list"); + + ///////////////////////////////////////////////////////////////////// // LLScrollingPanelList @@ -129,10 +132,8 @@ void LLScrollingPanelList::updatePanelVisiblilty() void LLScrollingPanelList::draw() { - if( getVisible() ) - { - updatePanelVisiblilty(); - } + updatePanelVisiblilty(); + LLUICtrl::draw(); } diff --git a/linden/indra/llui/llscrollingpanellist.h b/linden/indra/llui/llscrollingpanellist.h index 6fe35cd..7729250 100644 --- a/linden/indra/llui/llscrollingpanellist.h +++ b/linden/indra/llui/llscrollingpanellist.h @@ -56,8 +56,6 @@ public: : LLUICtrl(name, rect, TRUE, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_BOTTOM ) {} virtual void setValue(const LLSD& value) {}; - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SCROLLING_PANEL_LIST; } - virtual LLString getWidgetTag() const { return LL_SCROLLING_PANEL_LIST_TAG; } virtual LLXMLNodePtr getXML(bool save_children) const { return LLUICtrl::getXML(); } diff --git a/linden/indra/llui/llscrolllistctrl.cpp b/linden/indra/llui/llscrolllistctrl.cpp index 01c37d9..2066819 100644 --- a/linden/indra/llui/llscrolllistctrl.cpp +++ b/linden/indra/llui/llscrolllistctrl.cpp @@ -55,10 +55,11 @@ #include "llkeyboard.h" #include "llresizebar.h" -const S32 LIST_BORDER_PAD = 0; // white space inside the border and to the left of the scrollbar const S32 MIN_COLUMN_WIDTH = 20; const S32 LIST_SNAP_PADDING = 5; +static LLRegisterWidget r("scroll_list"); + // local structures & classes. struct SortScrollListItem { @@ -68,37 +69,26 @@ struct SortScrollListItem bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2) { - if ( mSortOrders.empty() ) return true; - - const LLScrollListCell *cell1 = NULL; - const LLScrollListCell *cell2 = NULL; - - sort_order_t::const_reverse_iterator end_it = mSortOrders.rend(); - sort_order_t::const_reverse_iterator it; + if ( mSortOrders.empty() ) + return i1 < i2; // sort over all columns in order specified by mSortOrders S32 sort_result = 0; - for (it = mSortOrders.rbegin(); it != end_it; ++it) + for (sort_order_t::const_reverse_iterator it = mSortOrders.rbegin(); + it != mSortOrders.rend(); ++it) { S32 col_idx = it->first; BOOL sort_ascending = it->second; - cell1 = i1->getColumn(col_idx); - cell2 = i2->getColumn(col_idx); - // ascending or descending sort for this column? - S32 order = 1; - if (!sort_ascending) - { - order = -1; - } - + const LLScrollListCell *cell1 = i1->getColumn(col_idx); + const LLScrollListCell *cell2 = i2->getColumn(col_idx); + S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column? if (cell1 && cell2) { - sort_result = (order * LLString::compareDict(cell1->getValue().asString(), cell2->getValue().asString())); + sort_result = order * LLString::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); if (sort_result != 0) { - // we have a sort order! - break; + break; // we have a sort order! } } } @@ -114,24 +104,49 @@ struct SortScrollListItem // // LLScrollListIcon // -LLScrollListIcon::LLScrollListIcon(const LLUUID& icon_id, S32 width) +LLScrollListIcon::LLScrollListIcon(LLUIImagePtr icon, S32 width) + : LLScrollListCell(width), + mIcon(icon), + mColor(LLColor4::white) +{ +} + +LLScrollListIcon::LLScrollListIcon(const LLSD& value, S32 width) : LLScrollListCell(width), - mColor(LLColor4::white), - mImageUUID(icon_id) + mColor(LLColor4::white) { - // don't use default image specified by LLUUID::null, use no image in that case - mIcon = icon_id.isNull() ? NULL : LLUI::sImageProvider->getImageByID(icon_id); + setValue(value); } + LLScrollListIcon::~LLScrollListIcon() { } void LLScrollListIcon::setValue(const LLSD& value) { - mImageUUID = value.asUUID(); - // don't use default image specified by LLUUID::null, use no image in that case - mIcon = mImageUUID.isNull() ? NULL : LLUI::sImageProvider->getImageByID(mImageUUID); + if (value.isUUID()) + { + // don't use default image specified by LLUUID::null, use no image in that case + LLUUID image_id = value.asUUID(); + mIcon = image_id.notNull() ? LLUI::sImageProvider->getUIImageByID(image_id) : LLUIImagePtr(NULL); + } + else + { + LLString value_string = value.asString(); + if (LLUUID::validate(value_string)) + { + setValue(LLUUID(value_string)); + } + else if (!value_string.empty()) + { + mIcon = LLUI::getUIImage(value.asString()); + } + else + { + mIcon = NULL; + } + } } @@ -143,7 +158,7 @@ void LLScrollListIcon::setColor(const LLColor4& color) S32 LLScrollListIcon::getWidth() const { // if no specified fix width, use width of icon - if (LLScrollListCell::getWidth() == 0) + if (LLScrollListCell::getWidth() == 0 && mIcon.notNull()) { return mIcon->getWidth(); } @@ -151,11 +166,11 @@ S32 LLScrollListIcon::getWidth() const } -void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color) const +void LLScrollListIcon::draw(const LLColor4& color, const LLColor4& highlight_color) const { if (mIcon) { - gl_draw_image(0, 0, mIcon, mColor); + mIcon->draw(0, 0, mColor); } } @@ -206,6 +221,13 @@ LLScrollListSeparator::LLScrollListSeparator(S32 width) : LLScrollListCell(width { } +//virtual +S32 LLScrollListSeparator::getHeight() const +{ + return 5; +} + + void LLScrollListSeparator::draw(const LLColor4& color, const LLColor4& highlight_color) const { //*FIXME: use dynamic item heights and make separators narrow, and inactive @@ -234,9 +256,34 @@ LLScrollListText::LLScrollListText( const LLString& text, const LLFontGL* font, // initialize rounded rect image if (!mRoundedRectImage) { - mRoundedRectImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("rounded_square.tga"))); + mRoundedRectImage = LLUI::sImageProvider->getUIImage("rounded_square.tga"); } } +//virtual +void LLScrollListText::highlightText(S32 offset, S32 num_chars) +{ + mHighlightOffset = offset; + mHighlightCount = num_chars; +} + +//virtual +BOOL LLScrollListText::isText() const +{ + return TRUE; +} + +//virtual +BOOL LLScrollListText::getVisible() const +{ + return mVisible; +} + +//virtual +S32 LLScrollListText::getHeight() const +{ + return llround(mFont->getLineHeight()); +} + LLScrollListText::~LLScrollListText() { @@ -266,6 +313,13 @@ void LLScrollListText::setValue(const LLSD& text) setText(text.asString()); } +//virtual +const LLSD LLScrollListText::getValue() const +{ + return LLSD(mText.getString()); +} + + void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_color) const { LLColor4 display_color; @@ -280,8 +334,6 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col if (mHighlightCount > 0) { - mRoundedRectImage->bind(); - gGL.color4fv(highlight_color.mV); S32 left = 0; switch(mFontAlignment) { @@ -295,13 +347,11 @@ void LLScrollListText::draw(const LLColor4& color, const LLColor4& highlight_col left = (getWidth() - mFont->getWidth(mText.getString())) / 2; break; } - gl_segmented_rect_2d_tex(left - 2, + LLRect highlight_rect(left - 2, llround(mFont->getLineHeight()) + 1, left + mFont->getWidth(mText.getString(), mHighlightOffset, mHighlightCount) + 1, - 1, - mRoundedRectImage->getWidth(), - mRoundedRectImage->getHeight(), - 16); + 1); + mRoundedRectImage->draw(highlight_rect, highlight_color); } // Try to draw the entire string @@ -389,8 +439,6 @@ void LLScrollListItem::draw(const LLRect& rect, const LLColor4& fg_color, const { // draw background rect LLRect bg_rect = rect; - // pad background rectangle to separate it from contents - bg_rect.stretch(LIST_BORDER_PAD, 0); { LLGLSNoTexture no_texture; gGL.color4fv(bg_color.mV); @@ -432,7 +480,7 @@ LLScrollListItemComment::LLScrollListItemComment(const LLString& comment_string, : LLScrollListItem(FALSE), mColor(color) { - addColumn( comment_string, gResMgr->getRes( LLFONT_SANSSERIF_SMALL ) ); + addColumn( comment_string, LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ) ); } void LLScrollListItemComment::draw(const LLRect& rect, const LLColor4& fg_color, const LLColor4& bg_color, const LLColor4& highlight_color, S32 column_padding) @@ -541,10 +589,10 @@ LLScrollListCtrl::LLScrollListCtrl(const LLString& name, const LLRect& rect, mDrewSelected(FALSE) { mItemListRect.setOriginAndSize( - mBorderThickness + LIST_BORDER_PAD, - mBorderThickness + LIST_BORDER_PAD, - getRect().getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), - getRect().getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) ); + mBorderThickness, + mBorderThickness, + getRect().getWidth() - 2 * mBorderThickness, + getRect().getHeight() - 2 * mBorderThickness ); updateLineHeight(); @@ -738,10 +786,10 @@ void LLScrollListCtrl::updateLayout() // reserve room for column headers, if needed S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); mItemListRect.setOriginAndSize( - mBorderThickness + LIST_BORDER_PAD, - mBorderThickness + LIST_BORDER_PAD, - getRect().getWidth() - 2*( mBorderThickness + LIST_BORDER_PAD ), - getRect().getHeight() - 2*( mBorderThickness + LIST_BORDER_PAD ) - heading_size ); + mBorderThickness, + mBorderThickness, + getRect().getWidth() - 2 * mBorderThickness, + getRect().getHeight() - (2 * mBorderThickness ) - heading_size ); // how many lines of content in a single "page" mPageLines = mLineHeight? mItemListRect.getHeight() / mLineHeight : 0; @@ -749,7 +797,7 @@ void LLScrollListCtrl::updateLayout() if (scrollbar_visible) { // provide space on the right for scrollbar - mItemListRect.mRight = getRect().getWidth() - ( mBorderThickness + LIST_BORDER_PAD ) - SCROLLBAR_SIZE; + mItemListRect.mRight = getRect().getWidth() - mBorderThickness - SCROLLBAR_SIZE; } mScrollbar->reshape(SCROLLBAR_SIZE, mItemListRect.getHeight() + (mDisplayColumnHeaders ? mHeadingHeight : 0)); @@ -775,7 +823,7 @@ LLRect LLScrollListCtrl::getRequiredRect() { S32 heading_size = (mDisplayColumnHeaders ? mHeadingHeight : 0); S32 height = (mLineHeight * getItemCount()) - + (2 * ( mBorderThickness + LIST_BORDER_PAD )) + + (2 * mBorderThickness ) + heading_size; S32 width = getRect().getWidth(); @@ -1357,7 +1405,6 @@ LLScrollListItem* LLScrollListCtrl::addCommentText(const LLString& comment_text, LLScrollListItem* item = NULL; if (getItemCount() < mMaxItemCount) { - // simple items have their LLSD data set to their label // always draw comment text with "enabled" color item = new LLScrollListItemComment( comment_text, mFgUnselectedColor ); addItem( item, pos, FALSE ); @@ -1525,7 +1572,7 @@ LLScrollListItem* LLScrollListCtrl::addStringUUIDItem(const LLString& item_text, if (getItemCount() < mMaxItemCount) { item = new LLScrollListItem( enabled, NULL, id ); - item->addColumn(item_text, gResMgr->getRes(LLFONT_SANSSERIF_SMALL), column_width); + item->addColumn(item_text, LLResMgr::getInstance()->getRes(LLFONT_SANSSERIF_SMALL), column_width); addItem( item, pos ); } return item; @@ -1664,7 +1711,6 @@ void LLScrollListCtrl::drawItems() fg_color = (item->getEnabled() ? mFgUnselectedColor : mFgDisabledColor); if( item->getSelected() && mCanSelect) { - // Draw background of selected item bg_color = mBgSelectedColor; fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor); } @@ -1697,43 +1743,40 @@ void LLScrollListCtrl::drawItems() void LLScrollListCtrl::draw() { - if( getVisible() ) + // if user specifies sort, make sure it is maintained + if (needsSorting() && !isSorted()) { - // if user specifies sort, make sure it is maintained - if (needsSorting() && !isSorted()) - { - sortItems(); - } - - if (mNeedsScroll) - { - scrollToShowSelected(); - mNeedsScroll = FALSE; - } - LLRect background(0, getRect().getHeight(), getRect().getWidth(), 0); - // Draw background - if (mBackgroundVisible) - { - LLGLSNoTexture no_texture; - gGL.color4fv( getEnabled() ? mBgWriteableColor.mV : mBgReadOnlyColor.mV ); - gl_rect_2d(background); - } + sortItems(); + } - if (mColumnsDirty) - { - updateColumns(); - mColumnsDirty = FALSE; - } + if (mNeedsScroll) + { + scrollToShowSelected(); + mNeedsScroll = FALSE; + } + LLRect background(0, getRect().getHeight(), getRect().getWidth(), 0); + // Draw background + if (mBackgroundVisible) + { + LLGLSNoTexture no_texture; + glColor4fv( getEnabled() ? mBgWriteableColor.mV : mBgReadOnlyColor.mV ); + gl_rect_2d(background); + } - drawItems(); + if (mColumnsDirty) + { + updateColumns(); + mColumnsDirty = FALSE; + } - if (mBorder) - { - mBorder->setKeyboardFocusHighlight(gFocusMgr.getKeyboardFocus() == this); - } + drawItems(); - LLUICtrl::draw(); + if (mBorder) + { + mBorder->setKeyboardFocusHighlight(gFocusMgr.getKeyboardFocus() == this); } + + LLUICtrl::draw(); } void LLScrollListCtrl::setEnabled(BOOL enabled) @@ -1950,23 +1993,21 @@ BOOL LLScrollListCtrl::handleMouseUp(S32 x, S32 y, MASK mask) BOOL LLScrollListCtrl::handleDoubleClick(S32 x, S32 y, MASK mask) { //BOOL handled = FALSE; - if(getVisible()) - { - BOOL handled = handleClick(x, y, mask); + BOOL handled = handleClick(x, y, mask); - if (!handled) + if (!handled) + { + // Offer the click to the children, even if we aren't enabled + // so the scroll bars will work. + if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) { - // Offer the click to the children, even if we aren't enabled - // so the scroll bars will work. - if (NULL == LLView::childrenHandleDoubleClick(x, y, mask)) + if( mCanSelect && mOnDoubleClickCallback ) { - if( mCanSelect && mOnDoubleClickCallback ) - { - mOnDoubleClickCallback( mCallbackUserData ); - } + mOnDoubleClickCallback( mCallbackUserData ); } } } + return TRUE; } @@ -2146,12 +2187,12 @@ BOOL LLScrollListCtrl::handleHover(S32 x,S32 y,MASK mask) } -BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask, BOOL called_from_parent ) +BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask ) { BOOL handled = FALSE; // not called from parent means we have keyboard focus or a child does - if (mCanSelect && !called_from_parent) + if (mCanSelect) { // Ignore capslock mask = mask; @@ -2234,7 +2275,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask, BOOL called_from_parent // JC - Special case: Only claim to have handled it // if we're the special non-commit-on-move // type. AND we are visible - if (!mCommitOnKeyboardMovement && mask == MASK_NONE && getVisible()) + if (!mCommitOnKeyboardMovement && mask == MASK_NONE) { onCommit(); mSearchString.clear(); @@ -2281,7 +2322,7 @@ BOOL LLScrollListCtrl::handleKeyHere(KEY key,MASK mask, BOOL called_from_parent return handled; } -BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) +BOOL LLScrollListCtrl::handleUnicodeCharHere(llwchar uni_char) { if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL { @@ -3207,17 +3248,16 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p LLColor4 color = ((*itor)["color"]); BOOL enabled = !(*itor).has("enabled") || (*itor)["enabled"].asBoolean() == true; - const LLFontGL *font = gResMgr->getRes(fontname); + const LLFontGL *font = LLResMgr::getInstance()->getRes(fontname); if (!font) { - font = gResMgr->getRes( LLFONT_SANSSERIF_SMALL ); + font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); } U8 font_style = LLFontGL::getStyleFromString(fontstyle); if (type == "icon") { - LLUUID image_id = value.asUUID(); - LLScrollListIcon* cell = new LLScrollListIcon(value.asUUID(), width); + LLScrollListIcon* cell = new LLScrollListIcon(value, width); if (has_color) { cell->setColor(color); @@ -3270,7 +3310,7 @@ LLScrollListItem* LLScrollListCtrl::addElement(const LLSD& value, EAddPosition p if (new_item->getColumn(column_idx) == NULL) { LLScrollListColumn* column_ptr = &column_it->second; - new_item->setColumn(column_idx, new LLScrollListText("", gResMgr->getRes( LLFONT_SANSSERIF_SMALL ), column_ptr->mWidth, LLFontGL::NORMAL)); + new_item->setColumn(column_idx, new LLScrollListText("", LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ), column_ptr->mWidth, LLFontGL::NORMAL)); } } @@ -3290,7 +3330,7 @@ LLScrollListItem* LLScrollListCtrl::addSimpleElement(const LLString& value, EAdd LLScrollListItem *new_item = new LLScrollListItem(entry_id); - const LLFontGL *font = gResMgr->getRes( LLFONT_SANSSERIF_SMALL ); + const LLFontGL *font = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); new_item->addColumn(value, font, getRect().getWidth()); @@ -3438,29 +3478,25 @@ LLColumnHeader::~LLColumnHeader() void LLColumnHeader::draw() { - if( getVisible() ) - { - BOOL draw_arrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() && mColumn->mParentCtrl->getSortColumnName() == mColumn->mSortingColumn; + BOOL draw_arrow = !mColumn->mLabel.empty() && mColumn->mParentCtrl->isSorted() && mColumn->mParentCtrl->getSortColumnName() == mColumn->mSortingColumn; - BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); - mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent); - mArrowImage = mButton->getImageOverlay()->getImage(); + BOOL is_ascending = mColumn->mParentCtrl->getSortAscending(); + mButton->setImageOverlay(is_ascending ? "up_arrow.tga" : "down_arrow.tga", LLFontGL::RIGHT, draw_arrow ? LLColor4::white : LLColor4::transparent); + mArrowImage = mButton->getImageOverlay(); - //BOOL clip = getRect().mRight > mColumn->mParentCtrl->getItemListRect().getWidth(); - //LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE); + //BOOL clip = getRect().mRight > mColumn->mParentCtrl->getItemListRect().getWidth(); + //LLGLEnable scissor_test(clip ? GL_SCISSOR_TEST : GL_FALSE); - //LLRect column_header_local_rect(-getRect().mLeft, getRect().getHeight(), mColumn->mParentCtrl->getItemListRect().getWidth() - getRect().mLeft, 0); - //LLUI::setScissorRegionLocal(column_header_local_rect); + //LLRect column_header_local_rect(-getRect().mLeft, getRect().getHeight(), mColumn->mParentCtrl->getItemListRect().getWidth() - getRect().mLeft, 0); + //LLUI::setScissorRegionLocal(column_header_local_rect); - // Draw children - LLComboBox::draw(); - - if (mList->getVisible()) - { - // sync sort order with list selection every frame - mColumn->mParentCtrl->sortByColumn(mColumn->mSortingColumn, getCurrentIndex() == 0); - } + // Draw children + LLComboBox::draw(); + if (mList->getVisible()) + { + // sync sort order with list selection every frame + mColumn->mParentCtrl->sortByColumn(mColumn->mSortingColumn, getCurrentIndex() == 0); } } diff --git a/linden/indra/llui/llscrolllistctrl.h b/linden/indra/llui/llscrolllistctrl.h index 716d18a..8a31154 100644 --- a/linden/indra/llui/llscrolllistctrl.h +++ b/linden/indra/llui/llscrolllistctrl.h @@ -90,7 +90,7 @@ public: LLScrollListSeparator(S32 width); virtual ~LLScrollListSeparator() {}; virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; // truncate to given width, if possible - virtual S32 getHeight() const { return 5; }; + virtual S32 getHeight() const; virtual BOOL isText() const { return FALSE; } }; @@ -105,14 +105,14 @@ public: virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; virtual S32 getContentWidth() const; - virtual S32 getHeight() const { return llround(mFont->getLineHeight()); } + virtual S32 getHeight() const; virtual void setValue(const LLSD& value); - virtual const LLSD getValue() const { return LLSD(mText.getString()); } - virtual BOOL getVisible() const { return mVisible; } - virtual void highlightText(S32 offset, S32 num_chars) {mHighlightOffset = offset; mHighlightCount = num_chars;} + virtual const LLSD getValue() const; + virtual BOOL getVisible() const; + virtual void highlightText(S32 offset, S32 num_chars); virtual void setColor(const LLColor4&); - virtual BOOL isText() const { return TRUE; } + virtual BOOL isText() const; void setText(const LLStringExplicit& text); void setFontStyle(const U8 font_style) { mFontStyle = font_style; } @@ -128,7 +128,7 @@ private: S32 mHighlightCount; S32 mHighlightOffset; - LLPointer mRoundedRectImage; + LLPointer mRoundedRectImage; static U32 sCount; }; @@ -139,20 +139,19 @@ private: class LLScrollListIcon : public LLScrollListCell { public: - LLScrollListIcon( const LLUUID& icon_id, S32 width = 0); + LLScrollListIcon( LLUIImagePtr icon, S32 width = 0); + LLScrollListIcon(const LLSD& value, S32 width = 0); /*virtual*/ ~LLScrollListIcon(); virtual void draw(const LLColor4& color, const LLColor4& highlight_color) const; virtual S32 getWidth() const; virtual S32 getHeight() const { return mIcon ? mIcon->getHeight() : 0; } - // used as sort criterion - virtual const LLSD getValue() const { return LLSD(mImageUUID); } + virtual const LLSD getValue() const { return mIcon.isNull() ? LLString::null : mIcon->getName(); } virtual void setColor(const LLColor4&); virtual BOOL isText()const { return FALSE; } virtual void setValue(const LLSD& value); private: - LLPointer mIcon; - LLUUID mImageUUID; + LLUIImagePtr mIcon; LLColor4 mColor; }; @@ -342,8 +341,8 @@ public: void addColumn( const LLString& text, const LLFontGL* font, S32 width = 0 , U8 font_style = LLFontGL::NORMAL, LLFontGL::HAlign font_alignment = LLFontGL::LEFT, BOOL visible = TRUE) { mColumns.push_back( new LLScrollListText(text, font, width, font_style, font_alignment, LLColor4::black, FALSE, visible) ); } - void addColumn( const LLUUID& icon_id, S32 width = 0 ) - { mColumns.push_back( new LLScrollListIcon(icon_id, width) ); } + void addColumn( LLUIImagePtr icon, S32 width = 0 ) + { mColumns.push_back( new LLScrollListIcon(icon, width) ); } void addColumn( LLCheckBoxCtrl* check, S32 width = 0 ) { mColumns.push_back( new LLScrollListCheck(check,width) ); } @@ -404,8 +403,7 @@ public: BOOL draw_border = TRUE); virtual ~LLScrollListCtrl(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SCROLL_LIST; } - virtual LLString getWidgetTag() const { return LL_SCROLL_LIST_CTRL_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; void setScrollListParameters(LLXMLNodePtr node); static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); @@ -562,8 +560,8 @@ public: /*virtual*/ BOOL handleMouseUp(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); /*virtual*/ BOOL handleHover(S32 x, S32 y, MASK mask); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); - /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); + /*virtual*/ BOOL handleUnicodeCharHere(llwchar uni_char); /*virtual*/ BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); /*virtual*/ void setEnabled(BOOL enabled); @@ -618,6 +616,7 @@ public: S32 selectMultiple( LLDynamicArray ids ); void sortItems(); + // manually call this whenever editing list items in place to flag need for resorting void setSorted(BOOL sorted) { mSorted = sorted; } void dirtyColumns(); // some operation has potentially affected column layout or ordering diff --git a/linden/indra/llui/llslider.cpp b/linden/indra/llui/llslider.cpp index 02841ee..12d794c 100644 --- a/linden/indra/llui/llslider.cpp +++ b/linden/indra/llui/llslider.cpp @@ -41,6 +41,10 @@ #include "llcontrol.h" #include "llimagegl.h" +static LLRegisterWidget r1("slider_bar"); +static LLRegisterWidget r2("volume_slider"); + + LLSlider::LLSlider( const LLString& name, const LLRect& rect, @@ -68,9 +72,9 @@ LLSlider::LLSlider( mMouseDownCallback( NULL ), mMouseUpCallback( NULL ) { - mThumbImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-thumb_dark.tga"))); - mTrackImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-groove_dark.tga"))); - mTrackHighlightImage = LLUI::sImageProvider->getImageByID(LLUUID(LLUI::sAssetsGroup->getString("icn_slide-highlight.tga"))); + mThumbImage = LLUI::sImageProvider->getUIImage("icn_slide-thumb_dark.tga"); + mTrackImage = LLUI::sImageProvider->getUIImage("icn_slide-groove_dark.tga"); + mTrackHighlightImage = LLUI::sImageProvider->getUIImage("icn_slide-highlight.tga"); // properly handle setting the starting thumb rect // do it this way to handle both the operating-on-settings @@ -217,98 +221,68 @@ BOOL LLSlider::handleMouseDown(S32 x, S32 y, MASK mask) return TRUE; } -BOOL LLSlider::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLSlider::handleKeyHere(KEY key, MASK mask) { BOOL handled = FALSE; - if( getVisible() && getEnabled() && !called_from_parent ) + switch(key) { - switch(key) - { - case KEY_UP: - case KEY_DOWN: - // eat up and down keys to be consistent - handled = TRUE; - break; - case KEY_LEFT: - setValueAndCommit(getValueF32() - getIncrement()); - handled = TRUE; - break; - case KEY_RIGHT: - setValueAndCommit(getValueF32() + getIncrement()); - handled = TRUE; - break; - default: - break; - } + case KEY_UP: + case KEY_DOWN: + // eat up and down keys to be consistent + handled = TRUE; + break; + case KEY_LEFT: + setValueAndCommit(getValueF32() - getIncrement()); + handled = TRUE; + break; + case KEY_RIGHT: + setValueAndCommit(getValueF32() + getIncrement()); + handled = TRUE; + break; + default: + break; } return handled; } void LLSlider::draw() { - if( getVisible() ) - { - // since thumb image might still be decoding, need thumb to accomodate image size - updateThumbRect(); - - // Draw background and thumb. - - // drawing solids requires texturing be disabled - LLGLSNoTexture no_texture; - - LLRect rect(mDragStartThumbRect); - - F32 opacity = getEnabled() ? 1.f : 0.3f; - LLColor4 center_color = (mThumbCenterColor % opacity); - LLColor4 track_color = (mTrackColor % opacity); - - // Track - LLRect track_rect(mThumbImage->getWidth() / 2, - getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2), - getRect().getWidth() - mThumbImage->getWidth() / 2, - getLocalRect().getCenterY() - (mTrackImage->getHeight() / 2) ); - - gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 3, 3, track_rect.getWidth(), track_rect.getHeight(), - mTrackImage, track_color); - gl_draw_scaled_image_with_border(track_rect.mLeft, track_rect.mBottom, 3, 3, mThumbRect.mLeft, track_rect.getHeight(), - mTrackHighlightImage, track_color); + // since thumb image might still be decoding, need thumb to accomodate image size + updateThumbRect(); + // Draw background and thumb. - // Thumb - if( hasMouseCapture() ) - { - gl_draw_scaled_image(mDragStartThumbRect.mLeft, mDragStartThumbRect.mBottom, mDragStartThumbRect.getWidth(), mDragStartThumbRect.getHeight(), - mThumbImage, mThumbCenterColor % 0.3f); + // drawing solids requires texturing be disabled + LLGLSNoTexture no_texture; - if (hasFocus()) - { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - LLRect highlight_rect = mThumbRect; - highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 0, 0, highlight_rect.getWidth(), highlight_rect.getHeight(), - mThumbImage, gFocusMgr.getFocusColor(), TRUE); - } + F32 opacity = getEnabled() ? 1.f : 0.3f; + LLColor4 center_color = (mThumbCenterColor % opacity); + LLColor4 track_color = (mTrackColor % opacity); - gl_draw_scaled_image(mThumbRect.mLeft, mThumbRect.mBottom, mThumbRect.getWidth(), mThumbRect.getHeight(), - mThumbImage, mThumbOutlineColor); + // Track + LLRect track_rect(mThumbImage->getWidth() / 2, + getLocalRect().getCenterY() + (mTrackImage->getHeight() / 2), + getRect().getWidth() - mThumbImage->getWidth() / 2, + getLocalRect().getCenterY() - (mTrackImage->getHeight() / 2) ); + LLRect highlight_rect(track_rect.mLeft, track_rect.mTop, mThumbRect.getCenterX(), track_rect.mBottom); + mTrackImage->draw(track_rect); + mTrackHighlightImage->draw(highlight_rect); - } - else - { - if (hasFocus()) - { - F32 lerp_amt = gFocusMgr.getFocusFlashAmt(); - LLRect highlight_rect = mThumbRect; - highlight_rect.stretch(llround(lerp(1.f, 3.f, lerp_amt))); - gl_draw_scaled_image_with_border(highlight_rect.mLeft, highlight_rect.mBottom, 0, 0, highlight_rect.getWidth(), highlight_rect.getHeight(), - mThumbImage, gFocusMgr.getFocusColor(), TRUE); - } - - gl_draw_scaled_image(mThumbRect.mLeft, mThumbRect.mBottom, mThumbRect.getWidth(), mThumbRect.getHeight(), - mThumbImage, center_color); - } - LLUICtrl::draw(); + // Thumb + if( hasMouseCapture() ) + { + // Show ghost where thumb was before dragging began. + mThumbImage->draw(mDragStartThumbRect, mThumbCenterColor % 0.3f); } + if (hasFocus()) + { + // Draw focus highlighting. + mThumbImage->drawBorder(mThumbRect, gFocusMgr.getFocusColor(), gFocusMgr.getFocusFlashWidth()); + } + // Fill in the thumb. + mThumbImage->draw(mThumbRect, hasMouseCapture() ? mThumbOutlineColor : center_color); + + LLUICtrl::draw(); } // virtual diff --git a/linden/indra/llui/llslider.h b/linden/indra/llui/llslider.h index 506a6bd..1c9d5e1 100644 --- a/linden/indra/llui/llslider.h +++ b/linden/indra/llui/llslider.h @@ -52,8 +52,6 @@ public: BOOL volume, //TODO: create a "volume" slider sub-class or just use image art, no? -MG const LLString& control_name = LLString::null ); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SLIDER_BAR; } - virtual LLString getWidgetTag() const { return LL_SLIDER_TAG; } virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); @@ -79,7 +77,7 @@ public: virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void draw(); private: @@ -96,9 +94,9 @@ private: S32 mMouseOffset; LLRect mDragStartThumbRect; - LLImageGL* mThumbImage; - LLImageGL* mTrackImage; - LLImageGL* mTrackHighlightImage; + LLUIImage* mThumbImage; + LLUIImage* mTrackImage; + LLUIImage* mTrackHighlightImage; LLRect mThumbRect; LLColor4 mTrackColor; diff --git a/linden/indra/llui/llsliderctrl.cpp b/linden/indra/llui/llsliderctrl.cpp index 58ab4ae..d3dc35f 100644 --- a/linden/indra/llui/llsliderctrl.cpp +++ b/linden/indra/llui/llsliderctrl.cpp @@ -52,6 +52,7 @@ const U32 MAX_STRING_LENGTH = 10; +static LLRegisterWidget r("slider"); LLSliderCtrl::LLSliderCtrl(const LLString& name, const LLRect& rect, const LLString& label, diff --git a/linden/indra/llui/llsliderctrl.h b/linden/indra/llui/llsliderctrl.h index 705fa5c..0c8a8b6 100644 --- a/linden/indra/llui/llsliderctrl.h +++ b/linden/indra/llui/llsliderctrl.h @@ -63,8 +63,7 @@ public: const LLString& control_which = LLString::null ); virtual ~LLSliderCtrl() {} // Children all cleaned up by default view destructor. - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SLIDER; } - virtual LLString getWidgetTag() const { return LL_SLIDER_CTRL_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); diff --git a/linden/indra/llui/llspinctrl.cpp b/linden/indra/llui/llspinctrl.cpp index 98cdae1..9e85b20 100644 --- a/linden/indra/llui/llspinctrl.cpp +++ b/linden/indra/llui/llspinctrl.cpp @@ -52,6 +52,7 @@ const U32 MAX_STRING_LENGTH = 32; +static LLRegisterWidget r2("spinner"); LLSpinCtrl::LLSpinCtrl( const LLString& name, const LLRect& rect, const LLString& label, const LLFontGL* font, void (*commit_callback)(LLUICtrl*, void*), @@ -409,26 +410,23 @@ void LLSpinCtrl::draw() BOOL LLSpinCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) { - if( getEnabled() ) + if( clicks > 0 ) { - if( clicks > 0 ) + while( clicks-- ) { - while( clicks-- ) - { - LLSpinCtrl::onDownBtn(this); - } - } - else - while( clicks++ ) - { - LLSpinCtrl::onUpBtn(this); + LLSpinCtrl::onDownBtn(this); } } + else + while( clicks++ ) + { + LLSpinCtrl::onUpBtn(this); + } return TRUE; } -BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLSpinCtrl::handleKeyHere(KEY key, MASK mask) { if (mEditor->hasFocus()) { diff --git a/linden/indra/llui/llspinctrl.h b/linden/indra/llui/llspinctrl.h index f1f971e..790e216 100644 --- a/linden/indra/llui/llspinctrl.h +++ b/linden/indra/llui/llspinctrl.h @@ -62,8 +62,7 @@ public: S32 label_width = SPINCTRL_DEFAULT_LABEL_WIDTH ); virtual ~LLSpinCtrl() {} // Children all cleaned up by default view destructor. - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_SPINNER; } - virtual LLString getWidgetTag() const { return LL_SPIN_CTRL_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); @@ -101,7 +100,7 @@ public: void forceEditorCommit(); // for commit on external button virtual BOOL handleScrollWheel(S32 x,S32 y,S32 clicks); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask); virtual void draw(); diff --git a/linden/indra/llui/llstyle.cpp b/linden/indra/llui/llstyle.cpp index cdf87d3..7c46114 100644 --- a/linden/indra/llui/llstyle.cpp +++ b/linden/indra/llui/llstyle.cpp @@ -138,12 +138,34 @@ void LLStyle::setFontName(const LLString& fontname) } -void LLStyle::setImage(const LLString& src) +void LLStyle::setLinkHREF(const LLString& href) { - if (src.size() >= UUID_STR_LENGTH - 1) - { - mImagep = LLUI::sImageProvider->getImageByID(LLUUID(src)); - } + mLink = href; +} + +BOOL LLStyle::isLink() const +{ + return mLink.size(); +} + +BOOL LLStyle::isVisible() const +{ + return mVisible; +} + +void LLStyle::setVisible(BOOL is_visible) +{ + mVisible = is_visible; +} + +LLUIImagePtr LLStyle::getImage() const +{ + return mImagep; +} + +void LLStyle::setImage(const LLUUID& src) +{ + mImagep = LLUI::sImageProvider->getUIImageByID(src); } diff --git a/linden/indra/llui/llstyle.h b/linden/indra/llui/llstyle.h index d6ae900..6f0099c 100644 --- a/linden/indra/llui/llstyle.h +++ b/linden/indra/llui/llstyle.h @@ -35,7 +35,7 @@ #include "v4color.h" #include "llresmgr.h" #include "llfont.h" -#include "llimagegl.h" +#include "llui.h" class LLStyle { @@ -53,19 +53,20 @@ public: virtual const LLColor4& getColor() const { return mColor; } virtual void setColor(const LLColor4 &color) { mColor = color; } - virtual BOOL isVisible() const { return mVisible; } - virtual void setVisible(BOOL is_visible) { mVisible = is_visible; } + virtual BOOL isVisible() const; + virtual void setVisible(BOOL is_visible); virtual const LLString& getFontString() const { return mFontName; } virtual void setFontName(const LLString& fontname); virtual LLFONT_ID getFontID() const { return mFontID; } virtual const LLString& getLinkHREF() const { return mLink; } - virtual void setLinkHREF(const LLString& href) { mLink = href; } - virtual BOOL isLink() const { return mLink.size(); } + virtual void setLinkHREF(const LLString& href); + virtual BOOL isLink() const; + + virtual LLUIImagePtr getImage() const; + virtual void setImage(const LLUUID& src); - virtual LLImageGL *getImage() const { return mImagep; } - virtual void setImage(const LLString& src); virtual BOOL isImage() const { return ((mImageWidth != 0) && (mImageHeight != 0)); } virtual void setImageSize(S32 width, S32 height); @@ -106,7 +107,7 @@ private: LLString mFontName; LLFONT_ID mFontID; LLString mLink; - LLPointer mImagep; + LLUIImagePtr mImagep; BOOL mIsEmbeddedItem; }; diff --git a/linden/indra/llui/lltabcontainer.cpp b/linden/indra/llui/lltabcontainer.cpp index e632cf1..7f581dc 100644 --- a/linden/indra/llui/lltabcontainer.cpp +++ b/linden/indra/llui/lltabcontainer.cpp @@ -64,7 +64,7 @@ const S32 TABCNTRV_HEADER_HEIGHT = LLPANEL_BORDER_WIDTH + TABCNTRV_CLOSE_BTN_SIZ const S32 TABCNTRV_ARROW_BTN_SIZE = 16; const S32 TABCNTRV_PAD = 0; - +static LLRegisterWidget r("tab_container"); LLTabContainer::LLTabContainer(const LLString& name, const LLRect& rect, TabPosition pos, BOOL bordered, BOOL is_vertical ) @@ -115,18 +115,6 @@ void LLTabContainer::setValue(const LLSD& value) } //virtual -EWidgetType LLTabContainer::getWidgetType() const -{ - return WIDGET_TYPE_TAB_CONTAINER; -} - -//virtual -LLString LLTabContainer::getWidgetTag() const -{ - return LL_TAB_CONTAINER_COMMON_TAG; -} - -//virtual void LLTabContainer::reshape(S32 width, S32 height, BOOL called_from_parent) { LLPanel::reshape( width, height, called_from_parent ); @@ -134,7 +122,7 @@ void LLTabContainer::reshape(S32 width, S32 height, BOOL called_from_parent) } //virtual -LLView* LLTabContainer::getChildByName(const LLString& name, BOOL recurse) const +LLView* LLTabContainer::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const { tuple_list_t::const_iterator itor; for (itor = mTabList.begin(); itor != mTabList.end(); ++itor) @@ -145,19 +133,20 @@ LLView* LLTabContainer::getChildByName(const LLString& name, BOOL recurse) const return panel; } } + if (recurse) { for (itor = mTabList.begin(); itor != mTabList.end(); ++itor) { LLPanel *panel = (*itor)->mTabPanel; - LLView *child = panel->getChild(name, recurse); + LLView *child = panel->getChildView(name, recurse, FALSE); if (child) { return child; } } } - return LLView::getChildByName(name, recurse); + return LLView::getChildView(name, recurse, create_if_missing); } // virtual @@ -185,124 +174,122 @@ void LLTabContainer::draw() } setScrollPosPixels((S32)lerp((F32)getScrollPosPixels(), (F32)target_pixel_scroll, LLCriticalDamp::getInterpolant(0.08f))); - if( getVisible() ) + + BOOL has_scroll_arrows = (mMaxScrollPos > 0) || (mScrollPosPixels > 0); + if (!mIsVertical) { - BOOL has_scroll_arrows = (mMaxScrollPos > 0) || (mScrollPosPixels > 0); - if (!mIsVertical) - { - mJumpPrevArrowBtn->setVisible( has_scroll_arrows ); - mJumpNextArrowBtn->setVisible( has_scroll_arrows ); - } - mPrevArrowBtn->setVisible( has_scroll_arrows ); - mNextArrowBtn->setVisible( has_scroll_arrows ); + mJumpPrevArrowBtn->setVisible( has_scroll_arrows ); + mJumpNextArrowBtn->setVisible( has_scroll_arrows ); + } + mPrevArrowBtn->setVisible( has_scroll_arrows ); + mNextArrowBtn->setVisible( has_scroll_arrows ); - S32 left = 0, top = 0; - if (mIsVertical) - { - top = getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1 - (has_scroll_arrows ? TABCNTRV_ARROW_BTN_SIZE : 0); - top += getScrollPosPixels(); - } - else - { - // Set the leftmost position of the tab buttons. - left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? (TABCNTR_ARROW_BTN_SIZE * 2) : TABCNTR_TAB_H_PAD); - left -= getScrollPosPixels(); - } - - // Hide all the buttons + S32 left = 0, top = 0; + if (mIsVertical) + { + top = getRect().getHeight() - getTopBorderHeight() - LLPANEL_BORDER_WIDTH - 1 - (has_scroll_arrows ? TABCNTRV_ARROW_BTN_SIZE : 0); + top += getScrollPosPixels(); + } + else + { + // Set the leftmost position of the tab buttons. + left = LLPANEL_BORDER_WIDTH + (has_scroll_arrows ? (TABCNTR_ARROW_BTN_SIZE * 2) : TABCNTR_TAB_H_PAD); + left -= getScrollPosPixels(); + } + + // Hide all the buttons + for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) + { + LLTabTuple* tuple = *iter; + tuple->mButton->setVisible( FALSE ); + } + + LLPanel::draw(); + + // if tabs are hidden, don't draw them and leave them in the invisible state + if (!getTabsHidden()) + { + // Show all the buttons for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) { LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( FALSE ); + tuple->mButton->setVisible( TRUE ); } - LLPanel::draw(); - - // if tabs are hidden, don't draw them and leave them in the invisible state - if (!getTabsHidden()) + // Draw some of the buttons... + LLRect clip_rect = getLocalRect(); + if (has_scroll_arrows) { - // Show all the buttons - for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) + // ...but clip them. + if (mIsVertical) { - LLTabTuple* tuple = *iter; - tuple->mButton->setVisible( TRUE ); + clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*TABCNTRV_PAD; + clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*TABCNTRV_PAD; } - - // Draw some of the buttons... - LLRect clip_rect = getLocalRect(); - if (has_scroll_arrows) + else { - // ...but clip them. - if (mIsVertical) - { - clip_rect.mBottom = mNextArrowBtn->getRect().mTop + 3*TABCNTRV_PAD; - clip_rect.mTop = mPrevArrowBtn->getRect().mBottom - 3*TABCNTRV_PAD; - } - else - { - clip_rect.mLeft = mPrevArrowBtn->getRect().mRight; - clip_rect.mRight = mNextArrowBtn->getRect().mLeft; - } + clip_rect.mLeft = mPrevArrowBtn->getRect().mRight; + clip_rect.mRight = mNextArrowBtn->getRect().mLeft; } - LLLocalClipRect clip(clip_rect); + } + LLLocalClipRect clip(clip_rect); - S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos(); - S32 idx = 0; - for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) - { - LLTabTuple* tuple = *iter; + S32 max_scroll_visible = getTabCount() - getMaxScrollPos() + getScrollPos(); + S32 idx = 0; + for(tuple_list_t::iterator iter = mTabList.begin(); iter != mTabList.end(); ++iter) + { + LLTabTuple* tuple = *iter; - tuple->mButton->translate( left ? left - tuple->mButton->getRect().mLeft : 0, - top ? top - tuple->mButton->getRect().mTop : 0 ); - if (top) top -= BTN_HEIGHT + TABCNTRV_PAD; - if (left) left += tuple->mButton->getRect().getWidth(); + tuple->mButton->translate( left ? left - tuple->mButton->getRect().mLeft : 0, + top ? top - tuple->mButton->getRect().mTop : 0 ); + if (top) top -= BTN_HEIGHT + TABCNTRV_PAD; + if (left) left += tuple->mButton->getRect().getWidth(); - if (!mIsVertical) + if (!mIsVertical) + { + if( idx < getScrollPos() ) { - if( idx < getScrollPos() ) - { - if( tuple->mButton->getFlashing() ) - { - mPrevArrowBtn->setFlashing( TRUE ); - } - } - else if( max_scroll_visible < idx ) + if( tuple->mButton->getFlashing() ) { - if( tuple->mButton->getFlashing() ) - { - mNextArrowBtn->setFlashing( TRUE ); - } + mPrevArrowBtn->setFlashing( TRUE ); } } - LLUI::pushMatrix(); + else if( max_scroll_visible < idx ) { - LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); - tuple->mButton->draw(); + if( tuple->mButton->getFlashing() ) + { + mNextArrowBtn->setFlashing( TRUE ); + } } - LLUI::popMatrix(); - - idx++; } - - - if( mIsVertical && has_scroll_arrows ) + LLUI::pushMatrix(); { - // Redraw the arrows so that they appears on top. - gGL.pushMatrix(); - gGL.translatef((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f); - mPrevArrowBtn->draw(); - gGL.popMatrix(); - - gGL.pushMatrix(); - gGL.translatef((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f); - mNextArrowBtn->draw(); - gGL.popMatrix(); + LLUI::translate((F32)tuple->mButton->getRect().mLeft, (F32)tuple->mButton->getRect().mBottom, 0.f); + tuple->mButton->draw(); } + LLUI::popMatrix(); + + idx++; } - mPrevArrowBtn->setFlashing(FALSE); - mNextArrowBtn->setFlashing(FALSE); + + if( mIsVertical && has_scroll_arrows ) + { + // Redraw the arrows so that they appears on top. + gGL.pushMatrix(); + gGL.translatef((F32)mPrevArrowBtn->getRect().mLeft, (F32)mPrevArrowBtn->getRect().mBottom, 0.f); + mPrevArrowBtn->draw(); + gGL.popMatrix(); + + gGL.pushMatrix(); + gGL.translatef((F32)mNextArrowBtn->getRect().mLeft, (F32)mNextArrowBtn->getRect().mBottom, 0.f); + mNextArrowBtn->draw(); + gGL.popMatrix(); + } } + + mPrevArrowBtn->setFlashing(FALSE); + mNextArrowBtn->setFlashing(FALSE); } @@ -524,12 +511,8 @@ BOOL LLTabContainer::handleToolTip( S32 x, S32 y, LLString& msg, LLRect* sticky_ } // virtual -BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLTabContainer::handleKeyHere(KEY key, MASK mask) { - if (!getEnabled()) return FALSE; - - if (!gFocusMgr.childHasKeyboardFocus(this)) return FALSE; - BOOL handled = FALSE; if (key == KEY_LEFT && mask == MASK_ALT) { @@ -687,7 +670,7 @@ void LLTabContainer::addTabPanel(LLPanel* child, // already a child of mine return; } - const LLFontGL* font = gResMgr->getRes( mIsVertical ? LLFONT_SANSSERIF : LLFONT_SANSSERIF_SMALL ); + const LLFontGL* font = LLResMgr::getInstance()->getRes( mIsVertical ? LLFONT_SANSSERIF : LLFONT_SANSSERIF_SMALL ); // Store the original label for possible xml export. child->setLabel(label); @@ -1272,7 +1255,7 @@ void LLTabContainer::setTabImage(LLPanel* child, std::string image_name, const L if (!mIsVertical) { - const LLFontGL* fontp = gResMgr->getRes( LLFONT_SANSSERIF_SMALL ); + const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); // remove current width from total tab strip width mTotalTabWidth -= tuple->mButton->getRect().getWidth(); @@ -1353,7 +1336,7 @@ void LLTabContainer::setPanelTitle(S32 index, const LLString& title) { LLTabTuple* tuple = getTab(index); LLButton* tab_button = tuple->mButton; - const LLFontGL* fontp = gResMgr->getRes( LLFONT_SANSSERIF_SMALL ); + const LLFontGL* fontp = LLResMgr::getInstance()->getRes( LLFONT_SANSSERIF_SMALL ); mTotalTabWidth -= tab_button->getRect().getWidth(); tab_button->reshape(llclamp(fontp->getWidth(title) + TAB_PADDING + tuple->mPadding, mMinTabWidth, mMaxTabWidth), tab_button->getRect().getHeight()); mTotalTabWidth += tab_button->getRect().getWidth(); diff --git a/linden/indra/llui/lltabcontainer.h b/linden/indra/llui/lltabcontainer.h index 152bd05..16f8be5 100644 --- a/linden/indra/llui/lltabcontainer.h +++ b/linden/indra/llui/lltabcontainer.h @@ -62,19 +62,19 @@ public: // from LLView /*virtual*/ void setValue(const LLSD& value); - /*virtual*/ EWidgetType getWidgetType() const; - /*virtual*/ LLString getWidgetTag() const; + /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); /*virtual*/ void draw(); /*virtual*/ BOOL handleMouseDown( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleHover( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleMouseUp( S32 x, S32 y, MASK mask ); /*virtual*/ BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect ); - /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); + /*virtual*/ BOOL handleKeyHere(KEY key, MASK mask); /*virtual*/ BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType type, void* cargo_data, EAcceptance* accept, LLString& tooltip); /*virtual*/ LLXMLNodePtr getXML(bool save_children = true) const; + /*virtual*/ LLView* getChildView(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; void addTabPanel(LLPanel* child, const LLString& label, @@ -142,10 +142,6 @@ public: static LLView* fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); -protected: - /*virtual*/ LLView* getChildByName(const LLString& name, BOOL recurse = FALSE) const; - - private: // Structure used to map tab buttons to and from tab panels struct LLTabTuple diff --git a/linden/indra/llui/lltextbox.cpp b/linden/indra/llui/lltextbox.cpp index 9ad7849..0f411b8 100644 --- a/linden/indra/llui/lltextbox.cpp +++ b/linden/indra/llui/lltextbox.cpp @@ -34,6 +34,8 @@ #include "lluictrlfactory.h" #include "llfocusmgr.h" +static LLRegisterWidget r("text"); + LLTextBox::LLTextBox(const LLString& name, const LLRect& rect, const LLString& text, const LLFontGL* font, BOOL mouse_opaque) : LLUICtrl(name, rect, mouse_opaque, NULL, NULL, FOLLOWS_LEFT | FOLLOWS_TOP ), @@ -212,7 +214,7 @@ void LLTextBox::setLineLengths() LLString::size_type cur = 0; LLString::size_type len = mText.getWString().size(); - while (cur < len) + while (cur < len) { LLString::size_type end = mText.getWString().find('\n', cur); LLString::size_type runLen; @@ -323,63 +325,60 @@ BOOL LLTextBox::setTextArg( const LLString& key, const LLStringExplicit& text ) void LLTextBox::draw() { - if( getVisible() ) + if (mBorderVisible) { - if (mBorderVisible) - { - gl_rect_2d_offset_local(getLocalRect(), 2, FALSE); - } + gl_rect_2d_offset_local(getLocalRect(), 2, FALSE); + } - if( mBorderDropShadowVisible ) - { - static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow"); - static S32 drop_shadow_tooltip = LLUI::sConfigGroup->getS32("DropShadowTooltip"); - gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, - color_drop_shadow, drop_shadow_tooltip); - } - - if (mBackgroundVisible) - { - LLRect r( 0, getRect().getHeight(), getRect().getWidth(), 0 ); - gl_rect_2d( r, mBackgroundColor ); - } + if( mBorderDropShadowVisible ) + { + static LLColor4 color_drop_shadow = LLUI::sColorsGroup->getColor("ColorDropShadow"); + static S32 drop_shadow_tooltip = LLUI::sConfigGroup->getS32("DropShadowTooltip"); + gl_drop_shadow(0, getRect().getHeight(), getRect().getWidth(), 0, + color_drop_shadow, drop_shadow_tooltip); + } - S32 text_x = 0; - switch( mHAlign ) - { - case LLFontGL::LEFT: - text_x = mHPad; - break; - case LLFontGL::HCENTER: - text_x = getRect().getWidth() / 2; - break; - case LLFontGL::RIGHT: - text_x = getRect().getWidth() - mHPad; - break; - } + if (mBackgroundVisible) + { + LLRect r( 0, getRect().getHeight(), getRect().getWidth(), 0 ); + gl_rect_2d( r, mBackgroundColor ); + } - S32 text_y = getRect().getHeight() - mVPad; + S32 text_x = 0; + switch( mHAlign ) + { + case LLFontGL::LEFT: + text_x = mHPad; + break; + case LLFontGL::HCENTER: + text_x = getRect().getWidth() / 2; + break; + case LLFontGL::RIGHT: + text_x = getRect().getWidth() - mHPad; + break; + } - if ( getEnabled() ) + S32 text_y = getRect().getHeight() - mVPad; + + if ( getEnabled() ) + { + if(mHasHover) { - if(mHasHover) - { - drawText( text_x, text_y, mHoverColor ); - } - else - { - drawText( text_x, text_y, mTextColor ); - } + drawText( text_x, text_y, mHoverColor ); } else { - drawText( text_x, text_y, mDisabledColor ); - } + drawText( text_x, text_y, mTextColor ); + } + } + else + { + drawText( text_x, text_y, mDisabledColor ); + } - if (sDebugRects) - { - drawDebugRect(); - } + if (sDebugRects) + { + drawDebugRect(); } mHasHover = FALSE; // This is reset every frame. diff --git a/linden/indra/llui/lltextbox.h b/linden/indra/llui/lltextbox.h index 7bea722..ffe6f4c 100644 --- a/linden/indra/llui/lltextbox.h +++ b/linden/indra/llui/lltextbox.h @@ -57,8 +57,7 @@ public: LLTextBox(const LLString& name_and_label); virtual ~LLTextBox() {} - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_TEXT_BOX; } - virtual LLString getWidgetTag() const { return LL_TEXT_BOX_TAG; } + virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 545fddb..4ed936f 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp @@ -64,6 +64,8 @@ // // Globals // +static LLRegisterWidget r("simple_text_editor"); + BOOL gDebugTextEditorTips = FALSE; // @@ -304,10 +306,10 @@ LLTextEditor::LLTextEditor( // Init the scrollbar LLRect scroll_rect; scroll_rect.setOriginAndSize( - getRect().getWidth() - UI_TEXTEDITOR_BORDER - SCROLLBAR_SIZE, - UI_TEXTEDITOR_BORDER, + getRect().getWidth() - SCROLLBAR_SIZE, + 1, SCROLLBAR_SIZE, - getRect().getHeight() - 2 * UI_TEXTEDITOR_BORDER ); + getRect().getHeight() - 1); S32 lines_in_doc = getLineCount(); mScrollbar = new LLScrollbar( "Scrollbar", scroll_rect, LLScrollbar::VERTICAL, @@ -1102,14 +1104,7 @@ BOOL LLTextEditor::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rec BOOL LLTextEditor::handleScrollWheel(S32 x, S32 y, S32 clicks) { // Pretend the mouse is over the scrollbar - if (getVisible()) - { - return mScrollbar->handleScrollWheel( 0, 0, clicks ); - } - else - { - return FALSE; - } + return mScrollbar->handleScrollWheel( 0, 0, clicks ); } BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) @@ -1197,91 +1192,88 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) BOOL handled = FALSE; mHoverSegment = NULL; - if( getVisible() ) + if(hasMouseCapture() ) { - if(hasMouseCapture() ) + if( mIsSelecting ) { - if( mIsSelecting ) + if (x != mLastSelectionX || y != mLastSelectionY) { - if (x != mLastSelectionX || y != mLastSelectionY) - { - mLastSelectionX = x; - mLastSelectionY = y; - } + mLastSelectionX = x; + mLastSelectionY = y; + } - if( y > mTextRect.mTop ) + if( y > mTextRect.mTop ) + { + mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 ); + } + else + if( y < mTextRect.mBottom ) + { + mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 ); + } + + setCursorAtLocalPos( x, y, TRUE ); + mSelectionEnd = mCursorPos; + + updateScrollFromCursor(); + } + + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; + getWindow()->setCursor(UI_CURSOR_IBEAM); + handled = TRUE; + } + + if( !handled ) + { + // Pass to children + handled = LLView::childrenHandleHover(x, y, mask) != NULL; + } + + if( handled ) + { + // Delay cursor flashing + resetKeystrokeTimer(); + } + + // Opaque + if( !handled && mTakesNonScrollClicks) + { + // Check to see if we're over an HTML-style link + if( !mSegments.empty() ) + { + const LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); + if( cur_segment ) + { + if(cur_segment->getStyle().isLink()) { - mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 ); + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (over link, inactive)" << llendl; + getWindow()->setCursor(UI_CURSOR_HAND); + handled = TRUE; } else - if( y < mTextRect.mBottom ) + if(cur_segment->getStyle().getIsEmbeddedItem()) { - mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 ); + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (over embedded item, inactive)" << llendl; + getWindow()->setCursor(UI_CURSOR_HAND); + //getWindow()->setCursor(UI_CURSOR_ARROW); + handled = TRUE; } - - setCursorAtLocalPos( x, y, TRUE ); - mSelectionEnd = mCursorPos; - - updateScrollFromCursor(); + mHoverSegment = cur_segment; } - - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; - getWindow()->setCursor(UI_CURSOR_IBEAM); - handled = TRUE; } if( !handled ) { - // Pass to children - handled = LLView::childrenHandleHover(x, y, mask) != NULL; - } - - if( handled ) - { - // Delay cursor flashing - resetKeystrokeTimer(); - } - - // Opaque - if( !handled && mTakesNonScrollClicks) - { - // Check to see if we're over an HTML-style link - if( !mSegments.empty() ) + lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; + if (!mScrollbar->getVisible() || x < getRect().getWidth() - SCROLLBAR_SIZE) { - const LLTextSegment* cur_segment = getSegmentAtLocalPos( x, y ); - if( cur_segment ) - { - if(cur_segment->getStyle().isLink()) - { - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (over link, inactive)" << llendl; - getWindow()->setCursor(UI_CURSOR_HAND); - handled = TRUE; - } - else - if(cur_segment->getStyle().getIsEmbeddedItem()) - { - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (over embedded item, inactive)" << llendl; - getWindow()->setCursor(UI_CURSOR_HAND); - //getWindow()->setCursor(UI_CURSOR_ARROW); - handled = TRUE; - } - mHoverSegment = cur_segment; - } + getWindow()->setCursor(UI_CURSOR_IBEAM); } - - if( !handled ) + else { - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (inactive)" << llendl; - if (!mScrollbar->getVisible() || x < getRect().getWidth() - SCROLLBAR_SIZE) - { - getWindow()->setCursor(UI_CURSOR_IBEAM); - } - else - { - getWindow()->setCursor(UI_CURSOR_ARROW); - } - handled = TRUE; + getWindow()->setCursor(UI_CURSOR_ARROW); } + handled = TRUE; } } @@ -2154,14 +2146,14 @@ void LLTextEditor::unindentLineBeforeCloseBrace() } -BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) +BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask ) { BOOL handled = FALSE; BOOL selection_modified = FALSE; BOOL return_key_hit = FALSE; BOOL text_may_have_changed = TRUE; - if ( (gFocusMgr.getKeyboardFocus() == this) && getVisible()) + if ( gFocusMgr.getKeyboardFocus() == this ) { // Special case for TAB. If want to move to next field, report // not handled and let the parent take care of field movement. @@ -2245,7 +2237,7 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ) } -BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent) +BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char) { if ((uni_char < 0x20) || (uni_char == 0x7F)) // Control character or DEL { @@ -2254,7 +2246,7 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare BOOL handled = FALSE; - if ( (gFocusMgr.getKeyboardFocus() == this) && getVisible()) + if ( gFocusMgr.getKeyboardFocus() == this ) { // Handle most keys only if the text editor is writeable. if( !mReadOnly ) @@ -2939,8 +2931,8 @@ void LLTextEditor::drawText() LLStyle style = cur_segment->getStyle(); if ( style.isImage() && (cur_segment->getStart() >= seg_start) && (cur_segment->getStart() <= clipped_end)) { - LLImageGL *image = style.getImage(); - gl_draw_scaled_image( llround(text_x), llround(text_y)+line_height-style.mImageHeight, style.mImageWidth, style.mImageHeight, image, LLColor4::white ); + LLUIImagePtr image = style.getImage(); + image->draw(llround(text_x), llround(text_y)+line_height-style.mImageHeight, style.mImageWidth, style.mImageHeight); } if (cur_segment == mHoverSegment && style.getIsEmbeddedItem()) @@ -2984,7 +2976,7 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32 if ( style.getFontString()[0] ) { - font = gResMgr->getRes(style.getFontID()); + font = LLResMgr::getInstance()->getRes(style.getFontID()); } U8 font_flags = LLFontGL::NORMAL; @@ -3051,10 +3043,6 @@ void LLTextEditor::drawClippedSegment(const LLWString &text, S32 seg_start, S32 void LLTextEditor::draw() { - if( !getVisible() ) - { - return; - } { LLLocalClipRect clip(LLRect(0, getRect().getHeight(), getRect().getWidth() - (mScrollbar->getVisible() ? SCROLLBAR_SIZE : 0), 0)); diff --git a/linden/indra/llui/lltexteditor.h b/linden/indra/llui/lltexteditor.h index 7943129..54a34cc 100644 --- a/linden/indra/llui/lltexteditor.h +++ b/linden/indra/llui/lltexteditor.h @@ -71,9 +71,6 @@ public: virtual ~LLTextEditor(); - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_TEXT_EDITOR; } - virtual LLString getWidgetTag() const { return LL_TEXT_EDITOR_TAG; } - virtual LLXMLNodePtr getXML(bool save_children = true) const; static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); void setTextEditorParameters(LLXMLNodePtr node); @@ -85,8 +82,8 @@ public: virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleScrollWheel(S32 x, S32 y, S32 clicks); virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); - virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent ); - virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); + virtual BOOL handleKeyHere(KEY key, MASK mask ); + virtual BOOL handleUnicodeCharHere(llwchar uni_char); virtual BOOL handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect); virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, diff --git a/linden/indra/llui/llui.cpp b/linden/indra/llui/llui.cpp index ec8c94e..aafd3af 100644 --- a/linden/indra/llui/llui.cpp +++ b/linden/indra/llui/llui.cpp @@ -55,6 +55,7 @@ //#include "llstartup.h" #include "llui.h" #include "llview.h" +#include "lllineeditor.h" #include "llwindow.h" #include "llglheaders.h" @@ -73,7 +74,6 @@ std::list gUntranslated; LLControlGroup* LLUI::sConfigGroup = NULL; LLControlGroup* LLUI::sColorsGroup = NULL; -LLControlGroup* LLUI::sAssetsGroup = NULL; LLImageProviderInterface* LLUI::sImageProvider = NULL; LLUIAudioCallback LLUI::sAudioCallback = NULL; LLVector2 LLUI::sGLScaleFactor(1.f, 1.f); @@ -321,7 +321,7 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2 ) { // Work around bug in ATI driver: vertical lines are offset by (-1,-1) - if( gGLManager.mATIOffsetVerticalLines && (x1 == x2) ) + if( (x1 == x2) && gGLManager.mATIOffsetVerticalLines ) { x1++; x2++; @@ -340,7 +340,7 @@ void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2 ) void gl_line_2d(S32 x1, S32 y1, S32 x2, S32 y2, const LLColor4 &color ) { // Work around bug in ATI driver: vertical lines are offset by (-1,-1) - if( gGLManager.mATIOffsetVerticalLines && (x1 == x2) ) + if( (x1 == x2) && gGLManager.mATIOffsetVerticalLines ) { x1++; x2++; @@ -458,24 +458,30 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma return; } - // scale screen size of borders down - LLRectf clipped_scale_rect = uv_rect; - clipped_scale_rect.intersectWith(scale_rect); + // shrink scaling region to be proportional to clipped image region + LLRectf scale_rect_uv( + uv_rect.mLeft + (scale_rect.mLeft * uv_rect.getWidth()), + uv_rect.mBottom + (scale_rect.mTop * uv_rect.getHeight()), + uv_rect.mLeft + (scale_rect.mRight * uv_rect.getWidth()), + uv_rect.mBottom + (scale_rect.mBottom * uv_rect.getHeight())); + + S32 image_natural_width = llround((F32)image->getWidth(0) * uv_rect.getWidth()); + S32 image_natural_height = llround((F32)image->getHeight(0) * uv_rect.getHeight()); LLRect draw_rect(0, height, width, 0); - LLRect draw_scale_rect(llround((F32)image->getWidth() * scale_rect.mLeft), - llround((F32)image->getHeight() * scale_rect.mTop), - llround((F32)image->getWidth() * scale_rect.mRight), - llround((F32)image->getHeight() * scale_rect.mBottom)); - // scale fixed region of image up with drawn region - draw_scale_rect.mRight += width - image->getWidth(); - draw_scale_rect.mTop += height - image->getHeight(); + LLRect draw_scale_rect(llround(scale_rect_uv.mLeft * (F32)image->getWidth(0)), + llround(scale_rect_uv.mTop * (F32)image->getHeight(0)), + llround(scale_rect_uv.mRight * (F32)image->getWidth(0)), + llround(scale_rect_uv.mBottom * (F32)image->getHeight(0))); + // scale fixed region of image to drawn region + draw_scale_rect.mRight += width - image_natural_width; + draw_scale_rect.mTop += height - image_natural_height; S32 border_shrink_width = llmax(0, draw_scale_rect.mLeft - draw_scale_rect.mRight); S32 border_shrink_height = llmax(0, draw_scale_rect.mBottom - draw_scale_rect.mTop); - F32 shrink_width_ratio = scale_rect.getWidth() == 1.f ? 0.f : border_shrink_width / ((F32)image->getWidth() * (1.f - scale_rect.getWidth())); - F32 shrink_height_ratio = scale_rect.getHeight() == 1.f ? 0.f : border_shrink_height / ((F32)image->getHeight() * (1.f - scale_rect.getHeight())); + F32 shrink_width_ratio = scale_rect.getWidth() == 1.f ? 0.f : border_shrink_width / ((F32)image_natural_width * (1.f - scale_rect.getWidth())); + F32 shrink_height_ratio = scale_rect.getHeight() == 1.f ? 0.f : border_shrink_height / ((F32)image_natural_height * (1.f - scale_rect.getHeight())); F32 shrink_scale = 1.f - llmax(shrink_width_ratio, shrink_height_ratio); draw_scale_rect.mLeft = llround((F32)draw_scale_rect.mLeft * shrink_scale); @@ -515,117 +521,117 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom); gGL.vertex2i(0, 0); - gGL.texCoord2f(clipped_scale_rect.mLeft, uv_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, uv_rect.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, 0); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - gGL.texCoord2f(uv_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(uv_rect.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(0, draw_scale_rect.mBottom); // draw bottom middle - gGL.texCoord2f(clipped_scale_rect.mLeft, uv_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, uv_rect.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, 0); - gGL.texCoord2f(clipped_scale_rect.mRight, uv_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, uv_rect.mBottom); gGL.vertex2i(draw_scale_rect.mRight, 0); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); // draw bottom right - gGL.texCoord2f(clipped_scale_rect.mRight, uv_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, uv_rect.mBottom); gGL.vertex2i(draw_scale_rect.mRight, 0); gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom); gGL.vertex2i(width, 0); - gGL.texCoord2f(uv_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(uv_rect.mRight, scale_rect_uv.mBottom); gGL.vertex2i(width, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); // draw left - gGL.texCoord2f(uv_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(uv_rect.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(0, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - gGL.texCoord2f(uv_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(uv_rect.mLeft, scale_rect_uv.mTop); gGL.vertex2i(0, draw_scale_rect.mTop); // draw middle - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); // draw right - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mBottom); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mBottom); - gGL.texCoord2f(uv_rect.mRight, clipped_scale_rect.mBottom); + gGL.texCoord2f(uv_rect.mRight, scale_rect_uv.mBottom); gGL.vertex2i(width, draw_scale_rect.mBottom); - gGL.texCoord2f(uv_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(uv_rect.mRight, scale_rect_uv.mTop); gGL.vertex2i(width, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); // draw top left - gGL.texCoord2f(uv_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(uv_rect.mLeft, scale_rect_uv.mTop); gGL.vertex2i(0, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mLeft, uv_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, uv_rect.mTop); gGL.vertex2i(draw_scale_rect.mLeft, height); gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop); gGL.vertex2i(0, height); // draw top middle - gGL.texCoord2f(clipped_scale_rect.mLeft, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mLeft, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - gGL.texCoord2f(clipped_scale_rect.mRight, uv_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, uv_rect.mTop); gGL.vertex2i(draw_scale_rect.mRight, height); - gGL.texCoord2f(clipped_scale_rect.mLeft, uv_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mLeft, uv_rect.mTop); gGL.vertex2i(draw_scale_rect.mLeft, height); // draw top right - gGL.texCoord2f(clipped_scale_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, scale_rect_uv.mTop); gGL.vertex2i(draw_scale_rect.mRight, draw_scale_rect.mTop); - gGL.texCoord2f(uv_rect.mRight, clipped_scale_rect.mTop); + gGL.texCoord2f(uv_rect.mRight, scale_rect_uv.mTop); gGL.vertex2i(width, draw_scale_rect.mTop); gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop); gGL.vertex2i(width, height); - gGL.texCoord2f(clipped_scale_rect.mRight, uv_rect.mTop); + gGL.texCoord2f(scale_rect_uv.mRight, uv_rect.mTop); gGL.vertex2i(draw_scale_rect.mRight, height); } gGL.end(); @@ -1556,20 +1562,14 @@ void gl_segmented_rect_3d_tex_top(const LLVector2& border_scale, const LLVector3 gl_segmented_rect_3d_tex(border_scale, border_width, border_height, width_vec, height_vec, ROUNDED_RECT_TOP); } -class LLShowXUINamesListener: public LLSimpleListener +bool handleShowXUINamesChanged(const LLSD& newvalue) { - bool handleEvent(LLPointer event, const LLSD& userdata) - { - LLUI::sShowXUINames = (BOOL) event->getValue().asBoolean(); - return true; - } -}; -static LLShowXUINamesListener show_xui_names_listener; - + LLUI::sShowXUINames = newvalue.asBoolean(); + return true; +} void LLUI::initClass(LLControlGroup* config, LLControlGroup* colors, - LLControlGroup* assets, LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback, const LLVector2* scale_factor, @@ -1577,7 +1577,6 @@ void LLUI::initClass(LLControlGroup* config, { sConfigGroup = config; sColorsGroup = colors; - sAssetsGroup = assets; sImageProvider = image_provider; sAudioCallback = audio_callback; sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor; @@ -1585,11 +1584,13 @@ void LLUI::initClass(LLControlGroup* config, LLFontGL::sShadowColor = colors->getColor("ColorDropShadow"); LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames"); - LLUI::sConfigGroup->getControl("ShowXUINames")->addListener(&show_xui_names_listener); + LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(boost::bind(&handleShowXUINamesChanged, _1)); } void LLUI::cleanupClass() { + sImageProvider->cleanUp(); + LLLineEditor::cleanupClass(); } @@ -1732,28 +1733,15 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen) glPointToScreen(gl.mRight, gl.mBottom, &screen->mRight, &screen->mBottom); } -//static -LLUUID LLUI::findAssetUUIDByName(const LLString &asset_name) -{ - if(asset_name == LLString::null) return LLUUID::null; - LLString foundValue = LLUI::sConfigGroup->findString(asset_name); - if(foundValue==LLString::null) - { - foundValue = LLUI::sAssetsGroup->findString(asset_name); - } - if(foundValue == LLString::null){ - return LLUUID::null; - } - return LLUUID( foundValue ); -} - //static -LLUIImage* LLUI::getUIImageByName(const LLString& name) +LLUIImage* LLUI::getUIImage(const LLString& name) { - return sImageProvider->getUIImageByID(findAssetUUIDByName(name)); + if (!name.empty()) + return sImageProvider->getUIImage(name); + else + return NULL; } - // static void LLUI::setHtmlHelp(LLHtmlHelp* html_help) { @@ -1834,7 +1822,8 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled) // LLUIImage // -LLUIImage::LLUIImage(LLPointer image) : +LLUIImage::LLUIImage(const LLString& name, LLPointer image) : + mName(name), mImage(image), mScaleRegion(0.f, 1.f, 1.f, 0.f), mClipRegion(0.f, 1.f, 1.f, 0.f), @@ -1898,24 +1887,32 @@ void LLUIImage::drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& c mScaleRegion); } -void LLUIImage::drawSolid(S32 x, S32 y, const LLColor4& color) const +void LLUIImage::drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const { - gl_draw_scaled_image_with_border( - x, y, - getWidth(), getHeight(), - mImage, - color, - TRUE, - mClipRegion, - mScaleRegion); + LLRect border_rect; + border_rect.setOriginAndSize(x, y, width, height); + border_rect.stretch(border_width, border_width); + drawSolid(border_rect, color); } S32 LLUIImage::getWidth() const { - return mImage->getWidth(0); + // return clipped dimensions of actual image area + return llround((F32)mImage->getWidth(0) * mClipRegion.getWidth()); } S32 LLUIImage::getHeight() const { - return mImage->getHeight(0); + // return clipped dimensions of actual image area + return llround((F32)mImage->getHeight(0) * mClipRegion.getHeight()); +} + +S32 LLUIImage::getTextureWidth() const +{ + return mImage->getWidth(0); +} + +S32 LLUIImage::getTextureHeight() const +{ + return mImage->getHeight(0); } diff --git a/linden/indra/llui/llui.h b/linden/indra/llui/llui.h index 9e275a5..0b06913 100644 --- a/linden/indra/llui/llui.h +++ b/linden/indra/llui/llui.h @@ -161,7 +161,6 @@ public: // static void initClass(LLControlGroup* config, LLControlGroup* colors, - LLControlGroup* assets, LLImageProviderInterface* image_provider, LLUIAudioCallback audio_callback = NULL, const LLVector2 *scale_factor = NULL, @@ -179,8 +178,7 @@ public: static void setCursorPositionLocal(const LLView* viewp, S32 x, S32 y); static void setScaleFactor(const LLVector2& scale_factor); static void setLineWidth(F32 width); - static LLUUID findAssetUUIDByName(const LLString& name); - static LLUIImage* getUIImageByName(const LLString& name); + static LLUIImage* getUIImage(const LLString& name); static LLVector2 getWindowSize(); static void screenPointToGL(S32 screen_x, S32 screen_y, S32 *gl_x, S32 *gl_y); static void glPointToScreen(S32 gl_x, S32 gl_y, S32 *screen_x, S32 *screen_y); @@ -193,7 +191,6 @@ public: // static LLControlGroup* sConfigGroup; static LLControlGroup* sColorsGroup; - static LLControlGroup* sAssetsGroup; static LLImageProviderInterface* sImageProvider; static LLUIAudioCallback sAudioCallback; static LLVector2 sGLScaleFactor; @@ -209,101 +206,6 @@ public: }; -// UI widgets -// This MUST match UICtrlNames in lluictrlfactory.cpp -typedef enum e_widget_type -{ - WIDGET_TYPE_VIEW = 0, - WIDGET_TYPE_ROOT_VIEW, - WIDGET_TYPE_FLOATER_VIEW, - WIDGET_TYPE_BUTTON, - WIDGET_TYPE_JOYSTICK_TURN, - WIDGET_TYPE_JOYSTICK_SLIDE, - WIDGET_TYPE_CHECKBOX, - WIDGET_TYPE_COLOR_SWATCH, - WIDGET_TYPE_COMBO_BOX, - WIDGET_TYPE_LINE_EDITOR, - WIDGET_TYPE_SEARCH_EDITOR, - WIDGET_TYPE_SCROLL_LIST, - WIDGET_TYPE_NAME_LIST, - WIDGET_TYPE_WEBBROWSER, - WIDGET_TYPE_SLIDER, // actually LLSliderCtrl - WIDGET_TYPE_SLIDER_BAR, // actually LLSlider - WIDGET_TYPE_VOLUME_SLIDER,//actually LLVolumeSliderCtrl - WIDGET_TYPE_MULTI_SLIDER, // actually LLMultiSliderCtrl - WIDGET_TYPE_MULTI_SLIDER_BAR, // actually LLMultiSlider - WIDGET_TYPE_SPINNER, - WIDGET_TYPE_TEXT_EDITOR, - WIDGET_TYPE_TEXTURE_PICKER, - WIDGET_TYPE_TEXT_BOX, - WIDGET_TYPE_PAD, // used in XML for positioning, not a real widget - WIDGET_TYPE_RADIO_GROUP, - WIDGET_TYPE_ICON, - WIDGET_TYPE_LANDMARK_PICKER, - WIDGET_TYPE_LOCATE, // used in XML for positioning, not a real widget - WIDGET_TYPE_VIEW_BORDER, // decorative border - WIDGET_TYPE_PANEL, - WIDGET_TYPE_MENU, - WIDGET_TYPE_PIE_MENU, - WIDGET_TYPE_PIE_MENU_BRANCH, - WIDGET_TYPE_MENU_ITEM, - WIDGET_TYPE_MENU_ITEM_SEPARATOR, - WIDGET_TYPE_MENU_SEPARATOR_VERTICAL, - WIDGET_TYPE_MENU_ITEM_CALL, - WIDGET_TYPE_MENU_ITEM_CHECK, - WIDGET_TYPE_MENU_ITEM_BRANCH, - WIDGET_TYPE_MENU_ITEM_BRANCH_DOWN, - WIDGET_TYPE_MENU_ITEM_BLANK, - WIDGET_TYPE_TEAROFF_MENU, - WIDGET_TYPE_MENU_BAR, - WIDGET_TYPE_TAB_CONTAINER, - WIDGET_TYPE_SCROLL_CONTAINER, // LLScrollableContainerView - WIDGET_TYPE_SCROLLBAR, - WIDGET_TYPE_INVENTORY_PANEL, // LLInventoryPanel - WIDGET_TYPE_FLOATER, - WIDGET_TYPE_DRAG_HANDLE_TOP, - WIDGET_TYPE_DRAG_HANDLE_LEFT, - WIDGET_TYPE_RESIZE_HANDLE, - WIDGET_TYPE_RESIZE_BAR, - WIDGET_TYPE_NAME_EDITOR, - WIDGET_TYPE_MULTI_FLOATER, - WIDGET_TYPE_MEDIA_REMOTE, - WIDGET_TYPE_FOLDER_VIEW, - WIDGET_TYPE_FOLDER_ITEM, - WIDGET_TYPE_FOLDER, - WIDGET_TYPE_STAT_GRAPH, - WIDGET_TYPE_STAT_VIEW, - WIDGET_TYPE_STAT_BAR, - WIDGET_TYPE_DROP_TARGET, - WIDGET_TYPE_TEXTURE_BAR, - WIDGET_TYPE_TEX_MEM_BAR, - WIDGET_TYPE_SNAPSHOT_LIVE_PREVIEW, - WIDGET_TYPE_STATUS_BAR, - WIDGET_TYPE_PROGRESS_VIEW, - WIDGET_TYPE_TALK_VIEW, - WIDGET_TYPE_OVERLAY_BAR, - WIDGET_TYPE_HUD_VIEW, - WIDGET_TYPE_HOVER_VIEW, - WIDGET_TYPE_MORPH_VIEW, - WIDGET_TYPE_NET_MAP, - WIDGET_TYPE_PERMISSIONS_VIEW, - WIDGET_TYPE_MENU_HOLDER, - WIDGET_TYPE_DEBUG_VIEW, - WIDGET_TYPE_SCROLLING_PANEL_LIST, - WIDGET_TYPE_AUDIO_STATUS, - WIDGET_TYPE_CONTAINER_VIEW, - WIDGET_TYPE_CONSOLE, - WIDGET_TYPE_FAST_TIMER_VIEW, - WIDGET_TYPE_VELOCITY_BAR, - WIDGET_TYPE_TEXTURE_VIEW, - WIDGET_TYPE_MEMORY_VIEW, - WIDGET_TYPE_FRAME_STAT_VIEW, - WIDGET_TYPE_LAYOUT_STACK, - WIDGET_TYPE_FLYOUT_BUTTON, - WIDGET_TYPE_DONTCARE, - WIDGET_TYPE_COUNT -} EWidgetType; - // FactoryPolicy is a static class that controls the creation and lookup of UI elements, // such as floaters. // The key parameter is used to provide a unique identifier and/or associated construction @@ -509,7 +411,7 @@ public: class LLUIImage : public LLRefCount { public: - LLUIImage(LLPointer image); + LLUIImage(const LLString& name, LLPointer image); void setClipRegion(const LLRectf& region); void setScaleRegion(const LLRectf& region); @@ -517,15 +419,29 @@ public: LLPointer getImage() { return mImage; } const LLPointer& getImage() const { return mImage; } - void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR) const; void draw(S32 x, S32 y, S32 width, S32 height, const LLColor4& color = UI_VERTEX_COLOR) const; + void draw(S32 x, S32 y, const LLColor4& color = UI_VERTEX_COLOR) const; + void draw(const LLRect& rect, const LLColor4& color = UI_VERTEX_COLOR) const { draw(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); } + void drawSolid(S32 x, S32 y, S32 width, S32 height, const LLColor4& color) const; - void drawSolid(S32 x, S32 y, const LLColor4& color) const; + void drawSolid(const LLRect& rect, const LLColor4& color) const { drawSolid(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color); } + void drawSolid(S32 x, S32 y, const LLColor4& color) const { drawSolid(x, y, mImage->getWidth(0), mImage->getHeight(0), color); } + + void drawBorder(S32 x, S32 y, S32 width, S32 height, const LLColor4& color, S32 border_width) const; + void drawBorder(const LLRect& rect, const LLColor4& color, S32 border_width) const { drawBorder(rect.mLeft, rect.mBottom, rect.getWidth(), rect.getHeight(), color, border_width); } + void drawBorder(S32 x, S32 y, const LLColor4& color, S32 border_width) const { drawBorder(x, y, mImage->getWidth(0), mImage->getHeight(0), color, border_width); } + + const LLString& getName() const { return mName; } S32 getWidth() const; S32 getHeight() const; + // returns dimensions of underlying textures, which might not be equal to ui image portion + S32 getTextureWidth() const; + S32 getTextureHeight() const; + protected: + LLString mName; LLRectf mScaleRegion; LLRectf mClipRegion; LLPointer mImage; @@ -533,6 +449,7 @@ protected: BOOL mNoClip; }; +typedef LLPointer LLUIImagePtr; template class LLTombStone : public LLRefCount @@ -667,6 +584,7 @@ private: LLRootHandle mHandle; }; + //RN: maybe this needs to moved elsewhere? class LLImageProviderInterface { @@ -674,8 +592,9 @@ public: LLImageProviderInterface() {}; virtual ~LLImageProviderInterface() {}; - virtual LLUIImage* getUIImageByID(const LLUUID& id, BOOL clamped = TRUE) = 0; - virtual LLImageGL* getImageByID(const LLUUID& id, BOOL clamped = TRUE) = 0; + virtual LLUIImagePtr getUIImage(const LLString& name) = 0; + virtual LLUIImagePtr getUIImageByID(const LLUUID& id) = 0; + virtual void cleanUp() = 0; }; #endif diff --git a/linden/indra/llui/lluictrl.cpp b/linden/indra/llui/lluictrl.cpp index 0e6c155..66504b7 100644 --- a/linden/indra/llui/lluictrl.cpp +++ b/linden/indra/llui/lluictrl.cpp @@ -34,7 +34,9 @@ #include "linden_common.h" #include "lluictrl.h" #include "llfocusmgr.h" +#include "llpanel.h" +static LLRegisterWidget r("ui_ctrl"); LLFocusableElement::LLFocusableElement() : mFocusLostCallback(NULL), @@ -473,7 +475,7 @@ BOOL LLUICtrl::focusPrevItem(BOOL text_fields_only) return focusPrev(result); } -const LLUICtrl* LLUICtrl::findRootMostFocusRoot() const +LLUICtrl* LLUICtrl::findRootMostFocusRoot() const { const LLUICtrl* focus_root = NULL; const LLUICtrl* next_view = this; @@ -485,7 +487,9 @@ const LLUICtrl* LLUICtrl::findRootMostFocusRoot() const } next_view = next_view->getParentUICtrl(); } - return focus_root; + // since focus_root could be this, need to cast away const to return + // a non-const result + return const_cast(focus_root); } @@ -538,14 +542,22 @@ LLXMLNodePtr LLUICtrl::getXML(bool save_children) const return node; } +//static +LLView* LLUICtrl::fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory) +{ + LLUICtrl* ctrl = new LLUICtrl(); + ctrl->initFromXML(node, parent); + return ctrl; +} + + // *NOTE: If other classes derive from LLPanel, they will need to be // added to this function. LLPanel* LLUICtrl::getParentPanel() const { LLView* parent = getParent(); - while (parent - && parent->getWidgetType() != WIDGET_TYPE_PANEL - && parent->getWidgetType() != WIDGET_TYPE_FLOATER) + LLPanel* parent_panel = dynamic_cast(parent); + while (!parent_panel) { parent = parent->getParent(); } diff --git a/linden/indra/llui/lluictrl.h b/linden/indra/llui/lluictrl.h index 0c43297..7bc5eeb 100644 --- a/linden/indra/llui/lluictrl.h +++ b/linden/indra/llui/lluictrl.h @@ -141,7 +141,9 @@ public: void setValidateBeforeCommit( BOOL(*cb)(LLUICtrl*, void*) ) { mValidateCallback = cb; } void setLostTopCallback( void (*cb)(LLUICtrl*, void*) ) { mLostTopCallback = cb; } - const LLUICtrl* findRootMostFocusRoot() const; + static LLView* fromXML(LLXMLNodePtr node, LLView* parent, class LLUICtrlFactory* factory); + + LLUICtrl* findRootMostFocusRoot() const; class LLTextInputFilter : public LLQueryFilter, public LLSingleton { diff --git a/linden/indra/llui/lluictrlfactory.cpp b/linden/indra/llui/lluictrlfactory.cpp index cfee76a..cc8135c 100644 --- a/linden/indra/llui/lluictrlfactory.cpp +++ b/linden/indra/llui/lluictrlfactory.cpp @@ -71,100 +71,6 @@ const char XML_HEADER[] = "\n"; -// *NOTE: If you add a new class derived from LLPanel, add a check for its -// widget type to LLUICtrl::getParentPanel(). -// *NOTE: This MUST match EWidgetType in llui.h -//static -const LLString LLUICtrlFactory::sUICtrlNames[WIDGET_TYPE_COUNT] = -{ - LLString("view"), //WIDGET_TYPE_VIEW - LLString("root_view"), //WIDGET_TYPE_ROOT_VIEW - LLString("floater_view"), //WIDGET_TYPE_FLOATER_VIEW - LLString("button"), //WIDGET_TYPE_BUTTON - LLString("joystick_turn"), //WIDGET_TYPE_JOYSTICK_TURN - LLString("joystick_slide"), //WIDGET_TYPE_JOYSTICK_SLIDE - LLString("check_box"), //WIDGET_TYPE_CHECKBOX - LLString("color_swatch"), //WIDGET_TYPE_COLOR_SWATCH - LLString("combo_box"), //WIDGET_TYPE_COMBO_BOX - LLString("line_editor"), //WIDGET_TYPE_LINE_EDITOR - LLString("search_editor"), //WIDGET_TYPE_SEARCH_EDITOR - LLString("scroll_list"), //WIDGET_TYPE_SCROLL_LIST - LLString("name_list"), //WIDGET_TYPE_NAME_LIST - LLString("web_browser"), //WIDGET_TYPE_WEBBROWSER - LLString("slider"), //WIDGET_TYPE_SLIDER, actually LLSliderCtrl - LLString("slider_bar"), //WIDGET_TYPE_SLIDER_BAR, actually LLSlider - LLString("volume_slider"), //WIDGET_TYPE_VOLUME_SLIDER, actually LLSlider + "volume" param - LLString("multi_slider"), //WIDGET_TYPE_MULTI_SLIDER, actually LLMultiSliderCtrl - LLString("multi_slider_bar"), //WIDGET_TYPE_MULTI_SLIDER_BAR, actually LLMultiSlider - LLString("spinner"), //WIDGET_TYPE_SPINNER, actually LLSpinCtrl - LLString("text_editor"), //WIDGET_TYPE_TEXT_EDITOR - LLString("texture_picker"),//WIDGET_TYPE_TEXTURE_PICKER - LLString("text"), //WIDGET_TYPE_TEXT_BOX - LLString("pad"), //WIDGET_TYPE_PAD - LLString("radio_group"), //WIDGET_TYPE_RADIO_GROUP - LLString("icon"), //WIDGET_TYPE_ICON - LLString("locate"), //WIDGET_TYPE_LOCATE - LLString("view_border"), //WIDGET_TYPE_VIEW_BORDER - LLString("panel"), //WIDGET_TYPE_PANEL - LLString("menu"), //WIDGET_TYPE_MENU - LLString("pie_menu"), //WIDGET_TYPE_PIE_MENU - LLString("pie_menu_branch"), //WIDGET_TYPE_PIE_MENU_BRANCH - LLString("menu_item"), //WIDGET_TYPE_MENU_ITEM - LLString("menu_item_separator"), //WIDGET_TYPE_MENU_ITEM_SEPARATOR - LLString("menu_separator_vertical"), // WIDGET_TYPE_MENU_SEPARATOR_VERTICAL - LLString("menu_item_call"), // WIDGET_TYPE_MENU_ITEM_CALL - LLString("menu_item_check"),// WIDGET_TYPE_MENU_ITEM_CHECK - LLString("menu_item_branch"), // WIDGET_TYPE_MENU_ITEM_BRANCH - LLString("menu_item_branch_down"), //WIDGET_TYPE_MENU_ITEM_BRANCH_DOWN, - LLString("menu_item_blank"), //WIDGET_TYPE_MENU_ITEM_BLANK, - LLString("tearoff_menu"), //WIDGET_TYPE_TEAROFF_MENU - LLString("menu_bar"), //WIDGET_TYPE_MENU_BAR - LLString("tab_container"),//WIDGET_TYPE_TAB_CONTAINER - LLString("scroll_container"),//WIDGET_TYPE_SCROLL_CONTAINER - LLString("scrollbar"), //WIDGET_TYPE_SCROLLBAR - LLString("inventory_panel"), //WIDGET_TYPE_INVENTORY_PANEL - LLString("floater"), //WIDGET_TYPE_FLOATER - LLString("drag_handle_top"), //WIDGET_TYPE_DRAG_HANDLE_TOP - LLString("drag_handle_left"), //WIDGET_TYPE_DRAG_HANDLE_LEFT - LLString("resize_handle"), //WIDGET_TYPE_RESIZE_HANDLE - LLString("resize_bar"), //WIDGET_TYPE_RESIZE_BAR - LLString("name_editor"), //WIDGET_TYPE_NAME_EDITOR - LLString("multi_floater"), //WIDGET_TYPE_MULTI_FLOATER - LLString("media_remote"), //WIDGET_TYPE_MEDIA_REMOTE - LLString("folder_view"), //WIDGET_TYPE_FOLDER_VIEW - LLString("folder_item"), //WIDGET_TYPE_FOLDER_ITEM - LLString("folder"), //WIDGET_TYPE_FOLDER - LLString("stat_graph"), //WIDGET_TYPE_STAT_GRAPH - LLString("stat_view"), //WIDGET_TYPE_STAT_VIEW - LLString("stat_bar"), //WIDGET_TYPE_STAT_BAR - LLString("drop_target"), //WIDGET_TYPE_DROP_TARGET - LLString("texture_bar"), //WIDGET_TYPE_TEXTURE_BAR - LLString("tex_mem_bar"), //WIDGET_TYPE_TEX_MEM_BAR - LLString("snapshot_live_preview"), //WIDGET_TYPE_SNAPSHOT_LIVE_PREVIEW - LLString("status_bar"), //WIDGET_TYPE_STATUS_BAR - LLString("progress_view"), //WIDGET_TYPE_PROGRESS_VIEW - LLString("talk_view"), //WIDGET_TYPE_TALK_VIEW - LLString("overlay_bar"), //WIDGET_TYPE_OVERLAY_BAR - LLString("hud_view"), //WIDGET_TYPE_HUD_VIEW - LLString("hover_view"), //WIDGET_TYPE_HOVER_VIEW - LLString("morph_view"), //WIDGET_TYPE_MORPH_VIEW - LLString("net_map"), //WIDGET_TYPE_NET_MAP - LLString("permissions_view"), //WIDGET_TYPE_PERMISSIONS_VIEW - LLString("menu_holder"), //WIDGET_TYPE_MENU_HOLDER - LLString("debug_view"), //WIDGET_TYPE_DEBUG_VIEW - LLString("scrolling_panel_list"), //WIDGET_TYPE_SCROLLING_PANEL_LIST - LLString("audio_status"), //WIDGET_TYPE_AUDIO_STATUS - LLString("container_view"), //WIDGET_TYPE_CONTAINER_VIEW - LLString("console"), //WIDGET_TYPE_CONSOLE - LLString("fast_timer_view"), //WIDGET_TYPE_FAST_TIMER_VIEW - LLString("velocity_bar"), //WIDGET_TYPE_VELOCITY_BAR - LLString("texture_view"), //WIDGET_TYPE_TEXTURE_VIEW - LLString("memory_view"), //WIDGET_TYPE_MEMORY_VIEW - LLString("frame_stat_view"), //WIDGET_TYPE_FRAME_STAT_VIEW - LLString("layout_stack"), //WIDGET_TYPE_LAYOUT_STACK - LLString("DONT_CARE"), //WIDGET_TYPE_DONTCARE -}; - const S32 HPAD = 4; const S32 VPAD = 4; const S32 FLOATER_H_MARGIN = 15; @@ -179,9 +85,6 @@ public: LLUICtrlLocate() : LLUICtrl("locate", LLRect(0,0,0,0), FALSE, NULL, NULL) { setTabStop(FALSE); } virtual void draw() { } - virtual EWidgetType getWidgetType() const { return WIDGET_TYPE_LOCATE; } - virtual LLString getWidgetTag() const { return LL_UI_CTRL_LOCATE_TAG; } - static LLView *fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) { LLString name("pad"); @@ -194,39 +97,14 @@ public: } }; +static LLRegisterWidget r1("locate"); +static LLRegisterWidget r2("pad"); + //----------------------------------------------------------------------------- // LLUICtrlFactory() //----------------------------------------------------------------------------- LLUICtrlFactory::LLUICtrlFactory() { - // Register controls - LLUICtrlCreator::registerCreator(LL_BUTTON_TAG, this); - LLUICtrlCreator::registerCreator(LL_CHECK_BOX_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_COMBO_BOX_TAG, this); - LLUICtrlCreator::registerCreator(LL_FLYOUT_BUTTON_TAG, this); - LLUICtrlCreator::registerCreator(LL_LINE_EDITOR_TAG, this); - LLUICtrlCreator::registerCreator(LL_SEARCH_EDITOR_TAG, this); - LLUICtrlCreator::registerCreator(LL_SCROLL_LIST_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_SLIDER_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_SLIDER_TAG, this); - LLUICtrlCreator::registerCreator(LL_VOLUME_SLIDER_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_MULTI_SLIDER_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_MULTI_SLIDER_TAG, this); - LLUICtrlCreator::registerCreator(LL_SPIN_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_TEXT_BOX_TAG, this); - LLUICtrlCreator::registerCreator(LL_RADIO_GROUP_TAG, this); - LLUICtrlCreator::registerCreator(LL_ICON_CTRL_TAG, this); - LLUICtrlCreator::registerCreator(LL_UI_CTRL_LOCATE_TAG, this); - LLUICtrlCreator::registerCreator(LL_PAD_TAG, this); - LLUICtrlCreator::registerCreator(LL_VIEW_BORDER_TAG, this); - LLUICtrlCreator::registerCreator(LL_TAB_CONTAINER_COMMON_TAG, this); - LLUICtrlCreator::registerCreator(LL_SCROLLABLE_CONTAINER_VIEW_TAG, this); - LLUICtrlCreator::registerCreator(LL_PANEL_TAG, this); - LLUICtrlCreator::registerCreator(LL_MENU_GL_TAG, this); - LLUICtrlCreator::registerCreator(LL_MENU_BAR_GL_TAG, this); - LLUICtrlCreator::registerCreator(LL_SCROLLING_PANEL_LIST_TAG, this); - LLUICtrlCreator::registerCreator(LL_LAYOUT_STACK_TAG, this); - setupPaths(); } @@ -548,43 +426,33 @@ void LLUICtrlFactory::rebuild() //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- -// static -EWidgetType LLUICtrlFactory::getWidgetType(const LLString& ctrl_type) -{ - U32 ctrl_id; - for (ctrl_id = 0; ctrl_id < WIDGET_TYPE_COUNT; ctrl_id++) - { - if (sUICtrlNames[ctrl_id] == ctrl_type) - { - break; - } - } - return (EWidgetType) ctrl_id; -} - -LLString LLUICtrlFactory::getWidgetType(EWidgetType ctrl_type) -{ - return sUICtrlNames[ctrl_type]; -} - LLView *LLUICtrlFactory::createCtrlWidget(LLPanel *parent, LLXMLNodePtr node) { + // panel for holding dummy widgets, so they have a parent for layout purposes, etc. + // does not manage lifetime of child widgets + static LLPanel dummy_panel; + LLString ctrl_type = node->getName()->mString; LLString::toLower(ctrl_type); - creator_list_t::const_iterator it = mCreatorFunctions.find(ctrl_type); - if (it == mCreatorFunctions.end()) + LLWidgetClassRegistry::factory_func_t func = LLWidgetClassRegistry::getInstance()->getCreatorFunc(ctrl_type); + + if (func == NULL) { llwarns << "Unknown control type " << ctrl_type << llendl; return NULL; } - LLView *ctrl = (*it->second)(node, parent, this); + if (parent == NULL) + { + parent = &dummy_panel; + } + LLView *ctrl = func(node, parent, this); return ctrl; } -void LLUICtrlFactory::createWidget(LLPanel *parent, LLXMLNodePtr node) +LLView* LLUICtrlFactory::createWidget(LLPanel *parent, LLXMLNodePtr node) { LLView* view = createCtrlWidget(parent, node); @@ -595,6 +463,8 @@ void LLUICtrlFactory::createWidget(LLPanel *parent, LLXMLNodePtr node) { parent->addChild(view, tab_group); } + + return view; } //----------------------------------------------------------------------------- @@ -648,138 +518,3 @@ BOOL LLUICtrlFactory::getAttributeColor(LLXMLNodePtr node, const LLString& name, return res; } -//============================================================================ - -LLButton* LLUICtrlFactory::getButtonByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLCheckBoxCtrl* LLUICtrlFactory::getCheckBoxByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLComboBox* LLUICtrlFactory::getComboBoxByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLIconCtrl* LLUICtrlFactory::getIconByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLLineEditor* LLUICtrlFactory::getLineEditorByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLRadioGroup* LLUICtrlFactory::getRadioGroupByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLScrollListCtrl* LLUICtrlFactory::getScrollListByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLSliderCtrl* LLUICtrlFactory::getSliderByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLSlider* LLUICtrlFactory::getSliderBarByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLSpinCtrl* LLUICtrlFactory::getSpinnerByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLTextBox* LLUICtrlFactory::getTextBoxByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLTextEditor* LLUICtrlFactory::getTextEditorByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLTabContainer* LLUICtrlFactory::getTabContainerByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLScrollableContainerView* LLUICtrlFactory::getScrollableContainerByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLPanel* LLUICtrlFactory::getPanelByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLMenuItemCallGL* LLUICtrlFactory::getMenuItemCallByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLScrollingPanelList* LLUICtrlFactory::getScrollingPanelList(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLMultiSliderCtrl* LLUICtrlFactory::getMultiSliderByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - -LLMultiSlider* LLUICtrlFactory::getMultiSliderBarByName(const LLPanel* panelp, const LLString& name) -{ - return panelp->getChild(name); -} - - -LLCtrlListInterface* LLUICtrlFactory::getListInterfaceByName(const LLPanel* panelp, const LLString& name) -{ - LLView* viewp = panelp->getCtrlByNameAndType(name, WIDGET_TYPE_DONTCARE); - if (viewp && viewp->isCtrl()) - { - return ((LLUICtrl*)viewp)->getListInterface(); - } - return NULL; -} - -LLCtrlSelectionInterface* LLUICtrlFactory::getSelectionInterfaceByName(const LLPanel* panelp, const LLString& name) -{ - LLView* viewp = panelp->getCtrlByNameAndType(name, WIDGET_TYPE_DONTCARE); - if (viewp && viewp->isCtrl()) - { - return ((LLUICtrl*)viewp)->getSelectionInterface(); - } - return NULL; -} - -LLCtrlScrollInterface* LLUICtrlFactory::getScrollInterfaceByName(const LLPanel* panelp, const LLString& name) -{ - LLView* viewp = panelp->getCtrlByNameAndType(name, WIDGET_TYPE_DONTCARE); - if (viewp && viewp->isCtrl()) - { - return ((LLUICtrl*)viewp)->getScrollInterface(); - } - return NULL; -} - -void LLUICtrlFactory::registerCreator(LLString ctrlname, creator_function_t function) -{ - LLString::toLower(ctrlname); - mCreatorFunctions[ctrlname] = function; -} - - diff --git a/linden/indra/llui/lluictrlfactory.h b/linden/indra/llui/lluictrlfactory.h index e6a2cd3..b9325a0 100644 --- a/linden/indra/llui/lluictrlfactory.h +++ b/linden/indra/llui/lluictrlfactory.h @@ -41,7 +41,7 @@ class LLView; class LLPanel; -class LLUICtrlFactory +class LLUICtrlFactory : public LLSingleton { public: LLUICtrlFactory(); @@ -49,7 +49,7 @@ public: virtual ~LLUICtrlFactory() {} void setupPaths(); - + void buildFloater(LLFloater* floaterp, const LLString &filename, const LLCallbackMap::map_t* factory_map = NULL, BOOL open = TRUE); BOOL buildPanel(LLPanel* panelp, const LLString &filename, @@ -65,84 +65,28 @@ public: // Returns 0 on success S32 saveToXML(LLView* viewp, const LLString& filename); - // Rebuilds all currently built panels. void rebuild(); - static EWidgetType getWidgetType(const LLString& ctrl_type); - static LLString getWidgetType(EWidgetType ctrl_type); static BOOL getAttributeColor(LLXMLNodePtr node, const LLString& name, LLColor4& color); - // specific typed getters - static class LLButton* getButtonByName( const LLPanel* panelp, const LLString& name); - static class LLCheckBoxCtrl* getCheckBoxByName( const LLPanel* panelp, const LLString& name); - static class LLComboBox* getComboBoxByName( const LLPanel* panelp, const LLString& name); - static class LLIconCtrl* getIconByName( const LLPanel* panelp, const LLString& name); - static class LLLineEditor* getLineEditorByName( const LLPanel* panelp, const LLString& name); - static class LLRadioGroup* getRadioGroupByName( const LLPanel* panelp, const LLString& name); - static class LLScrollListCtrl* getScrollListByName( const LLPanel* panelp, const LLString& name); - static class LLSliderCtrl* getSliderByName( const LLPanel* panelp, const LLString& name); - static class LLSlider* getSliderBarByName( const LLPanel* panelp, const LLString& name); - static class LLSpinCtrl* getSpinnerByName( const LLPanel* panelp, const LLString& name); - static class LLTextBox* getTextBoxByName( const LLPanel* panelp, const LLString& name); - static class LLTextEditor* getTextEditorByName( const LLPanel* panelp, const LLString& name); - static class LLTabContainer* getTabContainerByName( const LLPanel* panelp, const LLString& name); - static class LLScrollableContainerView* getScrollableContainerByName(const LLPanel* panelp, const LLString& name); - static class LLPanel* getPanelByName( const LLPanel* panelp, const LLString& name); - static class LLMenuItemCallGL* getMenuItemCallByName( const LLPanel* panelp, const LLString& name); - static class LLScrollingPanelList* getScrollingPanelList( const LLPanel* panelp, const LLString& name); - static class LLMultiSliderCtrl* getMultiSliderByName( const LLPanel* panelp, const LLString& name); - static class LLMultiSlider* getMultiSliderBarByName(const LLPanel* panelp, const LLString& name); - - // interface getters - static LLCtrlListInterface* getListInterfaceByName( const LLPanel* panelp, const LLString& name); - static LLCtrlSelectionInterface* getSelectionInterfaceByName(const LLPanel* panelp, const LLString& name); - static LLCtrlScrollInterface* getScrollInterfaceByName(const LLPanel* panelp, const LLString& name); - LLPanel* createFactoryPanel(LLString name); virtual LLView* createCtrlWidget(LLPanel *parent, LLXMLNodePtr node); - virtual void createWidget(LLPanel *parent, LLXMLNodePtr node); - - template T* createDummyWidget(const LLString& name) - { - return NULL; - //static LLPanel dummy_panel; - //LLXMLNodePtr new_node_ptr = new LLXMLNode(T::getWidgetTag(), FALSE); - //return createWidget(&dummy_panel, new_node_ptr); - } - - // Creator library - typedef LLView* (*creator_function_t)(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); - void registerCreator(LLString ctrlname, creator_function_t function); + virtual LLView* createWidget(LLPanel *parent, LLXMLNodePtr node); static bool getLayeredXMLNode(const LLString &filename, LLXMLNodePtr& root); -protected: - - template - class LLUICtrlCreator - { - public: - static void registerCreator(LLString name, LLUICtrlFactory *factory) - { - factory->registerCreator(name, T::fromXML); - } - }; - private: typedef std::map, LLString> built_panel_t; built_panel_t mBuiltPanels; + typedef std::map, LLString> built_floater_t; built_floater_t mBuiltFloaters; std::deque mFactoryStack; - static const LLString sUICtrlNames[]; - - typedef std::map creator_list_t; - creator_list_t mCreatorFunctions; static std::vector mXUIPaths; }; diff --git a/linden/indra/llui/llview.cpp b/linden/indra/llui/llview.cpp index e5415f8..c9828dd 100644 --- a/linden/indra/llui/llview.cpp +++ b/linden/indra/llui/llview.cpp @@ -49,7 +49,16 @@ #include "lluictrl.h" #include "llwindow.h" #include "v3color.h" +#include "lluictrlfactory.h" +// for ui edit hack +#include "llbutton.h" +#include "lllineeditor.h" +#include "lltexteditor.h" +#include "lltextbox.h" + +//HACK: this allows you to instantiate LLView from xml with "" which we don't want +static LLRegisterWidget r("view"); BOOL LLView::sDebugRects = FALSE; BOOL LLView::sDebugKeys = FALSE; @@ -153,6 +162,8 @@ LLView::~LLView() std::for_each(mFloaterControls.begin(), mFloaterControls.end(), DeletePairedPointer()); + std::for_each(mDummyWidgets.begin(), mDummyWidgets.end(), + DeletePairedPointer()); } // virtual @@ -716,7 +727,7 @@ BOOL LLView::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_scre tool_tip = getShowNamesToolTip(); } - BOOL showNamesTextBox = LLUI::sShowXUINames && (getWidgetType() == WIDGET_TYPE_TEXT_BOX); + BOOL showNamesTextBox = LLUI::sShowXUINames && dynamic_cast(this) != NULL; if( !handled && (blockMouseEvent(x, y) || showNamesTextBox) && !tool_tip.empty()) { @@ -741,23 +752,21 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) { BOOL handled = FALSE; - if( called_from_parent ) + if (getVisible() && getEnabled()) { - // Downward traversal - if (getVisible() && getEnabled()) + if( called_from_parent ) { + // Downward traversal handled = childrenHandleKey( key, mask ) != NULL; } - } - // JC: Must pass to disabled views, since they could have - // keyboard focus, which requires the escape key to exit. - if (!handled && getVisible()) - { - handled = handleKeyHere( key, mask, called_from_parent ); - if (handled && LLView::sDebugKeys) + if (!handled) { - llinfos << "Key handled by " << getName() << llendl; + handled = handleKeyHere( key, mask ); + if (handled && LLView::sDebugKeys) + { + llinfos << "Key handled by " << getName() << llendl; + } } } @@ -771,7 +780,7 @@ BOOL LLView::handleKey(KEY key, MASK mask, BOOL called_from_parent) // Called from handleKey() // Handles key in this object. Checking parents and children happens in handleKey() -BOOL LLView::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) +BOOL LLView::handleKeyHere(KEY key, MASK mask) { return FALSE; } @@ -780,25 +789,24 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) { BOOL handled = FALSE; - if( called_from_parent ) + if (getVisible() && getEnabled()) { - // Downward traversal - if (getVisible() && getEnabled()) + if( called_from_parent ) { + // Downward traversal handled = childrenHandleUnicodeChar( uni_char ) != NULL; } - } - if (!handled && getVisible()) - { - handled = handleUnicodeCharHere(uni_char, called_from_parent); - if (handled && LLView::sDebugKeys) + if (!handled) { - llinfos << "Unicode key handled by " << getName() << llendl; + handled = handleUnicodeCharHere(uni_char); + if (handled && LLView::sDebugKeys) + { + llinfos << "Unicode key handled by " << getName() << llendl; + } } } - if (!handled && !called_from_parent && mParentView) { // Upward traversal @@ -809,7 +817,7 @@ BOOL LLView::handleUnicodeChar(llwchar uni_char, BOOL called_from_parent) } -BOOL LLView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent ) +BOOL LLView::handleUnicodeCharHere(llwchar uni_char ) { return FALSE; } @@ -903,11 +911,14 @@ BOOL LLView::handleMouseDown(S32 x, S32 y, MASK mask) if (sEditingUI && handled_view) { // need to find leaf views, big hack - EWidgetType type = handled_view->getWidgetType(); - if (type == WIDGET_TYPE_BUTTON - || type == WIDGET_TYPE_LINE_EDITOR - || type == WIDGET_TYPE_TEXT_EDITOR - || type == WIDGET_TYPE_TEXT_BOX) + LLButton* buttonp = dynamic_cast(handled_view); + LLLineEditor* line_editorp = dynamic_cast(handled_view); + LLTextEditor* text_editorp = dynamic_cast(handled_view); + LLTextBox* text_boxp = dynamic_cast(handled_view); + if (buttonp + || line_editorp + || text_editorp + || text_boxp) { sEditingUIView = handled_view; } @@ -971,8 +982,10 @@ LLView* LLView::childrenHandleScrollWheel(S32 x, S32 y, S32 clicks) LLView* viewp = *child_it; S32 local_x = x - viewp->getRect().mLeft; S32 local_y = y - viewp->getRect().mBottom; - if (viewp->pointInView(local_x, local_y) && - viewp->handleScrollWheel( local_x, local_y, clicks )) + if (viewp->pointInView(local_x, local_y) + && viewp->getVisible() + && viewp->getEnabled() + && viewp->handleScrollWheel( local_x, local_y, clicks )) { if (sDebugMouseHandling) { @@ -1528,7 +1541,7 @@ BOOL LLView::hasAncestor(const LLView* parentp) const BOOL LLView::childHasKeyboardFocus( const LLString& childname ) const { - LLView *child = getChildByName(childname); + LLView *child = getChildView(childname, TRUE, FALSE); if (child) { return gFocusMgr.childHasKeyboardFocus(child); @@ -1543,16 +1556,17 @@ BOOL LLView::childHasKeyboardFocus( const LLString& childname ) const BOOL LLView::hasChild(const LLString& childname, BOOL recurse) const { - return getChildByName(childname, recurse) != NULL; + return getChildView(childname, recurse, FALSE) != NULL; } //----------------------------------------------------------------------------- -// getChildByName() +// getChildView() //----------------------------------------------------------------------------- -LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const +LLView* LLView::getChildView(const LLString& name, BOOL recurse, BOOL create_if_missing) const { - if(name.empty()) - return NULL; + //richard: should we allow empty names? + //if(name.empty()) + // return NULL; child_list_const_iter_t child_it; // Look for direct children *first* for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) @@ -1569,13 +1583,18 @@ LLView* LLView::getChildByName(const LLString& name, BOOL recurse) const for ( child_it = mChildList.begin(); child_it != mChildList.end(); ++child_it) { LLView* childp = *child_it; - LLView* viewp = childp->getChildByName(name, recurse); + LLView* viewp = childp->getChildView(name, recurse, FALSE); if ( viewp ) { return viewp; } } } + + if (create_if_missing) + { + return createDummyWidget(name); + } return NULL; } @@ -1692,7 +1711,6 @@ BOOL LLView::translateIntoRect(const LLRect& constraint, BOOL allow_partial_outs if( getRect().mLeft + KEEP_ONSCREEN_PIXELS > constraint.mRight ) { delta_x = constraint.mRight - (getRect().mLeft + KEEP_ONSCREEN_PIXELS); - delta_x += llmax( 0, getRect().getWidth() - constraint.getWidth() ); } if( getRect().mTop > constraint.mTop ) @@ -1703,7 +1721,6 @@ BOOL LLView::translateIntoRect(const LLRect& constraint, BOOL allow_partial_outs if( getRect().mTop - KEEP_ONSCREEN_PIXELS < constraint.mBottom ) { delta_y = constraint.mBottom - (getRect().mTop - KEEP_ONSCREEN_PIXELS); - delta_y -= llmax( 0, getRect().getHeight() - constraint.getHeight() ); } } else @@ -1716,6 +1733,7 @@ BOOL LLView::translateIntoRect(const LLRect& constraint, BOOL allow_partial_outs if( getRect().mRight > constraint.mRight ) { delta_x = constraint.mRight - getRect().mRight; + // compensate for left edge possible going off screen delta_x += llmax( 0, getRect().getWidth() - constraint.getWidth() ); } @@ -1727,6 +1745,7 @@ BOOL LLView::translateIntoRect(const LLRect& constraint, BOOL allow_partial_outs if( getRect().mBottom < constraint.mBottom ) { delta_y = constraint.mBottom - getRect().mBottom; + // compensate for top edge possible going off screen delta_y -= llmax( 0, getRect().getHeight() - constraint.getHeight() ); } } @@ -1832,9 +1851,8 @@ BOOL LLView::localRectToOtherView( const LLRect& local, LLRect* other, LLView* o // virtual LLXMLNodePtr LLView::getXML(bool save_children) const { - const LLString& type_name = getWidgetTag(); - - LLXMLNodePtr node = new LLXMLNode(type_name, FALSE); + //FIXME: need to provide actual derived type tag, probably outside this method + LLXMLNodePtr node = new LLXMLNode("view", FALSE); node->createChild("name", TRUE)->setStringValue(getName()); node->createChild("width", TRUE)->setIntValue(getRect().getWidth()); @@ -1897,6 +1915,14 @@ LLXMLNodePtr LLView::getXML(bool save_children) const return node; } +//static +LLView* LLView::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory) +{ + LLView* viewp = new LLView(); + viewp->initFromXML(node, parent); + return viewp; +} + // static void LLView::addColorXML(LLXMLNodePtr node, const LLColor4& color, const LLString& xml_name, const LLString& control_name) @@ -2426,16 +2452,7 @@ LLSimpleListener* LLView::getListenerByName(const LLString& callback_name) return callback; } -void LLView::addListenerToControl(LLEventDispatcher *dispatcher, const LLString& name, LLSD filter, LLSD userdata) -{ - LLSimpleListener* listener = getListenerByName(name); - if (listener) - { - dispatcher->addListener(listener, filter, userdata); - } -} - -LLControlBase *LLView::findControl(LLString name) +LLControlVariable *LLView::findControl(LLString name) { control_map_t::iterator itor = mFloaterControls.find(name); if (itor != mFloaterControls.end()) @@ -2791,9 +2808,15 @@ LLFontGL::StyleFlags LLView::selectFontStyle(LLXMLNodePtr node) return gl_font_style; } -void LLView::setControlValue(const LLSD& value) +bool LLView::setControlValue(const LLSD& value) { - LLUI::sConfigGroup->setValue(getControlName(), value); + LLString ctrlname = getControlName(); + if (!ctrlname.empty()) + { + LLUI::sConfigGroup->setValue(ctrlname, value); + return true; + } + return false; } //virtual @@ -2804,43 +2827,57 @@ void LLView::setControlName(const LLString& control_name, LLView *context) context = this; } - // Unregister from existing listeners if (!mControlName.empty()) { - clearDispatchers(); + llwarns << "setControlName called twice on same control!" << llendl; + mControlConnection.disconnect(); // disconnect current signal + mControlName.clear(); } - + // Register new listener if (!control_name.empty()) { - LLControlBase *control = context->findControl(control_name); + LLControlVariable *control = context->findControl(control_name); if (control) { mControlName = control_name; - LLSD state = control->registerListener(this, "DEFAULT"); - setValue(state); + mControlConnection = control->getSignal()->connect(boost::bind(&controlListener, _1, getHandle(), std::string("value"))); + setValue(control->getValue()); } } } -// virtual -bool LLView::handleEvent(LLPointer event, const LLSD& userdata) +// static +bool LLView::controlListener(const LLSD& newvalue, LLHandle handle, std::string type) { - if (userdata.asString() == "DEFAULT" && event->desc() == "value_changed") + LLView* view = handle.get(); + if (view) { - LLSD state = event->getValue(); - setValue(state); - return TRUE; + if (type == "value") + { + view->setValue(newvalue); + return true; + } + else if (type == "enabled") + { + view->setEnabled(newvalue.asBoolean()); + return true; + } + else if (type == "visible") + { + view->setVisible(newvalue.asBoolean()); + return true; + } } - return FALSE; + return false; } void LLView::addBoolControl(LLString name, bool initial_value) { - mFloaterControls[name] = new LLControl(name, TYPE_BOOLEAN, initial_value, "Internal floater control"); + mFloaterControls[name] = new LLControlVariable(name, TYPE_BOOLEAN, initial_value, "Internal floater control"); } -LLControlBase *LLView::getControl(LLString name) +LLControlVariable *LLView::getControl(LLString name) { control_map_t::iterator itor = mFloaterControls.find(name); if (itor != mFloaterControls.end()) @@ -2860,3 +2897,41 @@ LLSD LLView::getValue() const { return LLSD(); } + +LLView* LLView::createWidget(LLXMLNodePtr xml_node) const +{ + // forward requests to ui ctrl factory + return LLUICtrlFactory::getInstance()->createCtrlWidget(NULL, xml_node); +} + +// +// LLWidgetClassRegistry +// + +LLWidgetClassRegistry::LLWidgetClassRegistry() +{ +} + +void LLWidgetClassRegistry::registerCtrl(const LLString& tag, LLWidgetClassRegistry::factory_func_t function) +{ + LLString lower_case_tag = tag; + LLString::toLower(lower_case_tag); + + mCreatorFunctions[lower_case_tag] = function; +} + +BOOL LLWidgetClassRegistry::isTagRegistered(const LLString &tag) +{ + return mCreatorFunctions.find(tag) != mCreatorFunctions.end(); +} + +LLWidgetClassRegistry::factory_func_t LLWidgetClassRegistry::getCreatorFunc(const LLString& ctrl_type) +{ + factory_map_t::const_iterator found_it = mCreatorFunctions.find(ctrl_type); + if (found_it == mCreatorFunctions.end()) + { + return NULL; + } + return found_it->second; +} + diff --git a/linden/indra/llui/llview.h b/linden/indra/llui/llview.h index 51c314a..9a04ed7 100644 --- a/linden/indra/llui/llview.h +++ b/linden/indra/llui/llview.h @@ -52,7 +52,6 @@ #include "stdenums.h" #include "lluistring.h" - const U32 FOLLOWS_NONE = 0x00; const U32 FOLLOWS_LEFT = 0x01; const U32 FOLLOWS_RIGHT = 0x02; @@ -65,7 +64,6 @@ const BOOL NOT_MOUSE_OPAQUE = FALSE; const U32 GL_NAME_UI_RESERVED = 2; - /* // virtual functions defined in LLView: @@ -120,9 +118,7 @@ virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,EDragAndDropTy * virtual void draw(); * -virtual EWidgetType getWidgetType() const = 0; - * -virtual LLString getWidgetTag() const = 0; + * virtual LLXMLNodePtr getXML(bool save_children = true) const; * @@ -132,7 +128,7 @@ virtual void onFocusLost() {} LLUICtrl, LLScrollListCtrl, LLMenuGL, LLLineEditor, LLComboBox virtual void onFocusReceived() {} LLUICtrl, LLTextEditor, LLScrollListVtrl, LLMenuGL, LLLineEditor -virtual LLView* getChildByName(const LLString& name, BOOL recurse = FALSE) const; +virtual LLView* getChildView(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; LLTabContainer, LLPanel, LLMenuGL virtual void setControlName(const LLString& control, LLView *context); LLSliderCtrl, LLCheckBoxCtrl @@ -144,13 +140,72 @@ virtual void setValue(const LLSD& value); * protected: -virtual BOOL handleKeyHere(KEY key, MASK mask, BOOL called_from_parent); +virtual BOOL handleKeyHere(KEY key, MASK mask); * -virtual BOOL handleUnicodeCharHere(llwchar uni_char, BOOL called_from_parent); +virtual BOOL handleUnicodeCharHere(llwchar uni_char); * */ -class LLView : public LLMouseHandler, public LLMortician, public LLSimpleListenerObservable +class LLUICtrlFactory; + +// maps xml strings to widget classes +class LLWidgetClassRegistry : public LLSingleton +{ + friend class LLSingleton; +public: + typedef LLView* (*factory_func_t)(LLXMLNodePtr node, LLView *parent, LLUICtrlFactory *factory); + typedef std::map factory_map_t; + + void registerCtrl(const LLString& xml_tag, factory_func_t function); + BOOL isTagRegistered(const LLString& xml_tag); + factory_func_t getCreatorFunc(const LLString& xml_tag); + + // get (first) xml tag for a given class + template std::string getTag() + { + factory_map_t::iterator it; + for(it = mCreatorFunctions.begin(); it != mCreatorFunctions.end(); ++it) + { + if (it->second == T::fromXML) + { + return it->first; + } + } + + return ""; + } + +private: + LLWidgetClassRegistry(); + virtual ~LLWidgetClassRegistry() {}; + + typedef std::set ctrl_name_set_t; + ctrl_name_set_t mUICtrlNames; + + // map of xml tags to widget creator functions + factory_map_t mCreatorFunctions; +}; + +template +class LLRegisterWidget +{ +public: + LLRegisterWidget(const std::string& tag) + { + LLWidgetClassRegistry* registry = LLWidgetClassRegistry::getInstance(); + if (registry->isTagRegistered(tag)) + { + //error! + llerrs << "Widget named " << tag << " already registered!" << llendl; + } + else + { + registry->registerCtrl(tag, T::fromXML); + } + } +}; + +class LLView : public LLMouseHandler, public LLMortician { public: @@ -294,7 +349,6 @@ public: LLHandle getHandle() { mHandle.bind(this); return mHandle; } - U32 getFollows() const { return mReshapeFlags; } BOOL followsLeft() const { return mReshapeFlags & FOLLOWS_LEFT; } BOOL followsRight() const { return mReshapeFlags & FOLLOWS_RIGHT; } @@ -355,10 +409,9 @@ public: virtual void draw(); - virtual EWidgetType getWidgetType() const = 0; - virtual LLString getWidgetTag() const = 0; virtual LLXMLNodePtr getXML(bool save_children = true) const; - + //FIXME: make LLView non-instantiable from XML + static LLView* fromXML(LLXMLNodePtr node, LLView *parent, class LLUICtrlFactory *factory); virtual void initFromXML(LLXMLNodePtr node, LLView* parent); void parseFollowsFlags(LLXMLNodePtr node); @@ -393,13 +446,13 @@ public: void addListenerToControl(LLEventDispatcher *observer, const LLString& name, LLSD filter, LLSD userdata); void addBoolControl(LLString name, bool initial_value); - LLControlBase *getControl(LLString name); - LLControlBase *findControl(LLString name); + LLControlVariable *getControl(LLString name); + LLControlVariable *findControl(LLString name); - void setControlValue(const LLSD& value); + bool setControlValue(const LLSD& value); virtual void setControlName(const LLString& control, LLView *context); virtual LLString getControlName() const { return mControlName; } - virtual bool handleEvent(LLPointer event, const LLSD& userdata); +// virtual bool handleEvent(LLPointer event, const LLSD& userdata); virtual void setValue(const LLSD& value); virtual LLSD getValue() const; @@ -422,17 +475,74 @@ public: /*virtual*/ void screenPointToLocal(S32 screen_x, S32 screen_y, S32* local_x, S32* local_y) const; /*virtual*/ void localPointToScreen(S32 local_x, S32 local_y, S32* screen_x, S32* screen_y) const; - template T* getChild(const LLString& name, BOOL recurse = TRUE) const + template T* getChild(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const { - T* result = dynamic_cast(getChildByName(name, TRUE)); - //if (!result) - //{ - // // create dummy widget instance here - // result = gUICtrlFactory->createDummyWidget(name); - //} + LLView* child = getChildView(name, recurse, FALSE); + T* result = dynamic_cast(child); + if (!result) + { + // did we find *something* with that name? + if (child) + { + llwarns << "Found child named " << name << " but of wrong type" << llendl; + } + if (create_if_missing) + { + // create dummy widget instance here + result = createDummyWidget(name); + } + } return result; } + virtual LLView* getChildView(const LLString& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; + + template T* createDummyWidget(const LLString& name) const + { + T* widget = getDummyWidget(name); + if (!widget) + { + // get xml tag name corresponding to requested widget type (e.g. "button") + LLString xml_tag = LLWidgetClassRegistry::getInstance()->getTag(); + if (xml_tag.empty()) + { + llwarns << "No xml tag registered for this class " << llendl; + return NULL; + } + // create dummy xml node (