Changeset 1660 for code/branches/gui
- Timestamp:
- Aug 17, 2008, 7:27:36 PM (16 years ago)
- Location:
- code/branches/gui
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/core/CMakeLists.txt
r1645 r1660 5 5 Error.cc 6 6 Exception.cc 7 GameState.cc 7 8 Language.cc 8 9 OrxonoxClass.cc -
code/branches/gui/src/core/Exception.h
r1652 r1660 43 43 #include "core/Debug.h" 44 44 45 // Define some ugly macros to make things more clear 46 #define CREATE_ORXONOX_EXCEPTION(name) typedef SpecificException<Exception::name> name##Exception; 47 #define RETURN_EXCEPTION_CODE(name) \ 48 case Exception::name: \ 49 return #name; 50 51 45 52 namespace orxonox 46 53 { … … 54 61 PluginsNotFound, 55 62 InitialisationFailed, 56 NotImplemented 63 NotImplemented, 64 GameState 57 65 }; 58 66 … … 106 114 std::string getTypeName() const 107 115 { 108 // note: break is not necessary due to the return . Keep in mind!116 // note: break is not necessary due to the return in the macros. 109 117 switch (Type) 110 118 { 111 case Exception::General: 112 return "General"; 113 case Exception::FileNotFound: 114 return "FileNotFound"; 115 case Exception::PluginsNotFound: 116 return "PluginsNotFound"; 117 case Exception::InitialisationFailed: 118 return "InitialisationFailed"; 119 case Exception::NotImplemented: 120 return "NotImplemented"; 119 RETURN_EXCEPTION_CODE(General) 120 RETURN_EXCEPTION_CODE(FileNotFound); 121 RETURN_EXCEPTION_CODE(PluginsNotFound); 122 RETURN_EXCEPTION_CODE(InitialisationFailed); 123 RETURN_EXCEPTION_CODE(NotImplemented); 124 RETURN_EXCEPTION_CODE(GameState); 121 125 default: 122 126 return ""; … … 125 129 }; 126 130 127 typedef SpecificException<Exception::General> GeneralException; 128 typedef SpecificException<Exception::FileNotFound> FileNotFoundException; 129 typedef SpecificException<Exception::PluginsNotFound> PluginsNotFoundException; 130 typedef SpecificException<Exception::InitialisationFailed> InitialisationFailedException; 131 typedef SpecificException<Exception::NotImplemented> NotImplementedException; 131 // define the template spcialisations 132 CREATE_ORXONOX_EXCEPTION(General); 133 CREATE_ORXONOX_EXCEPTION(FileNotFound); 134 CREATE_ORXONOX_EXCEPTION(PluginsNotFound); 135 CREATE_ORXONOX_EXCEPTION(InitialisationFailed); 136 CREATE_ORXONOX_EXCEPTION(NotImplemented); 137 CREATE_ORXONOX_EXCEPTION(GameState); 132 138 133 139 #define ThrowException(type, description) \ -
code/branches/gui/src/core/input/InputManager.cc
r1659 r1660 498 498 499 499 joySticks_.clear(); 500 _redimensionLists(); 500 // don't use _redimensionLists(), might mess with registered handler if 501 // downgrading from 2 to 1 joystick 502 //_redimensionLists(); 503 joySticksSize_ = 0; 501 504 } 502 505 CCOUT(4) << "Joy sticks destroyed." << std::endl; -
code/branches/gui/src/orxonox/Main.cc
r1638 r1660 110 110 } 111 111 112 #include "core/GameState.h" 113 112 114 #ifdef __cplusplus 113 115 extern "C" { … … 125 127 return 0; 126 128 } 129 130 131 /*GameState* state1 = new GameState("state1"); 132 GameState* state2 = new GameState("state2"); 133 GameState* state3 = new GameState("state3"); 134 GameState* state4 = new GameState("state4"); 135 GameState* state5 = new GameState("state5"); 136 GameState* state6 = new GameState("state6"); 137 138 state1->addChild(state4); 139 state1->addChild(state6); 140 state2->addChild(state3); 141 state2->addChild(state5); 142 state3->addChild(state1); 143 state6->addChild(state2); 144 145 state5->requestState("state3"); 146 COUT(2) << std::endl; 147 state2->requestState("state2"); 148 COUT(2) << std::endl; 149 state2->requestState("state1"); 150 COUT(2) << std::endl; 151 state4->requestState("state3"); 152 COUT(2) << std::endl; 153 state1->requestState("state4"); 154 COUT(2) << std::endl; 155 state1->requestState("state2"); 156 COUT(2) << std::endl; 157 state1->requestState("stat"); 158 COUT(2) << std::endl; 159 state1->requestState("state5"); 160 COUT(2) << std::endl;*/ 161 162 127 163 128 164 Orxonox orxonoxInstance; -
code/branches/gui/visual_studio/vc8/core.vcproj
r1647 r1660 169 169 </File> 170 170 <File 171 RelativePath="..\..\src\core\GameState.cc" 172 > 173 </File> 174 <File 171 175 RelativePath="..\..\src\core\Language.cc" 172 176 > … … 400 404 </File> 401 405 <File 406 RelativePath="..\..\src\core\GameState.h" 407 > 408 </File> 409 <File 402 410 RelativePath="..\..\src\core\Language.h" 403 411 >
Note: See TracChangeset
for help on using the changeset viewer.