详细说明:这段代码用于加载X文件(省略无关的定义),我想用汇编实现,问题之一就是new这里不知道怎么做。
D3DMATERIAL9 czsz;
LPDIRECT3DTEXTURE9* wenlisz=0;
DWORD czzs
D3DXLoadMeshFromX("5.x",D3DPOOL_MANAGED,dx,&mhcq,&czhcq,0,&czzs,&mesh);
D3DXMATERIAL* d3dxMaterials=(D3DXMATERIAL*)czhcq->GetBufferPointer();
czsz=new D3DMATERIAL9[czzs];
wenlisz=new LPDIRECT3DTEXTURE9[czzs];
for(i=0;i<czzs;i++){
czsz[i]=d3dxMaterials[i].MatD3D;
czsz[i].Ambient=czsz[i].Diffuse;
wenlisz[i]=0;
if( d3dxMaterials[i].pTextureFilename != NULL &&
strlen(d3dxMaterials[i].pTextureFilename) > 0 )
{
D3DXCreateTextureFromFile( dx, d3dxMaterials[i].pTextureFilename,&wenlisz[i] );
}
}