Merge branch 'master' of github.com:Beeks/Ascent

Conflicts:
	indra/newview/CMakeLists.txt
This commit is contained in:
Beeks
2010-08-29 14:43:08 -04:00
21 changed files with 3429 additions and 1375 deletions

View File

@@ -656,7 +656,7 @@ class WindowsSetup(PlatformSetup):
continue
vstool_cmd = (os.path.join('tools','vstool','VSTool.exe') +
' --solution ' +
os.path.join(build_dir,'SecondLife.sln') +
os.path.join(build_dir,'Ascent.sln') +
' --config ' + self.build_type +
' --startup secondlife-bin')
print 'Running %r in %r' % (vstool_cmd, getcwd())

View File

@@ -55,7 +55,8 @@ LLCharacter::LLCharacter()
mPreferredPelvisHeight( 0.f ),
mSex( SEX_FEMALE ),
mAppearanceSerialNum( 0 ),
mSkeletonSerialNum( 0 )
mSkeletonSerialNum( 0 ),
mInAppearance( false )
{
mMotionController.setCharacter( this );
sInstances.push_back(this);

View File

@@ -253,6 +253,10 @@ public:
ESex getSex() { return mSex; }
void setSex( ESex sex ) { mSex = sex; }
// set appearance flag
void setAppearanceFlag( bool flag ) { mInAppearance = flag; }
bool getAppearanceFlag() { return mInAppearance; }
U32 getAppearanceSerialNum() const { return mAppearanceSerialNum; }
void setAppearanceSerialNum( U32 num ) { mAppearanceSerialNum = num; }
@@ -272,7 +276,7 @@ protected:
U32 mAppearanceSerialNum;
U32 mSkeletonSerialNum;
LLAnimPauseRequest mPauseRequest;
BOOL mInAppearance;
private:
// visual parameter stuff

View File

@@ -115,6 +115,8 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
//
if (!base.getData()) return FALSE;
if (!base.getDataSize()) return FALSE;
if (!raw_image.getData()) return FALSE;
if (!raw_image.getDataSize()) return FALSE;
LLTimer decode_timer;
@@ -156,6 +158,7 @@ BOOL LLImageJ2COJ::decodeImpl(LLImageJ2C &base, LLImageRaw &raw_image, F32 decod
/* decode the stream and fill the image structure */
if (!cio) return FALSE;
if (cio->bp == NULL) return FALSE;
if (!dinfo) return FALSE;
image = opj_decode(dinfo, cio);
@@ -463,9 +466,10 @@ BOOL LLImageJ2COJ::getMetadata(LLImageJ2C &base)
/* open a byte stream */
cio = opj_cio_open((opj_common_ptr)dinfo, base.getData(), base.getDataSize());
/* decode the stream and fill the image structure */
if (!cio) return FALSE;
if (cio->bp == NULL) return FALSE;
if (!dinfo) return FALSE;
image = opj_decode(dinfo, cio);

View File

@@ -65,6 +65,10 @@ include_directories(
set(viewer_SOURCE_FILES
ascentuploadbrowser.cpp
dhparam.cpp
dsaparam.cpp
emerald.cpp
emeraldboobutils.cpp
dofloaterhex.cpp
dohexeditor.cpp
floatersculptpreview.cpp
@@ -510,6 +514,8 @@ set(viewer_HEADER_FILES
CMakeLists.txt
ViewerInstall.cmake
ascentuploadbrowser.h
emerald.h
emeraldboobutils.h
dofloaterhex.h
dohexeditor.h
floatersculptpreview.h

View File

@@ -0,0 +1,647 @@
<llsd>
<map>
<key>8873757c-092a-98fb-1afd-ecd347566fcd</key>
<map>
<key>color</key>
<array>
<real>0.0375</real>
<real>1</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Ascent</string>
</map>
<key>f12457b5-762e-52a7-efad-8f17f3b022ee</key>
<map>
<key>color</key>
<array>
<real>0.69999999999999996</real>
<real>0.80000000000000004</real>
<real>1.6000000238418579</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Anti-Life</string>
</map>
<key>0f6723d2-5b23-6b58-08ab-308112b33786</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>CryoLife</string>
</map>
<key>e52d21f7-3c8b-819f-a3db-65c432295dac</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>CryoLife</string>
</map>
<key>d0091f21-1eef-a4ad-b358-249a8e5432ea</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>CryoLife</string>
</map>
<key>7c4d47a3-0c51-04d1-fa47-e4f3ac12f59b</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>CryoLife</string>
</map>
<key>8183e823-c443-2142-6eb6-2ab763d4f81c</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Day Oh proxy</string>
</map>
<key>emeraldTags</key>
<map>
<key>Blue</key>
<string>4eb67510-0924-ebb1-50ca-8af5694cd267</string>
<key>Default</key>
<string>bf33bd15-7020-cce1-3725-48923440b7ee</string>
<key>Fuchsia</key>
<string>e4117c3f-cc02-d537-665d-c31b8c11bb18</string>
<key>Green</key>
<string>ccda2b3b-e72c-a112-e126-fee238b67218</string>
<key>Orange</key>
<string>e741e2bf-cf8c-191c-97f2-b2709a843dfc</string>
<key>Pink</key>
<string>072343d0-1ce9-0952-4106-5312af4a789a</string>
<key>Purple</key>
<string>0ae2f973-98c1-a4e8-9f4b-9db2044ab079</string>
<key>Red</key>
<string>1da8eb54-a70f-bd4a-77e5-c7b815c3b2a2</string>
<key>Violet</key>
<string>602243f4-8fb1-ac00-d5bc-7ab50c4433b7</string>
<key>White</key>
<string>1e0948ab-706a-b309-434c-a694436a79be</string>
<key>Yellow</key>
<string>8078ffb3-840c-d037-caf3-5cd02c2e7040</string>
</map>
<key>072343d0-1ce9-0952-4106-5312af4a789a</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>1</real>
<real>1.6000000000000001</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>0ae2f973-98c1-a4e8-9f4b-9db2044ab079</key>
<map>
<key>color</key>
<array>
<real>1.2</real>
<real>0.40000000000000002</real>
<real>1.6000000000000001</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>1da8eb54-a70f-bd4a-77e5-c7b815c3b2a2</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>0</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>1e0948ab-706a-b309-434c-a694436a79be</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>4eb67510-0924-ebb1-50ca-8af5694cd267</key>
<map>
<key>color</key>
<array>
<real>0.34999999999999998</real>
<real>0.34999999999999998</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>602243f4-8fb1-ac00-d5bc-7ab50c4433b7</key>
<map>
<key>color</key>
<array>
<real>0.5</real>
<real>0</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>8078ffb3-840c-d037-caf3-5cd02c2e7040</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>bf33bd15-7020-cce1-3725-48923440b7ee</key>
<map>
<key>color</key>
<array>
<real>0.97999999999999998</real>
<real>0.68999999999999995</real>
<real>0.34000000000000002</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>ccda2b3b-e72c-a112-e126-fee238b67218</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>e4117c3f-cc02-d537-665d-c31b8c11bb18</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>0</real>
<real>2</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>e741e2bf-cf8c-191c-97f2-b2709a843dfc</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>0.5</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Emerald</string>
</map>
<key>734fed29-4c51-63e5-1648-6589949d7585</key>
<map>
<key>color</key>
<array>
<real>0.6</real>
<real>0.42745</real>
<real>0.80784</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Explicit</string>
</map>
<key>1c29480c-c608-df87-28bb-964fb64c5366</key>
<map>
<key>color</key>
<array>
<real>1.6000000238418579</real>
<real>1.6000000238418579</real>
<real>0.80000001192092896</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Gemini</string>
</map>
<key>4da16427-d81e-e816-f346-aaf4741b8056</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>2</real>
<real>2</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>iLife</string>
</map>
<key>cc7a030f-282f-c165-44d2-b5ee572e72bf</key>
<map>
<key>color</key>
<array>
<real>6.2999999999999998</real>
<real>3.5</real>
<real>7</real>
<real>1</real>
</array>
<key>multiple</key>
<real>8</real>
<key>name</key>
<string>Imprudence</string>
</map>
<key>5aa5c70d-d787-571b-0495-4fc1bdef1500</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>0</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>LGG proxy</string>
</map>
<key>2a9a406c-f448-68f2-4e38-878f8c46c190</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>0.89999997615814209</real>
<real>0.69999998807907104</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Meerkat</string>
</map>
<key>b6820989-bf42-ff59-ddde-fd3fd3a74fe4</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>0.89999997615814209</real>
<real>0.69999998807907104</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Meerkat</string>
</map>
<key>0bcd5f5d-a4ce-9ea4-f9e8-15132653b3d8</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>1</real>
<real>1.6000000238418579</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>MoyMix</string>
</map>
<key>9ba526b6-f43d-6b60-42de-ce62a25ee7fb</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>1</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>nolife</string>
</map>
<key>77662f23-c77a-9b4d-5558-26b757b2144c</key>
<map>
<key>color</key>
<array>
<real>0.60000002384185791</real>
<real>0.20000000298023224</real>
<real>0.80000001192092896</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>PSL</string>
</map>
<key>d95e0d9a-4d40-ea1b-a054-8db87f583f58</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>NeilLife</string>
</map>
<key>e6f9c019-8783-dc3e-b265-41f1510333fc</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>NeilLife</string>
</map>
<key>f5a48821-9a98-d09e-8d6a-50cc08ba9a47</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>NeilLife</string>
</map>
<key>f5feab57-bde5-2074-97af-517290213eaa</key>
<map>
<key>color</key>
<array>
<real>2</real>
<real>2</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>NeilLife</string>
</map>
<key>f3fd74a6-fee7-4b2f-93ae-ddcb5991da04</key>
<map>
<key>color</key>
<array>
<real>0.60000002384185791</real>
<real>0.20000000298023224</real>
<real>0.80000001192092896</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>PSL</string>
</map>
<key>d3eb4a5f-aec5-4bcb-b007-cce9efe89d37</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.60000002384185791</real>
<real>0</real>
<real>2</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>rivlife</string>
</map>
<key>ccb509cf-cc69-e569-38f1-5086c687afd1</key>
<map>
<key>color</key>
<array>
<real>1.6000000238418579</real>
<real>0.20000000298023224</real>
<real>0.80000001192092896</real>
<real>2</real>
</array>
<key>multiple</key>
<real>2</real>
<key>name</key>
<string>Ruby</string>
</map>
<key>872c0005-3095-0967-866d-11cd71115c22</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>1</real>
<real>2</real>
<real>3</real>
</array>
<key>multiple</key>
<real>3</real>
<key>name</key>
<string>Simfed</string>
</map>
<key>11ad2452-ce54-8d65-7c23-05589b59f516</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.5</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VerticalLife</string>
</map>
<key>e734563e-1c31-2a35-3ed5-8552c807439f</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.5</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VerticalLife</string>
</map>
<key>3ab7e2fa-9572-ef36-1a30-d855dbea4f92</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.5</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VerticalLife</string>
</map>
<key>58a8b7ec-1455-7162-5d96-d3c3ead2ed71</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.5</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VerticalLife</string>
</map>
<key>841ef25b-3b90-caf9-ea3d-5649e755db65</key>
<map>
<key>color</key>
<array>
<real>0</real>
<real>0.5</real>
<real>1</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VerticalLife</string>
</map>
<key>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>0.55000000000000004</real>
<real>0.75</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>Viewer 2.0</string>
</map>
<key>c252d89d-6f7c-7d90-f430-d140d2e3fbbe</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>0</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>1</real>
<key>name</key>
<string>VLife</string>
</map>
<key>c58fca06-33b3-827d-d81c-a886a631affc</key>
<map>
<key>color</key>
<array>
<real>1</real>
<real>0.61175999999999997</real>
<real>0</real>
<real>1</real>
</array>
<key>multiple</key>
<real>0</real>
<key>name</key>
<string>Whale</string>
</map>
<key>isComplete</key>
<string>true</string>
</map>
</llsd>

View File

@@ -114,6 +114,94 @@
<integer>0</integer>
</map>
<!-- Ascent-Specific Settings -->
<key>EmeraldBoobMass</key>
<map>
<key>Comment</key>
<string>Mass of boobs.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>54.0</real>
</map>
<key>EmeraldBoobHardness</key>
<map>
<key>Comment</key>
<string>Hardness (dampening) of boobs.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>51</real>
</map>
<key>EmeraldBreastPhysicsToggle</key>
<map>
<key>Comment</key>
<string>Enables/Disables breast physics</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>EmeraldBreastSportsBra</key>
<map>
<key>Comment</key>
<string>allows disabling the physics for 1 av, in case their outfit looks wrong with it on</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>EmeraldBoobVelMax</key>
<map>
<key>Comment</key>
<string>Max amount of velocity boobs can have</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>64</real>
</map>
<key>EmeraldBoobFriction</key>
<map>
<key>Comment</key>
<string>Internal friction (brings boobs to rest). Shouldn't ever be above 1.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>80</real>
</map>
<key>EmeraldBoobVelMin</key>
<map>
<key>Comment</key>
<string>Friction Fraction of FPS (used to keep friction uniform through FPS change).</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>24</real>
</map>
<key>EmeraldBoobXYInfluence</key>
<map>
<key>Comment</key>
<string>Amount of influence along the X and Y planes.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>0.1</real>
</map>
<key>AscentCmdLine</key>
<map>
<key>Comment</key>

42
indra/newview/dhparam.cpp Normal file
View File

@@ -0,0 +1,42 @@
/* Generated using openssl */
#include "llviewerprecompiledheaders.h"
#include <openssl/dh.h>
DH *get_dh2048()
{
static unsigned char dh2048_p[]={
0xAC,0x31,0xAA,0xFD,0x76,0x1B,0x47,0x24,0x99,0x6D,0xF8,0xD5,
0x5B,0x4B,0xD1,0x7E,0xF9,0x1A,0x41,0xF6,0x29,0xCC,0xA9,0x02,
0x6B,0xED,0xFD,0xC9,0x37,0xCE,0xF6,0x11,0x78,0x6F,0x37,0x38,
0x7D,0x49,0x3F,0x78,0x36,0x83,0x0A,0x6F,0xBA,0x6F,0x74,0xD9,
0xB1,0xC1,0xC4,0x5A,0x7D,0x84,0x26,0x56,0x8B,0x53,0xF4,0xFE,
0xD1,0x34,0xF1,0xE0,0x08,0x65,0xA6,0xFD,0xDB,0x5D,0xAC,0x14,
0xCD,0xC9,0x7E,0x79,0xE9,0x3B,0xAF,0x92,0xC7,0x4D,0x91,0x15,
0x0B,0x1E,0x2F,0x0A,0x56,0x4E,0x0D,0x3A,0x4D,0x9E,0xB0,0xB5,
0xFC,0x0D,0xB1,0x55,0x40,0xC6,0x30,0x99,0xCD,0xE8,0x7E,0x72,
0x08,0x93,0x9C,0x7F,0x55,0x23,0x27,0x09,0xF4,0x50,0xF2,0x96,
0xB5,0x30,0x35,0x6A,0x99,0x4C,0xD6,0x85,0x72,0x8D,0x9C,0x19,
0x70,0x9A,0x77,0x52,0xE8,0x33,0x03,0x7A,0x00,0xDA,0xFE,0xD7,
0x98,0xD0,0x7B,0x26,0xBA,0xD7,0xFF,0xD1,0x49,0x61,0x27,0x3E,
0xFC,0x12,0x81,0xC9,0xB0,0xAF,0x34,0x14,0x97,0x66,0xFB,0xEF,
0xD3,0xFE,0xC9,0x01,0x25,0xEC,0xF4,0xE8,0xA8,0xD8,0x21,0x45,
0x20,0x6F,0xFC,0xA8,0xB3,0xCE,0xCF,0x0D,0xA1,0x14,0xCC,0x38,
0x81,0x74,0x6A,0x5E,0x36,0x09,0x1D,0xBE,0x4C,0x08,0x52,0x5E,
0xC2,0x5F,0xA4,0x48,0x3A,0x71,0x85,0xF2,0x97,0x32,0xEC,0x3B,
0xFB,0x1B,0x9A,0x8A,0x4B,0x20,0x32,0xFE,0x6A,0x94,0x4C,0x02,
0xB2,0xD7,0xC3,0x1B,0xF8,0x90,0x54,0x76,0x70,0x49,0x81,0x86,
0x30,0x12,0xD2,0x91,0xF0,0xFD,0x1B,0x53,0x2E,0x60,0x13,0x78,
0x8B,0x3F,0x1B,0x13,
};
static unsigned char dh2048_g[]={
0x05,
};
DH *dh;
if ((dh=DH_new()) == NULL) return(NULL);
dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
if ((dh->p == NULL) || (dh->g == NULL))
{ DH_free(dh); return(NULL); }
return(dh);
}

View File

@@ -0,0 +1,69 @@
/* Generated using openssl */
#include "llviewerprecompiledheaders.h"
#include <openssl/dsa.h>
static unsigned char dsa2048_p[]={
0xD4,0x63,0x93,0xFA,0x69,0x87,0xDB,0x60,0x68,0xFB,0xCC,0x8F,
0x55,0x85,0x7A,0xAC,0xAD,0x1F,0x8E,0xF0,0x2C,0x62,0x2F,0xE6,
0xA6,0xA4,0xF3,0x57,0x42,0xDC,0xF0,0xE0,0x0E,0xC6,0x67,0x01,
0x95,0x22,0x6F,0x03,0x00,0x2A,0xB4,0xBF,0x62,0x6D,0xA1,0xBD,
0xB7,0x10,0x81,0xB4,0x20,0x1C,0x7D,0x41,0x75,0xCE,0x0F,0xCF,
0x9D,0x03,0xEC,0xE6,0x7E,0xBC,0x76,0x97,0xBC,0x5C,0x70,0xFE,
0xD5,0x64,0x15,0x20,0xD8,0xA8,0x25,0x73,0xD4,0xA2,0x77,0x99,
0xC7,0x3B,0xF7,0x4E,0x20,0x40,0x43,0xD7,0x7C,0xFD,0xBC,0x2F,
0x75,0xB5,0x18,0xA3,0x8C,0x85,0x79,0x86,0x53,0x62,0x73,0xBA,
0x66,0x73,0xE2,0x48,0x15,0xAF,0x04,0x65,0xE2,0x4D,0x15,0x47,
0x74,0x33,0x79,0xAE,0xBF,0x90,0xC0,0xF7,0x2F,0x04,0xFB,0xEE,
0x29,0xEC,0x42,0xC7,0x36,0x14,0xAC,0xB2,0xBC,0xE1,0x71,0x13,
0x65,0xBA,0x0D,0x61,0x11,0x89,0x49,0x41,0x5D,0xCC,0xE2,0x72,
0x7B,0x93,0xF2,0x2E,0xD1,0x23,0x37,0xF9,0xFF,0x55,0x59,0xF6,
0x41,0x78,0x87,0xC9,0xCD,0x95,0xD2,0xE5,0x1B,0x3A,0x25,0x7A,
0xD8,0x16,0x2F,0x58,0xFE,0x3B,0xD5,0xB1,0x59,0x63,0x3C,0x90,
0xA0,0xBF,0xA0,0x21,0x54,0xB0,0xB0,0x3F,0x9D,0xC6,0xB5,0x31,
0xBA,0x86,0xDC,0x86,0x41,0xB7,0xBA,0xCE,0x58,0x09,0x8B,0xD9,
0xD4,0xF1,0xD2,0x3B,0x5F,0x87,0xEE,0x66,0xFD,0x77,0x8C,0x2C,
0x66,0x3E,0xC9,0xDA,0x3E,0x2A,0x38,0x03,0x23,0x71,0xC9,0x04,
0x3E,0x9D,0x18,0x7F,0xBB,0x82,0x21,0x8E,0x5F,0xF0,0xAF,0xC8,
0x08,0x2D,0xA6,0x3F,
};
static unsigned char dsa2048_q[]={
0xAE,0xCA,0x67,0x69,0x21,0x7A,0xE1,0x9B,0x64,0x74,0xED,0x58,
0xF0,0x28,0xE0,0x45,0x2B,0x39,0xBC,0x79,
};
static unsigned char dsa2048_g[]={
0x51,0x1D,0xB0,0xF6,0x4E,0x8B,0xAF,0x1C,0x59,0x71,0x62,0x3C,
0xC3,0xE2,0x44,0x35,0xCE,0x11,0xB4,0x49,0x04,0x41,0xA1,0x1C,
0x22,0x59,0x47,0x8C,0x70,0x1D,0xA1,0x0C,0x51,0xFE,0x86,0x43,
0x7B,0x75,0x5C,0xB7,0x68,0xA5,0xBE,0x81,0x9C,0x6F,0x6D,0x32,
0x03,0xB0,0x28,0xA4,0x6B,0x5B,0x37,0xC3,0x35,0xCF,0xBD,0x92,
0xC3,0x66,0x2E,0xAB,0xB4,0x13,0xEC,0x23,0xA3,0xE3,0x09,0x4E,
0x47,0x7D,0xA5,0x90,0x33,0x80,0x5D,0x68,0xD6,0x39,0x54,0xBE,
0x35,0xB0,0x61,0x5B,0x96,0x63,0x05,0x67,0xB7,0x3C,0x21,0x17,
0x37,0x50,0x17,0x78,0xEA,0xC0,0x10,0x73,0xDF,0xE2,0x70,0x19,
0x17,0xF7,0x11,0x82,0x73,0xDB,0xFF,0x3E,0x8D,0x98,0x2F,0x2F,
0xA2,0x12,0xC3,0xB4,0x08,0xB2,0x2C,0x5B,0xA3,0x51,0xAA,0x7F,
0x3D,0xE0,0x74,0x39,0xE5,0xAF,0x81,0x32,0xF8,0x45,0x75,0x11,
0x35,0xD9,0x90,0xA1,0xA3,0x91,0x1A,0xEE,0xE9,0xAC,0x97,0x30,
0x4C,0xD5,0x5B,0x38,0x49,0x12,0x3B,0xCC,0x0C,0x84,0xA2,0x59,
0x78,0xB4,0xFD,0x46,0xAC,0x49,0x43,0x08,0xDB,0xF4,0x23,0xFF,
0x23,0xF8,0x9A,0xFD,0x15,0xAF,0x6B,0x81,0xCE,0x15,0x22,0xEF,
0x09,0x64,0x0A,0x1F,0x4D,0x6B,0xF1,0x9F,0x16,0x00,0x3E,0xE8,
0xFC,0x9A,0x24,0x58,0x1C,0xB4,0x5F,0x56,0x3E,0x83,0x8C,0x0C,
0x51,0x43,0x72,0x25,0xA8,0x1D,0x08,0x30,0x7E,0x17,0xC8,0xD6,
0x66,0x57,0x0C,0x59,0x76,0xE4,0xA6,0x0C,0x05,0xA8,0x60,0x1D,
0xA4,0x8F,0xBC,0xC4,0x67,0x55,0x0E,0x81,0x8F,0x66,0xED,0x1B,
0x84,0xCD,0x02,0x9F,
};
DSA *get_dsa2048()
{
DSA *dsa;
if ((dsa=DSA_new()) == NULL) return(NULL);
dsa->p=BN_bin2bn(dsa2048_p,sizeof(dsa2048_p),NULL);
dsa->q=BN_bin2bn(dsa2048_q,sizeof(dsa2048_q),NULL);
dsa->g=BN_bin2bn(dsa2048_g,sizeof(dsa2048_g),NULL);
if ((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL))
{ DSA_free(dsa); return(NULL); }
return(dsa);
}

593
indra/newview/emerald.cpp Normal file
View File

@@ -0,0 +1,593 @@
// Copyright (c)2009 Thomas Shikami
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "llviewerprecompiledheaders.h"
#include "emerald.h"
#include <sstream>
#include <cstring>
#include <openssl/evp.h>
#include <openssl/dh.h>
#include <openssl/dsa.h>
//-- Ascii85 encoder and decoder
typedef unsigned int U32;
static void encodeU32(unsigned int in, char *out)
{
out[4] = char(in % 85) + char(33);
in /= 85;
out[3] = char(in % 85) + char(33);
in /= 85;
out[2] = char(in % 85) + char(33);
in /= 85;
out[1] = char(in % 85) + char(33);
in /= 85;
out[0] = char(in % 85) + char(33);
}
static unsigned int decodeU32(const char *in)
{
U32 out;
out = U32(in[0] - 33);
out *= 85;
out += U32(in[1] - 33);
out *= 85;
out += U32(in[2] - 33);
out *= 85;
out += U32(in[3] - 33);
out *= 85;
out += U32(in[4] - 33);
return out;
}
// static
std::string EAscii85::encode(const std::vector<unsigned char> &in)
{
std::ostringstream out;
U32 tuple;
int count;
char block[6];
block[5] = '\0';
out << "<~";
count = 0;
tuple = 0;
for(size_t i = 0; i < in.size(); i++)
{
tuple <<= 8;
tuple += in[i];
if(++count == 4)
{
if(tuple == 0)
{
out << "z";
}
else
{
encodeU32(tuple, block);
out << block;
}
count = 0;
}
}
switch(count)
{
case 1:
tuple <<= 8;
tuple += 255;
// pass through
case 2:
tuple <<= 8;
tuple += 255;
// pass through
case 3:
tuple <<= 8;
tuple += 255;
}
encodeU32(tuple, block);
switch(count)
{
case 1:
block[2] = '\0';
break;
case 2:
block[3] = '\0';
break;
case 3:
block[4] = '\0';
break;
}
if(count > 0)
out << block;
out << "~>";
return out.str();
}
// static
std::vector<unsigned char> EAscii85::decode(const std::string &in)
{
std::vector<unsigned char> out;
size_t len;
int count = 0;
char block[6];
block[5] = '\0';
U32 tuple;
// approximate length
len = in.length() / 5 * 4;
out.clear();
if(in.length() < 4) return out;
std::string::const_iterator i = in.begin();
if(*i != '<') return out;
i++;
if(*i != '~') return out;
i++;
out.reserve(len);
for(; i != in.end(); i++)
{
char c = *i;
if(c >= '!' && c < 'v')
{
block[count++] = c;
}
switch(c)
{
case 'z':
if(count == 1)
{
for(count = 0; count < 4; count++)
out.push_back(0);
count = 0;
}
break;
case '~':
if(count > 1)
{
switch(count)
{
case 2:
block[2] = 'u';
case 3:
block[3] = 'u';
case 4:
block[4] = 'u';
}
tuple = decodeU32(block);
for(;count > 1; count--)
{
out.push_back(char(tuple >> 24));
tuple <<= 8;
}
count = 0;
}
}
if(count == 5)
{
tuple = decodeU32(block);
for(count = 0; count < 4; count++)
{
out.push_back(char(tuple >> 24));
tuple <<= 8;
}
count = 0;
}
}
return out;
}
//-- AES wrapper
class EAESEncrypt::EncryptImpl {
public:
EncryptImpl(const unsigned char *key, const unsigned char *iv);
~EncryptImpl();
std::vector<unsigned char> encrypt(const std::string &in);
EVP_CIPHER_CTX ctx;
};
EAESEncrypt::EAESEncrypt(const unsigned char *key, const unsigned char *iv)
{
mEncryptImpl = new EAESEncrypt::EncryptImpl(key, iv);
}
EAESEncrypt::EAESEncrypt(const std::vector<unsigned char> &key, const std::vector<unsigned char> &iv)
{
mEncryptImpl = new EAESEncrypt::EncryptImpl(&key[0], &iv[0]);
}
EAESEncrypt::~EAESEncrypt()
{
delete mEncryptImpl;
}
std::vector<unsigned char> EAESEncrypt::encrypt(const std::string &in)
{
return mEncryptImpl->encrypt(in);
}
EAESEncrypt::EncryptImpl::EncryptImpl(const unsigned char *key, const unsigned char *iv)
{
EVP_CIPHER_CTX_init(&ctx);
EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
}
EAESEncrypt::EncryptImpl::~EncryptImpl()
{
EVP_CIPHER_CTX_cleanup(&ctx);
}
std::vector<unsigned char> EAESEncrypt::EncryptImpl::encrypt(const std::string &in)
{
std::vector<unsigned char> out;
int outlen;
int tmplen;
out.resize(in.length() + 32);
EVP_EncryptUpdate(&ctx, &out[0], &outlen, reinterpret_cast<const unsigned char *>(in.c_str()), in.length());
EVP_EncryptFinal_ex(&ctx, &out[outlen], &tmplen);
out.resize(outlen + tmplen);
return out;
}
class EAESDecrypt::DecryptImpl {
public:
DecryptImpl(const unsigned char *key, const unsigned char *iv);
~DecryptImpl();
std::string decrypt(const std::vector<unsigned char> &in);
EVP_CIPHER_CTX ctx;
};
EAESDecrypt::EAESDecrypt(const unsigned char *key, const unsigned char *iv)
{
mDecryptImpl = new EAESDecrypt::DecryptImpl(key, iv);
}
EAESDecrypt::EAESDecrypt(const std::vector<unsigned char> &key, const std::vector<unsigned char> &iv)
{
mDecryptImpl = new EAESDecrypt::DecryptImpl(&key[0], &iv[0]);
}
EAESDecrypt::~EAESDecrypt()
{
delete mDecryptImpl;
}
EAESDecrypt::DecryptImpl::DecryptImpl(const unsigned char *key, const unsigned char *iv)
{
EVP_CIPHER_CTX_init(&ctx);
EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
}
EAESDecrypt::DecryptImpl::~DecryptImpl()
{
EVP_CIPHER_CTX_cleanup(&ctx);
}
std::string EAESDecrypt::decrypt(const std::vector<unsigned char> &in)
{
return mDecryptImpl->decrypt(in);
}
std::string EAESDecrypt::DecryptImpl::decrypt(const std::vector<unsigned char> &in)
{
std::vector<unsigned char> out;
int outlen;
int tmplen;
if(in.size() == 0) return "";
out.resize(in.size() + 32);
EVP_DecryptUpdate(&ctx, &out[0], &outlen, &in[0], in.size());
EVP_DecryptFinal_ex(&ctx, &out[outlen], &tmplen);
out.resize(outlen + tmplen);
if(out.empty())
return "";
return std::string(reinterpret_cast<const char *>(&out[0]), out.size());
}
EGenKey::EGenKey(const std::string &password, const unsigned char *salt)
{
EVP_BytesToKey(EVP_aes_128_cbc(), EVP_sha1(), salt,
reinterpret_cast<const unsigned char *>(password.c_str()), password.length(),
1000, mKey, mIv);
}
EGenKey::~EGenKey()
{
memset(mKey, 0, 16);
memset(mIv, 0, 16);
}
DH *get_dh2048();
class BigNum
{
public:
BigNum(const std::vector<unsigned char> &bin)
{
mBN = BN_bin2bn(&(bin[0]), bin.size(), NULL);
}
BigNum()
{
mBN = BN_new();
}
BigNum(const BigNum &other)
{
mBN = BN_dup(*other);
}
BigNum(BIGNUM *bn)
{
mBN = BN_dup(bn);
}
~BigNum()
{
BN_clear_free(mBN);
mBN = NULL;
}
friend BIGNUM* operator*(const BigNum&);
BigNum& operator=(const std::vector<unsigned char> &bin)
{
mBN = BN_bin2bn(&(bin[0]), bin.size(), mBN);
return *this;
}
BigNum& operator=(const BigNum& other)
{
BN_copy(mBN, *other);
return *this;
}
void to(std::vector<unsigned char> &dest)
{
dest.resize(BN_num_bytes(mBN));
BN_bn2bin(mBN, &(dest[0]));
}
BIGNUM* to(BIGNUM *ret)
{
return BN_copy(ret, mBN);
}
BIGNUM* dup()
{
return BN_dup(mBN);
}
static BIGNUM* dup(const std::vector<unsigned char> &bin)
{
return BN_bin2bn(&(bin[0]), bin.size(), NULL);
}
private:
BIGNUM *mBN;
};
BIGNUM* operator*(const BigNum& o) { return o.mBN; }
class EDH::DHImpl
{
public:
DH *mDH;
};
EDH::EDH(const std::vector<unsigned char> &priv_key)
{
mDHImpl = new DHImpl();
mDHImpl->mDH = get_dh2048();
mDHImpl->mDH->priv_key = BigNum::dup(priv_key);
DH_generate_key(mDHImpl->mDH);
}
EDH::EDH()
{
mDHImpl = new DHImpl();
mDHImpl->mDH = get_dh2048();
DH_generate_key(mDHImpl->mDH);
}
EDH::~EDH()
{
if(mDHImpl)
{
if(mDHImpl->mDH)
{
mDHImpl->mDH->priv_key = NULL;
mDHImpl->mDH->pub_key = NULL;
DH_free(mDHImpl->mDH);
mDHImpl->mDH = NULL;
}
delete mDHImpl;
mDHImpl = NULL;
}
}
void EDH::secretTo(std::vector<unsigned char> &secret)
{
BigNum(mDHImpl->mDH->priv_key).to(secret);
}
void EDH::publicTo(std::vector<unsigned char> &pub)
{
BigNum(mDHImpl->mDH->pub_key).to(pub);
}
std::vector<unsigned char> EDH::computeKey(const std::vector<unsigned char> &other_pub)
{
std::vector<unsigned char> temp;
BigNum pub(other_pub);
temp.resize(DH_size(mDHImpl->mDH));
DH_compute_key(&(temp[0]), *pub, mDHImpl->mDH);
return temp;
}
DSA *get_dsa2048();
class EDSA::DSAImpl
{
public:
DSA *mDSA;
};
EDSA::EDSA()
{
mDSAImpl = new DSAImpl();
mDSAImpl->mDSA = get_dsa2048();
}
EDSA::EDSA(const std::vector<unsigned char> &secret)
{
mDSAImpl = new DSAImpl();
const unsigned char *buf = &(secret[0]);
mDSAImpl->mDSA = d2i_DSAPrivateKey(NULL, &buf, secret.size());
}
std::vector<unsigned char> EDSA::generateSecret()
{
DSA_generate_key(mDSAImpl->mDSA);
std::vector<unsigned char> temp;
int size = i2d_DSAPrivateKey(mDSAImpl->mDSA, NULL);
temp.resize(size);
unsigned char *buf = &(temp[0]);
i2d_DSAPrivateKey(mDSAImpl->mDSA, &buf);
return temp;
}
std::vector<unsigned char> EDSA::getPublic()
{
std::vector<unsigned char> temp;
mDSAImpl->mDSA->write_params = 0;
int size = i2d_DSAPublicKey(mDSAImpl->mDSA, NULL);
temp.resize(size);
unsigned char *buf = &(temp[0]);
i2d_DSAPublicKey(mDSAImpl->mDSA, &buf);
return temp;
}
void EDSA::setPublic(const std::vector<unsigned char> &pub)
{
const unsigned char *buf = &(pub[0]);
d2i_DSAPublicKey(&mDSAImpl->mDSA, &buf, pub.size());
}
bool EDSA::verify(const std::vector<unsigned char> &dgst, const std::vector<unsigned char> &sig)
{
bool result = false;
if(DSA_verify(0, &(dgst[0]), dgst.size(), &(sig[0]), sig.size(), mDSAImpl->mDSA) == 1)
{
result = true;
}
return result;
}
// static
bool EDSA::verify(const std::vector<unsigned char> &dgst, const std::vector<unsigned char> &sig, const std::vector <unsigned char> &pub)
{
const unsigned char *buf = &(pub[0]);
DSA *dsa;
bool result = false;
dsa = get_dsa2048();
d2i_DSAPublicKey(&dsa, &buf, pub.size());
if(DSA_verify(0, &(dgst[0]), dgst.size(), &(sig[0]), sig.size(), dsa) == 1)
{
result = true;
}
DSA_free(dsa);
return result;
}
std::vector<unsigned char> EDSA::sign(const std::vector<unsigned char> &dgst)
{
std::vector<unsigned char> sig;
unsigned int size = DSA_size(mDSAImpl->mDSA);
sig.resize(size);
DSA_sign(0, &(dgst[0]), dgst.size(), &(sig[0]), &size, mDSAImpl->mDSA);
sig.resize(size);
return sig;
}
EDSA::~EDSA()
{
delete mDSAImpl;
mDSAImpl = NULL;
}

107
indra/newview/emerald.h Normal file
View File

@@ -0,0 +1,107 @@
// Copyright (c)2009 Thomas Shikami
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <string>
#include <vector>
class EAscii85 {
private:
EAscii85() { }
public:
static std::string encode(const std::vector<unsigned char> &in);
static std::vector<unsigned char> decode(const std::string &in);
};
class EAESEncrypt {
public:
EAESEncrypt(const unsigned char *key, const unsigned char *iv);
EAESEncrypt(const std::vector<unsigned char> &key, const std::vector<unsigned char> &iv);
~EAESEncrypt();
std::vector<unsigned char> encrypt(const std::string &in);
private:
EAESEncrypt(const EAESEncrypt&) {}
class EncryptImpl;
EncryptImpl *mEncryptImpl;
};
class EAESDecrypt {
public:
EAESDecrypt(const unsigned char *key, const unsigned char *iv);
EAESDecrypt(const std::vector<unsigned char> &key, const std::vector<unsigned char> &iv);
~EAESDecrypt();
std::string decrypt(const std::vector<unsigned char> &in);
private:
EAESDecrypt(const EAESDecrypt&) {}
class DecryptImpl;
DecryptImpl *mDecryptImpl;
};
class EGenKey {
public:
EGenKey(const std::string &password, const unsigned char *salt = 0);
~EGenKey();
const unsigned char *key() const { return mKey; }
const unsigned char *iv() const { return mIv; }
private:
unsigned char mKey[16];
unsigned char mIv[16];
};
class EDH {
public:
EDH(const std::vector<unsigned char> &secret);
EDH();
~EDH();
void secretTo(std::vector<unsigned char> &secret);
void publicTo(std::vector<unsigned char> &pub);
std::vector<unsigned char> computeKey(const std::vector<unsigned char> &other_pub);
private:
EDH(const EDH&) {}
class DHImpl;
DHImpl *mDHImpl;
};
class EDSA {
public:
EDSA(const std::vector<unsigned char> &secret);
EDSA();
~EDSA();
std::vector<unsigned char> getPublic();
void setPublic(const std::vector<unsigned char> &pub);
std::vector<unsigned char> generateSecret();
static bool verify(const std::vector<unsigned char> &dgst, const std::vector<unsigned char> &sig, const std::vector <unsigned char> &pub);
bool verify(const std::vector<unsigned char> &dgst, const std::vector<unsigned char> &sig);
std::vector<unsigned char> sign(const std::vector<unsigned char> &dgst);
private:
EDSA(const EDSA&) {}
class DSAImpl;
DSAImpl *mDSAImpl;
};

View File

@@ -0,0 +1,189 @@
#include "llviewerprecompiledheaders.h"
#include "emeraldboobutils.h"
std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v)
{
os << "EmeraldBoobConfig" << std::endl;
os << "enabled: " << v.enabled << std::endl;
os << "mass: " << v.mass << std::endl;
os << "hardness: " << v.hardness << std::endl;
os << "zMax: " << v.zMax << std::endl;
os << "velMin: " << v.velMin << std::endl;
os << "velMax: " << v.velMax << std::endl;
os << "zInfluence: " << v.zInfluence << std::endl;
os << "friction: " << v.friction << std::endl;
return os;
}
std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v)
{
os << "EmeraldAvatarLocalBoobConfig" << std::endl;
os << "actualBoobGrav: " << v.actualBoobGrav << std::endl;
os << "boobSize: " << v.boobSize << std::endl;
return os;
}
std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v)
{
os << "EmeraldBoobState" << std::endl;
os << "boobGrav: " << v.boobGrav << std::endl;
os << "chestPosition: " << v.chestPosition << std::endl;
os << "chestRotation: " << v.chestRotation << std::endl;
os << "elapsedTime: " << v.elapsedTime << std::endl;
os << "frameDuration: " << v.frameDuration << std::endl;
os << "chestDisplacement: " << v.chestDisplacement << std::endl;
os << "localChestDisplacement: " << v.localChestDisplacement << std::endl;
os << "displacementForce: " << v.displacementForce << std::endl;
os << "mysteryValue: " << v.mysteryValue << std::endl;
os << "Number of bounceStates: " << v.bounceStates.size() << std::endl;
return os;
}
std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v)
{
os << "EmeraldBoobInputs" << std::endl;
os << "chestPosition: " << v.chestPosition << std::endl;
os << "chestRotation: " << v.chestRotation << std::endl;
os << "elapsedTime: " << v.elapsedTime << std::endl;
os << "appearanceFlag: " << v.appearanceFlag << std::endl;
os << "appearanceAnimating: " << v.appearanceAnimating << std::endl;
return os;
}
std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v)
{
os << "EmeraldBoobBounceState" << std::endl;
os << "bounceStart: " << v.bounceStart << std::endl;
os << "bounceStartAmplitude: " << v.bounceStartAmplitude << std::endl;
os << "bounceStartFrameDuration: " << v.bounceStartFrameDuration << std::endl;
return os;
}
F32 EmeraldBoobUtils::convertMass(F32 displayMass)
{ return displayMass/100.f*150.f; };
F32 EmeraldBoobUtils::convertHardness(F32 displayHardness)
{ return displayHardness/100.f*50; };
F32 EmeraldBoobUtils::convertVelMax(F32 displayVelMax)
{ return displayVelMax/100.f*0.01f; };
F32 EmeraldBoobUtils::convertFriction(F32 displayFriction)
{ return displayFriction/100.f*1.0f; };
F32 EmeraldBoobUtils::convertVelMin(F32 displayVelMin)
{ return displayVelMin/100.f; };
EmeraldBoobState EmeraldBoobUtils::idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs)
{
EmeraldBoobState newState;
F32 avatarLocalMass = 0.0f;
F32 partMod = 1.f;
if(!config.enabled || inputs.appearanceFlag || inputs.appearanceAnimating)
return newState;
if(inputs.type == 0)
{
newState.boobGrav = localConfig.actualBoobGrav;
avatarLocalMass = (llclamp(localConfig.boobSize, 0.0f, 0.5f) / 0.5f);
}
if(inputs.type == 1)
{
newState.boobGrav = localConfig.actualButtGrav;
partMod = 1.5f;
avatarLocalMass = llclamp(localConfig.actualButtGrav, 0.0f, 0.5f) / 0.5f;
}
if(inputs.type == 2)
{
newState.boobGrav = localConfig.actualFatGrav;
partMod = 1.3f;
avatarLocalMass = localConfig.actualFatGrav;
}
newState.elapsedTime = inputs.elapsedTime;
// seemed to create incorrect amounts of velocity when FPS varied
newState.frameDuration = inputs.elapsedTime - oldState.elapsedTime;
newState.chestPosition = inputs.chestPosition;
newState.chestRotation = inputs.chestRotation;
newState.chestDisplacement = inputs.chestPosition - oldState.chestPosition;
newState.localChestDisplacement = newState.chestDisplacement * ~inputs.chestRotation;
std::list<EmeraldBoobBounceState> bounceStates = oldState.bounceStates;
if(fabs(newState.localChestDisplacement.length()) > 0.f)
{
F32 boobVel = 0.f;
boobVel = newState.localChestDisplacement.mV[VZ];
boobVel += newState.localChestDisplacement[VX] * config.XYInfluence;
boobVel += newState.localChestDisplacement.mV[VY] * config.XYInfluence;
boobVel *= newState.frameDuration * 0.3f * 100.f;
boobVel = llclamp(boobVel, -config.velMax, config.velMax);
if(fabs(boobVel) <= config.velMax * config.velMin * newState.frameDuration * 100.f)
boobVel = 0.0f;
else
{
EmeraldBoobBounceState bounceState;
bounceState.bounceStart = inputs.elapsedTime;
bounceState.bounceStartFrameDuration = newState.frameDuration;
bounceState.bounceStartAmplitude = boobVel;
bounceState.bounceStartAmplitude *= avatarLocalMass;
bounceState.bounceStartAmplitude *= config.mass;
bounceStates.push_front(bounceState);
}
}
/*if(fabs(newState.localChestDisplacement.length()) >= 0.f) {
LLVector3 displacementInfluence = newState.localChestDisplacement;
displacementInfluence *= LLVector3(0.3f, 0.3f, 1.0f);
F32 clampedDisplacementInfluenceLength = llclamp(displacementInfluence.length(), 0.0f, config.velMax);
if(displacementInfluence[VZ]<0.f)
clampedDisplacementInfluenceLength= -clampedDisplacementInfluenceLength;
EmeraldBoobBounceState bounceState;
bounceState.bounceStart = inputs.elapsedTime;
bounceState.bounceStartFrameDuration = newState.frameDuration;
bounceState.bounceStartAmplitude = clampedDisplacementInfluenceLength;
if(fabs(bounceState.bounceStartAmplitude) < config.velMin * config.velMax)
bounceState.bounceStartAmplitude = 0.0f;
else
{
bounceState.bounceStartAmplitude *= config.mass;
bounceStates.push_front(bounceState);
}
}
*/
F32 totalNewAmplitude = 0.0f;
//std::cout << "Beginning bounce State processing at time " << inputs.elapsedTime << std::endl;
while(!bounceStates.empty()) {
EmeraldBoobBounceState bounceState = bounceStates.front();
//std::cout << "Now processing " << bounceState;
bounceStates.pop_front();
F32 bounceTime = newState.elapsedTime-bounceState.bounceStart;
F32 newAmplitude = bounceState.bounceStartAmplitude*pow(60.f*config.friction, -bounceTime)*cos(config.hardness*partMod*bounceTime);
if(fabs(newAmplitude) < 0.005f) {
newAmplitude = 0.0f;
} else {
newState.bounceStates.push_front(bounceState);
}
totalNewAmplitude+=newAmplitude;
}
//std::cout << "Total new amplitude: " << totalNewAmplitude << std::endl;
/*
if(inputs.type == 0)
newState.boobGrav = localConfig.actualBoobGrav + totalNewAmplitude;
if(inputs.type == 1)
newState.boobGrav = localConfig.actualButtGrav + totalNewAmplitude;
if(inputs.type == 2)
newState.boobGrav = localConfig.actualFatGrav + totalNewAmplitude;
*/
newState.boobGrav = totalNewAmplitude;
newState.boobGrav = llclamp(newState.boobGrav, -1.5f, 2.0f);
return newState;
}

