2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-15 10:54:18 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
fdc8e28c2f Allow clickables to function while sitting or AFK.
Less special casing FTW!
2012-03-09 23:30:31 -05:00
3 changed files with 6 additions and 47 deletions

View File

@ -171,8 +171,6 @@ PyObject* pyVaultImageNode::Image_GetImage( void )
else
fMipmapKey->RefObject();
}
else
PYTHON_RETURN_NONE;
}
return pyImage::New(fMipmap);

View File

@ -170,12 +170,6 @@ void plAvBrainGeneric::Activate(plArmatureModBase *avMod)
{
plArmatureBrain::Activate(avMod);
if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar())
{
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kDisableClickables );
plgDispatch::MsgSend(msg);
}
int numStages = fStages->size();
if (!numStages)
return;
@ -315,12 +309,6 @@ void plAvBrainGeneric::Deactivate()
}
plArmatureBrain::Deactivate();
if ((GetType() == kEmote || GetType() == kAFK || GetType() == kSitOnGround) && fAvMod->IsLocalAvatar())
{
plInputIfaceMgrMsg* msg = TRACKED_NEW plInputIfaceMgrMsg(plInputIfaceMgrMsg::kEnableClickables );
plgDispatch::MsgSend(msg);
}
}
// GETRECIPIENT

View File

@ -328,25 +328,11 @@ plMipmap* plJPEG::ReadFromFile( const char *fileName )
plMipmap* plJPEG::ReadFromFile( const wchar *fileName )
{
// we use a stream because the IJL can't handle unicode
hsRAMStream tempstream;
hsUNIXStream in;
if (!in.Open(fileName, L"rb"))
hsUNIXStream out;
if (!out.Open(fileName, L"rb"))
return false;
// The stream reader for JPEGs expects a 32-bit size at the start,
// so insert that into the stream before passing it on
in.FastFwd();
UInt32 fsize = in.GetPosition();
UInt8 *tempbuffer = TRACKED_NEW UInt8[fsize];
in.Rewind();
in.Read(fsize, tempbuffer);
tempstream.WriteSwap32(fsize);
tempstream.Write(fsize, tempbuffer);
delete [] tempbuffer;
tempstream.Rewind();
plMipmap* ret = IRead(&tempstream);
in.Close();
plMipmap* ret = IRead(&out);
out.Close();
return ret;
}
@ -433,7 +419,7 @@ hsBool plJPEG::IWrite( plMipmap *source, hsStream *outStream )
jcProps.jquality = fWriteQuality;
#else
cinfo.jpeg_width = source->GetWidth(); // default
cinfo.jpeg_height = source->GetHeight(); // default
cinfo.jpeg_width = source->GetHeight(); // default
cinfo.jpeg_color_space = JCS_YCbCr; // default
// not sure how to set 4:1:1 but supposedly it's the default
jpeg_set_quality( &cinfo, fWriteQuality, TRUE );
@ -501,23 +487,10 @@ hsBool plJPEG::WriteToFile( const char *fileName, plMipmap *sourceData )
hsBool plJPEG::WriteToFile( const wchar *fileName, plMipmap *sourceData )
{
// we use a stream because the IJL can't handle unicode
hsRAMStream tempstream;
hsUNIXStream out;
if (!out.Open(fileName, L"wb"))
return false;
hsBool ret = IWrite(sourceData, &tempstream);
if (ret)
{
// The stream writer for JPEGs prepends a 32-bit size,
// so remove that from the stream before saving to a file
tempstream.Rewind();
UInt32 fsize = tempstream.ReadSwap32();
UInt8 *tempbuffer = TRACKED_NEW UInt8[fsize];
tempstream.Read(fsize, tempbuffer);
out.Write(fsize, tempbuffer);
delete [] tempbuffer;
}
hsBool ret = IWrite(sourceData, &out);
out.Close();
return ret;
}