diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /common/studiobyteswap.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'common/studiobyteswap.h')
| -rw-r--r-- | common/studiobyteswap.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/common/studiobyteswap.h b/common/studiobyteswap.h new file mode 100644 index 0000000..3bec9ea --- /dev/null +++ b/common/studiobyteswap.h @@ -0,0 +1,38 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: StudioMDL byteswapping functions. +// +// $NoKeywords: $ +//============================================================================= +#ifndef STUDIOBYTESWAP_H +#define STUDIOBYTESWAP_H + +#if defined(_WIN32) +#pragma once +#endif + +#include "byteswap.h" +struct studiohdr_t; +class IPhysicsCollision; + +namespace StudioByteSwap +{ +typedef bool (*CompressFunc_t)( const void *pInput, int inputSize, void **pOutput, int *pOutputSize ); + +//void SetTargetBigEndian( bool bigEndian ); +void ActivateByteSwapping( bool bActivate ); +void SourceIsNative( bool bActivate ); +void SetVerbose( bool bVerbose ); +void SetCollisionInterface( IPhysicsCollision *pPhysicsCollision ); + +int ByteswapStudioFile( const char *pFilename, void *pOutBase, const void *pFileBase, int fileSize, studiohdr_t *pHdr, CompressFunc_t pCompressFunc = NULL ); +int ByteswapPHY( void *pOutBase, const void *pFileBase, int fileSize ); +int ByteswapANI( studiohdr_t* pHdr, void *pOutBase, const void *pFileBase, int filesize ); +int ByteswapVVD( void *pOutBase, const void *pFileBase, int fileSize ); +int ByteswapVTX( void *pOutBase, const void *pFileBase, int fileSize ); +int ByteswapMDL( void *pOutBase, const void *pFileBase, int fileSize ); + +#define BYTESWAP_ALIGNMENT_PADDING 4096 +} + +#endif // STUDIOBYTESWAP_H
\ No newline at end of file |