View File

@@ -0,0 +1,197 @@
#ifndef __emeraldboobutils_h
#define __emeraldboobutils_h
#include <iostream>
#include <list>
#include "stdtypes.h"
#include "v3math.h"
#include "llquaternion.h"
struct EmeraldGlobalBoobConfig
{
bool enabled;
F32 mass;
F32 hardness;
F32 zMax;
F32 velMin;
F32 velMax;
F32 zInfluence;
F32 friction;
F32 XYInfluence;
EmeraldGlobalBoobConfig()
: enabled(false),
mass(6.4f),
hardness(0.67f),
zMax(1.29f),
velMin(0.0027f*0.017f),
velMax(0.0027f),
zInfluence(0.0f),
friction(0.35f),
XYInfluence(0.3f)
{
}
bool operator==(const EmeraldGlobalBoobConfig &other) const
{
return
enabled == other.enabled &&
mass == other.mass &&
zMax == other.zMax &&
velMax == other.velMax &&
velMin == other.velMin &&
zInfluence == other.zInfluence &&
XYInfluence == other.XYInfluence &&
friction == other.friction;
}
};
std::ostream &operator<<(std::ostream &os, const EmeraldGlobalBoobConfig &v);
struct EmeraldAvatarLocalBoobConfig
{
F32 actualBoobGrav;
F32 actualButtGrav;
F32 actualFatGrav;
F32 boobSize;
EmeraldAvatarLocalBoobConfig()
: actualBoobGrav(0.0f),
actualButtGrav(0.0f),
actualFatGrav(0.0f),
boobSize(0.0f)
{
}
bool operator==(const EmeraldAvatarLocalBoobConfig &other) const
{
return
actualBoobGrav == other.actualBoobGrav &&
actualButtGrav == other.actualButtGrav &&
actualFatGrav == other.actualFatGrav &&
boobSize == other.boobSize;
}
};
std::ostream &operator<<(std::ostream &os, const EmeraldAvatarLocalBoobConfig &v);
struct EmeraldBoobBounceState;
struct EmeraldBoobState
{
F32 boobGrav;
LLVector3 chestPosition;
LLQuaternion chestRotation;
F32 elapsedTime;
F32 frameDuration;
LLVector3 chestDisplacement;
LLVector3 localChestDisplacement;
LLVector3 displacementForce;
F32 mysteryValue;
std::list<EmeraldBoobBounceState> bounceStates;
EmeraldBoobState()
: boobGrav(0.0f),
chestPosition(0.0f,0.0f,0.0f),
chestRotation(0.0f,0.0f,0.0f,1.0f),
elapsedTime(0.0f),
frameDuration(0.0f),
chestDisplacement(0.0f,0.0f,0.0f),
localChestDisplacement(0.0f,0.0f,0.0f),
displacementForce(0.0f,0.0f,0.0f),
mysteryValue(0.0f)
{
}
bool operator==(const EmeraldBoobState &other) const
{
return
boobGrav == other.boobGrav &&
chestPosition == other.chestPosition &&
chestRotation == other.chestRotation &&
elapsedTime == other.elapsedTime &&
frameDuration == other.frameDuration &&
chestDisplacement == other.chestDisplacement &&
localChestDisplacement == other.localChestDisplacement &&
displacementForce == other.displacementForce &&
mysteryValue == other.mysteryValue &&
bounceStates == other.bounceStates;
}
};
std::ostream &operator<<(std::ostream &os, const EmeraldBoobState &v);
struct EmeraldBoobInputs
{
LLVector3 chestPosition;
LLQuaternion chestRotation;
F32 elapsedTime;
bool appearanceFlag;
bool appearanceAnimating;
S32 type;
EmeraldBoobInputs()
: chestPosition(0.0f,0.0f,0.0f),
chestRotation(0.0f,0.0f,0.0f,1.0f),
elapsedTime(0.0f),
appearanceFlag(false),
appearanceAnimating(false),
type(0)
{
}
bool operator==(const EmeraldBoobInputs &other) const
{
return
chestPosition == other.chestPosition &&
chestRotation == other.chestRotation &&
elapsedTime == other.elapsedTime &&
appearanceFlag == other.appearanceFlag &&
appearanceAnimating == other.appearanceAnimating &&
type == other.type;
}
};
std::ostream &operator<<(std::ostream &os, const EmeraldBoobInputs &v);
struct EmeraldBoobBounceState
{
F32 bounceStart;
F32 bounceStartAmplitude;
F32 bounceStartFrameDuration;
EmeraldBoobBounceState()
: bounceStart(0.0f),
bounceStartAmplitude(0.0f),
bounceStartFrameDuration(0.0f)
{
};
bool operator==(const EmeraldBoobBounceState &other) const
{
return
bounceStart == other.bounceStart &&
bounceStartAmplitude == other.bounceStartAmplitude &&
bounceStartFrameDuration == other.bounceStartFrameDuration;
}
};
std::ostream &operator<<(std::ostream &os, const EmeraldBoobBounceState &v);
struct EmeraldBoobUtils
{
public:
static EmeraldBoobState idleUpdate(const EmeraldGlobalBoobConfig &config, const EmeraldAvatarLocalBoobConfig &localConfig, const EmeraldBoobState &oldState, const EmeraldBoobInputs &inputs);
static F32 convertMass(F32 displayMass);
static F32 convertHardness(F32 displayHardness);
static F32 convertVelMax(F32 displayVelMax);
static F32 convertFriction(F32 displayFriction);
static F32 convertVelMin(F32 displayVelMin);
};
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -71,6 +71,7 @@
#include "llvowlsky.h"
#include "llrender.h"
#include "llfloaterchat.h"
#include "emeraldboobutils.h"
#ifdef TOGGLE_HACKED_GODLIKE_VIEWER
BOOL gHackGodmode = FALSE;
@@ -119,6 +120,49 @@ static bool handleSetShaderChanged(const LLSD& newvalue)
return true;
}
static bool handleAvatarBoobMassChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.mass = EmeraldBoobUtils::convertMass((F32) newvalue.asReal());
return true;
}
static bool handleAvatarBoobHardnessChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.hardness = EmeraldBoobUtils::convertHardness((F32) newvalue.asReal());
return true;
}
static bool handleAvatarBoobVelMaxChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax((F32) newvalue.asReal());
LLVOAvatar::sBoobConfig.velMin = LLVOAvatar::sBoobConfig.velMin*LLVOAvatar::sBoobConfig.velMax;
return true;
}
static bool handleAvatarBoobFrictionChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.friction = EmeraldBoobUtils::convertFriction((F32) newvalue.asReal());
return true;
}
static bool handleAvatarBoobVelMinChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin((F32) newvalue.asReal())*LLVOAvatar::sBoobConfig.velMax;
return true;
}
static bool handleAvatarBoobToggleChanged(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.enabled = (BOOL) newvalue.asReal();
return true;
}
static bool handleAvatarBoobXYInfluence(const LLSD& newvalue)
{
LLVOAvatar::sBoobConfig.XYInfluence = (F32) newvalue.asReal();
return true;
}
static bool handleSetSelfInvisible( const LLSD& newvalue)
{
LLVOAvatar::onChangeSelfInvisible( newvalue.asBoolean() );
@@ -468,6 +512,13 @@ void settings_setup_listeners()
gSavedSettings.getControl("RenderFlexTimeFactor")->getSignal()->connect(boost::bind(&handleFlexLODChanged, _1));
gSavedSettings.getControl("ThrottleBandwidthKBPS")->getSignal()->connect(boost::bind(&handleBandwidthChanged, _1));
gSavedSettings.getControl("RenderGamma")->getSignal()->connect(boost::bind(&handleGammaChanged, _1));
gSavedSettings.getControl("EmeraldBoobMass")->getSignal()->connect(boost::bind(&handleAvatarBoobMassChanged, _1));
gSavedSettings.getControl("EmeraldBoobHardness")->getSignal()->connect(boost::bind(&handleAvatarBoobHardnessChanged, _1));
gSavedSettings.getControl("EmeraldBoobVelMax")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMaxChanged, _1));
gSavedSettings.getControl("EmeraldBoobFriction")->getSignal()->connect(boost::bind(&handleAvatarBoobFrictionChanged, _1));
gSavedSettings.getControl("EmeraldBoobVelMin")->getSignal()->connect(boost::bind(&handleAvatarBoobVelMinChanged, _1));
gSavedSettings.getControl("EmeraldBreastPhysicsToggle")->getSignal()->connect(boost::bind(&handleAvatarBoobToggleChanged, _1));
gSavedSettings.getControl("EmeraldBoobXYInfluence")->getSignal()->connect(boost::bind(&handleAvatarBoobXYInfluence, _1));
gSavedSettings.getControl("RenderFogRatio")->getSignal()->connect(boost::bind(&handleFogRatioChanged, _1));
gSavedSettings.getControl("RenderMaxPartCount")->getSignal()->connect(boost::bind(&handleMaxPartCountChanged, _1));
gSavedSettings.getControl("RenderDynamicLOD")->getSignal()->connect(boost::bind(&handleRenderDynamicLODChanged, _1));

