controllers done i guess
This commit is contained in:
@@ -40,9 +40,9 @@ public:
|
||||
return u;
|
||||
}
|
||||
}
|
||||
for ( auto &m: m_objects)
|
||||
for ( uint32_t u = 1; u < nCount; u++ )
|
||||
{
|
||||
if (m.m_pObject == NULL)
|
||||
if (m_objects[u].m_pObject == NULL)
|
||||
break;
|
||||
uFoundIndex++;
|
||||
}
|
||||
@@ -57,6 +57,8 @@ public:
|
||||
{
|
||||
if (uIndex >= nCount)
|
||||
return 0;
|
||||
if (uIndex == 0)
|
||||
return 0;
|
||||
return m_objects[uIndex].m_pObject;
|
||||
}
|
||||
void UnrefObject( uint32_t uIndex )
|
||||
@@ -135,6 +137,7 @@ FunnyMesh_t *CAssetManager::GetMeshByIndex( uint32_t uIndex )
|
||||
|
||||
uint32_t CAssetManager::LoadModel( const char *szName )
|
||||
{
|
||||
V_printf("LOADING %s\n", szName);
|
||||
bool bHasBeenCreated = false;
|
||||
HFunnyModel hModel = m_models.GetOrCreateObject(szName, &bHasBeenCreated);
|
||||
if (!bHasBeenCreated)
|
||||
@@ -170,7 +173,6 @@ uint32_t CAssetManager::LoadModel( const char *szName )
|
||||
IJSONValue *pMesh = pMainObject->GetValue("Mesh");
|
||||
IJSONValue *pMaterial = pMainObject->GetValue("Material");
|
||||
IJSONValue *pPhysics = pMainObject->GetValue("Physics");
|
||||
V_printf("%s\n", pMaterial->GetStringValue());
|
||||
if (pMesh)
|
||||
pModel->m_hMesh = LoadMesh(pMesh->GetStringValue());
|
||||
if (pMaterial)
|
||||
@@ -294,7 +296,7 @@ void CAssetManager::UnrefMaterial( uint32_t uIndex )
|
||||
|
||||
HFunnyMesh CAssetManager::LoadMesh( const char *szName )
|
||||
{
|
||||
|
||||
V_printf("LOADING %s\n", szName);
|
||||
bool bHasBeenCreated = false;
|
||||
HFunnyMesh hAsset = m_meshes.GetOrCreateObject(szName, &bHasBeenCreated);
|
||||
if (!bHasBeenCreated)
|
||||
@@ -308,6 +310,7 @@ HFunnyMesh CAssetManager::LoadMesh( const char *szName )
|
||||
m_meshes.UnrefObject(hAsset);
|
||||
return 0;
|
||||
}
|
||||
V_printf("V_LOADING %s %llu\n", szName, filesystem->Size(hMesh));
|
||||
|
||||
IVertexBuffer *pVertexBuffer = g_pRenderContext->CreateVertexBuffer(filesystem->Size(hMesh));
|
||||
pVertexBuffer->Lock();
|
||||
|
||||
Reference in New Issue
Block a user