Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: StudioMDL byteswapping functions.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef STUDIOBYTESWAP_H
  8. #define STUDIOBYTESWAP_H
  9. #if defined(_WIN32)
  10. #pragma once
  11. #endif
  12. #include "byteswap.h"
  13. struct studiohdr_t;
  14. class IPhysicsCollision;
  15. namespace StudioByteSwap
  16. {
  17. typedef bool (*CompressFunc_t)( const void *pInput, int inputSize, void **pOutput, int *pOutputSize );
  18. //void SetTargetBigEndian( bool bigEndian );
  19. void ActivateByteSwapping( bool bActivate );
  20. void SourceIsNative( bool bActivate );
  21. void SetVerbose( bool bVerbose );
  22. void SetCollisionInterface( IPhysicsCollision *pPhysicsCollision );
  23. int ByteswapStudioFile( const char *pFilename, void *pOutBase, const void *pFileBase, int fileSize, studiohdr_t *pHdr, CompressFunc_t pCompressFunc = NULL );
  24. int ByteswapPHY( void *pOutBase, const void *pFileBase, int fileSize );
  25. int ByteswapANI( studiohdr_t* pHdr, void *pOutBase, const void *pFileBase, int filesize );
  26. int ByteswapVVD( void *pOutBase, const void *pFileBase, int fileSize );
  27. int ByteswapVTX( void *pOutBase, const void *pFileBase, int fileSize );
  28. int ByteswapMDL( void *pOutBase, const void *pFileBase, int fileSize );
  29. #define BYTESWAP_ALIGNMENT_PADDING 4096
  30. }
  31. #endif // STUDIOBYTESWAP_H