source-engine/tier3/studiohdrstub.cpp

48 lines
1.5 KiB
C++
Raw Normal View History

2020-04-22 16:56:21 +00:00
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=============================================================================
//#include "studio.h"
#include "studio.h"
#include "datacache/imdlcache.h"
#include "datamodel/dmelementfactoryhelper.h"
#include "istudiorender.h"
#include "bone_setup.h"
#include "tier3/tier3.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//-----------------------------------------------------------------------------
// FIXME: This trashy glue code is really not acceptable. Figure out a way of making it unnecessary.
//-----------------------------------------------------------------------------
const studiohdr_t *studiohdr_t::FindModel( void **cache, char const *pModelName ) const
{
MDLHandle_t handle = g_pMDLCache->FindMDL( pModelName );
*cache = (void*)(uintp)handle;
return g_pMDLCache->GetStudioHdr( handle );
}
virtualmodel_t *studiohdr_t::GetVirtualModel( void ) const
{
2022-02-23 11:50:30 +00:00
return g_pMDLCache->GetVirtualModel( VoidPtrToMDLHandle( VirtualModel() ) );
2020-04-22 16:56:21 +00:00
}
byte *studiohdr_t::GetAnimBlock( int i ) const
{
2022-02-23 11:50:30 +00:00
return g_pMDLCache->GetAnimBlock( VoidPtrToMDLHandle( VirtualModel() ), i );
2020-04-22 16:56:21 +00:00
}
int studiohdr_t::GetAutoplayList( unsigned short **pOut ) const
{
2022-02-23 11:50:30 +00:00
return g_pMDLCache->GetAutoplayList( VoidPtrToMDLHandle( VirtualModel() ), pOut );
2020-04-22 16:56:21 +00:00
}
const studiohdr_t *virtualgroup_t::GetStudioHdr( void ) const
{
2022-02-23 11:50:30 +00:00
return g_pMDLCache->GetStudioHdr( VoidPtrToMDLHandle( cache ) );
2020-04-22 16:56:21 +00:00
}