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.

47 lines
1.5 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. //#include "studio.h"
  7. #include "studio.h"
  8. #include "datacache/imdlcache.h"
  9. #include "datamodel/dmelementfactoryhelper.h"
  10. #include "istudiorender.h"
  11. #include "bone_setup.h"
  12. #include "tier3/tier3.h"
  13. // memdbgon must be the last include file in a .cpp file!!!
  14. #include "tier0/memdbgon.h"
  15. //-----------------------------------------------------------------------------
  16. // FIXME: This trashy glue code is really not acceptable. Figure out a way of making it unnecessary.
  17. //-----------------------------------------------------------------------------
  18. const studiohdr_t *studiohdr_t::FindModel( void **cache, char const *pModelName ) const
  19. {
  20. MDLHandle_t handle = g_pMDLCache->FindMDL( pModelName );
  21. *cache = (void*)(uintp)handle;
  22. return g_pMDLCache->GetStudioHdr( handle );
  23. }
  24. virtualmodel_t *studiohdr_t::GetVirtualModel( void ) const
  25. {
  26. return g_pMDLCache->GetVirtualModel( (MDLHandle_t)((int)virtualModel&0xffff) );
  27. }
  28. byte *studiohdr_t::GetAnimBlock( int i ) const
  29. {
  30. return g_pMDLCache->GetAnimBlock( (MDLHandle_t)((int)virtualModel&0xffff), i );
  31. }
  32. int studiohdr_t::GetAutoplayList( unsigned short **pOut ) const
  33. {
  34. return g_pMDLCache->GetAutoplayList( (MDLHandle_t)((int)virtualModel&0xffff), pOut );
  35. }
  36. const studiohdr_t *virtualgroup_t::GetStudioHdr( void ) const
  37. {
  38. return g_pMDLCache->GetStudioHdr( (MDLHandle_t)((int)cache&0xffff) );
  39. }