View File

@@ -86,6 +86,7 @@
#include "llvoiceclient.h"
#include "llvoicevisualizer.h" // Ventrella
#include "llsdserialize.h"
// <edit>
#include "llfloaterexploreanimations.h"
@@ -707,16 +708,13 @@ F32 LLVOAvatar::sLODFactor = 1.f;
BOOL LLVOAvatar::sUseImpostors = FALSE;
BOOL LLVOAvatar::sJointDebug = FALSE;
EmeraldGlobalBoobConfig LLVOAvatar::sBoobConfig;
F32 LLVOAvatar::sUnbakedTime = 0.f;
F32 LLVOAvatar::sUnbakedUpdateTime = 0.f;
F32 LLVOAvatar::sGreyTime = 0.f;
F32 LLVOAvatar::sGreyUpdateTime = 0.f;
bool LLVOAvatar::sDoProperArc = true;
//-----------------------------------------------------------------------------
// Helper functions
@@ -768,7 +766,10 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mUpdatePeriod(1),
mFullyLoadedInitialized(FALSE),
mHasBakedHair( FALSE ),
mSupportsAlphaLayers(FALSE)
mSupportsAlphaLayers(FALSE),
mFirstSetActualBoobGravRan( false )
//mFirstSetActualButtGravRan( false ),
//mFirstSetActualFatGravRan( false )
// <edit>
// mNametagSaysIdle(false),
// mIdleForever(true),
@@ -996,6 +997,16 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
}
// grab the boob savedparams (prob a better place for this)
sBoobConfig.mass = EmeraldBoobUtils::convertMass(gSavedSettings.getF32("EmeraldBoobMass"));
sBoobConfig.hardness = EmeraldBoobUtils::convertHardness(gSavedSettings.getF32("EmeraldBoobHardness"));
sBoobConfig.velMax = EmeraldBoobUtils::convertVelMax(gSavedSettings.getF32("EmeraldBoobVelMax"));
sBoobConfig.velMin = EmeraldBoobUtils::convertVelMin(gSavedSettings.getF32("EmeraldBoobVelMin"));
sBoobConfig.friction = EmeraldBoobUtils::convertFriction(gSavedSettings.getF32("EmeraldBoobFriction"));
sBoobConfig.enabled = gSavedSettings.getBOOL("EmeraldBreastPhysicsToggle");
sBoobConfig.XYInfluence = gSavedSettings.getF32("EmeraldBoobXYInfluence");
sDoProperArc = (bool)gSavedSettings.getBOOL("EmeraldUseProperArc");
if (gNoRender)
{
return;
@@ -2712,7 +2723,7 @@ BOOL LLVOAvatar::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
idleUpdateVoiceVisualizer( voice_enabled );
idleUpdateMisc( detailed_update );
idleUpdateAppearanceAnimation();
idleUpdateBoobEffect();
idleUpdateLipSync( voice_enabled );
idleUpdateLoadingEffect();
idleUpdateBelowWater(); // wind effect uses this
@@ -2994,105 +3005,105 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
}
}
// ------------------------------------------------------------
// Danny: ZOMG Boob Phsyics go!
// ------------------------------------------------------------
void LLVOAvatar::idleUpdateBoobEffect()
{
if(mFirstSetActualBoobGravRan)
{
// should probably be moved somewhere where it is only called when boobsize changes
LLVisualParam *param;
// BOOBS
param = getVisualParam(105); //boob size
mLocalBoobConfig.boobSize = param->getCurrentWeight();
EmeraldBoobInputs boobInputs;
boobInputs.type = 0;
boobInputs.chestPosition = mChestp->getWorldPosition();
boobInputs.chestRotation = mChestp->getWorldRotation();
boobInputs.elapsedTime = mBoobBounceTimer.getElapsedTimeF32();
boobInputs.appearanceFlag = getAppearanceFlag();
EmeraldBoobState newBoobState = EmeraldBoobUtils::idleUpdate(sBoobConfig, mLocalBoobConfig, mBoobState, boobInputs);
if(mBoobState.boobGrav != newBoobState.boobGrav)
{
LLVisualParam *param;
param = getVisualParam(507);
ESex avatar_sex = getSex();
param->stopAnimating(FALSE);
param->setWeight(llclamp(newBoobState.boobGrav+getActualBoobGrav(), -1.5f, 2.f), FALSE);
param->apply(avatar_sex);
updateVisualParams();
}
mBoobState = newBoobState;
}
/*
if(mFirstSetActualButtGravRan)
{
// BUTT
EmeraldBoobInputs buttInputs;
buttInputs.type = 1;
buttInputs.chestPosition = mPelvisp->getWorldPosition();
buttInputs.chestRotation = mPelvisp->getWorldRotation();
buttInputs.elapsedTime = mBoobBounceTimer.getElapsedTimeF32();
buttInputs.appearanceFlag = getAppearanceFlag();
EmeraldBoobState newButtState = EmeraldBoobUtils::idleUpdate(sBoobConfig, mLocalBoobConfig, mButtState, buttInputs);
if(mButtState.boobGrav != newButtState.boobGrav)
{
LLVisualParam *param;
param = getVisualParam(795);
ESex avatar_sex = getSex();
param->stopAnimating(FALSE);
param->setWeight(newButtState.boobGrav*0.3f+getActualButtGrav(), FALSE);
param->apply(avatar_sex);
updateVisualParams();
}
mButtState = newButtState;
}
if(mFirstSetActualFatGravRan)
{
// FAT
EmeraldBoobInputs fatInputs;
fatInputs.type = 2;
fatInputs.chestPosition = mPelvisp->getWorldPosition();
fatInputs.chestRotation = mPelvisp->getWorldRotation();
fatInputs.elapsedTime = mBoobBounceTimer.getElapsedTimeF32();
fatInputs.appearanceFlag = getAppearanceFlag();
EmeraldBoobState newFatState = EmeraldBoobUtils::idleUpdate(sBoobConfig, mLocalBoobConfig, mFatState, fatInputs);
if(mFatState.boobGrav != newFatState.boobGrav)
{
LLVisualParam *param;
param = getVisualParam(157);
ESex avatar_sex = getSex();
param->stopAnimating(FALSE);
param->setWeight(newFatState.boobGrav*0.3f+getActualFatGrav(), FALSE);
param->apply(avatar_sex);
updateVisualParams();
}
mFatState = newFatState;
}
*/
}
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
{
@@ -10419,11 +10430,33 @@ void LLVOAvatar::idleUpdateRenderCost()
}
}
if(sDoProperArc)
{
std::set<LLUUID>::const_iterator tex_iter;
for(tex_iter = textures.begin();tex_iter != textures.end();++tex_iter)
{
LLViewerImage* img = gImageList.getImage(*tex_iter);
if(img)
{
shame += (img->getHeight() * img->getWidth()) >> 4;
}
}
}
shame += textures.size() * 5;
setDebugText(llformat("%d", shame));
F32 green = 1.f-llclamp(((F32) shame-1024.f)/1024.f, 0.f, 1.f);
F32 red = llmin((F32) shame/1024.f, 1.f);
if(sDoProperArc)
{
green = 1.f-llclamp(((F32)shame-1000000.f)/1000000.f, 0.f, 1.f);
red = llmin((F32)shame/1000000.f, 1.f);
}
else
{
green = 1.f-llclamp(((F32)shame-1024.f)/1024.f, 0.f, 1.f);
red = llmin((F32)shame/1024.f, 1.f);
}
mText->setColor(LLColor4(red,green,0,1));
}

