Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4139 in orxonox.OLD for orxonox/branches/md2_loader/src/lib


Ignore:
Timestamp:
May 10, 2005, 10:39:01 AM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_loader: merged trunk into branche using: svn merge ../trunk/ md2_loader -r 4063:HEAD

Location:
orxonox/branches/md2_loader/src/lib
Files:
37 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/Makefile.in

    r4063 r4139  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
  • orxonox/branches/md2_loader/src/lib/graphics/Makefile.in

    r4063 r4139  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
  • orxonox/branches/md2_loader/src/lib/graphics/graphics_engine.cc

    r4126 r4139  
    1717
    1818#include "graphics_engine.h"
     19#include "resource_manager.h"
    1920
    2021#include "debug.h"
     
    3435  this->maxFPS = 0;
    3536  this->setClassName ("GraphicsEngine");
     37
     38  this->fullscreen = false;
     39
    3640  this->initVideo();
    3741
     
    105109 
    106110  // TO DO: Create a cool icon and use it here
    107   SDL_WM_SetIcon(SDL_LoadBMP("../data/pictures/orxonox-icon32x32.bmp"), NULL); 
    108 
     111  char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
     112  sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
     113  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL); 
     114  delete loadPic;
    109115  // Enable default GL stuff
    110116  glEnable(GL_DEPTH_TEST);
     
    141147int GraphicsEngine::setResolution(int width, int height, int bpp)
    142148{
     149  Uint32 fullscreenFlag;
    143150  this->resolutionX = width;
    144151  this->resolutionY = height;
    145152  this->bitsPerPixel = bpp;
     153  if (this->fullscreen)
     154    fullscreenFlag = SDL_FULLSCREEN;
     155  else
     156    fullscreenFlag = 0;
    146157 
    147158  printf ("ok\n");
    148   if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
     159  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
    149160    {
    150161      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
     
    152163      //    return -1;
    153164    }
    154 
     165}
     166
     167void GraphicsEngine::setFullscreen(bool fullscreen)
     168{
     169  this->fullscreen = fullscreen;
     170  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
    155171}
    156172
     
    258274  /* Check if our resolution is restricted */
    259275  if(this->videoModes == (SDL_Rect **)-1){
    260     PRINTF(1)("All resolutions available.\n");
     276    PRINTF(2)("All resolutions available.\n");
    261277  }
    262278  else{
     
    264280    PRINT(0)("Available Resoulution Modes are\n");
    265281    for(int i = 0; this->videoModes[i]; ++i)
    266       PRINT(0)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
     282      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
    267283  }
    268284}
  • orxonox/branches/md2_loader/src/lib/graphics/graphics_engine.h

    r4070 r4139  
    2626  int setGLattribs(void);
    2727  int setResolution(int width, int height, int bpp);
     28  void setFullscreen(bool fullscreen = false);
    2829  /** \returns the x resolution */
    2930  inline int getResolutionX(void) {return this->resolutionX;}
  • orxonox/branches/md2_loader/src/lib/graphics/importer/Makefile.in

    r4078 r4139  
    4242subdir = src/lib/graphics/importer
    4343DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
    44         $(srcdir)/Makefile.in TODO
     44        $(srcdir)/Makefile.in
    4545ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4646am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    144144PACKAGE_VERSION = @PACKAGE_VERSION@
    145145PATH_SEPARATOR = @PATH_SEPARATOR@
     146PKG_CONFIG = @PKG_CONFIG@
    146147RANLIB = @RANLIB@
    147148SET_MAKE = @SET_MAKE@
  • orxonox/branches/md2_loader/src/lib/graphics/importer/array.cc

    r3590 r4139  
    112112 
    113113/**
    114    \brief Gives back the array !! MUST be executed AFTER finalize.
    115    \returns The created array.
    116 */
    117 GLfloat* Array::getArray ()
    118 {
    119   return this->array;
    120 }
    121 
    122 /**
    123    \returns The Count of entries in the Array
    124 */
    125 int Array::getCount()
    126 {
    127   return this->entryCount;
    128 }
    129 
    130 /**
    131114   \brief Simple debug info about the Array
    132115*/
    133 void Array::debug ()
     116void Array::debug (void) const
    134117{
    135118  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
  • orxonox/branches/md2_loader/src/lib/graphics/importer/array.h

    r3590 r4139  
    2323  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
    2424 
    25   GLfloat* getArray ();
    26   int getCount();
    27   void debug(void);
     25  /** \returns The array */
     26  inline const GLfloat* getArray () const {return this->array;}
     27  /**   \returns The Count of entries in the Array*/
     28  inline int getCount(void)const {return this->entryCount;}
     29  void debug(void) const ;
    2830 private:
    2931  //! One entry of the Array
  • orxonox/branches/md2_loader/src/lib/graphics/importer/framework.cc

    r3910 r4139  
    7979    obj = new OBJModel(argv[1]);
    8080  else
    81     obj = new PrimitiveModel(SPHERE);
     81    obj = new PrimitiveModel(CYLINDER);
    8282
    8383  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
  • orxonox/branches/md2_loader/src/lib/graphics/importer/material.cc

    r3966 r4139  
    4545  this->setTransparency(1.0);
    4646
    47 
    4847  this->diffuseTexture = NULL;
    4948  this->ambientTexture = NULL;
    5049  this->specularTexture = NULL;
    51 
    52   this->diffuseTextureSet = false;
    53   this->ambientTextureSet = false;
    54   this->specularTextureSet = false;
    5550
    5651  this->setName(mtlName);
     
    107102    glShadeModel(GL_SMOOTH);
    108103
    109   if (this->diffuseTextureSet)
     104  if (this->diffuseTexture)
    110105    {
    111106      glEnable(GL_TEXTURE_2D);
     
    300295{
    301296  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    302   //    diffuseTexture = new Texture();
    303   //    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
    304297
    305298  //! \todo check if RESOURCE MANAGER is availiable
    306299  //! \todo Textures from .mtl-file need special care.
    307   this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
     300  this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
    308301}
    309302
  • orxonox/branches/md2_loader/src/lib/graphics/importer/material.h

    r3914 r4139  
    6767  Texture* ambientTexture; //!< The ambient texture of the Material.
    6868  Texture* specularTexture;//!< The specular texture of the Material.
    69  
    70   bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
    71   bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.
    72   bool specularTextureSet;//!< Chekcs if the specular texture is Set.
    73 
    7469};
    7570#endif
  • orxonox/branches/md2_loader/src/lib/graphics/importer/model.cc

    r4063 r4139  
    3636ModelFaceElement::ModelFaceElement()
    3737{
     38  this->vertexNumber = -1;
     39  this->normalNumber = -1;
     40  this->texCoordNumber = -1;   
     41
    3842  this->next = NULL;
    3943}
     
    140144  this->currentGroup = this->firstGroup = new ModelGroup;
    141145  this->groupCount = 0;
     146  this->vertexCount = 0;
     147  this->normalCount = 0;
     148  this->texCoordCount = 0;
    142149 
    143150  this->scaleFactor = 1;
     
    355362Material* Model::addMaterial(const char* materialName)
    356363{
    357  
    358364  Material* newMat = new Material();
    359365  newMat->setName(materialName);
     
    424430  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    425431  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
     432  this->vertexCount++;
    426433  return true;
    427434}
     
    438445  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    439446  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
     447  this->vertexCount++;
    440448  return true;
    441449}
     
    455463  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    456464  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
     465  this->normalCount++;
    457466  return true;
    458467}
     
    470479  PRINTF(5)("found vertex-Normal %f, %f, %f\n", x, y, z);
    471480  this->normals->addEntry(x, y, z);
     481  this->normalCount++;
     482  return true;
    472483}
    473484
     
    487498  this->vTexture->addEntry(subbuffer1);
    488499  this->vTexture->addEntry(subbuffer2);
     500  this->texCoordCount++;
    489501  return true;
    490502}
     
    502514  this->vTexture->addEntry(u);
    503515  this->vTexture->addEntry(v);
     516  this->texCoordCount++;
     517  return true;
    504518}
    505519
     
    509523
    510524   If a face line is found this function will add it to the glList.
     525
     526   String is different from the argument addFace, in this that the first Vertex/Normal/Texcoord is 1 instead of 0
    511527*/
    512528bool Model::addFace (const char* faceString)
     
    546562      if (vertex)
    547563        tmpElem->vertexNumber = atoi(vertex)-1;
    548       else
    549         tmpElem->vertexNumber = -1;
    550564      if (texture)
    551565        tmpElem->texCoordNumber = atoi(texture)-1;
    552       else
    553         tmpElem->texCoordNumber = -1;
    554566      if (normal)
    555567        tmpElem->normalNumber = atoi(normal)-1;
    556       else
    557         tmpElem->normalNumber = -1;
    558568
    559569      faceString += tmpLen;
     
    569579   \brief adds a new Face
    570580   \param faceElemCount the number of Vertices to add to the Face.
    571    \param type 0: vertex only, 1: vertex and normal, 2: vertex and Texture, 3 vertex, normal and texture
     581   \param type The information Passed with each Vertex
    572582*/
    573583bool Model::addFace(int faceElemCount, VERTEX_FORMAT type, ...)
     
    583593  for (int i = 0; i < faceElemCount; i++)
    584594    {
    585       if (this->currentGroup->currentFace->vertexCount>0)
     595      if (this->currentGroup->currentFace->vertexCount > 0)
    586596        tmpElem = tmpElem->next = new ModelFaceElement;
    587597
    588       tmpElem->vertexNumber = va_arg (itemlist, int) -1;
     598      tmpElem->vertexNumber = va_arg (itemlist, int);
    589599      if (type & TEXCOORD)
    590         tmpElem->texCoordNumber = va_arg (itemlist, int) -1;
     600        tmpElem->texCoordNumber = va_arg (itemlist, int);
    591601      if (type & NORMAL)
    592         tmpElem->normalNumber = va_arg(itemlist, int) -1;
     602        tmpElem->normalNumber = va_arg(itemlist, int);
    593603      this->currentGroup->currentFace->vertexCount++;
    594604    }
     
    693703    }
    694704
    695   for (int i=0; i<vertices->getCount()/3;i++)
     705  for (int i=0; i < vertices->getCount()/3;i++)
    696706    {
    697707      normArray[i].normalize();
    698708      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    699709     
    700       this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     710      this->addVertexNormal(normArray[i].x, normArray[i].y, normArray[i].z);
    701711
    702712    }
     
    834844
    835845  if (elem->texCoordNumber != -1)
    836     glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2);
     846    {
     847      if (likely(elem->texCoordNumber < this->texCoordCount))
     848        glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2);
     849      else
     850        PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n",
     851                  elem->texCoordNumber, this->texCoordCount);
     852    }
    837853  if (elem->normalNumber != -1)
    838     glNormal3fv(this->normals->getArray() + elem->normalNumber * 3);
     854    {
     855    if (likely(elem->normalNumber < this->normalCount))
     856      glNormal3fv(this->normals->getArray() + elem->normalNumber * 3);
     857    else
     858        PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete",
     859                  elem->normalNumber, this->normalCount);     
     860    }
    839861  if (elem->vertexNumber != -1)
    840     glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
     862    {
     863      if (likely(elem->vertexNumber < this->vertexCount))
     864          glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
     865      else
     866        PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete",
     867                  elem->vertexNumber, this->vertexCount);     
     868    }   
     869
    841870}
    842871
     
    897926  this->addVertexNormal (-1.0, 0.0, 0.0);
    898927
    899   /* normaleLess-testingMode
    900   this->addFace ("1 2 4 3");
    901   this->addFace ("3 4 6 5");
    902   this->addFace ("5 6 8 7");
    903   this->addFace ("7 8 2 1");
    904   this->addFace ("2 8 6 4");
    905   this->addFace ("7 1 3 5");
    906   */
    907 
    908   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,1, 2,2,2, 4,4,3, 3,3,4);
    909   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 3,3,5, 4,4,6, 6,6,7, 5,5,8);
    910   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 5,5,9, 6,6,10, 8,8,11, 7,7,12);
    911   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,7,13, 8,8,14, 2,10,15, 1,9,16);
    912   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,17, 8,11,18, 6,12,19, 4,4,20);
    913   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,13,21, 1,1,22, 3,3,23, 5,14,24);
    914 
    915 }
     928  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,1, 3,3,2, 2,2,3);
     929  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,4, 3,3,5, 5,5,6, 4,4,7);
     930  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,4,8, 5,5,9, 7,7,10, 6,6,11);
     931  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,6,12, 7,7,13, 1,9,14, 0,8,15);
     932  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19);
     933  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23);
     934
     935}
  • orxonox/branches/md2_loader/src/lib/graphics/importer/model.h

    r4065 r4139  
    100100  bool finalized;             //!< Sets the Object to be finalized.
    101101
     102  int vertexCount;            //!< A modelwide Counter for vertices.
     103  int normalCount;            //!< A modelwide Counter for the normals.
     104  int texCoordCount;          //!< A modelwide Counter for the texCoord.
    102105  Array* vertices;            //!< The Array that handles the Vertices.
    103   int verticesCount;          //!< A global Counter for vertices.
    104106  Array* normals;             //!< The Array that handles the Normals.
    105107  Array* vTexture;            //!< The Array that handles the VertexTextureCoordinates.
     
    159161  bool setMaterial(Material* mtl);
    160162  void finalize(void);
     163
     164  /** \returns The number of Vertices of the Model */
     165  inline int getVertexCount(void) const {return this->vertexCount;}
     166  /** \returns The number of Normals of the Model */
     167  inline int getNormalCount(void) const {return this->normalCount;}
     168  /** \returns The number of Texture Coordinates of the Model*/
     169  inline int getTexCoordCount(void) const {return this->texCoordCount;}
    161170};
    162171
  • orxonox/branches/md2_loader/src/lib/graphics/importer/objModel.cc

    r4063 r4139  
    3434OBJModel::OBJModel(const char* fileName, float scaling) : Model(fileName)
    3535{
    36   this->initializeOBJ();
     36  this->objPath = "./";
     37
    3738  this->scaleFactor = scaling;
    3839
     
    5253  if (this->objPath)
    5354    delete []this->objPath;
    54   if (this->objFileName)
    55     delete []this->objFileName;
    56   if (this->mtlFileName)
    57     delete []this->mtlFileName;
    58 }
    59 
    60 /**
    61    \brief Initializes an obj-model
    62 */
    63 void OBJModel::initializeOBJ(void)
    64 {
    65   this->objPath = NULL;
    66   this->objFileName = NULL;
    67   this->mtlFileName = NULL;
    6855}
    6956
     
    7158   \brief Imports a obj file and handles the the relative location
    7259   \param fileName The file to import
     60
     61   Splits the FileName from the DirectoryName
    7362*/
    7463bool OBJModel::importFile (const char* fileName)
    7564{
    7665  PRINTF(4)("preparing to read in file: %s\n", fileName);
    77 
    78 
    79 #ifdef __WIN32__
    80   // win32 path reading
    81   char pathSplitter= '\\';
    82 #else /* __WIN32__ */
    83   // unix path reading
    84   char pathSplitter='/';
    85 #endif /* __WIN32__ */
    86   char* tmpName;
    87   strcpy(tmpName, fileName);
    88   if (tmpName[0] == pathSplitter)
    89     tmpName++;
    90   char* name = tmpName;
    91   while (( tmpName = strchr (tmpName+1, pathSplitter)))
    92     {
    93       name = tmpName+1;
    94     }
    95   this->objPath = new char[name-fileName+1];
    96   strncpy(this->objPath, fileName, name-fileName);
    97   this->objPath[name-fileName] = '\0';
    98   if (strlen(objPath)> 0)
    99     PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath);
    100   else
    101     PRINTF(5)("Resolved file %s.\n", name);
    102  
    103   this->setName(name);
    104 
    105   this->objFileName = new char[strlen(name)+1];
    106   strcpy (this->objFileName, name);
    107   this->readFromObjFile ();
     66  // splitting the
     67  char* split = NULL;
     68
     69  if (!(split = strrchr(fileName, '/')))
     70    split = strrchr(fileName, '\\'); // windows Case
     71  if (split)
     72    {
     73      int len = split - fileName+1;
     74      this->objPath = new char[len +2];
     75      strncpy(this->objPath, fileName, len);
     76      this->objPath[len] = '\0';
     77      PRINTF(1)("Resolved file %s to Path %s.\n", fileName, this->objPath);
     78    }
     79  this->readFromObjFile (fileName);
    10880  return true;
    10981}
     
    11385   This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
    11486*/
    115 bool OBJModel::readFromObjFile (void)
    116 {
    117   char* fileName = new char [strlen(objPath)+strlen(objFileName)+1];
    118   if (this->objFileName != NULL && !strcmp(this->objFileName, ""))
    119     return false;
    120   strcpy(fileName, this->objPath);
    121   strcat(fileName, this->objFileName);
    122 
     87bool OBJModel::readFromObjFile(const char* fileName)
     88{
    12389  FILE* stream;
    12490  if( (stream = fopen (fileName, "r")) == NULL)
    12591    {
    126       printf("IniParser could not open %s\n", fileName);
     92      printf("Object File Could not be Opened %s\n", fileName);
    12793      return false;
    12894    }
     
    179145    }
    180146  fclose (stream);
    181   delete []fileName;
    182147  return true;
    183148}
     
    194159bool OBJModel::readMtlLib (const char* mtlFile)
    195160{
    196   this->mtlFileName = new char [strlen(mtlFile)+1];
    197   strcpy(this->mtlFileName, mtlFile);
    198   char* fileName = new char [strlen(this->objPath) + strlen(this->mtlFileName)+1];
    199   sprintf(fileName, "%s%s", this->objPath, this->mtlFileName);
    200  
     161  char* fileName = new char [strlen(this->objPath) + strlen(mtlFile)+1];
     162  sprintf(fileName, "%s%s", this->objPath, mtlFile);
    201163
    202164  FILE* stream;
    203165  if( (stream = fopen (fileName, "r")) == NULL)
    204166    {
    205       printf("IniParser could not open %s\n", fileName);
     167      PRINTF(2)("MaterialLibrary could not be opened %s\n", fileName);
     168      delete []fileName;
    206169      return false;
    207170    }
  • orxonox/branches/md2_loader/src/lib/graphics/importer/objModel.h

    r3916 r4139  
    1515  OBJModel(const char* fileName, float scaling = 1.0);
    1616  virtual ~OBJModel();
    17   void initializeOBJ(void);
    1817
    1918 private:
    2019  // Variables
    2120  char* objPath;        //!< The Path where the obj and mtl-file are located.
    22   char* objFileName;    //!< The Name of the obj-file.
    23   char* mtlFileName;    //!< The Name of the mtl-file (parsed out of the obj-file)
    2421
    2522  ///// readin /////
    2623  bool importFile (const char* fileName);
    27   bool readFromObjFile (void);
     24  bool readFromObjFile (const char* fileName);
    2825  bool readMtlLib (const char* matFile);
    2926};
  • orxonox/branches/md2_loader/src/lib/graphics/importer/primitive_model.cc

    r3911 r4139  
    7171void PrimitiveModel::sphereModel(float size, unsigned int detail)
    7272{
    73   int vertexCount = 0;
    7473  if (detail <= 0)
    7574    detail = 1;
     
    8988                          size * sin(vi) * cos(vj));
    9089          this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5);
    91           vertexCount++;
    9290        }
    9391    }
    9492  this->addVertex(0, -size, 0);
     93  this->addVertexTexture(0,0);
    9594  this->addVertex(0, size, 0);
     95  this->addVertexTexture(0 ,1);
    9696
    9797  // defining the binding Faces.
     
    102102        {
    103103         
    104           v1 = i*detail + j;
    105           v4 = i*detail + (j+1);
     104          v1 = i*detail + j-1;
     105          v4 = i*detail + j;
    106106         
    107107          if (i == detail*2 -1)
    108108            {
    109               v2 = j;
    110               v3 = j+1;
     109              v2 = j-1;
     110              v3 = j;
    111111            }
    112112          else
    113113            {
    114               v2 = (i+1)*detail + j;
    115               v3 = (i+1)*detail + (j+1);
    116             }
    117          
     114              v2 = (i+1)*detail + j-1;
     115              v3 = (i+1)*detail + j;
     116            }
     117
    118118          if (j == 0)
    119119            {
    120               v1 = vertexCount+1;
     120              v1 = this->getVertexCount()-2;
    121121              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4);
    122122            }
    123123          else if (j == detail)
    124124            {
    125               v3 = vertexCount+2;
     125              v3 = this->getVertexCount()-1;
    126126              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3);
    127127            }
     
    157157    {
    158158      int p1, p2, p3, p4;
    159       p1 = 2*i+1;
    160       p2 = 2*i+2;
    161       p3 = 2*i+4;
    162       p4 = 2*i+3;
     159      p1 = 2*i;
     160      p2 = 2*i+1;
     161      p3 = 2*i+3;
     162      p4 = 2*i+2;
    163163      // something is wrong here
    164164      this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
    165       this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail+1);
    166       this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+2);
     165      this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail);
     166      this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+1);
    167167    }
    168168  // caps
    169   this->addFace(4, VERTEX_ONLY, 2*detail-1, 2*detail, 2, 1);
    170   this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1);
    171   this->addFace(3, VERTEX_ONLY, 2*detail, 2, 2*detail+2);
     169  this->addFace(4, VERTEX_ONLY, 2*detail-2, 2*detail-1, 1, 0);
     170  this->addFace(3, VERTEX_ONLY, 0, 2*detail-2, 2*detail);
     171  this->addFace(3, VERTEX_ONLY, 2*detail-1, 1, 2*detail+1);
    172172}
    173173
     
    198198    {
    199199      unsigned int v1, v2;
    200       v1 = i+3;
     200      v1 = i+2;
    201201      if (i == detail -1)
    202         v2 = 3;
     202        v2 = 2;
    203203      else
    204         v2 = i+4;
    205       this->addFace(3, VERTEX_ONLY, 1, v1, v2);
    206       this->addFace(3, VERTEX_ONLY, 2, v1, v2);
     204        v2 = i+3;
     205      this->addFace(3, VERTEX_ONLY, 0, v1, v2);
     206      this->addFace(3, VERTEX_ONLY, 1, v1, v2);
    207207    }
    208208}
     
    228228  unsigned int v1, v2, v3, v4;
    229229  for (int i = 0; i < detail-1; i++)
    230     for (int j = 1; j < detail; j++)
     230    for (int j = 0; j < detail-1; j++)
    231231      {
    232232        v1 = i*detail + j;
  • orxonox/branches/md2_loader/src/lib/graphics/particles/particle_system.cc

    r4017 r4139  
    4040   this->particleType = type;
    4141   this->particles = NULL;
     42   this->deadList = NULL;
    4243   this->setConserve(.8);
    4344   this->setLifeSpan(.1);
     
    5758  // delete what has to be deleted here
    5859   ParticleEngine::getInstance()->removeSystem(this);
     60
     61   // deleting all the living Particles
     62   while (this->particles)
     63     {
     64       Particle* tmpDelPart = this->particles;
     65       this->particles = this->particles->next;
     66       delete tmpDelPart;
     67     }
     68
     69   // deleting all the dead particles
     70   while (this->deadList)
     71     {
     72       Particle* tmpDelPart = this->deadList;
     73       this->deadList = this->deadList->next;
     74       delete tmpDelPart;
     75     }
    5976}
    6077
     
    199216            {
    200217              prevPart->next = tickPart->next;
    201               delete tickPart;
     218              tickPart->next = this->deadList;
     219              this->deadList = tickPart;
    202220              tickPart = prevPart->next;
    203221            }
     
    206224              prevPart = NULL;
    207225              this->particles = tickPart->next;
    208               delete tickPart;
     226              tickPart->next = this->deadList;
     227              this->deadList = tickPart;
    209228              tickPart = this->particles;
    210229            }
     
    266285      if (unlikely(particles == NULL))
    267286        {
    268           this->particles = new Particle;
     287          if (likely(deadList != NULL))
     288            {
     289              this->particles = this->deadList;
     290              deadList = deadList->next;
     291            }
     292          else
     293            this->particles = new Particle;
    269294          this->particles->next = NULL;
    270295        }
     
    272297      else
    273298        {
    274           Particle* tmpPart = new Particle;
     299          Particle* tmpPart;
     300          if (likely(deadList != NULL))
     301            {
     302              tmpPart = this->deadList;
     303              deadList = deadList->next;
     304            }
     305          else
     306            tmpPart = new Particle;
    275307          tmpPart->next = this->particles;
    276308          this->particles = tmpPart;
     
    300332  PRINT(0)("  ParticleSystem %s\n", this->name);
    301333  PRINT(0)("  ParticleCount: %d, maximumCount: %d :: filled %d%%\n", this->count, this->maxCount, 100*this->count/this->maxCount);
    302 }
     334  if (deadList)
     335    {
     336      PRINT(0)("  - ParticleDeadList is used: ");
     337      int i = 1;
     338      Particle* tmpPart = this->deadList;
     339      while (tmpPart = tmpPart->next) ++i;
     340      PRINT(0)("count: %d\n", i);
     341    }
     342}
  • orxonox/branches/md2_loader/src/lib/graphics/particles/particle_system.h

    r4017 r4139  
    9292  Material* material;        //!< A Material for all the Particles.
    9393  Particle* particles;       //!< A list of particles of this System.
     94  Particle* deadList;        //!< A list of dead Particles in the System.
    9495
    9596  GLuint* glID;              //!< A List of different gl-List-ID's
  • orxonox/branches/md2_loader/src/lib/gui/Makefile.in

    r4063 r4139  
    113113PACKAGE_VERSION = @PACKAGE_VERSION@
    114114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
    115116RANLIB = @RANLIB@
    116117SET_MAKE = @SET_MAKE@
  • orxonox/branches/md2_loader/src/lib/gui/console/Makefile.in

    r4063 r4139  
    132132PACKAGE_VERSION = @PACKAGE_VERSION@
    133133PATH_SEPARATOR = @PATH_SEPARATOR@
     134PKG_CONFIG = @PKG_CONFIG@
    134135RANLIB = @RANLIB@
    135136SET_MAKE = @SET_MAKE@
  • orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.am

    r4063 r4139  
    77AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord
    88AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data
    9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gaphics
    10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/font
     9AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
    1110AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
    1211AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui
    13 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gui
    1412AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang
    1513AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util
     
    2018AM_CXXFLAGS+=-I$(MAINSRCDIR)/glmenu
    2119AM_CXXFLAGS+=-I$(MAINSRCDIR)/ai
     20AM_CXXFLAGS+=-I$(MAINSRCDIR)/util
     21AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
     22AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
    2223
    2324#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
     
    3536            gui_banner.cc \
    3637            gui_keys.cc \
    37             gui_update.cc
     38            gui_update.cc \
     39                  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     40                  $(MAINSRCDIR)/lib/lang/base_object.cc \
     41                  $(MAINSRCDIR)/lib/math/vector.cc \
     42                  $(MAINSRCDIR)/util/resource_manager.cc \
     43                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     44                  $(MAINSRCDIR)/lib/coord/p_node.cc \
     45                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
     46                  $(MAINSRCDIR)/lib/graphics/importer/array.cc \
     47                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
     48                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     49                  $(MAINSRCDIR)/lib/graphics/importer/material.cc \
     50                  $(MAINSRCDIR)/lib/graphics/importer/texture.cc \
     51                  $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
    3852
    3953noinst_HEADERS=gui.h \
  • orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.in

    r4063 r4139  
    5656        gui_element.$(OBJEXT) gui_video.$(OBJEXT) gui_audio.$(OBJEXT) \
    5757        gui_exec.$(OBJEXT) gui_flags.$(OBJEXT) gui_banner.$(OBJEXT) \
    58         gui_keys.$(OBJEXT) gui_update.$(OBJEXT)
     58        gui_keys.$(OBJEXT) gui_update.$(OBJEXT) \
     59        graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
     60        vector.$(OBJEXT) resource_manager.$(OBJEXT) \
     61        text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \
     62        array.$(OBJEXT) model.$(OBJEXT) objModel.$(OBJEXT) \
     63        material.$(OBJEXT) texture.$(OBJEXT) primitive_model.$(OBJEXT)
    5964gui_OBJECTS = $(am_gui_OBJECTS)
    6065gui_LDADD = $(LDADD)
     
    6267depcomp = $(SHELL) $(top_srcdir)/depcomp
    6368am__depfiles_maybe = depfiles
    64 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gui.Po ./$(DEPDIR)/gui_audio.Po \
    65 @AMDEP_TRUE@    ./$(DEPDIR)/gui_banner.Po \
     69@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
     70@AMDEP_TRUE@    ./$(DEPDIR)/base_object.Po \
     71@AMDEP_TRUE@    ./$(DEPDIR)/graphics_engine.Po ./$(DEPDIR)/gui.Po \
     72@AMDEP_TRUE@    ./$(DEPDIR)/gui_audio.Po ./$(DEPDIR)/gui_banner.Po \
    6673@AMDEP_TRUE@    ./$(DEPDIR)/gui_element.Po ./$(DEPDIR)/gui_exec.Po \
    6774@AMDEP_TRUE@    ./$(DEPDIR)/gui_flags.Po ./$(DEPDIR)/gui_gtk.Po \
    6875@AMDEP_TRUE@    ./$(DEPDIR)/gui_keys.Po ./$(DEPDIR)/gui_main.Po \
    69 @AMDEP_TRUE@    ./$(DEPDIR)/gui_update.Po ./$(DEPDIR)/gui_video.Po
     76@AMDEP_TRUE@    ./$(DEPDIR)/gui_update.Po ./$(DEPDIR)/gui_video.Po \
     77@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
     78@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
     79@AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po \
     80@AMDEP_TRUE@    ./$(DEPDIR)/primitive_model.Po \
     81@AMDEP_TRUE@    ./$(DEPDIR)/resource_manager.Po \
     82@AMDEP_TRUE@    ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
     83@AMDEP_TRUE@    ./$(DEPDIR)/vector.Po
    7084CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7185        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    136150PACKAGE_VERSION = @PACKAGE_VERSION@
    137151PATH_SEPARATOR = @PATH_SEPARATOR@
     152PKG_CONFIG = @PKG_CONFIG@
    138153RANLIB = @RANLIB@
    139154SET_MAKE = @SET_MAKE@
     
    187202target_vendor = @target_vendor@
    188203MAINSRCDIR = ../../..
    189 AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/gaphics -I$(MAINSRCDIR)/lib/graphics/font -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/gui/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
     204AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common
    190205
    191206#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
     
    201216            gui_banner.cc \
    202217            gui_keys.cc \
    203             gui_update.cc
     218            gui_update.cc \
     219                  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     220                  $(MAINSRCDIR)/lib/lang/base_object.cc \
     221                  $(MAINSRCDIR)/lib/math/vector.cc \
     222                  $(MAINSRCDIR)/util/resource_manager.cc \
     223                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     224                  $(MAINSRCDIR)/lib/coord/p_node.cc \
     225                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
     226                  $(MAINSRCDIR)/lib/graphics/importer/array.cc \
     227                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
     228                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     229                  $(MAINSRCDIR)/lib/graphics/importer/material.cc \
     230                  $(MAINSRCDIR)/lib/graphics/importer/texture.cc \
     231                  $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
    204232
    205233noinst_HEADERS = gui.h \
     
    290318        -rm -f *.tab.c
    291319
     320@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
     321@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
     322@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@
    292323@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@
    293324@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_audio.Po@am__quote@
     
    301332@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_update.Po@am__quote@
    302333@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_video.Po@am__quote@
     334@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
     335@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
     336@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@
     337@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@
     338@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
     339@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
     340@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
     341@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
     342@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
     343@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    303344
    304345.cc.o:
     
    317358@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    318359@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     360
     361graphics_engine.o: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     362@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.o -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc; \
     363@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
     364@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.o' libtool=no @AMDEPBACKSLASH@
     365@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@
     366@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     367@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     368
     369graphics_engine.obj: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     370@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.obj -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`; \
     371@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
     372@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.obj' libtool=no @AMDEPBACKSLASH@
     373@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@
     374@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     375@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`
     376
     377base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc
     378@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.o -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc; \
     379@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
     380@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.o' libtool=no @AMDEPBACKSLASH@
     381@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@
     382@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     383@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc
     384
     385base_object.obj: $(MAINSRCDIR)/lib/lang/base_object.cc
     386@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.obj -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`; \
     387@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
     388@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.obj' libtool=no @AMDEPBACKSLASH@
     389@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@
     390@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     391@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`
     392
     393vector.o: $(MAINSRCDIR)/lib/math/vector.cc
     394@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.o -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc; \
     395@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi
     396@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.o' libtool=no @AMDEPBACKSLASH@
     397@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@
     398@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     399@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc
     400
     401vector.obj: $(MAINSRCDIR)/lib/math/vector.cc
     402@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.obj -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`; \
     403@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi
     404@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.obj' libtool=no @AMDEPBACKSLASH@
     405@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@
     406@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     407@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`
     408
     409resource_manager.o: $(MAINSRCDIR)/util/resource_manager.cc
     410@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.o -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc; \
     411@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
     412@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.o' libtool=no @AMDEPBACKSLASH@
     413@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
     414@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     415@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc
     416
     417resource_manager.obj: $(MAINSRCDIR)/util/resource_manager.cc
     418@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.obj -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi`; \
     419@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
     420@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.obj' libtool=no @AMDEPBACKSLASH@
     421@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
     422@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     423@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi`
     424
     425text_engine.o: $(MAINSRCDIR)/lib/graphics/text_engine.cc
     426@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.o -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc; \
     427@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     428@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.o' libtool=no @AMDEPBACKSLASH@
     429@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     430@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     431@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc
     432
     433text_engine.obj: $(MAINSRCDIR)/lib/graphics/text_engine.cc
     434@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.obj -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi`; \
     435@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     436@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.obj' libtool=no @AMDEPBACKSLASH@
     437@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     438@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     439@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi`
     440
     441p_node.o: $(MAINSRCDIR)/lib/coord/p_node.cc
     442@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.o -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc; \
     443@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi
     444@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.o' libtool=no @AMDEPBACKSLASH@
     445@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@
     446@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     447@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc
     448
     449p_node.obj: $(MAINSRCDIR)/lib/coord/p_node.cc
     450@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.obj -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi`; \
     451@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi
     452@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.obj' libtool=no @AMDEPBACKSLASH@
     453@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@
     454@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     455@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi`
     456
     457null_parent.o: $(MAINSRCDIR)/lib/coord/null_parent.cc
     458@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.o -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc; \
     459@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi
     460@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.o' libtool=no @AMDEPBACKSLASH@
     461@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@
     462@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     463@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc
     464
     465null_parent.obj: $(MAINSRCDIR)/lib/coord/null_parent.cc
     466@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.obj -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi`; \
     467@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi
     468@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.obj' libtool=no @AMDEPBACKSLASH@
     469@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@
     470@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     471@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi`
     472
     473array.o: $(MAINSRCDIR)/lib/graphics/importer/array.cc
     474@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc; \
     475@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     476@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.o' libtool=no @AMDEPBACKSLASH@
     477@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@
     478@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     479@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc
     480
     481array.obj: $(MAINSRCDIR)/lib/graphics/importer/array.cc
     482@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi`; \
     483@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     484@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@
     485@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@
     486@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     487@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi`
     488
     489model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc
     490@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.o -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc; \
     491@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     492@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.o' libtool=no @AMDEPBACKSLASH@
     493@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     494@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     495@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc
     496
     497model.obj: $(MAINSRCDIR)/lib/graphics/importer/model.cc
     498@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.obj -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi`; \
     499@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     500@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.obj' libtool=no @AMDEPBACKSLASH@
     501@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     502@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     503@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi`
     504
     505objModel.o: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     506@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.o -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc; \
     507@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi
     508@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.o' libtool=no @AMDEPBACKSLASH@
     509@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@
     510@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     511@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     512
     513objModel.obj: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     514@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.obj -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi`; \
     515@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi
     516@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.obj' libtool=no @AMDEPBACKSLASH@
     517@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@
     518@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     519@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi`
     520
     521material.o: $(MAINSRCDIR)/lib/graphics/importer/material.cc
     522@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc; \
     523@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     524@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.o' libtool=no @AMDEPBACKSLASH@
     525@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@
     526@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     527@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc
     528
     529material.obj: $(MAINSRCDIR)/lib/graphics/importer/material.cc
     530@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi`; \
     531@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     532@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@
     533@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@
     534@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     535@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi`
     536
     537texture.o: $(MAINSRCDIR)/lib/graphics/importer/texture.cc
     538@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.o -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc; \
     539@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi
     540@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.o' libtool=no @AMDEPBACKSLASH@
     541@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@
     542@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     543@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc
     544
     545texture.obj: $(MAINSRCDIR)/lib/graphics/importer/texture.cc
     546@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.obj -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi`; \
     547@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi
     548@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.obj' libtool=no @AMDEPBACKSLASH@
     549@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@
     550@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     551@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi`
     552
     553primitive_model.o: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     554@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.o -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc; \
     555@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
     556@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.o' libtool=no @AMDEPBACKSLASH@
     557@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@
     558@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     559@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     560
     561primitive_model.obj: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     562@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.obj -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi`; \
     563@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
     564@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.obj' libtool=no @AMDEPBACKSLASH@
     565@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@
     566@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     567@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi`
    319568uninstall-info-am:
    320569
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui.cc

    r4063 r4139  
    5353{
    5454  Window* orxonoxGUI = NULL;
    55 
     55  executable = NULL;
     56 
    5657  initGUI(argc, argv);
    5758
     
    9495    orxonoxGUI->fill(windowBox);
    9596  }
     97
     98
    9699  // Reading Values from File
    97100  exec->setConfDir(GUI_DEFAULT_CONF_DIR);
     
    111114  // case update //
    112115#ifdef HAVE_CURL
    113   if (static_cast<Option*>(Window::mainWindow->findWidgetByName("auto update", 0))->value == 1)
     116  if (static_cast<Option*>(Window::mainWindow->findWidgetByName(CONFIG_NAME_AUTO_UPDATE, 0))->value == 1)
    114117    {
    115118      update->checkForUpdates();
    116119    }
    117120#endif /* HAVE_CURL */
     121}
    118122
     123/**
     124   \brief starts the OrxonoxGUI
     125*/
     126void Gui::startGui(void)
     127{
    119128  mainloopGUI();
     129 
    120130#ifndef HAVE_GTK2
    121131  GuiExec::startOrxonox(NULL, exec);
     
    123133}
    124134
     135void Gui::printHelp()
     136{
     137  Window::mainWindow->walkThrough(Widget::printHelp, 1);
     138}
     139
     140/**
     141   \brief a bool that knows if orxonox should be started
     142*/
    125143bool Gui::startOrxonox = false;
    126144
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui.h

    r4063 r4139  
    2626  ~Gui(void);
    2727
     28  void startGui(void);
     29  void printHelp(void);
     30
    2831  static bool startOrxonox;
    2932};
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_audio.cc

    r4063 r4139  
    3636
    3737  audioFrame = new Frame("Audio-Options:");
    38   audioFrame->setGroupName("audio");
     38  audioFrame->setGroupName(CONFIG_SECTION_AUDIO);
    3939  {
    4040    Box* audioBox;            //!< The Box that holds the audio Options.
     
    4545      Slider* effectsVolume;    //!< A Slider for effects volume.
    4646     
    47       enableSound = new CheckButton("Disable Sound");
     47      enableSound = new CheckButton(CONFIG_NAME_DISABLE_AUDIO);
    4848      enableSound->setFlagName ("no-sound", 0);
     49      enableSound->setDescription("Disables Sound", "Check this to disable Sound in Orxonox");
     50      enableSound->setDefaultValue(0);
    4951      enableSound->saveability();
    5052      audioBox->fill(enableSound);
    51       Label* musicVolumeLabel = new Label("Music Volume");
     53      Label* musicVolumeLabel = new Label(CONFIG_NAME_MUSIC_VOLUME);
    5254      audioBox->fill(musicVolumeLabel);
    5355      musicVolume = new Slider("Music Volume", 0, 100);
    5456      musicVolume->setFlagName("music-volume", "m", 80);
     57      musicVolume->setDescription("Sets the volume of the ingame music");
    5558      musicVolume->saveability();
    5659      audioBox->fill (musicVolume);
    57       Label* effectsVolumeLabel = new Label ("Effects Volume");
     60      Label* effectsVolumeLabel = new Label (CONFIG_NAME_EFFECTS_VOLUME);
    5861      audioBox->fill (effectsVolumeLabel);
    5962      effectsVolume = new Slider ("Effects Volume", 0, 100);
    6063      effectsVolume->setFlagName ("effects-volume", "e", 80);
     64      effectsVolume->setDescription("Sets the volune of the ingame SoundEffects");
    6165      effectsVolume->saveability();
    6266      audioBox->fill (effectsVolume);
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_banner.cc

    r4063 r4139  
    7676
    7777    //! \todo add the names of all the guys working on orxonox
    78     orxIsLabel = new Label(PACKAGE_NAME " is:\nPatrick Boenzli - main Developer\nBenjamin Grauer - right Hand\n....");
     78    orxIsLabel = new Label("           " PACKAGE_NAME " is:\n" ORXONOX_STAFF);
    7979    logoBox->fill(orxIsLabel);
    8080    logoEventBox->fill(logoBox);
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_exec.cc

    r4063 r4139  
    5353
    5454    execBox = new Box('v');
    55     execFrame->setGroupName("misc");
     55    execFrame->setGroupName(CONFIG_SECTION_MISC);
    5656    {
    5757      Button* start;               //!< The start Button of orxonox.
     
    6565#endif /* HAVE_GTK2 */
    6666      execBox->fill(start);
    67       this->saveSettings = new CheckButton("Save Settings");
     67      this->saveSettings = new CheckButton(CONFIG_NAME_SAVE_SETTINGS);
    6868      this->saveSettings->value = 1;
    6969      this->saveSettings->saveability();
    7070      execBox->fill(this->saveSettings);
    71       verboseMode = new Menu("verbose mode", "nothing", "error", "warning", "info", "lastItem");
     71
     72#ifdef DEBUG
     73      verboseMode = new Menu(CONFIG_NAME_VERBOSE_MODE, "nothing",
     74#if DEBUG >=1
     75                             "error",
     76#endif
     77#if DEBUG >=2
     78                             "warning",
     79#endif
     80#if DEBUG >=3
     81                             "info",
     82#endif
     83#if DEBUG >=4
     84                             "debug",
     85#endif
     86#if DEBUG >=5
     87                             "heavydebug",
     88#endif
     89                             "lastItem");
    7290      verboseMode->setFlagName("verbose", "v", 2);
     91      verboseMode->setDescription("Sets the Output Mode", "This Enables Outbug messages\n"
     92                                  "0: nothing will be displayed, but stuff one cannot do without (eg.GUI)\n"
     93#if DEBUG >=1
     94                                  "1: error: outputs all the above and errors"
     95#endif
     96#if DEBUG >=2
     97                                  "2: warning: outputs all the above plus warnings"
     98#endif
     99#if DEBUG >=3
     100                                  "3: info: outputs all the above plus Information"
     101#endif
     102#if DEBUG >=4
     103                                  "4: debug: displays all the above plus debug information"
     104#endif
     105#if DEBUG >=5
     106                                  "5: heavydebug: displays all the above plus heavy debug information: WARNING: the game will run very slow with this."
     107#endif
     108                                  );
    73109      verboseMode->saveability();
    74110      execBox->fill(verboseMode);
    75       alwaysShow = new CheckButton("Always Show this Menu");
     111#endif
     112
     113      alwaysShow = new CheckButton(CONFIG_NAME_ALWAYS_SHOW_GUI);
    76114      alwaysShow->setFlagName("gui", "g", 0);
     115      alwaysShow->setDescription("shows the gui when starting orxonox");
    77116      alwaysShow->saveability();
    78117      execBox->fill(alwaysShow);
     118
    79119      quit = new Button("Quit");
    80120#ifdef HAVE_GTK2
     
    111151  this->confDir = ResourceManager::homeDirCheck(confDir);
    112152
    113   PRINTF(3)("Config Directory is: %s.\n", this->confDir);
     153  PRINTF(5)("Config Directory is: %s.\n", this->confDir);
    114154  //! \todo F** Windows-support
    115155#ifndef __WIN32__
     
    132172  this->confFile = new char[strlen(this->confDir)+strlen(fileName)+2];
    133173  sprintf(this->confFile, "%s/%s", this->confDir, fileName);
    134   PRINTF(3)("ConfigurationFile is %s.\n", this->confFile);
     174  PRINTF(5)("ConfigurationFile is %s.\n", this->confFile);
    135175}
    136176
     
    174214{
    175215  int counter = 0;
    176   while(counter < depth &&((widget->isOption>0
     216  while(counter < depth &&((widget->optionType > GUI_NOTHING
    177217                              &&(static_cast<Option*>(widget)->isSaveable()))
    178                              ||(widget->isOption<0
     218                             ||(widget->optionType < GUI_NOTHING
    179219                                && static_cast<Packer*>(widget)->getGroupName())))
    180220    {
     
    184224 
    185225  // check if it is a Packer, and if it is, check if it has a name and if there is something in it.
    186   if(widget->isOption <0)
     226  if(widget->optionType < GUI_NOTHING)
    187227    {
    188228      if(static_cast<Packer*>(widget)->getGroupName())
     
    197237        }
    198238    }
    199   //  if(widget->isOption == 0)
    200   //    printf("%s\n",widget->title);
    201   if(widget->isOption >= 1)
     239
     240  if(widget->optionType > GUI_NOTHING)
    202241    if (static_cast<Option*>(widget)->isSaveable())
    203242      {
     
    277316    {
    278317      PRINT(5)("Located Option %s.\n", widget->title);
    279       if(widget->isOption >= 1)
     318      if(widget->optionType > GUI_NOTHING)
    280319        static_cast<Option*>(widget)->load(info->variableValue);
    281320    }
     
    302341    }
    303342
    304   if(widget->isOption < 0)
     343  if(widget->optionType < GUI_NOTHING)
    305344    {
    306345      if(static_cast<Packer*>(widget)->getGroupName() &&
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_flags.cc

    r4063 r4139  
    3838  this->flagsBox->fill(flagsLabel);
    3939  this->shortFlags = new CheckButton("shortFlags");
     40  this->shortFlags->setDefaultValue(0);
    4041  this->flagsBox->fill(shortFlags);
    4142
     
    7677{
    7778  FlagInfo* info =(FlagInfo*)flagInfo;
    78   if(widget->isOption >= 1)
     79  if(widget->optionType > GUI_NOTHING)
    7980    if (static_cast<Option*>(widget)->value != static_cast<Option*>(widget)->defaultValue )
    8081      {
     
    9091          }
    9192
    92         if(static_cast<Option*>(widget)->isOption == 2)
     93        if(static_cast<Option*>(widget)->optionType > GUI_BOOL)
    9394          {
    9495            info->flagsLabel->appendText("=");
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_gtk.cc

    r4063 r4139  
    222222    return this;
    223223
    224   if (this->isOption < 0 && static_cast<Packer*>(this)->down)
     224  if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down)
    225225    {
    226226      Widget* tmp = static_cast<Packer*>(this)->down->findWidgetByName(name, depth+1);
     
    243243{
    244244  function(this);
    245   if (this->isOption < 0)
     245  if (this->optionType < GUI_NOTHING)
    246246    {
    247247      static_cast<Packer*>(this)->down->walkThrough(function, depth+1);
     
    261261{
    262262  function(this, data);
    263   if (this->isOption < 0)
     263  if (this->optionType < GUI_NOTHING)
    264264    {
    265265      static_cast<Packer*>(this)->down->walkThrough(function, data, depth+1);
     
    275275void Widget::listOptionsAndGroups(Widget* widget)
    276276{
    277   if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
     277  if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName)
    278278    PRINT(0)("[%s]\n", static_cast<Packer*>(widget)->groupName);
    279   if (widget->isOption >= 1)
     279  if (widget->optionType > GUI_NOTHING)
    280280    {
    281281      Widget::listOptions(widget);
     
    289289void Widget::listOptions(Widget* widget)
    290290{
    291   if(widget->isOption >= 1)
     291  if(widget->optionType > GUI_NOTHING)
    292292    PRINT(0)("  %s is %s\n", static_cast<Option*>(widget)->title, static_cast<Option*>(widget)->save());
    293293}
     
    301301{
    302302 
    303   if (widget->isOption >= 1)
     303  if (widget->optionType > GUI_NOTHING)
    304304    {
    305305      int* count =(int*)data;
     
    308308               static_cast<Option*>(widget)->title,
    309309               static_cast<Option*>(widget)->save());
     310    }
     311}
     312
     313/**
     314    \brief This is for listing the options of "widget"
     315    \param widget specifies the widget that should be listed
     316    \param data A Counter, that always knows how many Options have been found yet.
     317*/
     318void Widget::printHelp(Widget* widget)
     319{
     320  int helpLen=0;
     321
     322  if (widget->optionType > GUI_NOTHING)
     323    {
     324      Option* option = (Option*)widget;
     325      if (option->flagName || option->flagNameShort)
     326        {
     327          PRINT(0)("  ");
     328          if (option->flagNameShort)
     329            {
     330              PRINT(0)("-%s", option->flagNameShort);
     331              helpLen += strlen(option->flagNameShort)+1;
     332            }
     333          if (option->flagName)
     334            {
     335              if (helpLen > 0)
     336                {
     337                  PRINT(0)("|");
     338                  helpLen++;
     339                }
     340              PRINT(0)("--%s:", option->flagName);
     341              helpLen += strlen(option->flagName)+2;
     342            }
     343          while ((helpLen ++) < 29)
     344            PRINT(0)(" ");
     345          if (option->shortDescription)
     346            PRINT(0)("%s\n", option->shortDescription);
     347          else
     348            PRINT(0)("\n");
     349        }
    310350    }
    311351}
     
    320360Widget* Widget::findOptionByNumber(int* number, unsigned int depth)
    321361{
    322   if (isOption > 0)
     362  if (optionType > GUI_NOTHING)
    323363    {
    324364      --*number;
     
    328368        }
    329369    }
    330   if (this->isOption < 0 && static_cast<Packer*>(this)->down)
     370  if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down)
    331371    {
    332372      Widget* tmp = static_cast<Packer*>(this)->down->findOptionByNumber(number, depth+1);
     
    346386void Widget::listGroups(Widget* widget)
    347387{
    348   if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
     388  if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName)
    349389    PRINT(0)("[%s]\n", static_cast<Packer*>(widget)->groupName);
    350390}
     
    358398{
    359399  int* count = (int*)data;
    360   if (widget->isOption < 0 && static_cast<Packer*>(widget)->groupName)
     400  if (widget->optionType < GUI_NOTHING && static_cast<Packer*>(widget)->groupName)
    361401    PRINT(0)("%d: [%s]\n", ++*count, static_cast<Packer*>(widget)->groupName);
    362402}
     
    369409Widget* Widget::findGroupByNumber(int* number, unsigned int depth)
    370410{
    371   if (isOption < 0 && static_cast<Packer*>(this)->groupName)
     411  if (optionType < GUI_NOTHING && static_cast<Packer*>(this)->groupName)
    372412    {
    373413      --*number;
     
    377417        }
    378418    }
    379   if (this->isOption < 0 && static_cast<Packer*>(this)->down)
     419  if (this->optionType < GUI_NOTHING && static_cast<Packer*>(this)->down)
    380420    {
    381421      Widget* tmp = static_cast<Packer*>(this)->down->findGroupByNumber(number, depth+1);
     
    395435void Widget::setOptions(Widget* widget)
    396436{
    397   if (widget->isOption >= 1)
     437  if (widget->optionType > GUI_NOTHING)
    398438    static_cast<Option*>(widget)->redraw();
    399439}
     
    406446void Widget::redrawOptions(Widget* widget)
    407447{
    408   if (widget->isOption >= 1)
     448  if (widget->optionType > GUI_NOTHING)
    409449    static_cast<Option*>(widget)->redraw();
    410450}
     
    415455void Widget::flagCheck(Widget* widget, void* flagName)
    416456{
    417   if (widget->isOption>=1)
     457  if (widget->optionType > GUI_NOTHING)
    418458    {     
    419459      Option* option =(Option*)widget;
     
    567607Container::Container(void)
    568608{
    569   this->isOption = -1;
     609  this->optionType = GUI_CONTAINER;
    570610}
    571611
     
    595635    }
    596636  else
    597     PRINTF(1)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
     637    PRINTF(2)("You tried to put more than one Widget into a Container. \nNot including this item.\nThis is only possible with Boxes.\n");
    598638}
    599639
     
    772812   \brief Creates a new Frame with name title
    773813*/
    774 Frame::Frame(char* frameName)
     814Frame::Frame(const char* frameName)
    775815{
    776816#ifdef HAVE_GTK2
     
    778818  gtk_container_set_border_width(GTK_CONTAINER(this->widget), 3);
    779819#endif /* HAVE_GTK2 */
    780   if (title)
     820  if (frameName)
    781821    this->setTitle(frameName);
    782822}
     
    801841  strcpy(this->title, title);
    802842#ifdef HAVE_GTK2
    803   gtk_frame_set_label(GTK_FRAME(widget), title);
     843  gtk_frame_set_label(GTK_FRAME(widget), this->title);
    804844#endif /* HAVE_GTK2 */
    805845}
     
    814854EventBox::EventBox(const char* eventBoxName)
    815855{
    816   this->isOption = -1;
    817 
    818856#ifdef HAVE_GTK2
    819857  this->widget = gtk_event_box_new();
     
    842880Box::Box(char boxtype)
    843881{
    844   this->isOption = -2;
     882  this->optionType = GUI_BOX;
    845883
    846884#ifdef HAVE_GTK2
     
    10531091   \param buttonName sets the Name of the Button
    10541092*/
    1055 Button::Button(char* buttonName)
    1056 {
    1057   isOption = 0;
     1093Button::Button(const char* buttonName)
     1094{
     1095  this->optionType = GUI_NOTHING;
    10581096
    10591097#ifdef HAVE_GTK2
     
    11151153CheckButton::CheckButton(const char* buttonName)
    11161154{
    1117   this->isOption = 1;
     1155  this->optionType = GUI_BOOL;
    11181156
    11191157#ifdef HAVE_GTK2
     
    11791217  if ((this->value = atoi(tmpChar))=!0)
    11801218    this->value = 1;
    1181 #endif /* HAVE_GTK2 */
     1219
    11821220  PRINT(0)("%s set to: %d\n", this->title, this->value);
     1221#endif /* HAVE_GTK2 */
    11831222}
    11841223
     
    12051244Slider::Slider(const char* slidername, int start, int end)
    12061245{
    1207   this->isOption = 2;
     1246  this->optionType = GUI_INT;
    12081247
    12091248  this->start = start;
     
    12641303  if (this->value <= this->start)
    12651304    this->value = this->start;
    1266 #endif /* HAVE_GTK2 */
     1305
    12671306  PRINT(0)("%s set to: %d\n",this->title, this->value);
     1307#endif /* HAVE_GTK2 */
    12681308}
    12691309
     
    13291369void Menu::init(void)
    13301370{
    1331   this->isOption = 2;
     1371  this->optionType = GUI_INT;
    13321372  this->firstItem = NULL;
    13331373
     
    13721412    {
    13731413      this->value = 0;
    1374       PRINTF(2)("Sorry, but %s has not been found in the Itemlist of %s\n", loadString, this->title);
    1375     }
    1376   PRINTF(4)( "Loading %s: setting to %d\n", this->title, this->value);
     1414      PRINTF(2)("%s has not been found in the Itemlist of %s\n", loadString, this->title);
     1415    }
     1416  PRINTF(5)( "Loading %s: setting to %d\n", this->title, this->value);
    13771417  this->redraw();
    13781418}
     
    14311471
    14321472#endif /* HAVE_GTK2 */
    1433   PRINT(4)("%s set to: %d\n", this->title, this->value);
     1473  PRINT(5)("%s set to: %d\n", this->title, this->value);
    14341474}
    14351475
     
    14431483OptionLabel::OptionLabel(const char* label, const char* value)
    14441484{
    1445   this->isOption = 5;
     1485  this->optionType = GUI_CHAR_ARRAY;
    14461486  cValue = NULL;
    14471487
     
    14741514  this->cValue = new char [strlen(newValue)+1];
    14751515  strcpy(this->cValue, newValue);
    1476 #ifdef HAVE_GTK2
    1477   gtk_label_set_text(GTK_LABEL(this->widget), this->cValue);
    1478 #endif /* HAVE_GTK2 */
     1516
     1517  this->redraw();
    14791518}
    14801519
     
    14851524{
    14861525#ifdef HAVE_GTK2
    1487   gtk_label_set_text(GTK_LABEL(widget), title);
     1526  gtk_label_set_text(GTK_LABEL(widget), cValue);
    14881527#endif /* HAVE_GTK2 */
    14891528}
     
    14951534{
    14961535#ifdef HAVE_GTK2
    1497   this->cValue =(char*)gtk_label_get_text(GTK_LABEL(this->widget));
     1536  this->cValue = (char*)gtk_label_get_text(GTK_LABEL(this->widget));
    14981537#else /* HAVE_GTK2 */
    14991538  PRINT(0)("\nPlease give me a new input for %s: ", this->title);
     
    15211560void OptionLabel::load(char* loadString)
    15221561{
    1523   PRINTF(4)("Loading %s: setting to %s\n", this->title, loadString);
     1562  PRINTF(5)("Loading %s: setting to %s\n", this->title, loadString);
    15241563  this->setValue(loadString);
    15251564}
     
    15341573Label:: Label(const char* text)
    15351574{
    1536   this->isOption = 0;
     1575  this->optionType = GUI_NOTHING;
    15371576 
    15381577#ifdef HAVE_GTK2
     
    16301669ProgressBar::ProgressBar(const char* label)
    16311670{
    1632   this->isOption = 0;
     1671  this->optionType = GUI_NOTHING;
    16331672  this->progress = 0.0;
    16341673  this->totalSize = 0.0;
     
    16711710#ifdef HAVE_GTK2
    16721711  gtk_progress_set_value(GTK_PROGRESS(widget), this->progress*100.0/this->totalSize);
    1673   PRINTF(4)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
     1712  PRINTF(5)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
    16741713#else /* HVE_GTK2 */
    16751714  PRINT(0)("Progress: %f%%\n", this->progress*100.0/this->totalSize);
     
    17291768void Image::init(const char* name)
    17301769{
    1731   isOption = 0;
     1770  optionType = GUI_NOTHING;
    17321771
    17331772  if (this->title)
     
    17361775  strcpy(this->title, name);
    17371776}
     1777
     1778
     1779/////////////////
     1780/* FILE DIALOG */
     1781/////////////////
     1782/**
     1783   \brief Creates a new FileDialog
     1784   \param fileDialogName a Name for the Dialog
     1785*/
     1786FileDialog::FileDialog(const char* fileDialogName)
     1787{
     1788  this->optionType = GUI_NOTHING;
     1789  this->isOpen = false;
     1790  this->changeOption = NULL;
     1791  this->openUpButton = NULL;
     1792  this->okObject = NULL;
     1793  this->okFunc = NULL;
     1794
     1795#ifdef HAVE_GTK2
     1796  this->widget = gtk_file_selection_new(fileDialogName);
     1797
     1798  gtk_file_selection_set_select_multiple(GTK_FILE_SELECTION (this->widget), FALSE);
     1799
     1800  g_signal_connect(GTK_FILE_SELECTION (this->widget)->cancel_button,
     1801                     "button_release_event",
     1802                     G_CALLBACK (FileDialog::dialogClose),
     1803                     this);
     1804  g_signal_connect(GTK_FILE_SELECTION (this->widget),
     1805                     "delete_event",
     1806                     G_CALLBACK (FileDialog::dialogClose),
     1807                     this);
     1808  g_signal_connect(GTK_FILE_SELECTION (this->widget)->ok_button,
     1809                     "button_release_event",
     1810                     G_CALLBACK (FileDialog::dialogOK),
     1811                     this);
     1812#endif /* HAVE_GTK2 */
     1813  if (fileDialogName)
     1814    this->setTitle(fileDialogName);
     1815}
     1816
     1817/**
     1818   \brief destructs a FileDialog
     1819*/
     1820FileDialog::~FileDialog(void)
     1821{
     1822  PRINTF(5)("deleting FileDialog %s\n", this->title);
     1823}
     1824
     1825void FileDialog::setChangeOption(OptionLabel* changeOption)
     1826{
     1827  this->changeOption = changeOption;
     1828}
     1829
     1830void FileDialog::setOKFunc(void* okObject, bool(*function)(const char* , void*))
     1831{
     1832  this->okObject = okObject;
     1833  this->okFunc = function;
     1834}
     1835
     1836
     1837void FileDialog::setOpenUpButton(Button* openUpButton)
     1838{
     1839  this->openUpButton = openUpButton;
     1840
     1841  openUpButton->connectSignal("button_release_event", this, FileDialog::dialogOpen);
     1842}
     1843
     1844
     1845void FileDialog::setDefaultFileName(const char* defaultFileName)
     1846{
     1847#ifdef HAVE_GTK2
     1848  gtk_file_selection_set_filename (GTK_FILE_SELECTION(this->widget), defaultFileName);
     1849#endif /* HAVE_GTK2 */
     1850}
     1851
     1852void FileDialog::setMask(const char* mask)
     1853{
     1854#ifdef HAVE_GTK2
     1855  gtk_file_selection_complete(GTK_FILE_SELECTION(this->widget), mask);
     1856#endif /* HAVE_GTK2 */
     1857}
     1858
     1859/**
     1860   \brief disables the File Operator Buttons
     1861*/
     1862void FileDialog::disableFileOpts(void)
     1863{
     1864#ifdef HAVE_GTK2
     1865  gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(this->widget));
     1866#endif /* HAVE_GTK2 */
     1867}
     1868
     1869/**
     1870   \brief The ok-button has been pressed
     1871*/
     1872void FileDialog::okEvent(void)
     1873{
     1874  if (this->okFunc)
     1875    {
     1876#ifdef HAVE_GTK2
     1877      if(this->okFunc((const char*)gtk_file_selection_get_filename(GTK_FILE_SELECTION(this->widget)), this->okObject))
     1878         this->close();
     1879#endif /* HAVE_GTK2 */
     1880    }
     1881  else if (this->changeOption)
     1882    {
     1883#ifdef HAVE_GTK2
     1884      changeOption->setValue(gtk_file_selection_get_filename(GTK_FILE_SELECTION(this->widget)));
     1885#endif /* HAVE_GTK2 */
     1886      this->close();
     1887    }
     1888  else
     1889    this->close();
     1890}
     1891
     1892/**
     1893   \biref opens up the FileDialog-Window
     1894*/
     1895void FileDialog::open(void)
     1896{
     1897  isOpen = true;
     1898#ifdef HAVE_GTK2
     1899  gtk_widget_show_all(this->widget);
     1900  gtk_grab_add(this->widget);
     1901#endif /* HAVE_GTK2 */
     1902}
     1903
     1904/**
     1905   \closes the FileDialog-Window
     1906*/
     1907void FileDialog::close(void)
     1908{
     1909  this->isOpen = false;
     1910#ifdef HAVE_GTK2
     1911  gtk_grab_remove(this->widget);
     1912  gtk_widget_hide(this->widget);
     1913#endif /* HAVE_GTK2 */
     1914}
     1915
     1916#ifdef HAVE_GTK2
     1917gint FileDialog::dialogOK(GtkWidget* widget, GdkEvent* event, void* dialog)
     1918{
     1919  static_cast<FileDialog*>(dialog)->okEvent();
     1920}
     1921#else /* HAVE_GTK2 */
     1922int FileDialog::dialogOK(void* widget, void* event, void* dialog){}
     1923#endif /* HAVE_GTK2 */
     1924
     1925#ifdef HAVE_GTK2
     1926gint FileDialog::dialogOpen(GtkWidget* widget, GdkEvent* event, void* dialog)
     1927{
     1928  static_cast<FileDialog*>(dialog)->open();
     1929}
     1930#else /* HAVE_GTK2 */
     1931int FileDialog::dialogOpen(void* widget, void* event, void* dialog){}
     1932#endif /* HAVE_GTK2 */
     1933
     1934#ifdef HAVE_GTK2
     1935gint FileDialog::dialogClose(GtkWidget* widget, GdkEvent* event, void* dialog)
     1936{
     1937  static_cast<FileDialog*>(dialog)->close();
     1938}
     1939#else /* HAVE_GTK2 */
     1940int FileDialog::dialogClose(void* widget, void* event, void* dialog){}
     1941#endif /* HAVE_GTK2 */
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_gtk.h

    r4063 r4139  
    1111
    1212#include "debug.h"
     13#include "globals.h"
    1314
    1415#ifdef HAVE_GTK2
     
    2829#include <gtk/gtkeventbox.h>
    2930#include <gtk/gtkprogressbar.h>
     31#include <gtk/gtkfilesel.h>
    3032#endif /* HAVE_GTK2 */
    3133
    3234// enumerator for different GuiOption-Types
    33 enum GUI_OPTION {GUI_CONTAINER = -2,
    34                  GUI_BOX = -1,
     35enum GUI_OPTION {GUI_BOX = -2,
     36                 GUI_CONTAINER = -1,
    3537                 GUI_NOTHING = 0,
    3638                 GUI_BOOL = 1,
     
    6365  void walkThrough(void(*function)(Widget*), unsigned int depth);
    6466  void walkThrough(void(*function)(Widget*, void*), void* data, unsigned int depth);
    65   static void listOptionsAndGroups(Widget* widget);
    66   static void listOptions(Widget* widget);
    67   static void listOptions(Widget* widget, void* data);
    68   Widget* findOptionByNumber(int* number, unsigned int depth);
    69   static void listGroups(Widget* widget);
    70   static void listGroups(Widget* widget, void* data);
    71   Widget* findGroupByNumber(int* number, unsigned int depth);
    72   static void setOptions(Widget* widget);
    73   static void redrawOptions(Widget* widget);
    74   static void flagCheck(Widget* widget, void* flagName);
     67   static void listOptionsAndGroups(Widget* widget);
     68   static void listOptions(Widget* widget);
     69   static void listOptions(Widget* widget, void* data);
     70   Widget* findOptionByNumber(int* number, unsigned int depth);
     71   static void listGroups(Widget* widget);
     72   static void listGroups(Widget* widget, void* data);
     73   static void printHelp(Widget* widget);
     74   Widget* findGroupByNumber(int* number, unsigned int depth);
     75   static void setOptions(Widget* widget);
     76   static void redrawOptions(Widget* widget);
     77   static void flagCheck(Widget* widget, void* flagName);
    7578 
    7679#ifdef HAVE_GTK2
     
    103106#endif /* HAVE_GTK2 */
    104107
    105   int isOption;                     //!< with this Paramenter one can set the option-type: -2:Container, -1: Box, 0: not an Option, 1: Bool-option, 2: int-option, 3: float option, 4:char option, 5: char* option
    106  
     108  GUI_OPTION optionType;            //!< The Type of the Widget.
    107109  char* title;                      //!< The name of the Widget. Some do display it, Options need it to save;
    108110};
     
    141143  Container(void);
    142144  virtual ~Container(void);
     145
    143146  void setBorderWidth(int borderwidth);
    144147  void fill(Widget* lowerWidget);
     
    184187{
    185188 public:
    186   Frame(char* frameName = NULL);
     189  Frame(const char* frameName = NULL);
    187190  virtual ~Frame(void);
    188191
     
    262265{
    263266 public:
    264   Button(char* buttonName = NULL);
     267  Button(const char* buttonName = NULL);
    265268  virtual ~Button(void);
    266269
     
    358361};
    359362
     363//! A EntryField is a TextEntry field, for putting some text into.
     364class EntryField : public Option
     365{
     366 public:
     367  EntryField(const char* name = NULL);
     368  virtual ~EntryField(void);
     369 
     370  void setValue(const char* newValue);
     371  virtual char* save(void);
     372  virtual void load(char* loadString);
     373 
     374  virtual void redraw(void);
     375  virtual void changeOption(void);
     376};
     377
    360378//! A label is a Widget, that displays a text
    361379class Label : public Widget
     
    405423};
    406424
    407 //gint orxonox_gui_quit(GtkWidget* widget, GdkEvent* event, gpointer data);
     425//! A FileDialog is a window with wich one can select a File
     426class FileDialog : public Widget
     427{
     428 private:
     429  OptionLabel* changeOption;
     430  Button* openUpButton;
     431  bool isOpen;
     432  bool (*okFunc)(const char* , void*);
     433  void* okObject;
     434
     435 public:
     436  FileDialog(const char* fileDialogName);
     437  virtual ~FileDialog(void);
     438
     439  void setChangeOption(OptionLabel* changeOption);
     440  void setOKFunc(void* okObject, bool(*function)(const char* , void*));
     441  void setOpenUpButton(Button* openUpButton);
     442  void setDefaultFileName(const char* defaultFileName);
     443  void setMask(const char* mask);
     444  void disableFileOpts(void);
     445
     446  void okEvent();
     447  void open();
     448  void close();
     449
     450#ifdef HAVE_GTK2
     451  static gint dialogOK(GtkWidget* widget, GdkEvent* event, void* dialog);
     452  static gint dialogOpen(GtkWidget* widget, GdkEvent* event, void* dialog);
     453  static gint dialogClose(GtkWidget* widget, GdkEvent* event, void* dialog);
     454#else /* HAVE_GTK2 */
     455  static int dialogOK(void* widget, void* event, void* dialog);
     456  static int dialogOpen(void* widget, void* event, void* dialog);
     457  static int dialogClose(void* widget, void* event, void* dialog);
     458#endif /* HAVE_GTK2 */
     459};
    408460
    409461#endif /* _GUI_GTK_H */
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_keys.cc

    r4063 r4139  
    3333GuiKeys::GuiKeys(void)
    3434{
    35   this->keysFrame = new Frame("Keyboard-Options:");
    36   //  keysFrame->setGroupName("Keyboard");
    37   this->keysBox = new Box('h');
    38   this->player1 = new Player("player1");
    39   this->player2 = new Player("player2");
    40 
    41   this->keysBox->fill(this->player1->getOpenButton());
    42   this->keysBox->fill(this->player2->getOpenButton());
    43 
    44   this->keysFrame->fill(this->keysBox);
     35  Frame* keysFrame;      //!< The Frame that holds the keyOptions.
     36
     37  keysFrame = new Frame("Keyboard-Options:");
     38  {
     39    Box* keysBox0;          //!< The Frame that holds the keyOptions.
     40   
     41    //  keysFrame->setGroupName("Keyboard");
     42    keysBox0 = new Box('v');
     43    {
     44      Box* keysBox1;
     45      MiscKeys* misc;            //!< The Misc Keys
     46
     47      keysBox1 = new Box('h');
     48      {
     49        PlayerKeys* player1;       //!< The first Player's keys.
     50        PlayerKeys* player2;       //!< The seconds Player's keys.
     51       
     52        player1 = new PlayerKeys(CONFIG_SECTION_PLAYER "1");
     53        player2 = new PlayerKeys(CONFIG_SECTION_PLAYER "2");
     54       
     55        keysBox1->fill(player1->getOpenButton());
     56        keysBox1->fill(player2->getOpenButton());
     57      }
     58      keysBox0->fill(keysBox1);
     59
     60      misc = new MiscKeys();
     61      keysBox0->fill(misc->getOpenButton());
     62    }
     63    keysFrame->fill(keysBox0);
     64  }
     65 
     66  // setting up the Input Windows that receives keystrokes.
     67  this->inputWindow = new Window("inputWindow");
     68  this->inputButton = new Button("test");
     69#ifdef HAVE_GTK2
     70  this->inputWindow->connectSignal("destroy",  Widget::doNothingSignal);
     71  this->inputWindow->connectSignal("delete_event", Widget::doNothingSignal);
     72#endif /* HAVE_GTK2 */
     73  this->inputWindow->fill(inputButton);
     74 
    4575  this->setMainWidget(keysFrame);
    4676}
     
    5484}
    5585
     86
     87Window* GuiKeys::inputWindow = NULL;
     88Button* GuiKeys::inputButton = NULL;
     89long GuiKeys::keySignal = 0;
     90
     91////////////
    5692/* PLAYER */
    57 
     93////////////
    5894/**
    5995   \brief Creates new inputs for a player
    6096   \param player the name of the Player
    6197*/
    62 Player::Player(char* player)
    63 {
    64   char* windowName = new char[strlen(player)+25];
    65   strcpy(windowName, "Keyboard settings of ");
     98PlayerKeys::PlayerKeys(char* player)
     99{
     100  Window* pKeyWindow;     //!< The Window for a new Key-setting.
     101
     102  char* windowName = new char[strlen(player)+12];
     103  strcpy(windowName, "KeySets: ");
    66104  strcat(windowName, player);
    67   this->pKeyWindow = new Window(windowName);
    68   this->pKeyFrame = new Frame(windowName);
    69    this->pKeysBox = new Box('v');
    70    this->pKeysBox->setGroupName(player);
    71     this->pKeysBox->fill(addKey(UP, "up"));
    72     this->pKeysBox->fill(addKey(DOWN, "down"));
    73     this->pKeysBox->fill(addKey(LEFT, "left"));
    74     this->pKeysBox->fill(addKey(RIGHT, "right"));
    75     this->pKeysBox->fill(addKey(SHOOT, "shoot"));
    76     delete windowName;
    77     closeButton = new Button("close");
    78 #ifdef HAVE_GTK2
    79     this->closeButton->connectSignal("button_press_event", this->pKeyWindow, Window::windowClose);
    80 #endif /* HAVE_GTK2 */
    81 
    82     this->pKeysBox->fill(this->closeButton);
    83     this->pKeyFrame->fill(this->pKeysBox);
    84    this->pKeyWindow->fill(this->pKeyFrame);
    85    Window::addWindow(this->pKeyWindow);
    86 #ifdef HAVE_GTK2
    87    this->pKeyWindow->connectSignal("destroy", this->pKeyWindow, Window::windowClose);
    88    this->pKeyWindow->connectSignal("delete_event", this->pKeyWindow, Window::windowClose);
    89 #endif /* HAVE_GTK2 */
    90 
     105  pKeyWindow = new Window(windowName);
     106  {
     107    Frame* pKeyFrame;       //!< The Frame for a new Key-setting.
     108
     109    pKeyFrame = new Frame(windowName);
     110    {
     111      Box* pKeysBox;          //!< The Box that holds the Key-settings.
     112      pKeysBox = new Box('v');
     113      {
     114        Button* closeButton;    //!< The CloseButton for this key-settings.
     115
     116        pKeysBox->setGroupName(player);
     117        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_UP, "UP"));
     118        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_DOWN, "DOWN"));
     119        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_LEFT, "LEFT"));
     120        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_RIGHT, "RIGHT"));
     121        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_FIRE, "SPACE"));
     122        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_NEXT_WEAPON, "m"));
     123        pKeysBox->fill(addKey(CONFIG_NAME_PLAYER_PREV_WEAPON, "n"));
     124        closeButton = new Button("close");
     125#ifdef HAVE_GTK2
     126        closeButton->connectSignal("button_press_event", pKeyWindow, Window::windowClose);
     127#endif /* HAVE_GTK2 */
     128
     129        pKeysBox->fill(closeButton);
     130      }
     131      pKeyFrame->fill(pKeysBox);
     132    }
     133    pKeyWindow->fill(pKeyFrame);
     134  }
     135  delete windowName;
     136  Window::addWindow(pKeyWindow);
     137#ifdef HAVE_GTK2
     138  pKeyWindow->connectSignal("destroy", pKeyWindow, Window::windowClose);
     139  pKeyWindow->connectSignal("delete_event", pKeyWindow, Window::windowClose);
     140#endif /* HAVE_GTK2 */
     141 
    91142  this->openButton = new Button(player);
    92143#ifdef HAVE_GTK2
    93   this->openButton->connectSignal("button_press_event", this->pKeyWindow, Window::windowOpen);
    94 #endif /* HAVE_GTK2 */
    95 
    96   this->inputWindow = new Window("inputWindow");
    97 
    98   this->inputButton = new Button("test");
    99   this->inputWindow->fill(inputButton);
    100 #ifdef HAVE_GTK2
    101   this->inputWindow->connectSignal("destroy",  Widget::doNothingSignal);
    102   this->inputWindow->connectSignal("delete_event", Widget::doNothingSignal);
    103 #endif /* HAVE_GTK2 */
    104 
    105 }
     144  this->openButton->connectSignal("button_press_event", pKeyWindow, Window::windowOpen);
     145#endif /* HAVE_GTK2 */
     146}
     147
     148/**
     149   \returns the OpenButton of a Player
     150*/
     151Button* PlayerKeys::getOpenButton(void)
     152{
     153  return this->openButton;
     154}
     155
     156//////////////////
     157/* MISC_OPTIONS */
     158//////////////////
     159/**
     160   \brief Creates new inputs for a misc
     161   \param player the name of the Misc
     162*/
     163MiscKeys::MiscKeys()
     164{
     165  Window* keyWindow;     //!< The Window for a new Key-setting.
     166
     167  keyWindow = new Window("misc Keys");
     168  {
     169    Frame* keyFrame;       //!< The Frame for a new Key-setting.
     170
     171    keyFrame = new Frame("misc Keys:");
     172    {
     173      Box* keysBox;          //!< The Box that holds the Key-settings.
     174      keysBox = new Box('v');
     175      {
     176        Button* closeButton;    //!< The CloseButton for this key-settings.
     177
     178        keysBox->setGroupName(CONFIG_SECTION_MISC_KEYS);
     179        keysBox->fill(addKey(CONFIG_NAME_QUIT , "ESCAPE"));
     180        keysBox->fill(addKey(CONFIG_NAME_PAUSE, "PAUSE"));
     181        keysBox->fill(addKey(CONFIG_NAME_NEXT_WORLD, "x"));
     182        keysBox->fill(addKey(CONFIG_NAME_PREV_WORLD, "z"));
     183        keysBox->fill(addKey(CONFIG_NAME_VIEW0, "1"));
     184        keysBox->fill(addKey(CONFIG_NAME_VIEW1, "2"));
     185        keysBox->fill(addKey(CONFIG_NAME_VIEW2, "3"));
     186        keysBox->fill(addKey(CONFIG_NAME_VIEW3, "4"));
     187        keysBox->fill(addKey(CONFIG_NAME_VIEW4, "5"));
     188        keysBox->fill(addKey(CONFIG_NAME_VIEW5, "6"));
     189
     190        closeButton = new Button("close");
     191#ifdef HAVE_GTK2
     192        closeButton->connectSignal("button_press_event", keyWindow, Window::windowClose);
     193#endif /* HAVE_GTK2 */
     194
     195        keysBox->fill(closeButton);
     196      }
     197      keyFrame->fill(keysBox);
     198    }
     199    keyWindow->fill(keyFrame);
     200  }
     201  Window::addWindow(keyWindow);
     202#ifdef HAVE_GTK2
     203  keyWindow->connectSignal("destroy", keyWindow, Window::windowClose);
     204  keyWindow->connectSignal("delete_event", keyWindow, Window::windowClose);
     205#endif /* HAVE_GTK2 */
     206 
     207  this->openButton = new Button("misc");
     208#ifdef HAVE_GTK2
     209  this->openButton->connectSignal("button_press_event", keyWindow, Window::windowOpen);
     210#endif /* HAVE_GTK2 */
     211}
     212
     213/**
     214   \returns the OpenButton of a Misc
     215*/
     216Button* MiscKeys::getOpenButton(void)
     217{
     218  return this->openButton;
     219}
     220
    106221
    107222/**
     
    111226   \returns A widget that has the Key-Box
    112227*/
    113 Widget* Player::addKey(KEYS key, char* name)
    114 {
    115   this->inputKey[key] = new InputKey;
    116   this->inputKey[key]->pKeyBox = new Box();
    117   this->inputKey[key]->pKeyButton = new Button(name);
    118   this->inputKey[key]->pKeyOLabel = new OptionLabel(name, name);
    119   this->inputKey[key]->pKeyOLabel->saveability();
    120 
    121 #ifdef HAVE_GTK2
    122   //inputKey[key]->pKeyButton->connectSignal("key_press_event", inputKey[key]->pKeyButton, key_cb);
    123   this->inputKey[key]->pKeyButton->connectSignal("button_press_event", this->inputKey[key], inputWindowEvent);
    124 #endif /* HAVE_GTK2 */
    125   this->inputKey[key]->pKeyBox->fill(this->inputKey[key]->pKeyButton);
    126   this->inputKey[key]->pKeyBox->fill(this->inputKey[key]->pKeyOLabel);
    127   return this->inputKey[key]->pKeyBox;
    128 }
    129 
    130 /**
    131    \returns the OpenButton of a Player
    132 */
    133 Button* Player::getOpenButton(void)
    134 {
    135   return this->openButton;
    136 }
    137 
    138 /**
    139    \brief sets a new Key(only output)
    140    \param key the new Key.
    141 */
    142 void Player::setkey(KEYS key)
    143 {
    144   PRINT(4)("setting up Key: %d\n", key);
    145 }
    146 
    147 Window* Player::inputWindow = NULL;
    148 Button* Player::inputButton = NULL;
    149 long Player::keySignal = 0;
    150 
    151 #ifdef HAVE_GTK2
    152 gint Player::inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* inputKey)
    153 {
    154   inputButton->setTitle("press a Key");
    155   keySignal = inputButton->connectSignal("key_press_event", inputKey, key_cb);
    156   inputWindow->open();
     228Widget* addKey(const char* name, const char* defaultVal)
     229{
     230  InputKey* inputKey = new InputKey;
     231  inputKey->keyBox = new Box();
     232  inputKey->keyButton = new Button(name);
     233  if (defaultVal)
     234    inputKey->keyOLabel = new OptionLabel(name, defaultVal);
     235  else
     236    inputKey->keyOLabel = new OptionLabel(name, name);
     237  inputKey->keyOLabel->saveability();
     238
     239#ifdef HAVE_GTK2
     240  //inputKey->keyButton->connectSignal("key_press_event", inputKey->keyButton, key_cb);
     241  inputKey->keyButton->connectSignal("button_press_event", inputKey, inputWindowEvent);
     242#endif /* HAVE_GTK2 */
     243  inputKey->keyBox->fill(inputKey->keyButton);
     244  inputKey->keyBox->fill(inputKey->keyOLabel);
     245  return inputKey->keyBox;
     246}
     247
     248
     249#ifdef HAVE_GTK2
     250gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* inputKey)
     251{
     252  GuiKeys::inputButton->setTitle("press a Key");
     253  GuiKeys::keySignal = GuiKeys::inputButton->connectSignal("key_press_event", inputKey, key_cb);
     254  GuiKeys::inputWindow->open();
    157255}
    158256 
     
    164262   \returns Nothing
    165263*/
    166 gint Player::key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey)
     264gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey)
    167265{
    168266  InputKey* inputkey =(InputKey*) inputKey;
    169   char title [20];
    170 
    171   switch(event->keyval) 
     267  char title [50];
     268
     269  switch(event->keyval)
    172270    {
    173271    case GDK_Up:
    174       strcpy(title, "up");
     272      strcpy(title, "UP");
    175273      break;
    176274    case GDK_Down:
    177       strcpy(title, "down");
     275      strcpy(title, "DOWN");
    178276      break;
    179277    case GDK_Left:
    180       strcpy(title, "left");
     278      strcpy(title, "LEFT");
    181279      break;
    182280    case GDK_Right:
    183       strcpy(title, "right");
     281      strcpy(title, "RIGHT");
    184282      break;
    185283     
    186284    case GDK_space:
    187       strcpy(title, "space");
    188       break;
    189      
    190     case 65293:
    191       strcpy(title, "enter");
     285      strcpy(title, "SPACE");
     286      break;
     287     
     288    case GDK_Return:
     289      strcpy(title, "RETURN");
    192290      break;
    193291     
    194292      // Special Keys //
     293    case GDK_BackSpace:
     294      strcpy(title, "BACKSPACE");
     295      break;
     296    case GDK_Scroll_Lock:
     297      strcpy(title, "SCROLLOCK");
     298      break;
     299    case GDK_minus:
     300      strcpy(title, "MINUS");
     301      break;
     302    case GDK_plus:
     303      strcpy(title, "PLUS");
     304      break;
     305    case GDK_slash:
     306      strcpy(title, "SLASH");
     307      break;
     308    case GDK_period:
     309      strcpy(title, "PERIOD");
     310      break;
     311    case GDK_comma:
     312      strcpy(title, "COMMA");
     313      break;
     314    case GDK_colon:
     315      strcpy(title, "COLON");
     316      break;
     317    case GDK_semicolon:
     318      strcpy(title, "SEMICOLON");
     319      break;
     320    case GDK_less:
     321      strcpy(title, "LESS");
     322      break;
     323    case GDK_equal:
     324      strcpy(title, "EQUALS");
     325      break;
     326    case GDK_greater:
     327      strcpy(title, "GREATER");
     328      break;
     329    case GDK_question:
     330      strcpy(title, "QUESTION");
     331      break;
     332    case GDK_at:
     333      strcpy(title, "AT");
     334      break;
     335    case GDK_bracketleft:
     336      strcpy(title, "LEFTBRACKET");
     337      break;
     338    case GDK_bracketright:
     339      strcpy(title, "RIGHTBRACKET");
     340      break;
     341    case GDK_backslash:
     342      strcpy(title, "BACKSLASH");
     343      break;
     344    case GDK_underscore:
     345      strcpy(title, "UNDERSCORE");
     346      break;
     347    case GDK_quoteleft:
     348      strcpy(title, "BACKQUOTE");
     349      break;
     350
     351    case GDK_Page_Up:
     352      strcpy(title, "PAGEUP");
     353      break;
     354    case GDK_Page_Down:
     355      strcpy(title, "PAGEDOWN");
     356      break;
     357    case GDK_Home:
     358      strcpy(title, "HOME");
     359      break;
     360    case GDK_Insert:
     361      strcpy(title, "INSERT");
     362      break;
     363     
    195364    case GDK_Escape:
    196       strcpy(title, "esc");
     365      strcpy(title, "ESCAPE");
    197366      break;
    198367    case GDK_Tab:
    199       strcpy(title, "tab");
     368      strcpy(title, "TAB");
    200369      break;
    201370    case GDK_Shift_L:
    202       strcpy(title, "l_shift");
     371      strcpy(title, "LSHIFT");
    203372      break;
    204373    case GDK_Shift_R:
    205       strcpy(title, "r_shift");
     374      strcpy(title, "R_SHIFT");
    206375      break;
    207376    case GDK_Control_L:
    208       strcpy(title, "l_ctrl");
     377      strcpy(title, "LCTRL");
    209378      break;
    210379    case GDK_Control_R:
    211       strcpy(title, "r_ctrl");
     380      strcpy(title, "RCTRL");
    212381      break;
    213382    case GDK_Alt_L:
    214       strcpy(title, "l_alt");
     383      strcpy(title, "LALT");
    215384      break;
    216385    case GDK_Alt_R:
    217       strcpy(title, "r_alt");
     386      strcpy(title, "RALT");
    218387      break;
    219388      // FXX KEYS //
    220389    case GDK_F1:
    221       strcpy(title, "f1");
     390      strcpy(title, "F1");
    222391      break;
    223392    case GDK_F2:
    224       strcpy(title, "f2");
     393      strcpy(title, "F2");
    225394      break;
    226395    case GDK_F3:
    227       strcpy(title, "f3");
     396      strcpy(title, "F3");
    228397      break;
    229398    case GDK_F4:
    230       strcpy(title, "f4");
     399      strcpy(title, "F4");
    231400      break;
    232401    case GDK_F5:
    233       strcpy(title, "f5");
     402      strcpy(title, "F5");
    234403      break;
    235404    case GDK_F6:
    236       strcpy(title, "f6");
     405      strcpy(title, "F6");
    237406      break;
    238407    case GDK_F7:
    239       strcpy(title, "f7");
     408      strcpy(title, "F7");
    240409      break;
    241410    case GDK_F8:
    242       strcpy(title, "f8");
     411      strcpy(title, "F8");
    243412      break;
    244413    case GDK_F9:
    245       strcpy(title, "f9");
     414      strcpy(title, "F9");
    246415      break;
    247416    case GDK_F10:
    248       strcpy(title, "f10");
     417      strcpy(title, "F10");
    249418      break;
    250419    case GDK_F11:
    251       strcpy(title, "f11");
     420      strcpy(title, "F11");
    252421      break;
    253422    case GDK_F12:
    254       strcpy(title, "f12");
     423      strcpy(title, "F12");
    255424      break;
    256425     
     
    264433    }
    265434
    266   inputkey->pKeyOLabel->setValue(title);
    267   inputButton->disconnectSignal(keySignal);
    268   inputWindow->close();
    269 }
    270 #endif /* HAVE_GTK2 */
     435  inputkey->keyOLabel->setValue(title);
     436  GuiKeys::inputButton->disconnectSignal(GuiKeys::keySignal);
     437  GuiKeys::inputWindow->close();
     438}
     439#endif /* HAVE_GTK2 */
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_keys.h

    r4063 r4139  
    1515#endif /* HAVE_GTK2 */
    1616
    17 /**
    18    \brief defines the Possible Player Keys
    19 */
    20 enum KEYS {UP, DOWN, LEFT, RIGHT, SHOOT};
     17//! One KeyOption has one InputKey
     18struct InputKey
     19{
     20  Box* keyBox;           //!< One Box that holds the Keys
     21  Button* keyButton;     //!< The Button for changing the Key.
     22  OptionLabel* keyOLabel;//!< The Label for displaying the Key-setting.
     23};
    2124
    22 class Player;
    2325//! Class that creates the Keys-Options.
    2426class GuiKeys : public GuiElement
    2527{
    26  private:
    27   Frame* keysFrame;      //!< The Frame that holds the keyOptions.
    28   Box* keysBox;          //!< The Frame that holds the keyOptions.
    29   Player* player1;       //!< The first Player's keys.
    30   Player* player2;       //!< The seconds Player's keys.
    31   Button* misc;          //!< Other keyboeard options come here. \todo include some like pause, quit and so on.
    32 
    3328 public:
    3429  GuiKeys(void);
    3530  ~GuiKeys(void);
    36 };
    37 
    38 //! Class to hold infos about a Player
    39 /**
    40    \todo split into subclass and superclass ButtonConfigurator
    41 */
    42 class Player
    43 {
    44  private:
    45   Window* pKeyWindow;     //!< The Window for a new Key-setting.
    46   Frame* pKeyFrame;       //!< The Frame for a new Key-setting.
    47   Button* openButton;     //!< The OpenButton for this key-settings.
    48   Button* closeButton;    //!< The CloseButton for this key-settings.
    49   Box* pKeysBox;          //!< The Box that holds the Key-settings.
    50  
    51   //! One KeyOption has one InputKey
    52   struct InputKey
    53   {
    54     Box* pKeyBox;           //!< One Box that holds the Keys
    55     Button* pKeyButton;     //!< The Button for changing the Key.
    56     OptionLabel* pKeyOLabel;//!< The Label for displaying the Key-setting.
    57   };
    58 
    59   InputKey* inputKey[10];     //!< Buttons-array. \todo make it dynamic.
    6031
    6132  static Window* inputWindow; //!< A Window that gets keyboard clicks. Static, because only one needed.
    6233  static Button* inputButton; //!< A Button that gets keyboard clicks. Static, because only one needed.
    6334  static long keySignal;      //!< A keySignal that handles keyboard clicks. Static, because only one needed.
     35};
     36
     37//! Class to hold infos about a Player
     38class PlayerKeys
     39{
     40 private:
     41  Button* openButton;     //!< The OpenButton for this key-settings.
     42
    6443 public:
    65   Player(char* player);
    66 
    67   Widget* addKey(KEYS key, char* name);
     44  PlayerKeys(char* player);
    6845
    6946  Button* getOpenButton(void);
    70 
    71 #ifdef HAVE_GTK2
    72   static gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
    73   static gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
    74 #endif /* HAVE_GTK2 */
    75   void setkey(KEYS key);
    76  
    7747};
    7848
     49class MiscKeys
     50{
     51 private:
     52  Button* openButton;     //!< The OpenButton for this key-settings.
     53
     54 public:
     55  MiscKeys();
     56
     57  Button* getOpenButton(void); 
     58};
     59
     60Widget* addKey(const char* name, const char* defaultValue = NULL);
     61#ifdef HAVE_GTK2
     62gint inputWindowEvent(GtkWidget* w, GdkEventKey* event, void* widget);
     63gint key_cb(GtkWidget* w, GdkEventKey* event, void* inputKey);
     64#endif /* HAVE_GTK2 */
    7965
    8066
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_update.cc

    r4063 r4139  
    3737GuiUpdate::GuiUpdate(void)
    3838{
     39  FileDialog* dataDirDialog;   //!< A FileDialog for the selection of the DataRepos
     40  Button* dataDirButton;       //!< A Button for the selection of the DataRepos
     41  OptionLabel* dataDirLabel;   //!< A Label fot the selection of the DataRepos
     42 
     43
    3944  this->tmpDir = NULL;
    4045  this->homeDir = NULL;
     
    4550
    4651  this->updateFrame = new Frame("Update-Options:");
    47   this->updateFrame->setGroupName("update");
     52  this->updateFrame->setGroupName(CONFIG_SECTION_DATA);
    4853  this->updateBox = new Box('v');
     54
     55  dataDirButton = new Button(CONFIG_NAME_DATADIR);
     56  dataDirLabel = new OptionLabel(CONFIG_NAME_DATADIR, "unknown");
     57  dataDirLabel->setFlagName("data-dir", "d", 0);
     58  dataDirLabel->setDescription("Sets the location of the orxonox' Data-Directory");
     59  dataDirLabel->saveability();
     60  dataDirDialog = new FileDialog("data-Repos-location");
     61  dataDirDialog->setDefaultFileName("data");
     62  dataDirDialog->setMask(DATA_IDENTIFIER);
     63  this->checkDataDir("../data/" DATA_IDENTIFIER, dataDirLabel);
     64  dataDirDialog->disableFileOpts();
     65  dataDirDialog->setOpenUpButton(dataDirButton);
     66  //dataDirDialog->setChangeOption(dataDirLabel);
     67  dataDirDialog->setOKFunc(dataDirLabel, GuiUpdate::checkDataDir);
     68  updateBox->fill(dataDirButton);
     69  updateBox->fill(dataDirLabel);
     70
    4971#ifdef HAVE_CURL
    5072
    5173  // the Button for autoUpdating
    52   this->autoUpdate = new CheckButton("auto update");
     74  this->autoUpdate = new CheckButton(CONFIG_NAME_AUTO_UPDATE);
    5375  this->updateBox->fill(this->autoUpdate);
    5476  this->autoUpdate->setFlagName("update", "u", 0);
     77  this->autoUpdate->setDescription("Updates orxonox", "When this option is selected orxonox automatically searches for updates, and if found installs them");
    5578  this->autoUpdate->saveability();
     79
     80 
     81
    5682
    5783  this->updateSourceWindowCreate();
     
    6288
    6389#else /* HAVE_CURL */
    64   Label* noCurlLabel = new Label("since you do not have cURL,\nthis option is not availible");
     90  Label* noCurlLabel = new Label("since you do not have cURL-support,\nupdate options are not availible");
    6591  this->updateBox->fill(noCurlLabel); 
    6692#endif /* HAVE_CURL */
    6793  this->updateFrame->fill(this->updateBox);
    6894  this->setMainWidget(this->updateFrame);
     95
     96
    6997}
    7098
     
    76104
    77105}
     106
     107/**
     108   \brief checks if the Folder containing selected File is data.oxd, and if so sets it.
     109   \param
     110*/
     111bool GuiUpdate::checkDataDir(const char* fileName, void* object)
     112{
     113  if (!strcmp(fileName+(strlen(fileName)-strlen(DATA_IDENTIFIER)), DATA_IDENTIFIER))
     114    {
     115      char* tmpName = new char[strlen(fileName)-strlen(DATA_IDENTIFIER)+1];
     116      strncpy(tmpName, fileName, strlen(fileName)-strlen(DATA_IDENTIFIER));
     117      tmpName[strlen(fileName)-strlen(DATA_IDENTIFIER)] = '\0';
     118      static_cast<OptionLabel*>(object)->setValue(tmpName);
     119      delete tmpName;
     120      return true;
     121    }
     122  else
     123    return false;
     124}
     125
    78126
    79127/**
     
    82130bool GuiUpdate::getSystemInfo(void)
    83131{
    84   PRINTF(3)("Grabbing system information\n");
     132  PRINTF(5)("Grabbing system information\n");
    85133  this->tmpDir = getenv("TMPDIR");
    86134  if(!tmpDir)
    87135    this->tmpDir = "/tmp";
    88   PRINTF(4)("Temporary directory is: %s\n", this->tmpDir);
     136  PRINTF(5)("Temporary directory is: %s\n", this->tmpDir);
    89137
    90138#ifdef __WIN32__
     
    93141  this->homeDir = getenv("HOME");
    94142#endif
    95   PRINTF(4)("Home directory is %s\n", homeDir);
    96 
    97   this->installDataDir = "/usr/share/games/orxonox";
    98   PRINTF(4)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
     143  PRINTF(5)("Home directory is %s\n", homeDir);
     144
     145
     146  this->installDataDir = DEFAULT_DATA_DIR;
     147  PRINTF(5)("Installation of orxonox-data will go to this directory: %s\n", this->installDataDir);
    99148
    100149  this->installSourceDir = "/usr/games/bin";
    101   PRINTF(4)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
     150  PRINTF(5)("Installation of orxonox-source will go to this directory: %s\n", this->installSourceDir);
    102151
    103152  this->userName = getenv("USER");
    104   PRINTF(4)("Logged in username is: %s\n", this->userName);
     153  PRINTF(5)("Logged in username is: %s\n", this->userName);
    105154}
    106155
     
    108157bool* GuiUpdate::checkForUpdates(void)
    109158{
    110   PRINTF(3)("checking for new version of orxonox\n");
     159  PRINTF(4)("checking for new version of orxonox\n");
    111160  FileInfo updateFileInfo;
    112161  updateFileInfo.fileName = "update_info";
     
    218267  dataInfo->webRoot  = "http://www.orxonox.ethz.ch/files/";
    219268  dataInfo->localRoot = "./";
    220   PRINTF(3)("Preparing to download file %s.\n", dataInfo->fileName);
     269  PRINTF(4)("Preparing to download file %s.\n", dataInfo->fileName);
    221270  downloadWithStyle(dataInfo);
    222271}
     
    284333CURL* GuiUpdate::curlHandle = NULL;
    285334
    286 /**
    287    \brief A bool parameter that shows if we are downloading.
    288 */
     335//! A bool parameter that shows if we are downloading.
    289336bool GuiUpdate::isDownloading = false;
    290337
     338//! A parameter to see, if downloading has been canceled
     339bool GuiUpdate::downloadCanceled = false;
    291340
    292341/**
     
    303352      return false;
    304353    }
    305   PRINTF(3)("Downloading.\n");
     354  PRINTF(4)("Downloading.\n");
    306355  FileInfo* info =(FileInfo*)fileInfo;
    307356  CURLcode res;
     
    351400      return false;
    352401    }
    353   PRINTF(3)("Downloading.\n");
     402  PRINTF(4)("Downloading.\n");
    354403  FileInfo* info =(FileInfo*)fileInfo;
    355404  CURLcode res;
     
    419468    curl_easy_cleanup(curlHandle);
    420469 
    421   PRINTF(3)("Closing the downloaded file.\n");
     470  PRINTF(4)("Closing the downloaded file.\n");
    422471  fclose(info->fileHandle);
    423472
     
    445494gint GuiUpdate::cancelDownload(GtkWidget* w, GdkEventKey* event, void* bar)
    446495{
    447   PRINTF(4)("Cannot cancle the Downloading process until after this File\n");
     496  PRINTF(3)("Cannot cancle the Downloading process until after this File\n");
    448497}
    449498#endif /* HAVE_GTK2 */
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_update.h

    r4063 r4139  
    1010#include "gui_element.h"
    1111#include "gui_gtk.h"
     12
     13
     14#define DATA_IDENTIFIER "data.oxd"
    1215
    1316#include <stdio.h>
     
    5962  static gint updateSourceFunc(GtkWidget* w, GdkEventKey* event, void* info);
    6063#endif /* HAVE_GTK2 */
     64
     65  static bool checkDataDir(const char* fileName, void* object);
    6166
    6267#ifdef HAVE_CURL
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_video.cc

    r4063 r4139  
    2727#include "gui_video.h"
    2828
     29#include "gui_gtk.h"
    2930#include "glincl.h"
    3031#include <stdlib.h>
     
    3536GuiVideo::GuiVideo(void)
    3637{
    37   this->videoFrame = new Frame("Video-Options:");
    38   this->videoBox = new Box('v');
    39   this->videoFrame->setGroupName("video");
    40  
    41   this->fullscreen = new CheckButton("Fullscreen-mode");
    42   this->fullscreen->setFlagName("windowed", "q", 1);
    43   this->fullscreen->saveability();
    44   this->videoBox->fill(this->fullscreen);
    45   this->resolution = new Menu("Resolution");
    46   this->getResolutions(this->resolution);
    47   this->resolution->saveability();
    48   this->resolution->setFlagName("resolution", "r", 0);
    49   this->videoBox->fill(this->resolution);
    50   this->wireframe = new CheckButton("WireFrame-mode");
    51   this->wireframe->setFlagName("wireframe", "w", 0);
    52   this->wireframe->saveability();
    53   this->videoBox->fill(this->wireframe);
    54 
    55   this->advancedWindowCreate();
    56   this->videoBox->fill(this->advancedWindowGetButton());
    57 
    58   this->videoFrame->fill(videoBox);
    59   this->setMainWidget(this->videoFrame);
     38  Frame* videoFrame;        //!< The Frame that holds the video options.
     39
     40  videoFrame = new Frame("Video-Options:");
     41  videoFrame->setGroupName("video");
     42  {
     43    Box* videoBox;            //!< The Box that holds the video options.
     44
     45    videoBox = new Box('v');
     46    {
     47      CheckButton* fullscreen;  //!< CheckButton for fullscreen-mode
     48      Menu* resolution;         //!< Menu for the resolution
     49      CheckButton* wireframe;   //!< CheckButton for wireframe Mode.
     50
     51      fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN);
     52      fullscreen->setFlagName("windowed", "q", 1);
     53      fullscreen->setDescription("Starts orxonox in windowed mode");
     54      fullscreen->saveability();
     55      videoBox->fill(fullscreen);
     56      resolution = new Menu(CONFIG_NAME_RESOLUTION);
     57      getResolutions(resolution);
     58      resolution->saveability();
     59      resolution->setFlagName("resolution", "r", 0);
     60      resolution->setDescription("Sets the resolution of orxonox");
     61      videoBox->fill(resolution);
     62      wireframe = new CheckButton(CONFIG_NAME_WIREFRAME);
     63      wireframe->setFlagName("wireframe", "w", 0);
     64      wireframe->setDescription("Starts orxonox in wireframe mode");
     65      wireframe->saveability();
     66      videoBox->fill(wireframe);
     67
     68      videoBox->fill(advancedWindowCreate());
     69    }
     70    videoFrame->fill(videoBox);
     71  }
     72  setMainWidget(videoFrame);
    6073}
    6174
     
    7184   \brief Creates a window, and all it contains for the Source-update.
    7285*/
    73 void GuiVideo::advancedWindowCreate(void)
    74 {
     86Widget* GuiVideo::advancedWindowCreate(void)
     87{
     88  // advanced-Performance-Options
     89  Window* advancedWindow;   //!< A Window to display advanced options.
     90  Button* advancedButton;   //!< A Button to open the Advanced Video Performance Window.
    7591  // the button, that opens this Window.
    76   this->advancedButton = new Button("advanced");
     92  advancedButton = new Button("advanced");
    7793
    7894  // the Window itself
    79   this->advancedWindow = new Window("Advanced Video Options");
    80   this->advancedWindow->setGroupName("advancedVideoOptions");
    81 
    82   this->advancedBox = new Box('v');
    83 
    84   // Advanced Performance Options
    85   this->shadows = new CheckButton("Shadows");
    86   this->shadows->saveability();
    87   this->advancedBox->fill(this->shadows);
    88 
    89   this->fog = new CheckButton("Fog");
    90   this->fog->saveability();
    91   this->advancedBox->fill(this->fog);
    92 
    93   this->reflections = new CheckButton("Reflections");
    94   this->reflections->saveability();
    95   this->advancedBox->fill(this->reflections);
    96 
    97   this->textures = new CheckButton("Textures");
    98   this->textures->saveability();
    99   this->advancedBox->fill(this->textures);
    100 
    101   this->textureDetail = new Menu("Texture Detail", "low", "medium", "high", "lastItem");
    102   this->textureDetail->setDefaultValue(1);
    103   this->textureDetail->saveability();
    104   this->advancedBox->fill(this->textureDetail);
    105 
    106   this->modelDetailLabel = new Label("Model Detail");
    107   this->advancedBox->fill(this->modelDetailLabel);
    108   this->modelDetail = new Menu("Model Detail", "low", "high", "lastItem");
    109   this->modelDetail->setDefaultValue(1);
    110   this->modelDetail->saveability();
    111   this->advancedBox->fill(this->modelDetail);
    112 
    113   this->antiAliasingLabel = new Label("Anti-Aliasing-depth:");
    114   this->advancedBox->fill(this->antiAliasingLabel);
    115   this->antiAliasing = new Menu("Anti Aliasing", "0", "1", "2", "4", "8",  "lastItem");
    116   this->antiAliasing->setDefaultValue(2);
    117   this->antiAliasing->saveability();
    118   this->advancedBox->fill(this->antiAliasing);
    119 
    120   this->filterMethodLabel = new Label("Filtering Method:");
    121   this->advancedBox->fill(this->filterMethodLabel);
    122   this->filterMethod = new Menu("Filtering Method", "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem");
    123   this->filterMethod->setDefaultValue(1);
    124   this->filterMethod->saveability();
    125   this->advancedBox->fill(this->filterMethod);
    126  
    127   this->closeButton = new Button("close");
    128   this->advancedBox->fill(this->closeButton);
    129 
    130   this->advancedWindow->fill(advancedBox);
    131 #ifdef HAVE_GTK2
    132   this->advancedButton->connectSignal("button_press_event", this->advancedWindow, Window::windowOpen);
    133   this->closeButton->connectSignal("button_press_event", this->advancedWindow, Window::windowClose);
    134   this->advancedWindow->connectSignal("destroy", this->advancedWindow, Window::windowClose);
    135   this->advancedWindow->connectSignal("delete_event", this->advancedWindow, Window::windowClose);
     95  advancedWindow = new Window("Advanced Video Options");
     96  advancedWindow->setGroupName(CONFIG_SECTION_VIDEO_ADVANCED);
     97  {
     98    Box* advancedBox;         //!< A Box to pack the options into.
     99
     100    advancedBox = new Box('v');
     101    {
     102      CheckButton* shadows;     //!< CheckButton for shadows
     103      CheckButton* fog;         //!< CheckButton for fog.
     104      CheckButton* reflections; //!< CheckButton for reflections
     105      CheckButton* textures;    //!< CheckButton for textures
     106      Menu* textureDetail;      //!< Menu for the Texture-Detail.
     107      Label* modelDetailLabel;  //!< Label for model-detail.
     108      Menu* modelDetail;        //!< model-detail.
     109      Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
     110      Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
     111      Label* filterMethodLabel; //!< Label for filtering-Method.
     112      Menu* filterMethod;       //!< Menu for filtering Method.
     113      Button* closeButton;      //!< A Button to close the Advanced-settingsWindow.
     114
     115      // Advanced Performance Options
     116      shadows = new CheckButton(CONFIG_NAME_SHADOWS);
     117      shadows->saveability();
     118      advancedBox->fill(shadows);
     119     
     120      fog = new CheckButton(CONFIG_NAME_FOG);
     121      fog->saveability();
     122      advancedBox->fill(fog);
     123     
     124      reflections = new CheckButton(CONFIG_NAME_REFLECTIONS);
     125      reflections->saveability();
     126      advancedBox->fill(reflections);
     127     
     128      textures = new CheckButton(CONFIG_NAME_TEXTURES);
     129      textures->saveability();
     130      advancedBox->fill(textures);
     131     
     132      textureDetail = new Menu(CONFIG_NAME_TEXTURE_DETAIL, "low", "medium", "high", "lastItem");
     133      textureDetail->setDefaultValue(1);
     134      textureDetail->saveability();
     135      advancedBox->fill(textureDetail);
     136     
     137      modelDetailLabel = new Label(CONFIG_NAME_MODEL_DETAIL);
     138      advancedBox->fill(modelDetailLabel);
     139      modelDetail = new Menu(CONFIG_NAME_MODEL_DETAIL, "low", "high", "lastItem");
     140      modelDetail->setDefaultValue(1);
     141      modelDetail->saveability();
     142      advancedBox->fill(modelDetail);
     143     
     144      antiAliasingLabel = new Label("Anti-Aliasing-depth:");
     145      advancedBox->fill(antiAliasingLabel);
     146      antiAliasing = new Menu(CONFIG_NAME_ANTI_ALIASING, "0", "1", "2", "4", "8",  "lastItem");
     147      antiAliasing->setDefaultValue(2);
     148      antiAliasing->saveability();
     149      advancedBox->fill(antiAliasing);
     150     
     151      filterMethodLabel = new Label("Filtering Method:");
     152      advancedBox->fill(filterMethodLabel);
     153      filterMethod = new Menu(CONFIG_NAME_FILTER_METHOD, "none", "linear", "bilinear", "trilinear", "anisortopic", "lastItem");
     154      filterMethod->setDefaultValue(1);
     155      filterMethod->saveability();
     156      advancedBox->fill(filterMethod);
     157 
     158      closeButton = new Button("close");
     159#ifdef HAVE_GTK2
     160      closeButton->connectSignal("button_press_event", advancedWindow, Window::windowClose);
    136161#endif /* HAVE_GTK2 */
    137    Window::addWindow(this->advancedWindow);
    138 
    139 }
    140 
    141 /**
    142    \returns A Pointer to the Button of the UpdaterSourceWindow
    143 */
    144 Button* GuiVideo::advancedWindowGetButton(void)
    145 {
    146   return this->advancedButton;
    147 }
    148 
     162
     163      advancedBox->fill(closeButton);
     164    }
     165    advancedWindow->fill(advancedBox);
     166  }
     167#ifdef HAVE_GTK2
     168  advancedButton->connectSignal("button_press_event", advancedWindow, Window::windowOpen);
     169  advancedWindow->connectSignal("destroy", advancedWindow, Window::windowClose);
     170  advancedWindow->connectSignal("delete_event", advancedWindow, Window::windowClose);
     171#endif /* HAVE_GTK2 */
     172  Window::addWindow(advancedWindow);
     173
     174  return advancedButton;
     175}
     176
     177/**
     178   \brief sets all resolutions to the menu
     179   \param menu the Menu to set The resolutions to.
     180*/
    149181void GuiVideo::getResolutions(Menu* menu)
    150182{
     
    170202  else{
    171203    /* Print valid modes */
    172     PRINT(4)("Available Modes\n");
     204    PRINT(5)("Available Modes\n");
    173205    for(i = 0; modes[i] ;++i)
    174206      {
    175207        if (x != modes[i]->w || y != modes[i]->h)
    176208          {
    177             PRINT(4)("  %d x %d\n", modes[i]->w, modes[i]->h);
     209            PRINTF(5)("  %d x %d\n", modes[i]->w, modes[i]->h);
    178210            sprintf(tmpChar, "%dx%d", modes[i]->w, modes[i]->h);
    179211            menu->addItem(tmpChar);
  • orxonox/branches/md2_loader/src/lib/gui/gui/gui_video.h

    r4063 r4139  
    88#include "gui.h"
    99#include "gui_element.h"
    10 #include "gui_gtk.h"
     10
     11// FORWARD DECLARATIONS
     12class Widget;
     13class Menu;
    1114
    1215//! Class that creates the Video-Options.
     
    1417{
    1518 private:
    16   Frame* videoFrame;        //!< The Frame that holds the video options.
    17   Box* videoBox;            //!< The Box that holds the video options.
    18   CheckButton* fullscreen;  //!< CheckButton for fullscreen-mode
    19   Menu* resolution;         //!< Menu for the resolution
    20   CheckButton* wireframe;   //!< CheckButton for wireframe Mode.
    21 
    22   // advanced-Performance-Options
    23   Window* advancedWindow;   //!< A Window to display advanced options.
    24   Button* advancedButton;   //!< A Button to open the Advanced Video Performance Window.
    25   Box* advancedBox;         //!< A Box to pack the options into.
    26   CheckButton* shadows;     //!< CheckButton for shadows
    27   CheckButton* fog;         //!< CheckButton for fog.
    28   CheckButton* reflections; //!< CheckButton for reflections
    29   CheckButton* textures;    //!< CheckButton for textures
    30   Menu* textureDetail;      //!< Menu for the Texture-Detail.
    31  
    32   Label* modelDetailLabel;  //!< Label for model-detail.
    33   Menu* modelDetail;        //!< model-detail.
    34  
    35   Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
    36   Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
    37 
    38   Label* filterMethodLabel; //!< Label for filtering-Method.
    39   Menu* filterMethod;       //!< Menu for filtering Method.
    40 
    41   Button* closeButton;      //!< A Button to close the Advanced-settingsWindow.
    42 
    43   Button* advancedWindowGetButton(void);
    44   void advancedWindowCreate(void);
     19  //  Button* advancedWindowGetButton(void);
    4520 
    4621 public:
     
    4823  ~GuiVideo(void);
    4924
     25 private:
    5026  void getResolutions(Menu* menu);
    51  
    52 
     27  Widget* advancedWindowCreate(void);
    5328};
    5429#endif /* _GUI_VIDEO_H */
  • orxonox/branches/md2_loader/src/lib/gui/gui/rc

    r4063 r4139  
     1/*
     2 * style <name> [= <name>]
     3 * {
     4 *   <option>
     5 * }
     6 *
     7 * widget <widget_set> style <style_name>
     8 * widget_class <widget_class_set> style <style_name>
     9 *
     10 * Here is a list of all the possible states.  Note that some do not apply to
     11 * certain widgets.
     12 *
     13 * NORMAL - The normal state of a widget, without the mouse over top of
     14 * it, and not being pressed, etc.
     15 *
     16 * PRELIGHT - When the mouse is over top of the widget, colors defined
     17 * using this state will be in effect.
     18 *
     19 * ACTIVE - When the widget is pressed or clicked it will be active, and
     20 * the attributes assigned by this tag will be in effect.
     21 *
     22 * INSENSITIVE - When a widget is set insensitive, and cannot be
     23 * activated, it will take these attributes.
     24 *
     25 * SELECTED - When an object is selected, it takes these attributes.
     26 *
     27 * Given these states, we can set the attributes of the widgets in each of
     28 * these states using the following directives.
     29 *
     30 * fg - Sets the foreground color of a widget.
     31 * bg - Sets the background color of a widget.
     32 * bg_pixmap - Sets the background of a widget to a tiled pixmap.
     33 * base - Sets the base of Widgets
     34 * font - Sets the font to be used with the given widget.
     35*/
     36
     37
     38
    139static const gchar* rc_string =
    2 (       
     40(
     41"style'orxonox'"
     42"{"
     43"fg[NORMAL]      = { 0.0, 1.0, 0.0 }"
     44"fg[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     45"fg[ACTIVE]      = { 0.0, 1.0, 0.0 }"
     46"fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }"
     47"fg[SELECTED]    = { 0.0, 1.0, 0.0 }"
     48
     49"bg[NORMAL]      = { 0.0, 0.0, 0.0 }"
     50"bg[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     51"bg[ACTIVE]      = { 0.0, 0.3, 0.0 }"
     52"bg[INSENSITIVE] = { 0.0, 0.1, 0.0 }"
     53"bg[SELECTED]    = { 0.0, 0.1, 0.0 }"
     54
     55"base[NORMAL]      = { 0.0, 1.0, 0.0 }"
     56"base[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     57"base[ACTIVE]      = { 0.0, 1.0, 0.0 }"
     58"base[INSENSITIVE] = { 0.0, 1.0, 0.0 }"
     59"base[SELECTED]    = { 0.0, 1.0, 0.0 }"
     60
     61"font              = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'"
     62"}"
     63
    364"style'window'"
    465"{"                     
     
    768"base[NORMAL] = { 0, 0, 0 }"
    869"base[INSENSITIVE] = { 0, 0, 0 }"
     70"}"
     71
     72"style'frame'"
     73"{"
     74"bg[NORMAL]  = { 0.0, 0.4, 0.0 }"
    975"}"
    1076
     
    2692"bg[NORMAL] = { 0, 0, 0 }"
    2793"fg[NORMAL] = { 0, 1.0, 0 }"
    28 "bg[INSENSITIVE] = { 1.0, 0, 1.0 }"
    29 "fg[INSENSITIVE] = { 1.0, 0, 1.0 }"
     94"bg[INSENSITIVE] = { 0.0, 0.2, 0.0 }"
     95"fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }"
    3096"base[NORMAL] = { 0, 1.0, 0 }"
    3197"base[PRELIGHT] = { 0, 1.0, 0 }"
     
    55121"}"
    56122
     123"widget'Gtk*'                   style'orxonox'"
     124"widget'*Gtk*Frame*'              style'frame'"
    57125"widget'GtkWindow'              style'window'"
    58 "widget'GtkFrame'               style'window'"
    59 "widget'Gtk*EventBox'           style'window'"
    60 "widget'GtkDialog'              style'window'"
    61126"widget'GtkFileSelection'       style'window'"
    62127"widget'*Gtk*Scale'             style'scale'"
  • orxonox/branches/md2_loader/src/lib/util/ini_parser.cc

    r4063 r4139  
    1616
    1717#include "ini_parser.h"
     18#include "resource_manager.h"
    1819
    1920using namespace std;
    2021
    2122/**
    22         \brief constructs an IniParser using a file
    23         \param filename: the path and name of the file to parse
     23   \brief constructs an IniParser using a file
     24   \param filename: the path and name of the file to parse
    2425*/
    2526IniParser::IniParser (const char* filename)
     
    2728  stream = NULL;
    2829  bInSection = false;
    29   openFile(filename);
     30  this->openFile(filename);
    3031}
    3132
    3233/**
    33         \brief removes the IniParser from memory
     34   \brief removes the IniParser from memory
    3435*/
    3536IniParser::~IniParser ()
     
    4546int IniParser::openFile(const char* filename)
    4647{
     48  char* tmpName = ResourceManager::homeDirCheck(filename);
    4749  if( filename == NULL) return -1;
    4850  if( stream != NULL)   fclose (stream);
    49   if( (stream = fopen (filename, "r")) == NULL)
     51  if( (stream = fopen (tmpName, "r")) == NULL)
    5052    {
    51       printf("IniParser could not open %s\n", filename);
     53      PRINTF(1)("IniParser could not open %s\n", filename);
     54      delete tmpName;
    5255      return -1;
    5356    }
    5457  bInSection = false;
     58  delete tmpName;
    5559  return 0;
    5660}
     
    123127          return -1;
    124128        }
    125       if( (ptr = strchr( linebuffer, '=')) != NULL)
     129      sscanf(linebuffer, "%s = %s", name, value);
     130      return 0;
     131      /*
     132        if( (ptr = strchr( tmpBuffer, '=')) != NULL)
    126133        {
    127           if( ptr == linebuffer) continue;
    128           strcpy (value, &ptr[1]);
    129           strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
    130           return 0;
     134        if( ptr == linebuffer) continue;
     135        strcpy (value, &ptr[1]);
     136        strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
     137        printf ("%s, %s\n", value, name);
     138        return 0;
    131139        }
     140      */
    132141    }
    133142  return -1;   
Note: See TracChangeset for help on using the changeset viewer.