I'm working with the Doom3 source code that ID\Zenimax recently released to the public, and I came across something that I can't seem to figure out. (I'm not the best C++ programmer, I'm more of C# kinda guy.)
void idTarget_EndLevel::Spawn( void ) {
idStr guiName;
gui = NULL;
noGui = spawnArgs.GetBool("noGui");
if (!noGui) {
spawnArgs.GetString( "guiName", "guis/EndLevel.gui", guiName );
if (guiName.Length()) {
gui = idUserInterface::FindGui( guiName, true, false, true );
}
}
buttonsReleased = false;
readyToExit = false;
exitCommand = "";
}
The important bit, is the "idUnserInterface::FindGui" function call, this function does not exist in that class, nor does that class inherit that member from any other class. ? (ie, idUserInterface, doesn't contain that member, and it doesn't seem to inherit it. But, the code is correct, and compiles.)
Here is how the function is being defined, the best I can tell.
class idUserInterfaceManagerLocal : public idUserInterfaceManager {
friend class idUserInterfaceLocal;
public:
virtual idUserInterface * FindGui( const char *qpath, bool autoLoad = false, bool needInteractive = false, bool forceUnique = false );
This link contains a reference for the entire source code for the game, so you can easily look up the classes, view relations, etc, to help answer this question.
https://dev.visucore.com/doom3/doxygen/index.html[
^]
You can also download the full source here.
https://github.com/TTimo/doom3.gpl[
^]
(Just ask if you need any more info, I tried to keep it short, and relevant.)
-----
For the record, here is what I'm actually working on, I'm creating a new solution in VC++, and remaking the project by importing the original code, it originally consisted of several sub projects, which I'm condensing into a single project, since most of it's not needed for my purposes. (ie, it had code for the expansion packs, an SDK, editors, etc,.)
It was going well until I hit this error.
game\EndLevel.cpp(58): error C3861: 'FindGui': identifier not found
Which lead to the current question, I need to figure out how this technique works, what it's called, and research it, so I can properly implement this portion of the original source in my new VC++ solution. (Hope this all makes sense.)