View File

@@ -49,7 +49,7 @@
#include "llrendertarget.h"
#include "llwearable.h"
#include "llvoavatardefines.h"
#include "emeraldboobutils.h"
extern const LLUUID ANIM_AGENT_BODY_NOISE;
@@ -118,7 +118,7 @@ public:
void idleUpdateLipSync(bool voice_enabled);
void idleUpdateLoadingEffect();
void idleUpdateWindEffect();
void idleUpdateBoobEffect();
void idleUpdateNameTag(const LLVector3& root_pos_last);
void idleUpdateRenderCost();
void idleUpdateTractorBeam();
@@ -525,58 +525,57 @@ private:
BOOL mAppearanceAnimSetByUser;
F32 mLastAppearanceBlendTime;
//--------------------------------------------------------------------
// boob bounce stuff
//--------------------------------------------------------------------
private:
bool mFirstSetActualBoobGravRan;
//bool mFirstSetActualButtGravRan;
//bool mFirstSetActualFatGravRan;
LLFrameTimer mBoobBounceTimer;
EmeraldAvatarLocalBoobConfig mLocalBoobConfig;
EmeraldBoobState mBoobState;
//EmeraldBoobState mButtState;
//EmeraldBoobState mFatState;
public:
//boob
F32 getActualBoobGrav() { return mLocalBoobConfig.actualBoobGrav; }
void setActualBoobGrav(F32 grav)
{
mLocalBoobConfig.actualBoobGrav = grav;
if(!mFirstSetActualBoobGravRan)
{
mBoobState.boobGrav = grav;
mFirstSetActualBoobGravRan = true;
}
}
//butt
/*F32 getActualButtGrav() { return mLocalBoobConfig.actualButtGrav; }
void setActualButtGrav(F32 grav)
{
mLocalBoobConfig.actualButtGrav = grav;
if(!mFirstSetActualButtGravRan)
{
mButtState.boobGrav = grav;
mFirstSetActualButtGravRan = true;
}
}
//fat
F32 getActualFatGrav() { return mLocalBoobConfig.actualFatGrav; }
void setActualFatGrav(F32 grav)
{
mLocalBoobConfig.actualFatGrav = grav;
if(!mFirstSetActualFatGravRan)
{
mFatState.boobGrav = grav;
mFirstSetActualFatGravRan = true;
}
}
*/
static EmeraldGlobalBoobConfig sBoobConfig;
//--------------------------------------------------------------------
// Attachments
@@ -870,6 +869,7 @@ public:
static F32 sUnbakedUpdateTime; // Last time stats were updated (to prevent multiple updates per frame)
static F32 sGreyTime; // Total seconds with >=1 grey avatars
static F32 sGreyUpdateTime; // Last time stats were updated (to prevent multiple updates per frame)
static bool sDoProperArc;
const std::string getBakedStatusForPrintout() const;
};

