The error message I get is this.
My code is gigantic, Ill just cut out the relavant parts to make this easy to read.Code:C:\Programming\4x\ClientCode\SplashManager.cpp(81) : error C2039: 'LoadMenuA' : is not a member of 'sGameMode' c:\programming\4x\clientcode\mode.h(36) : see declaration of 'sGameMode'
Code:struct sShared { public: sGameMode* mode; }; struct sGameMode { public: sGameMode() { mode = GAMEMODE_LOAD_SPLASH; } ~sGameMode() { } //batch void LoadSplash() { mode = GAMEMODE_LOAD_SPLASH; } void LoadMenu() { mode = GAMEMODE_LOAD_MENU; } void Quit() { mode = GAMEMODE_QUIT; } void Exit() { mode = GAMEMODE_EXIT; } //Only return a load mode one time, increment to the actual mode after short GetMode() { short m = mode; switch(mode) { case GAMEMODE_LOAD_SPLASH: case GAMEMODE_LOAD_MENU: mode++; break; } return m; } private: short mode; }; class cSplashManager : public sShared { public: cSplashManager(); ~cSplashManager(); void Process(float* rate); private: //data structures sSplash* current; //fade functionality bool fadein; float accum; }; void cSplashManager::Process(float* rate) { //increment the accum value based on in our out if(fadein) accum += *rate; else accum -= *rate; //check to see if we need to change direction if(accum > 1.5f) fadein = false; //check to see if we are done else if(accum < -0.25f) mode->LoadMenu(); //COMPILER ERROR HERE //set the current color based on this value current->color->SetA(accum); }



LinkBack URL
About LinkBacks


