Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8145 in orxonox.OLD


Ignore:
Timestamp:
Jun 5, 2006, 11:49:26 AM (18 years ago)
Author:
bensch
Message:

trunk: merged the gui back
merged with command:
svn merge -r8114:HEAD https://svn.orxonox.net/orxonox/branches/gui .
→ no conflicts

Location:
trunk
Files:
3 deleted
24 edited
93 copied

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r8061 r8145  
    526526  AX_CHECK_REQUIRED_HEADER_LIB([avformat.h ffmpeg/avformat.h] ,[avformat], [main],
    527527   [AX_CHECK_REQUIRED_HEADER_LIB([avcodec.h ffmpeg/avcodec.h], [avcodec], [main],,, [http://ffmpeg.sourceforge.net]) LIBS="${LIBS} -lavformat -lavcodec"],
    528    [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a])
     528     [AX_GET_INSTALL_NECESSARY_LIB([http://svn.orxonox.net/webdev/develop/ext_libs], [ffmpeg.tar.gz], [ffmpeg], [extern_libs/], [include/*.h lib/*.a])
    529529       LIBS="-llualib -llua"  CPPFLAGS="${CPPFLAGS} -I$(top_build_dir)/extern_libs" ],
    530530  [http://ffmpeg.sourceforge.net])
     531
     532
    531533
    532534
     
    625627                 src/lib/shell/Makefile
    626628                 src/lib/gui/Makefile
    627                  src/lib/gui/gtk_gui/Makefile
    628                  src/lib/gui/gl_gui/Makefile
    629                  src/lib/gui/qt_gui/Makefile
     629                 src/lib/gui/gtk/Makefile
     630                 src/lib/gui/gl/Makefile
     631                 src/lib/gui/qt/Makefile
    630632                 src/lib/script_engine/Makefile
    631633                 src/lib/parser/Makefile
  • trunk/src/defs/debug.h

    r7819 r8145  
    131131#define PRINTF1 \
    132132    if (SOFT_DEBUG_LEVEL >= ORX_ERR) \
    133       printf("(EE)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    134 #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
    136136#endif
    137137
     
    139139#define PRINTF2 \
    140140     if (SOFT_DEBUG_LEVEL >= ORX_WARN) \
    141        printf("(WW)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    142 
    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
    145145#endif
    146146
     
    148148#define PRINTF3 \
    149149     if (SOFT_DEBUG_LEVEL >= ORX_INFO) \
    150        printf("(II)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    151 #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
    153153#endif
    154154
     
    156156#define PRINTF4 \
    157157     if (SOFT_DEBUG_LEVEL >= ORX_DEBUG) \
    158        printf("(DD)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    159 #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
    161161#endif
    162162
     
    164164#define PRINTF5 \
    165165     if (SOFT_DEBUG_LEVEL >= ORX_vDEBUG) \
    166        printf("(VD)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC
    167 #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
    169169#endif
    170170
     
    174174
    175175#define PRINTF0 \
    176     printf("%s:%d::", __FILE__, __LINE__) && PRINT_EXEC
     176    printf("%s:%d::", __FILE__, __LINE__), PRINT_EXEC
    177177#endif
    178178
     
    196196    PRINT_EXEC
    197197#else
    198 #define PRINT1 if (ORX_NONE)
     198#define PRINT1 if (ORX_NONE) PRINT_EXEC
    199199#endif
    200200
     
    205205
    206206#else
    207 #define PRINT2 if (ORX_NONE)
     207#define PRINT2 if (ORX_NONE) PRINT_EXEC
    208208#endif
    209209
     
    213213    PRINT_EXEC
    214214#else
    215 #define PRINT3 if (ORX_NONE)
     215#define PRINT3 if (ORX_NONE) PRINT_EXEC
    216216#endif
    217217
     
    221221    PRINT_EXEC
    222222#else
    223 #define PRINT4 if (ORX_NONE)
     223#define PRINT4 if (ORX_NONE) PRINT_EXEC
    224224#endif
    225225
     
    229229       PRINT_EXEC
    230230#else
    231 #define PRINT5 if (ORX_NONE)
     231#define PRINT5 if (ORX_NONE) PRINT_EXEC
    232232#endif
    233233
  • trunk/src/defs/include_paths.am

    r7927 r8145  
    1212AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/render2D
    1313AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/particles
    14 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gtk_gui
    15 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gl_gui
    16 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gl_gui/glmenu
     14AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gl
     15AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gl/glmenu
    1716AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang
    1817AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/shell
  • trunk/src/lib/BuildLibs.am

    r7954 r8145  
    33                $(LIB_PREFIX)/libORXlibs.a \
    44                $(LIB_PREFIX)/shell/libORXshell.a \
    5                 $(LIB_PREFIX)/gui/qt_gui/libORXqtgui.a \
    6                 $(LIB_PREFIX)/gui/gl_gui/libORXglgui.a \
     5                $(LIB_PREFIX)/gui/qt/libORXqtgui.a \
     6                $(LIB_PREFIX)/gui/gl/libORXglgui.a \
    77                $(LIB_PREFIX)/gui/libORXbasegui.a \
    88                $(LIB_PREFIX)/graphics/importer/libORXimporter.a \
  • trunk/src/lib/collision_reaction/cr_engine.h

    r7927 r8145  
    5151
    5252  /** @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*/ }
    5454  /** @param collision: returns the Collision object back to the cache list */
    5555  inline void putCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }
  • trunk/src/lib/event/event_handler.cc

    r8061 r8145  
    337337  else
    338338  {
    339     SDL_WM_GrabInput(SDL_GRAB_ON);
     339//    SDL_WM_GrabInput(SDL_GRAB_ON);
    340340    SDL_ShowCursor(SDL_DISABLE);
    341341  }
  • trunk/src/lib/graphics/importer/primitive_model.cc

    r7729 r8145  
    104104
    105105  // defining the binding Faces.
    106   unsigned int v1, v2, v3, v4;
     106  int v1, v2, v3, v4;
    107107  for (int i = 0; i <= detail * 2 -1; i++)
    108108  {
     
    235235    }
    236236  //defining Faces
    237   unsigned int v1, v2, v3, v4;
     237  int v1, v2, v3, v4;
    238238  for (int i = 0; i < detail-1; i++)
    239239    for (int j = 0; j < detail-1; j++)
  • trunk/src/lib/graphics/importer/texture.cc

    r7790 r8145  
    218218    this->setTexture(Texture::loadTexToGL(this->data->getStoredImage()));
    219219  }
     220  return true;
    220221}
    221222
  • trunk/src/lib/graphics/importer/texture.h

    r7790 r8145  
    3434    bool setSurface(SDL_Surface* newSurface);
    3535    /** @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; };
    3737    bool setTexture(GLuint texture);
    3838
  • trunk/src/lib/gui/Makefile.am

    r7661 r8145  
    2323SUBDIRS = \
    2424        . \
    25         gl_gui \
    26         qt_gui
     25        gl \
     26        qt
    2727
    2828#       gtk_gui
  • trunk/src/lib/lang/base_object.cc

    r7954 r8145  
    154154  if (classID != CL_NULL)
    155155    return this->isA(classID);
     156  else
     157    return false;
    156158}
    157159
  • trunk/src/lib/lang/class_list.cc

    r7429 r8145  
    335335  PRINT(0)("| knows %d Classes\n|\n", ClassList::classList->size());
    336336  char niceString[100];
    337   unsigned int lenCount = 0;
     337  int lenCount = 0;
    338338
    339339  list<ClassList>::iterator cl;
  • trunk/src/lib/math/rect2D.cc

    r7919 r8145  
    3636Rect2D::Rect2D(float x, float y, float width, float height)
    3737{
    38   this->setLeft(x), this->setTop(y);
     38  this->setLeft(x),
     39  this->setTop(y);
    3940  this->setSize(width, height);
    4041}
  • trunk/src/lib/math/vector.h

    r8035 r8145  
    7979  inline const Vector& operator= (const Vector& v) { this->x = v.x; this->y = v.y; this->z = v.z; return *this; };
    8080  /** 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; }
    8383  /** @param v: the other vector \return the dot product of the vectors */
    8484  float dot (const Vector& v) const { return x*v.x+y*v.y+z*v.z; };
  • trunk/src/lib/shell/shell_buffer.cc

    r7764 r8145  
    4141  ShellBuffer* ShellBuffer::singletonRef = NULL;
    4242  std::list<std::string> ShellBuffer::buffer;
     43  char ShellBuffer::bufferArray[SHELL_BUFFER_SIZE];
     44
    4345
    4446  /**
     
    6264   * @param line the Line as in the first argument in printf
    6365   */
    64   bool ShellBuffer::addBufferLineStatic(const char* line, ...)
     66  void ShellBuffer::addBufferLineStatic(const char* line, ...)
    6567  {
    66     va_list arguments;
    67     va_start(arguments, line);
    68 
    6968    static OrxThread::Mutex ShellBuffer__bufferMutex;
    7069
    7170    OrxThread::MutexLock bufferLock(&ShellBuffer__bufferMutex);
     71
     72    va_list arguments;
     73    va_start(arguments, line);
     74    vsnprintf(ShellBuffer::bufferArray, SHELL_BUFFER_SIZE, line, arguments);
     75    va_end(arguments);
     76
    7277#if DEBUG_LEVEL < 3
    7378    if (ShellBuffer::singletonRef == NULL)
    7479#endif
    75       vprintf(line, arguments);
     80      printf(ShellBuffer::bufferArray);
    7681#if DEBUG_LEVEL < 3
    7782    else
     
    7984    if (ShellBuffer::singletonRef != NULL)
    8085#endif
    81       ShellBuffer::singletonRef->addBufferLine(line, arguments);
    82     return true;
     86      ShellBuffer::singletonRef->addBufferLine(ShellBuffer::bufferArray);
    8387  }
    8488
     
    9195   * and displays the line as the First Line of the display-buffer
    9296   */
    93   void ShellBuffer::addBufferLine(const char* line, va_list arguments)
     97  void ShellBuffer::addBufferLine(const char* line)
    9498  {
    95     // copy the output to the bufferArray
    96     vsprintf(this->bufferArray, line, arguments);
    97 
    98     std::string inputBuffer = this->keepBuffer + this->bufferArray;
     99    std::string inputBuffer = this->keepBuffer + line;
    99100
    100101    int lineBegin = 0;
  • trunk/src/lib/shell/shell_buffer.h

    r7762 r8145  
    3232    inline static bool isInstanciated() { return (ShellBuffer::singletonRef == NULL)?false:true; };
    3333
    34     static bool addBufferLineStatic(const char* line, ...);
    35     void addBufferLine(const char* line, va_list arg);
     34    static void addBufferLineStatic(const char* line, ...);
     35    void addBufferLine(const char* line);
    3636
    3737    /// BUFFER
     
    5656    unsigned int                  maxBufferSize;                         //!< The Size of the buffer
    5757
    58     char                          bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    5958    std::string                   keepBuffer;                         //!< a BUFFER to have multi-non-newLine commands be copied into the shell.
    6059
     
    6261
    6362    // The Beginning of buffer (buffer.front()) is the last added line.
     63    static char                   bufferArray[SHELL_BUFFER_SIZE];     //!< a BUFFER for fast writing
    6464    static std::list<std::string> buffer;                             //!< A list of stored char-arrays(strings) to store the history
    6565  };
  • trunk/src/lib/shell/shell_command.h

    r7742 r8145  
    3434   * $ ClassName [ObjectName] commandNameInShell [parameters]
    3535   */
    36   //#define SHELL_COMMAND(command, class, function) \
    37   //        ShellCommand* shell_command_##class##_##command = ShellCommand<class>::registerCommand(#command, #class, &class::function)
    3836#define SHELL_COMMAND(command, class, function) \
    3937           OrxShell::ShellCommand* shell_command_##class##_##command = OrxShell::ShellCommand::registerCommand(#command, #class, createExecutor<class>(&class::function))
  • trunk/src/lib/util/color.h

    r7195 r8145  
    1616{
    1717public:
     18  Color(float r, float g, float b, float a) :_r(r), _g(g), _b(b), _a(a) {};
     19  Color(const Color& c) { _r = c._r; _g = c._g; _b = c._b; _a = c._a; };
     20
     21  float r() const { return _r; }
     22  float& r() { return _r; }
     23  float g() const { return _g; }
     24  float& g() { return _g; }
     25  float b() const { return _b; }
     26  float& b() { return _b; }
     27  float a() const { return _a; }
     28  float& a() { return _a; }
     29
     30public:
    1831  static Vector RGBtoHSV (const Vector& RGB);
    1932  static void RGBtoHSV (const Vector& RGB, Vector& HSV);
     
    2437  static float minrgb(float r, float g, float b);
    2538  static float maxrgb(float r, float g, float b);
     39
     40  float       _r;     //!< Red Value.
     41  float       _g;     //!< Green Value.
     42  float       _b;     //!< Blue Value.
     43  float       _a;     //!< Alpha Value.
     44
    2645};
    2746
  • trunk/src/lib/util/count_pointer.h

    r6669 r8145  
    1111    explicit CountPointer(X* p = 0) // allocate a new counter
    1212        : itsCounter(0) { if (p) itsCounter = new counter(p); }
    13     ~CountPointer() { release(); }
     13    virtual ~CountPointer() { release(); }
    1414    CountPointer(const CountPointer& r) { acquire(r.itsCounter); }
    1515    CountPointer& operator=(const CountPointer& r)
  • trunk/src/orxonox.cc

    r7954 r8145  
    3030#include "globals.h"
    3131
    32 #include "gui/qt_gui/qt_gui.h"
     32#include "gui/qt/qt_gui.h"
    3333
    3434#include "file.h"
  • trunk/src/util/animation/t_animation.h

    r5115 r8145  
    242242      break;
    243243    case ANIM_NEG_EXP:
    244       {
    245244        this->animFunc = &tAnimation<T>::negExp;
    246245        expFactor =  - 1.0 / this->currentKeyFrame->duration * logf(DELTA_X);
    247246        break;
    248       }
    249247    case ANIM_QUADRATIC:
    250248      this->animFunc = &tAnimation<T>::quadratic;
  • trunk/src/util/hud.cc

    r7064 r8145  
    6262}
    6363
    64 void Hud::setEnergyWidget(GLGuiWidget* widget)
     64void Hud::setEnergyWidget(OrxGui::GLGuiWidget* widget)
    6565{
    6666  // decopple old widget
     
    8383}
    8484
    85 void Hud::setShiledWidget(GLGuiWidget* widget)
     85void Hud::setShiledWidget(OrxGui::GLGuiWidget* widget)
    8686{
    8787}
    8888
    89 void Hud::setArmorWidget(GLGuiWidget* widget)
     89void Hud::setArmorWidget(OrxGui::GLGuiWidget* widget)
    9090{
    9191}
     
    115115{
    116116  // hide all the Widgets
    117   std::list<GLGuiWidget*>::iterator weaponWidget;
     117  std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget;
    118118  for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++)
    119119  {
     
    140140}
    141141
    142 void Hud::addWeaponWidget(GLGuiWidget* widget)
     142void Hud::addWeaponWidget(OrxGui::GLGuiWidget* widget)
    143143{
    144144}
    145145
    146 void Hud::removeWeaponWidget(GLGuiWidget* widget)
     146void Hud::removeWeaponWidget(OrxGui::GLGuiWidget* widget)
    147147{
    148148}
     
    160160  this->setSize2D(.2 * this->resX, this->resY);
    161161
    162   std::list<GLGuiWidget*>::iterator weaponWidget;
     162  std::list<OrxGui::GLGuiWidget*>::iterator weaponWidget;
    163163  float pos = .3;
    164164  for (weaponWidget = this->weaponsWidgets.begin(); weaponWidget != this->weaponsWidgets.end(); weaponWidget++, pos+=.03)
  • trunk/src/util/hud.h

    r7779 r8145  
    1515
    1616//! A class that renders a HUD.
    17 class Hud : public OrxGui::GLGuiWidget
     17class Hud : public Element2D
    1818{
    1919
     
    2626
    2727  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);
    3131  void setWeaponManager(WeaponManager* weaponMan);
    3232
    33   void addWeaponWidget(GLGuiWidget* widget);
    34   void removeWeaponWidget(GLGuiWidget* widget);
     33  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
     34  void removeWeaponWidget(OrxGui::GLGuiWidget* widget);
    3535
    3636  void updateWeaponManager();
     
    4646  unsigned int             resY;
    4747
    48   GLGuiWidget*             energyWidget;
    49   GLGuiWidget*             shieldWidget;
    50   GLGuiWidget*             armorWidget;
     48  OrxGui::GLGuiWidget*     energyWidget;
     49  OrxGui::GLGuiWidget*     shieldWidget;
     50  OrxGui::GLGuiWidget*     armorWidget;
    5151
    5252  WeaponManager*           weaponManager;
    5353
    54   std::list<GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
     54  std::list<OrxGui::GLGuiWidget*> weaponsWidgets; //!< WeaponWidgets will be displayed one after another
    5555};
    5656
  • trunk/src/world_entities/player.cc

    r7868 r8145  
    3838
    3939  this->playable = NULL;
    40   this->hud.show();
     40  this->hud.setVisibility(true);
    4141
    4242  this->subscribeEvent(ES_GAME, KeyMapper::PEV_CHANGE_SHIP);
Note: See TracChangeset for help on using the changeset viewer.