void ModelContainer::LoadAll(void)
{
	int i;

	for (i=0; i < NUMBER_OF_MODELS; i++)
		LoadMD2Model(i);

	for (i=0; i < NUMBER_OF_TEXTURES; i++)
		LoadTexture(i);

	for (i=0; i < NUMBER_OF_XMODELS; i++)
		LoadXModel(i);


	// It's convenient to put this here but if I want to load models at different times I'll need to move this to where I load the demon model
	Demon::LoadSharedAnimations();

}
Пример #2
0
void Md2::load( std::string file, std::string tex) {
    if (m_pModel != NULL)
        ReleaseMD2Model(m_pModel);
    if (IntVerts != NULL)
        IntVerts->Release();
    if (pTex != NULL)
        dxs->releaseTexture(pTex);

    m_pModel = LoadMD2Model( file );
    pd3dDevice->CreateVertexBuffer(
        m_pModel->NumVerts*sizeof(PNTVertex),
        0, FVF_PNT,
        D3DPOOL_MANAGED,
        &IntVerts);

    // Load the skin
    if( (pTex = dxs->loadTexture(tex)) == NULL )
        dxs->debugprintf("Couldn't find texture : %s", tex.c_str());
    else
        dxs->debugprintf("CMD2::LoadMD2Model - loaded %s", tex.c_str());
}