View File

@@ -3,15 +3,38 @@
border="true" label="Ascent Vanity" name="ascvan" enabled="true" mouse_opaque="true">
<tab_container label="Ascent" bottom="0" height="440" width="500" left="0"
name="Ascent Vanity" tab_min_width="90" tab_position="top">
<panel border="true" left="1" bottom="-190" height="180" width="500" mouse_opaque="true"
<panel border="true" left="1" bottom="-190" height="180" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="General" name="General">
<check_box bottom_delta="-25" control_name="AscentStoreSettingsPerAccount" enabled="true"
<check_box bottom_delta="-25" control_name="AscentStoreSettingsPerAccount" enabled="true"
follows="left|top" font="SansSerifSmall" height="16" initial_value="true"
label="Where applicable, save Vanity settings per-account." left="10"
tool_tip="Saves settings per-account, allowing easier customization for alts."
mouse_opaque="true" name="use_account_settings_check" radio_style="false"
width="400" />
</panel>
<check_box bottom="-50" enabled="true" follows="left|top" font="SansSerifSmall" height="16"
label="Enable enhanced physics on avatar breasts" left="10" mouse_opaque="true" name="EmBreastsToggle"
control_name="EmeraldBreastPhysicsToggle" width="126"/>
<slider bottom_delta="-20" left="10" name="EmeraldBoobMass" control_name="EmeraldBoobMass"
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast mass:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
<slider bottom_delta="-20" left_delta="0" name="EmeraldBoobHardness" control_name="EmeraldBoobHardness"
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast rebound:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
<slider bottom_delta="-20" left_delta="0" name="EmeraldBoobVelMax" control_name="EmeraldBoobVelMax"
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast max vel:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
<slider bottom_delta="-20" left_delta="0" name="EmeraldBoobFriction" control_name="EmeraldBoobFriction"
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast friction:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
<slider bottom_delta="-20" left_delta="0" name="EmeraldBoobVelMin" control_name="EmeraldBoobVelMin"
decimal_digits="0" enabled="true" follows="left|top" height="18" increment="1"
label="Breast min vel:" label_width="100" max_val="100" min_val="1" mouse_opaque="true"
show_text="true" width="250" auto_resize="false" tool_tip=""/>
</panel>
<panel border="true" left="1" bottom="-190" height="180" width="500" mouse_opaque="true"
follows="left|top|right|bottom" label="Colors" name="Colors">
<!-- Client tag options -->

