Changeset 8144 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jun 4, 2006, 7:55:55 PM (19 years ago)
- Location:
- branches/gui/src
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/defs/debug.h
r7819 r8144 131 131 #define PRINTF1 \ 132 132 if (SOFT_DEBUG_LEVEL >= ORX_ERR) \ 133 printf("(EE)::%s:%d:", __FILE__, __LINE__) &&PRINT_EXEC134 #else 135 #define PRINTF1 if (ORX_NONE) 133 printf("(EE)::%s:%d:", __FILE__, __LINE__), PRINT_EXEC 134 #else 135 #define PRINTF1 if (ORX_NONE) PRINT_EXEC 136 136 #endif 137 137 … … 139 139 #define PRINTF2 \ 140 140 if (SOFT_DEBUG_LEVEL >= ORX_WARN) \ 141 printf("(WW)::%s:%d:", __FILE__, __LINE__) &&PRINT_EXEC142 143 #else 144 #define PRINTF2 if (ORX_NONE) 141 printf("(WW)::%s:%d:", __FILE__, __LINE__), PRINT_EXEC 142 143 #else 144 #define PRINTF2 if (ORX_NONE) PRINT_EXEC 145 145 #endif 146 146 … … 148 148 #define PRINTF3 \ 149 149 if (SOFT_DEBUG_LEVEL >= ORX_INFO) \ 150 printf("(II)::%s:%d:", __FILE__, __LINE__) &&PRINT_EXEC151 #else 152 #define PRINTF3 if (ORX_NONE) 150 printf("(II)::%s:%d:", __FILE__, __LINE__), PRINT_EXEC 151 #else 152 #define PRINTF3 if (ORX_NONE) PRINT_EXEC 153 153 #endif 154 154 … … 156 156 #define PRINTF4 \ 157 157 if (SOFT_DEBUG_LEVEL >= ORX_DEBUG) \ 158 printf("(DD)::%s:%d:", __FILE__, __LINE__) &&PRINT_EXEC159 #else 160 #define PRINTF4 if (ORX_NONE) 158 printf("(DD)::%s:%d:", __FILE__, __LINE__), PRINT_EXEC 159 #else 160 #define PRINTF4 if (ORX_NONE) PRINT_EXEC 161 161 #endif 162 162 … … 164 164 #define PRINTF5 \ 165 165 if (SOFT_DEBUG_LEVEL >= ORX_vDEBUG) \ 166 printf("(VD)::%s:%d:", __FILE__, __LINE__) &&PRINT_EXEC167 #else 168 #define PRINTF5 if (ORX_NONE) 166 printf("(VD)::%s:%d:", __FILE__, __LINE__), PRINT_EXEC 167 #else 168 #define PRINTF5 if (ORX_NONE) PRINT_EXEC 169 169 #endif 170 170 … … 174 174 175 175 #define PRINTF0 \ 176 printf("%s:%d::", __FILE__, __LINE__) &&PRINT_EXEC176 printf("%s:%d::", __FILE__, __LINE__), PRINT_EXEC 177 177 #endif 178 178 … … 196 196 PRINT_EXEC 197 197 #else 198 #define PRINT1 if (ORX_NONE) 198 #define PRINT1 if (ORX_NONE) PRINT_EXEC 199 199 #endif 200 200 … … 205 205 206 206 #else 207 #define PRINT2 if (ORX_NONE) 207 #define PRINT2 if (ORX_NONE) PRINT_EXEC 208 208 #endif 209 209 … … 213 213 PRINT_EXEC 214 214 #else 215 #define PRINT3 if (ORX_NONE) 215 #define PRINT3 if (ORX_NONE) PRINT_EXEC 216 216 #endif 217 217 … … 221 221 PRINT_EXEC 222 222 #else 223 #define PRINT4 if (ORX_NONE) 223 #define PRINT4 if (ORX_NONE) PRINT_EXEC 224 224 #endif 225 225 … … 229 229 PRINT_EXEC 230 230 #else 231 #define PRINT5 if (ORX_NONE) 231 #define PRINT5 if (ORX_NONE) PRINT_EXEC 232 232 #endif 233 233 -
branches/gui/src/lib/collision_reaction/cr_engine.h
r7927 r8144 51 51 52 52 /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */ 53 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ }53 inline Collision* getCollisionObject() { /* return the first element of the cache list*/ } 54 54 /** @param collision: returns the Collision object back to the cache list */ 55 55 inline void putCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); } -
branches/gui/src/lib/graphics/importer/primitive_model.cc
r7729 r8144 104 104 105 105 // defining the binding Faces. 106 unsignedint v1, v2, v3, v4;106 int v1, v2, v3, v4; 107 107 for (int i = 0; i <= detail * 2 -1; i++) 108 108 { … … 235 235 } 236 236 //defining Faces 237 unsignedint v1, v2, v3, v4;237 int v1, v2, v3, v4; 238 238 for (int i = 0; i < detail-1; i++) 239 239 for (int j = 0; j < detail-1; j++) -
branches/gui/src/lib/graphics/importer/texture.cc
r7790 r8144 218 218 this->setTexture(Texture::loadTexToGL(this->data->getStoredImage())); 219 219 } 220 return true; 220 221 } 221 222 -
branches/gui/src/lib/graphics/importer/texture.h
r7790 r8144 34 34 bool setSurface(SDL_Surface* newSurface); 35 35 /** @returns true if the Surface has an Alpha Value. */ 36 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; };36 bool setAlpha(bool hasAlpha) { this->bAlpha = hasAlpha; return this->bAlpha; }; 37 37 bool setTexture(GLuint texture); 38 38 -
branches/gui/src/lib/gui/gl/glgui_style.h
r8143 r8144 1 1 /*! 2 2 * @file glgui_style.h 3 * @brief Definition of ...3 * @brief Definition of the OpenGL-GUI Style of a Class. 4 4 */ 5 5 … … 19 19 { 20 20 public: 21 //! An enumerator that defines the different states Widgets may be in.22 typedef enum {23 Normal, //!< Normal state of the GUI's Widgets.24 Active, //!< If the widget is Active.25 Selected, //!< If the Widget is Selected.26 Insensitive //!< If the Widget is insensitive.27 } State;28 21 29 22 //! Where a Certain feature will be positioned at. … … 35 28 } FeaturePosition; 36 29 30 31 37 32 public: 38 33 GLGuiStyle(); … … 41 36 42 37 private: 43 44 38 float _borderLeft; //!< The Distance to the left Border of the widget, before any internal Element starts. 45 39 float _borderRight; //!< The Distance to the right Border of the widget, before any internal Element starts. -
branches/gui/src/lib/gui/gl/glgui_widget.h
r8140 r8144 35 35 */ 36 36 class GLGuiWidget : public Element2D 37 { 37 { 38 public: 39 //! An enumerator that defines the different states Widgets may be in. 40 typedef enum { 41 Normal, //!< Normal state of the GUI's Widgets. 42 Active, //!< If the widget is Active. 43 Selected, //!< If the Widget is Selected. 44 Insensitive //!< If the Widget is insensitive. 45 } State; 46 47 48 38 49 public: 39 50 GLGuiWidget(GLGuiWidget* parent = NULL); -
branches/gui/src/lib/gui/qt/gui_general.cc
r7855 r8144 41 41 */ 42 42 GuiGeneral::GuiGeneral(OrxGui::Gui* gui) 43 : Element(CONFIG_SECTION_GENERAL, gui), QGroupBox()43 : QGroupBox(), Element(CONFIG_SECTION_GENERAL, gui) 44 44 { 45 45 QGridLayout* layout = new QGridLayout(this); -
branches/gui/src/lib/lang/base_object.cc
r7954 r8144 154 154 if (classID != CL_NULL) 155 155 return this->isA(classID); 156 else 157 return false; 156 158 } 157 159 -
branches/gui/src/lib/lang/class_list.cc
r7429 r8144 335 335 PRINT(0)("| knows %d Classes\n|\n", ClassList::classList->size()); 336 336 char niceString[100]; 337 unsignedint lenCount = 0;337 int lenCount = 0; 338 338 339 339 list<ClassList>::iterator cl; -
branches/gui/src/lib/math/vector.h
r8035 r8144 79 79 inline const Vector& operator= (const Vector& v) { this->x = v.x; this->y = v.y; this->z = v.z; return *this; }; 80 80 /** copy constructor* @param v the sVec3D to assign to this vector. @returns the vector v */ 81 inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; }82 inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; }81 inline const Vector& operator= (const sVec3D& v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; } 82 inline const Vector& operator= (const float* v) { this->x = v[0]; this->y = v[1]; this->z = v[2]; return *this; } 83 83 /** @param v: the other vector \return the dot product of the vectors */ 84 84 float dot (const Vector& v) const { return x*v.x+y*v.y+z*v.z; }; -
branches/gui/src/lib/shell/shell_buffer.cc
r8123 r8144 64 64 * @param line the Line as in the first argument in printf 65 65 */ 66 boolShellBuffer::addBufferLineStatic(const char* line, ...)66 void ShellBuffer::addBufferLineStatic(const char* line, ...) 67 67 { 68 68 static OrxThread::Mutex ShellBuffer__bufferMutex; … … 85 85 #endif 86 86 ShellBuffer::singletonRef->addBufferLine(ShellBuffer::bufferArray); 87 return true;88 87 } 89 88 -
branches/gui/src/lib/shell/shell_buffer.h
r8123 r8144 32 32 inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; }; 33 33 34 static booladdBufferLineStatic(const char* line, ...);34 static void addBufferLineStatic(const char* line, ...); 35 35 void addBufferLine(const char* line); 36 36 -
branches/gui/src/lib/shell/shell_command.h
r7742 r8144 34 34 * $ ClassName [ObjectName] commandNameInShell [parameters] 35 35 */ 36 //#define SHELL_COMMAND(command, class, function) \37 // ShellCommand* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)38 36 #define SHELL_COMMAND(command, class, function) \ 39 37 OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class>(&class::function)) -
branches/gui/src/lib/util/count_pointer.h
r6669 r8144 11 11 explicit CountPointer(X* p = 0) // allocate a new counter 12 12 : itsCounter(0) { if (p) itsCounter = new counter(p); } 13 ~CountPointer() { release(); }13 virtual ~CountPointer() { release(); } 14 14 CountPointer(const CountPointer& r) { acquire(r.itsCounter); } 15 15 CountPointer& operator=(const CountPointer& r) -
branches/gui/src/util/animation/t_animation.h
r5115 r8144 242 242 break; 243 243 case ANIM_NEG_EXP: 244 {245 244 this->animFunc = &tAnimation<T>::negExp; 246 245 expFactor = - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X); 247 246 break; 248 }249 247 case ANIM_QUADRATIC: 250 248 this->animFunc = &tAnimation<T>::quadratic; -
branches/gui/src/util/hud.cc
r7064 r8144 62 62 } 63 63 64 void Hud::setEnergyWidget( GLGuiWidget* widget)64 void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget) 65 65 { 66 66 // decopple old widget … … 83 83 } 84 84 85 void Hud::setShiledWidget( GLGuiWidget* widget)85 void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget) 86 86 { 87 87 } 88 88 89 void Hud::setArmorWidget( GLGuiWidget* widget)89 void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget) 90 90 { 91 91 } … … 115 115 { 116 116 // hide all the Widgets 117 std::list< GLGuiWidget*>::iterator weaponWidget;117 std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget; 118 118 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++) 119 119 { … … 140 140 } 141 141 142 void Hud::addWeaponWidget( GLGuiWidget* widget)142 void Hud::addWeaponWidget(OrxGui::GLGuiWidget* widget) 143 143 { 144 144 } 145 145 146 void Hud::removeWeaponWidget( GLGuiWidget* widget)146 void Hud::removeWeaponWidget(OrxGui::GLGuiWidget* widget) 147 147 { 148 148 } … … 160 160 this->setSize2D(.2 * this->resX, this->resY); 161 161 162 std::list< GLGuiWidget*>::iterator weaponWidget;162 std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget; 163 163 float pos = .3; 164 164 for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.03) -
branches/gui/src/util/hud.h
r7779 r8144 15 15 16 16 //! A class that renders a HUD. 17 class Hud : public OrxGui::GLGuiWidget17 class Hud : public Element2D 18 18 { 19 19 … … 26 26 27 27 void setBackGround(); 28 void setEnergyWidget( GLGuiWidget* widget);29 void setShiledWidget( GLGuiWidget* widget);30 void setArmorWidget( GLGuiWidget* widget);28 void setEnergyWidget(OrxGui::GLGuiWidget* widget); 29 void setShiledWidget(OrxGui::GLGuiWidget* widget); 30 void setArmorWidget(OrxGui::GLGuiWidget* widget); 31 31 void setWeaponManager(WeaponManager* weaponMan); 32 32 33 void addWeaponWidget( GLGuiWidget* widget);34 void removeWeaponWidget( GLGuiWidget* widget);33 void addWeaponWidget(OrxGui::GLGuiWidget* widget); 34 void removeWeaponWidget(OrxGui::GLGuiWidget* widget); 35 35 36 36 void updateWeaponManager(); … … 46 46 unsigned int resY; 47 47 48 GLGuiWidget*energyWidget;49 GLGuiWidget*shieldWidget;50 GLGuiWidget*armorWidget;48 OrxGui::GLGuiWidget* energyWidget; 49 OrxGui::GLGuiWidget* shieldWidget; 50 OrxGui::GLGuiWidget* armorWidget; 51 51 52 52 WeaponManager* weaponManager; 53 53 54 std::list< GLGuiWidget*>weaponsWidgets; //!< WeaponWidgets will be displayed one after another54 std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another 55 55 }; 56 56 -
branches/gui/src/world_entities/player.cc
r7868 r8144 38 38 39 39 this->playable = NULL; 40 this->hud.s how();40 this->hud.setVisibility(true); 41 41 42 42 this->subscribeEvent(ES_GAME, KeyMapper::PEV_CHANGE_SHIP);
Note: See TracChangeset
for help on using the changeset viewer.