[SOLVED] Problem updating a code. Help please.
Posted: Tue Apr 08, 2014 22:26
Hello,
I'm new here. I'm trying to update the code for a game that i found. It all was going fine but i have a problem with the OgreCEGUIRenderer.h.
I'm working on debian Jessie and that OgreCEGUIRenderer.h is not available there. The line of code that is causing trouble right now is the following:
CEGUI::Texture *cTex = static_cast<CEGUI::OgreCEGUIRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture((CEGUI::utf8*)"RttTex");
That's the original line. It was written under Cegui = 0.6.2. I currently have the newest version of CEGUI and OGRE but i cannot download the package libceguiogre-dev.
I tried to change the line to
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
But i get this
In member function ‘virtual void CSimulatorWindowHandler::init()’:
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected type-specifier
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected ‘>’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected ‘(’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: ‘OgreRenderer’ is not a member of ‘CEGUI’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:61: error: expected primary-expression before ‘>’ token
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:137: error: expected primary-expression before string constant
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:146: error: expected ‘)’ before ‘;’ token
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
The game is named "Project Football" by Ikaro Games. I need to make a couple of little changes but before i need to make it run so i need to update to the newest version of CEGUI.
I'm new here. I'm trying to update the code for a game that i found. It all was going fine but i have a problem with the OgreCEGUIRenderer.h.
I'm working on debian Jessie and that OgreCEGUIRenderer.h is not available there. The line of code that is causing trouble right now is the following:
CEGUI::Texture *cTex = static_cast<CEGUI::OgreCEGUIRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture((CEGUI::utf8*)"RttTex");
That's the original line. It was written under Cegui = 0.6.2. I currently have the newest version of CEGUI and OGRE but i cannot download the package libceguiogre-dev.
I tried to change the line to
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
But i get this
In member function ‘virtual void CSimulatorWindowHandler::init()’:
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected type-specifier
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected ‘>’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: expected ‘(’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:41: error: ‘OgreRenderer’ is not a member of ‘CEGUI’
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:61: error: expected primary-expression before ‘>’ token
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:137: error: expected primary-expression before string constant
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
../src/singlePlayer/wh/CSimulatorWindowHandler.cpp:251:146: error: expected ‘)’ before ‘;’ token
CEGUI::Texture *cTex = static_cast<CEGUI::OgreRenderer*>(CEGUI::System::getSingleton().getRenderer())->createTexture(CEGUI::String "RttTex");
^
The game is named "Project Football" by Ikaro Games. I need to make a couple of little changes but before i need to make it run so i need to update to the newest version of CEGUI.