Merge branch 'development' of https://github.com/GarageGames/Torque3D into andOrMaybe

Conflicts:
	Engine/source/T3D/staticShape.cpp
This commit is contained in:
Azaezel 2016-12-20 22:50:28 -06:00
commit dd071484da
517 changed files with 87707 additions and 178465 deletions

View file

@ -101,8 +101,8 @@ bool OggDecoder::_nextPacket()
//-----------------------------------------------------------------------------
OggInputStream::OggInputStream( Stream* stream )
: mStream( stream ),
mIsAtEnd( false )
: mIsAtEnd( false ),
mStream( stream )
{
ogg_sync_init( &mOggSyncState );

View file

@ -95,12 +95,12 @@ static inline S32 sampleG( U8* pCb, U8* pCr )
OggTheoraDecoder::OggTheoraDecoder( const ThreadSafeRef< OggInputStream >& stream )
: Parent( stream ),
#ifdef TORQUE_DEBUG
mLock( 0 ),
#endif
mTheoraSetup( NULL ),
mTheoraDecoder( NULL ),
mTranscoder( TRANSCODER_Auto )
#ifdef TORQUE_DEBUG
,mLock( 0 )
#endif
{
// Initialize.

View file

@ -33,7 +33,7 @@
class FileStream : public Stream
{
public:
enum
enum : U32
{
BUFFER_SIZE = 8 * 1024, // this can be changed to anything appropriate [in k]
BUFFER_INVALID = 0xffffffff // file offsets must all be less than this

View file

@ -300,16 +300,7 @@ bool Stream::write(const NetAddress &na)
{
bool success = write(na.type);
success &= write(na.port);
success &= write(na.netNum[0]);
success &= write(na.netNum[1]);
success &= write(na.netNum[2]);
success &= write(na.netNum[3]);
success &= write(na.nodeNum[0]);
success &= write(na.nodeNum[1]);
success &= write(na.nodeNum[2]);
success &= write(na.nodeNum[3]);
success &= write(na.nodeNum[4]);
success &= write(na.nodeNum[5]);
success &= write(sizeof(na.address), &na.address);
return success;
}
@ -317,16 +308,20 @@ bool Stream::read(NetAddress *na)
{
bool success = read(&na->type);
success &= read(&na->port);
success &= read(&na->netNum[0]);
success &= read(&na->netNum[1]);
success &= read(&na->netNum[2]);
success &= read(&na->netNum[3]);
success &= read(&na->nodeNum[0]);
success &= read(&na->nodeNum[1]);
success &= read(&na->nodeNum[2]);
success &= read(&na->nodeNum[3]);
success &= read(&na->nodeNum[4]);
success &= read(&na->nodeNum[5]);
success &= read(sizeof(na->address), &na->address);
return success;
}
bool Stream::write(const NetSocket &so)
{
return write(so.getHandle());
}
bool Stream::read(NetSocket* so)
{
S32 handle = -1;
bool success = read(&handle);
*so = NetSocket::fromHandle(handle);
return success;
}

View file

@ -45,6 +45,7 @@ class ColorF;
struct NetAddress;
class RawData;
class String;
class NetSocket;
namespace Torque {
class ByteBuffer;
@ -165,6 +166,11 @@ public:
/// Read a network address from the stream.
bool read(NetAddress*);
/// Write a network socket to the stream.
bool write(const NetSocket &);
/// Read a network socket from the stream.
bool read(NetSocket*);
/// Write some raw data onto the stream.
bool write(const RawData &);
/// Read some raw data from the stream.

View file

@ -25,13 +25,7 @@
#include "core/stream/stream.h"
namespace {
const char TAG_ASCII_ID[] = "[TAG]";
const char TAG_ASCII_END[] = "[END]";
const char TAG_ASCII_HEADER[] = "// Auto-Generated by TagDictionary class";
const S32 sg_tagDictAsciiUser = 1;
} // namespace
TagDictionary tagDictionary;

View file

@ -104,9 +104,9 @@ acceptable. Do NOT use for cryptographic purposes.
--------------------------------------------------------------------
*/
U32 hash(register const U8 *k, register U32 length, register U32 initval)
U32 hash(const U8 *k, U32 length, U32 initval)
{
register U32 a,b,c,len;
U32 a,b,c,len;
/* Set up the internal state */
len = length;
@ -211,9 +211,9 @@ is acceptable. Do NOT use for cryptographic purposes.
--------------------------------------------------------------------
*/
U64 hash64( register const U8 *k, register U32 length, register U64 initval )
U64 hash64( const U8 *k, U32 length, U64 initval )
{
register U64 a,b,c,len;
U64 a,b,c,len;
/* Set up the internal state */
len = length;

View file

@ -177,7 +177,7 @@ void MD5Final( unsigned char digest[16], MD5Context* ctx)
*/
void MD5Transform( int buf[4], int in[16])
{
register int a, b, c, d;
int a, b, c, d;
a = buf[0];
b = buf[1];

View file

@ -41,7 +41,7 @@ protected:
StrTest() : mData( 0 ), mUTF16( 0 ), mLength( 0 ) {}
StrTest( const char* str )
: mData( str ), mLength( str ? dStrlen( str ) : 0 ), mUTF16( NULL )
: mData( str ), mUTF16( NULL ), mLength( str ? dStrlen( str ) : 0 )
{
if( str )
mUTF16 = createUTF16string( mData );

View file

@ -167,7 +167,7 @@ static void create_uuid_state(uuid_state *st)
*/
static void format_token(char *target, const xuuid_t *u)
{
sprintf(target, "%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
sprintf(target, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
u->time_low, u->time_mid, u->time_hi_and_version,
u->clock_seq_hi_and_reserved, u->clock_seq_low,
u->node[0], u->node[1], u->node[2],