I'm sorry if this questions have been asked before, but could not find an appropriate answer here. I need a little help with Visual Studio regular expressions to modify source code. I have source code that loads textures from files. I have lots of line like these.
D3DXCreateTextureFromFileA(pDevice , chFileName , &pTexture) ;
D3DXCreateTextureFromFileA(pDevice , pAttrib->Value() , &pd3dTexture) ;
I need to define a constant and based on that to load textures from a custom format. I want this
D3DXCreateTextureFromFileA(pDevice , chFileName , &pTexture) ;
to become this
#ifdef LOAD_TEXTURES_FROM_CF
CreateTextureFromResourceFile((pDevice , chFileName , &pTexture) ;
#else
D3DXCreateTextureFromFileA(pDevice , chFileName , &pTexture) ;
#endif
How can I achieve this with Visual Studio regular expressions ? Thank you in advance.