View File

@@ -1,230 +1,230 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mimetypes name="default">
<widgetset name="web">
<label name="web_label">
Зміст веб
</label>
<tooltip name="web_tooltip">
Це місце має веб-контент
</tooltip>
<playtip name="web_playtip">
Показати веб-контент
</playtip>
</widgetset>
<widgetset name="movie">
<label name="movie_label">
Фільм
</label>
<tooltip name="movie_tooltip">
Тут програється фільм
</tooltip>
<playtip name="movie_playtip">
Програти фільм
</playtip>
</widgetset>
<widgetset name="none">
<label name="none_label">
Немає змісту
</label>
<tooltip name="none_tooltip">
Тут немає медіа
</tooltip>
</widgetset>
<widgetset name="image">
<label name="image_label">
Зображення
</label>
<tooltip name="image_tooltip">
В цьому місці є зображення
</tooltip>
<playtip name="image_playtip">
Переглянути зображення в цьому місці
</playtip>
</widgetset>
<widgetset name="audio">
<label name="audio_label">
Аудіо
</label>
<tooltip name="audio_tooltip">
В цьому місці програється аудіо
</tooltip>
<playtip name="audio_playtip">
Прослухати аудіо в цьому місці
</playtip>
</widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
Поток в реальному часі
</label>
</scheme>
<mimetype name="blank">
<label name="blank_label">
- Ні -
</label>
</mimetype>
<mimetype name="none/none">
<label name="none/none_label">
- Ні -
</label>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
Аудіо
</label>
</mimetype>
<mimetype name="video/*">
<label name="video2_label">
Відео
</label>
</mimetype>
<mimetype name="image/*">
<label name="image2_label">
Зображення
</label>
</mimetype>
<mimetype name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
Фільм (QuickTime)
</label>
</mimetype>
<mimetype name="application/javascript">
<label name="application/javascript_label">
Javascript
</label>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
Ogg Аудіо/Відео
</label>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
PDF документ
</label>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
Postscript документ
</label>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
Rich Text (RTF)
</label>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
Synchronized Multimedia Integration Language (SMIL)
</label>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
Web Page (XHTML)
</label>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
Macromedia Director
</label>
</mimetype>
<mimetype name="application/x-shockwave-flash">
<label name="application/x-shockwave-flash_label">
Flash
</label>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
Аудіо (MIDI)
</label>
</mimetype>
<mimetype name="audio/mpeg">
<label name="audio/mpeg_label">
Аудіо (MP3)
</label>
</mimetype>
<mimetype name="audio/x-aiff">
<label name="audio/x-aiff_label">
Аудіо (AIFF)
</label>
</mimetype>
<mimetype name="audio/x-wav">
<label name="audio/x-wav_label">
Аудіо (WAV)
</label>
</mimetype>
<mimetype name="image/bmp">
<label name="image/bmp_label">
Зображення (BMP)
</label>
</mimetype>
<mimetype name="image/gif">
<label name="image/gif_label">
Зображення (GIF)
</label>
</mimetype>
<mimetype name="image/jpeg">
<label name="image/jpeg_label">
Зображення (JPEG)
</label>
</mimetype>
<mimetype name="image/png">
<label name="image/png_label">
Зображення (PNG)
</label>
</mimetype>
<mimetype name="image/svg+xml">
<label name="image/svg+xml_label">
Зображення (SVG)
</label>
</mimetype>
<mimetype name="image/tiff">
<label name="image/tiff_label">
Зображення (TIFF)
</label>
</mimetype>
<mimetype name="text/html">
<label name="text/html_label">
Веб-сторінка
</label>
</mimetype>
<mimetype name="text/plain">
<label name="text/plain_label">
Текст
</label>
</mimetype>
<mimetype name="text/xml">
<label name="text/xml_label">
XML
</label>
</mimetype>
<mimetype name="video/mpeg">
<label name="video/mpeg_label">
Фільм (MPEG)
</label>
</mimetype>
<mimetype name="video/mp4">
<label name="video/mp4_label">
Фільм (MP4)
</label>
</mimetype>
<mimetype name="video/quicktime">
<label name="video/quicktime_label">
Фільм (QuickTime)
</label>
</mimetype>
<mimetype name="video/x-ms-asf">
<label name="video/x-ms-asf_label">
Фільм (Windows Media ASF)
</label>
</mimetype>
<mimetype name="video/x-ms-wmv">
<label name="video/x-ms-wmv_label">
Фільм (Windows Media WMV)
</label>
</mimetype>
<mimetype name="video/x-msvideo">
<label name="video/x-msvideo_label">
Фільм (AVI)
</label>
</mimetype>
</mimetypes>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<mimetypes name="default">
<widgetset name="web">
<label name="web_label">
Зміст веб
</label>
<tooltip name="web_tooltip">
Це місце має веб-контент
</tooltip>
<playtip name="web_playtip">
Показати веб-контент
</playtip>
</widgetset>
<widgetset name="movie">
<label name="movie_label">
Фільм
</label>
<tooltip name="movie_tooltip">
Тут програється фільм
</tooltip>
<playtip name="movie_playtip">
Програти фільм
</playtip>
</widgetset>
<widgetset name="none">
<label name="none_label">
Немає змісту
</label>
<tooltip name="none_tooltip">
Тут немає медіа
</tooltip>
</widgetset>
<widgetset name="image">
<label name="image_label">
Зображення
</label>
<tooltip name="image_tooltip">
В цьому місці є зображення
</tooltip>
<playtip name="image_playtip">
Переглянути зображення в цьому місці
</playtip>
</widgetset>
<widgetset name="audio">
<label name="audio_label">
Аудіо
</label>
<tooltip name="audio_tooltip">
В цьому місці програється аудіо
</tooltip>
<playtip name="audio_playtip">
Прослухати аудіо в цьому місці
</playtip>
</widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
Поток в реальному часі
</label>
</scheme>
<mimetype name="blank">
<label name="blank_label">
- Ні -
</label>
</mimetype>
<mimetype name="none/none">
<label name="none/none_label">
- Ні -
</label>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
Аудіо
</label>
</mimetype>
<mimetype name="video/*">
<label name="video2_label">
Відео
</label>
</mimetype>
<mimetype name="image/*">
<label name="image2_label">
Зображення
</label>
</mimetype>
<mimetype name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
Фільм (QuickTime)
</label>
</mimetype>
<mimetype name="application/javascript">
<label name="application/javascript_label">
Javascript
</label>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
Ogg Аудіо/Відео
</label>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
PDF документ
</label>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
Postscript документ
</label>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
Rich Text (RTF)
</label>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
Synchronized Multimedia Integration Language (SMIL)
</label>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
Web Page (XHTML)
</label>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
Macromedia Director
</label>
</mimetype>
<mimetype name="application/x-shockwave-flash">
<label name="application/x-shockwave-flash_label">
Flash
</label>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
Аудіо (MIDI)
</label>
</mimetype>
<mimetype name="audio/mpeg">
<label name="audio/mpeg_label">
Аудіо (MP3)
</label>
</mimetype>
<mimetype name="audio/x-aiff">
<label name="audio/x-aiff_label">
Аудіо (AIFF)
</label>
</mimetype>
<mimetype name="audio/x-wav">
<label name="audio/x-wav_label">
Аудіо (WAV)
</label>
</mimetype>
<mimetype name="image/bmp">
<label name="image/bmp_label">
Зображення (BMP)
</label>
</mimetype>
<mimetype name="image/gif">
<label name="image/gif_label">
Зображення (GIF)
</label>
</mimetype>
<mimetype name="image/jpeg">
<label name="image/jpeg_label">
Зображення (JPEG)
</label>
</mimetype>
<mimetype name="image/png">
<label name="image/png_label">
Зображення (PNG)
</label>
</mimetype>
<mimetype name="image/svg+xml">
<label name="image/svg+xml_label">
Зображення (SVG)
</label>
</mimetype>
<mimetype name="image/tiff">
<label name="image/tiff_label">
Зображення (TIFF)
</label>
</mimetype>
<mimetype name="text/html">
<label name="text/html_label">
Веб-сторінка
</label>
</mimetype>
<mimetype name="text/plain">
<label name="text/plain_label">
Текст
</label>
</mimetype>
<mimetype name="text/xml">
<label name="text/xml_label">
XML
</label>
</mimetype>
<mimetype name="video/mpeg">
<label name="video/mpeg_label">
Фільм (MPEG)
</label>
</mimetype>
<mimetype name="video/mp4">
<label name="video/mp4_label">
Фільм (MP4)
</label>
</mimetype>
<mimetype name="video/quicktime">
<label name="video/quicktime_label">
Фільм (QuickTime)
</label>
</mimetype>
<mimetype name="video/x-ms-asf">
<label name="video/x-ms-asf_label">
Фільм (Windows Media ASF)
</label>
</mimetype>
<mimetype name="video/x-ms-wmv">
<label name="video/x-ms-wmv_label">
Фільм (Windows Media WMV)
</label>
</mimetype>
<mimetype name="video/x-msvideo">
<label name="video/x-msvideo_label">
Фільм (AVI)
</label>
</mimetype>
</mimetypes>

