Changeset 346
- Timestamp:
- Nov 29, 2007, 4:21:30 PM (17 years ago)
- Location:
- code/branches/FICN
- Files:
-
- 7 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN
-
Property
svn:ignore
set to
FICN.sln
FICN.ncb
FICN.vcproj
FICN.vcproj.RGRIEDERT60.rgrieder.user
FICN.suo
obj
-
Property
svn:ignore
set to
-
code/branches/FICN/bin
-
Property
svn:ignore
set to
benixonox
-
Property
svn:ignore
set to
-
code/branches/FICN/src/loader/LevelLoader.cc
r341 r346 15 15 dir.append("/"); 16 16 dir.append(file); 17 rootNode = XMLNode::openFileHelper( dir.c_str(),"WorldDataFile");17 rootNode = XMLNode::openFileHelper((const wchar_t*)dir.c_str(),(const wchar_t*)"WorldDataFile"); 18 18 // TODO: Error handling 19 19 20 20 // Assing general level infos to class variables 21 this->name_ = rootNode.getChildNode("name").getText();22 this->description_ = rootNode.getChildNode("description").getText();23 this->image_ = rootNode.getChildNode("image").getText();21 this->name_ = (const char*)rootNode.getChildNode((const wchar_t*)"name").getText(); 22 this->description_ = (const char*)rootNode.getChildNode((const wchar_t*)"description").getText(); 23 this->image_ = (const char*)rootNode.getChildNode((const wchar_t*)"image").getText(); 24 24 25 25 this->loadingScreen(); 26 26 27 27 // Assign sub-nodes 28 if (rootNode.nChildNode( "LightManager")==1)28 if (rootNode.nChildNode((const wchar_t*)"LightManager")==1) 29 29 { 30 30 // Init Luightmanager... -
code/branches/FICN/src/loader/Light.cc
r341 r346 9 9 10 10 } 11 12 Light::~Light() 13 { 14 } 11 15 12 16 Light::Light(XMLNode xml) … … 18 22 { 19 23 // Here comes the tricky part... convert strings to int 20 const char* diffuse = xml.getAttribute("diffuse-color");21 const char* coor = xml.getAttribute("abs-coor");24 const char* diffuse = (const char*)xml.getAttribute((const wchar_t*)"diffuse-color"); 25 const char* coor = (const char*)xml.getAttribute((const wchar_t*)"abs-coor"); 22 26 } 23 27 } -
code/branches/FICN/src/loader/Light.h
r341 r346 7 7 namespace light 8 8 { 9 class Light ()9 class Light 10 10 { 11 11 public: -
code/branches/FICN/src/loader/LightManager.cc
r341 r346 7 7 LightManager::LightManager() 8 8 { 9 vector<Light> this->elements_ = new vector<Light>;9 std::vector<Light> elements_ = *(new std::vector<Light>); 10 10 } 11 11 … … 14 14 if (!xml.isEmpty()) 15 15 { 16 int nLights = xml.nChildNode( "light");16 int nLights = xml.nChildNode((const wchar_t*)"light"); 17 17 for (int i=0; i<nLights;i++) 18 18 { 19 Light l = new Light(xml.getChildNode("light",i));20 this->elements_.append(l);19 Light l = *(new Light(xml.getChildNode((const wchar_t*)"light",i))); 20 this->elements_.insert(elements_.end(),l); 21 21 } 22 22 } -
code/branches/FICN/src/loader/LightManager.h
r341 r346 9 9 namespace light 10 10 { 11 class LightManager ()11 class LightManager 12 12 { 13 13 public: … … 20 20 float ambient_g_; 21 21 float ambient_b_; 22 22 std::vector<Light> elements_; 23 23 }; 24 24 } -
code/branches/FICN/src/network/ClientConnection.cc
r337 r346 12 12 #include "ClientConnection.h" 13 13 14 // workaround for usleep(int) under windows 15 #ifdef WIN32 16 #include "winbase.h" 17 #endif 18 14 19 namespace network{ 15 20 16 boost::thread_group network_threads;21 static boost::thread_group network_threads; 17 22 18 23 ClientConnection::ClientConnection(int port, std::string address){ … … 34 39 bool ClientConnection::waitEstablished(int milisec){ 35 40 for(int i=0; i<=milisec && !established; i++) 41 // under windows, use Sleep(milliseconds) instead of usleep(microseconds) 42 #ifdef WIN32 43 Sleep(1); 44 #else 36 45 usleep(1000); 46 #endif 37 47 return established; 38 48 } -
code/branches/FICN/src/network/GameStateManager.cc
r337 r346 106 106 } 107 107 108 108 return true; 109 109 } 110 110 … … 115 115 */ 116 116 // orxonox::Iterator<Synchronisable> removeObject(orxonox::Iterator<Synchronisable> it){ 117 void removeObject(orxonox::Iterator<Synchronisable> &it){117 void GameStateManager::removeObject(orxonox::Iterator<Synchronisable> &it){ 118 118 orxonox::Iterator<Synchronisable> temp=it; 119 119 ++it; -
code/branches/FICN/src/network/GameStateManager.h
r337 r346 44 44 bool loadSnapshot(GameState state); 45 45 private: 46 bool removeObject(orxonox::Iterator<Synchronisable>it);46 void removeObject(orxonox::Iterator<Synchronisable> &it); 47 47 48 48 }; -
code/branches/FICN/src/network/PacketBufferTest.cc
r337 r346 14 14 p.data=i*i; 15 15 std::cout << i << ": pushing " << p.data << std::endl; 16 test.push( p);16 test.push((ENetEvent*)&p); 17 17 } 18 18 std::cout << std::endl << "queue.print()" << std::endl; 19 19 test.print(); 20 20 while(!test.isEmpty()){ 21 int i =test.pop().data;21 int i = (int)test.pop()->data; 22 22 std::cout << "We popped the value " << i << std::endl; 23 23 } -
code/branches/FICN/src/network/PacketBufferTestExt.cc
r337 r346 7 7 8 8 using namespace network; 9 10 // workaround for usleep(int) under windows 11 #ifdef WIN32 12 #include "winbase.h" 13 #endif 9 14 10 15 … … 18 23 ENET_PACKET_FLAG_RELIABLE); 19 24 std::cout << i << ": pushing " << packet->data << std::endl; 20 test->push( packet);25 test->push((ENetEvent*)packet); 21 26 if(i==5) 27 // under windows, use Sleep(milliseconds) instead of usleep(microseconds) 28 #ifdef WIN32 29 Sleep(200); 30 #else 22 31 usleep(200000); 32 #endif 23 33 } 24 34 test->setClosed(true); -
code/branches/FICN/src/network/Synchronisable.cc
r337 r346 21 21 { 22 22 datasize=0; 23 registerAllVariables();23 //registerAllVariables(); 24 24 } 25 25 -
code/branches/FICN/src/network/Synchronisable.h
r337 r346 52 52 int getSize(); 53 53 bool updateData(syncData vars); 54 virtual void registerAllVariables() ;54 virtual void registerAllVariables() = 0; 55 55 56 56 private: -
code/branches/FICN/src/network/dummyclient.cc
r337 r346 8 8 #include <enet/enet.h> 9 9 #include "PacketManager.h" 10 11 // workaround for usleep(int) under windows 12 #ifdef WIN32 13 #include "winbase.h" 14 #endif 15 10 16 11 17 using namespace std; … … 67 73 cout << "failed sending" << endl; 68 74 } 75 // under windows, use Sleep(milliseconds) instead of usleep(microseconds) 76 #ifdef WIN32 77 Sleep(1000); 78 #else 69 79 usleep(1000000); 80 #endif 70 81 } 71 82 -
code/branches/FICN/src/network/dummyserver.cc
r341 r346 9 9 #include "ConnectionManager.h" 10 10 #include "PacketManager.h" 11 12 // workaround for usleep(int) under windows 13 #ifdef WIN32 14 #include "winbase.h" 15 #endif 16 11 17 12 18 using namespace network; … … 23 29 while(!quit){ 24 30 if(server.queueEmpty()) 31 // under windows, use Sleep(milliseconds) instead of usleep(microseconds) 32 // Warning: Sleep(1) is ten times longer than usleep(100)! 33 #ifdef WIN32 34 Sleep(1); 35 #else 25 36 usleep(100); 37 #endif 26 38 else{ 27 39 ENetAddress addr; -
code/branches/FICN/src/orxonox/core/Identifier.h
r258 r346 8 8 #include "Factory.h" 9 9 10 #define HIERARCHY_VERBOSE false10 #define HIERARCHY_VERBOSE 0 11 11 12 12 -
code/branches/FICN/src/orxonox/objects/test3.cc
r258 r346 33 33 testandcout(test1->usefullClass3isA(Class(Test2))); 34 34 testandcout(test1->usefullClass3isA(Class(Test3))); 35 36 return true; 35 37 } 36 38 … … 50 52 testandcout(test2->usefullClass3isA(Class(Test2))); 51 53 testandcout(test2->usefullClass3isA(Class(Test3))); 54 55 return true; 52 56 } 53 57 } -
code/branches/FICN/src/orxonox/orxonox.cc
r341 r346 33 33 #include <Ogre.h> 34 34 #include <OIS/OIS.h> 35 #include <CEGUI/CEGUI.h>36 #include <OgreCEGUIRenderer.h>35 //#include <CEGUI/CEGUI.h> 36 //#include <OgreCEGUIRenderer.h> 37 37 38 38 #include <string> … … 209 209 OIS::Mouse *mMouse; 210 210 OIS::InputManager *mInputManager; 211 CEGUI::OgreCEGUIRenderer *mRenderer;212 CEGUI::System *mSystem;211 //CEGUI::OgreCEGUIRenderer *mRenderer; 212 //CEGUI::System *mSystem; 213 213 OrxExitListener *mListener; 214 214 … … 271 271 { 272 272 273 string levelFile = "sp_level_moonstation.oxw";274 loader::LevelLoader* loader = new loader::LevelLoader(levelFile);273 //string levelFile = "sp_level_moonstation.oxw"; 274 //loader::LevelLoader* loader = new loader::LevelLoader(levelFile); 275 275 } 276 276
Note: See TracChangeset
for help on using the changeset viewer.