Force IDA decompiler to use a different signature of functions of static functions in namespaces

I am testing the IDA with some simple code to find out how to use it, and I am looping because it does not properly decompile the static function in the namespace:

The function is declared as follows:

namespace pvrtex
{
    bool transcode(CPVRTexture& tex,
        const PixelType fmt,
        const EPVRTVariableType chType,
        const EPVRTColourSpace clrSpace,
        const ECompressorQuality q,
        const bool dither = false);    
}

this function terminates this signature: ?transcode@pvrtex@@YA_NAAVCPVRTexture@1@TPixelType@1@W4EPVRTVariableType@@W4EPVRTColourSpace@@W4ECompressorQuality@1@_N@Z. The online demangler creates the correct C ++ signature. When I load my executable into the IDA, it also shows the same function signature, however, when I try to decompile this function, the IDA does not correctly process this function, as if it were some kind of member function of the pvrtex class and ended up inside the whole code some random mess

bool __cdecl pvrtex::transcode(pvrtex *__hidden this, struct pvrtex::CPVRTexture *, union pvrtex::PixelType, enum EPVRTVariableType, enum EPVRTColourSpace, enum pvrtex::ECompressorQuality, bool).

? , ? rclick , , : IDA , -, pvrtex *__hidden this.

0

Source: https://habr.com/ru/post/1765262/


All Articles