View File

@@ -1,262 +1,262 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<mimetypes name="default">
<defaultlabel>
(未知)
</defaultlabel>
<defaultwidget>
</defaultwidget>
<defaultimpl>
LLMediaImplLLMozLib
</defaultimpl>
<widgetset name="web">
<label name="web_label">
网页内容
</label>
<tooltip name="web_tooltip">
该区域有网页内容
</tooltip>
<playtip name="web_playtip">
显示网页内容
</playtip>
</widgetset>
<widgetset name="movie">
<label name="movie_label">
影片
</label>
<tooltip name="movie_tooltip">
这里可以播放影片
</tooltip>
<playtip name="movie_playtip">
播放影片
</playtip>
</widgetset>
<widgetset name="none">
<label name="none_label">
无内容
</label>
<tooltip name="none_tooltip">
这里没有媒体
</tooltip>
<playtip name="none_playtip" />
</widgetset>
<widgetset name="image">
<label name="image_label">
图像
</label>
<tooltip name="image_tooltip">
这里有图像
</tooltip>
<playtip name="image_playtip">
显示该位置的图像
</playtip>
</widgetset>
<widgetset name="audio">
<label name="audio_label">
音频
</label>
audio/*
<tooltip name="audio_tooltip">
这里可以播放音频
</tooltip>
<playtip name="audio_playtip">
播放该位置的音频
</playtip>
</widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
实时流媒体 (RTSP)
</label>
</scheme>
<mimetype name="blank">
<label name="blank_label">
- 无 -
</label>
</mimetype>
<mimetype name="none/none">
<label name="none/none_label">
- 无 -
</label>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
音频
</label>
</mimetype>
<mimetype name="video/*">
<label name="video2_label">
视频
</label>
</mimetype>
<mimetype name="image/*">
<label name="image2_label">
图像
</label>
</mimetype>
<mimetype name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
影片 (QuickTime)
</label>
</mimetype>
<mimetype name="application/javascript">
<label name="application/javascript_label">
Javascript
</label>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
Ogg 音频/视频
</label>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
PDF 文档
</label>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
Postscript 文档
</label>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
带格式化的文本 (RTF)
</label>
<widgettype>
image
</widgettype>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
同步多媒体集成语言 (SMIL)
</label>
<widgettype>
movie
</widgettype>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
网页 (XHTML)
</label>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
Macromedia Director
</label>
<widgettype>
image
</widgettype>
</mimetype>
<mimetype name="application/x-shockwave-flash">
<label name="application/x-shockwave-flash_label">
Flash
</label>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
音频 (MIDI)
</label>
</mimetype>
<mimetype name="audio/mpeg">
<label name="audio/mpeg_label">
音频 (MP3)
</label>
</mimetype>
<mimetype name="audio/x-aiff">
<label name="audio/x-aiff_label">
音频 (AIFF)
</label>
</mimetype>
<mimetype name="audio/x-wav">
<label name="audio/x-wav_label">
音频 (WAV)
</label>
</mimetype>
<mimetype menu="1" name="image/bmp">
<label name="image/bmp_label">
图像 (BMP)
</label>
</mimetype>
<mimetype menu="1" name="image/gif">
<label name="image/gif_label">
图像 (GIF)
</label>
</mimetype>
<mimetype menu="1" name="image/jpeg">
<label name="image/jpeg_label">
图像 (JPEG)
</label>
</mimetype>
<mimetype menu="1" name="image/png">
<label name="image/png_label">
图像 (PNG)
</label>
</mimetype>
<mimetype name="image/svg+xml">
<label name="image/svg+xml_label">
图像 (SVG)
</label>
</mimetype>
<mimetype menu="1" name="image/tiff">
<label name="image/tiff_label">
图像 (TIFF)
</label>
</mimetype>
<mimetype menu="1" name="text/html">
<label name="text/html_label">
网页
</label>
</mimetype>
<mimetype menu="1" name="text/plain">
<label name="text/plain_label">
文本
</label>
</mimetype>
<mimetype name="text/xml">
<label name="text/xml_label">
XML
</label>
<widgettype>
text
</widgettype>
<impl>
LLMediaImplLLMozLib
</impl>
</mimetype>
<mimetype menu="1" name="video/mpeg">
<label name="video/mpeg_label">
影片 (MPEG)
</label>
</mimetype>
<mimetype name="video/mp4">
<label name="video/mp4_label">
影片 (MP4)
</label>
</mimetype>
<mimetype menu="1" name="video/quicktime">
<label name="video/quicktime_label">
影片 (QuickTime)
</label>
<widgettype>
movie
</widgettype>
<impl>
LLMediaImplQuickTime
</impl>
</mimetype>
<mimetype name="video/x-ms-asf">
<label name="video/x-ms-asf_label">
影片 (Windows Media ASF)
</label>
</mimetype>
<mimetype name="video/x-ms-wmv">
<label name="video/x-ms-wmv_label">
影片 (Windows Media WMV)
</label>
</mimetype>
<mimetype menu="1" name="video/x-msvideo">
<label name="video/x-msvideo_label">
影片 (AVI)
</label>
</mimetype>
</mimetypes>
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<mimetypes name="default">
<defaultlabel>
(未知)
</defaultlabel>
<defaultwidget>
</defaultwidget>
<defaultimpl>
LLMediaImplLLMozLib
</defaultimpl>
<widgetset name="web">
<label name="web_label">
网页内容
</label>
<tooltip name="web_tooltip">
该区域有网页内容
</tooltip>
<playtip name="web_playtip">
显示网页内容
</playtip>
</widgetset>
<widgetset name="movie">
<label name="movie_label">
影片
</label>
<tooltip name="movie_tooltip">
这里可以播放影片
</tooltip>
<playtip name="movie_playtip">
播放影片
</playtip>
</widgetset>
<widgetset name="none">
<label name="none_label">
无内容
</label>
<tooltip name="none_tooltip">
这里没有媒体
</tooltip>
<playtip name="none_playtip" />
</widgetset>
<widgetset name="image">
<label name="image_label">
图像
</label>
<tooltip name="image_tooltip">
这里有图像
</tooltip>
<playtip name="image_playtip">
显示该位置的图像
</playtip>
</widgetset>
<widgetset name="audio">
<label name="audio_label">
音频
</label>
audio/*
<tooltip name="audio_tooltip">
这里可以播放音频
</tooltip>
<playtip name="audio_playtip">
播放该位置的音频
</playtip>
</widgetset>
<scheme name="rtsp">
<label name="rtsp_label">
实时流媒体 (RTSP)
</label>
</scheme>
<mimetype name="blank">
<label name="blank_label">
- 无 -
</label>
</mimetype>
<mimetype name="none/none">
<label name="none/none_label">
- 无 -
</label>
</mimetype>
<mimetype name="audio/*">
<label name="audio2_label">
音频
</label>
</mimetype>
<mimetype name="video/*">
<label name="video2_label">
视频
</label>
</mimetype>
<mimetype name="image/*">
<label name="image2_label">
图像
</label>
</mimetype>
<mimetype name="video/vnd.secondlife.qt.legacy">
<label name="vnd.secondlife.qt.legacy_label">
影片 (QuickTime)
</label>
</mimetype>
<mimetype name="application/javascript">
<label name="application/javascript_label">
Javascript
</label>
</mimetype>
<mimetype name="application/ogg">
<label name="application/ogg_label">
Ogg 音频/视频
</label>
</mimetype>
<mimetype name="application/pdf">
<label name="application/pdf_label">
PDF 文档
</label>
</mimetype>
<mimetype name="application/postscript">
<label name="application/postscript_label">
Postscript 文档
</label>
</mimetype>
<mimetype name="application/rtf">
<label name="application/rtf_label">
带格式化的文本 (RTF)
</label>
<widgettype>
image
</widgettype>
</mimetype>
<mimetype name="application/smil">
<label name="application/smil_label">
同步多媒体集成语言 (SMIL)
</label>
<widgettype>
movie
</widgettype>
</mimetype>
<mimetype name="application/xhtml+xml">
<label name="application/xhtml+xml_label">
网页 (XHTML)
</label>
</mimetype>
<mimetype name="application/x-director">
<label name="application/x-director_label">
Macromedia Director
</label>
<widgettype>
image
</widgettype>
</mimetype>
<mimetype name="application/x-shockwave-flash">
<label name="application/x-shockwave-flash_label">
Flash
</label>
</mimetype>
<mimetype name="audio/mid">
<label name="audio/mid_label">
音频 (MIDI)
</label>
</mimetype>
<mimetype name="audio/mpeg">
<label name="audio/mpeg_label">
音频 (MP3)
</label>
</mimetype>
<mimetype name="audio/x-aiff">
<label name="audio/x-aiff_label">
音频 (AIFF)
</label>
</mimetype>
<mimetype name="audio/x-wav">
<label name="audio/x-wav_label">
音频 (WAV)
</label>
</mimetype>
<mimetype menu="1" name="image/bmp">
<label name="image/bmp_label">
图像 (BMP)
</label>
</mimetype>
<mimetype menu="1" name="image/gif">
<label name="image/gif_label">
图像 (GIF)
</label>
</mimetype>
<mimetype menu="1" name="image/jpeg">
<label name="image/jpeg_label">
图像 (JPEG)
</label>
</mimetype>
<mimetype menu="1" name="image/png">
<label name="image/png_label">
图像 (PNG)
</label>
</mimetype>
<mimetype name="image/svg+xml">
<label name="image/svg+xml_label">
图像 (SVG)
</label>
</mimetype>
<mimetype menu="1" name="image/tiff">
<label name="image/tiff_label">
图像 (TIFF)
</label>
</mimetype>
<mimetype menu="1" name="text/html">
<label name="text/html_label">
网页
</label>
</mimetype>
<mimetype menu="1" name="text/plain">
<label name="text/plain_label">
文本
</label>
</mimetype>
<mimetype name="text/xml">
<label name="text/xml_label">
XML
</label>
<widgettype>
text
</widgettype>
<impl>
LLMediaImplLLMozLib
</impl>
</mimetype>
<mimetype menu="1" name="video/mpeg">
<label name="video/mpeg_label">
影片 (MPEG)
</label>
</mimetype>
<mimetype name="video/mp4">
<label name="video/mp4_label">
影片 (MP4)
</label>
</mimetype>
<mimetype menu="1" name="video/quicktime">
<label name="video/quicktime_label">
影片 (QuickTime)
</label>
<widgettype>
movie
</widgettype>
<impl>
LLMediaImplQuickTime
</impl>
</mimetype>
<mimetype name="video/x-ms-asf">
<label name="video/x-ms-asf_label">
影片 (Windows Media ASF)
</label>
</mimetype>
<mimetype name="video/x-ms-wmv">
<label name="video/x-ms-wmv_label">
影片 (Windows Media WMV)
</label>
</mimetype>
<mimetype menu="1" name="video/x-msvideo">
<label name="video/x-msvideo_label">
影片 (AVI)
</label>
</mimetype>
</mimetypes>

View File

@@ -163,13 +163,13 @@ class WindowsManifest(ViewerManifest):
def final_exe(self):
if self.default_channel() and self.viewer_branding_id()=="secondlife":
if self.default_grid():
return "SecondLife.exe"
return "Ascent.exe"
else:
return "SecondLifePreview.exe"
return "Ascent.exe"
elif(self.viewer_branding_id=="snowglobe"):
return "Snowglobe.exe"
return "Ascent.exe"
else:
return ''.join(self.channel().split()) + '.exe'
return 'Ascent.exe'
def construct(self):