Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
May 5, 2005, 2:37:08 PM (20 years ago)
Author:
patrick
Message:

orxonox/branche/md2_loader: merged trunk into my branche

Location:
orxonox/branches/md2_loader/src/lib
Files:
20 deleted
13 edited
22 copied

Legend:

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

    r3789 r4063  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115RANLIB = @RANLIB@
    119116SET_MAKE = @SET_MAKE@
    120117SHELL = @SHELL@
     
    125122ac_ct_CC = @ac_ct_CC@
    126123ac_ct_CXX = @ac_ct_CXX@
     124ac_ct_RANLIB = @ac_ct_RANLIB@
    127125ac_ct_STRIP = @ac_ct_STRIP@
    128126am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/md2_loader/src/lib/graphics/Makefile.in

    r3789 r4063  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115RANLIB = @RANLIB@
    119116SET_MAKE = @SET_MAKE@
    120117SHELL = @SHELL@
     
    125122ac_ct_CC = @ac_ct_CC@
    126123ac_ct_CXX = @ac_ct_CXX@
     124ac_ct_RANLIB = @ac_ct_RANLIB@
    127125ac_ct_STRIP = @ac_ct_STRIP@
    128126am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/md2_loader/src/lib/graphics/importer/Makefile.in

    r3907 r4063  
    119119EXEEXT = @EXEEXT@
    120120GPROF = @GPROF@
    121 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    122 GTHREAD_LIBS = @GTHREAD_LIBS@
    123121GTK2_CFLAGS = @GTK2_CFLAGS@
    124122GTK2_LIBS = @GTK2_LIBS@
    125123HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    126124HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    127 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    128 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    129125HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    130126HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    147143PACKAGE_VERSION = @PACKAGE_VERSION@
    148144PATH_SEPARATOR = @PATH_SEPARATOR@
     145RANLIB = @RANLIB@
    149146SET_MAKE = @SET_MAKE@
    150147SHELL = @SHELL@
     
    155152ac_ct_CC = @ac_ct_CC@
    156153ac_ct_CXX = @ac_ct_CXX@
     154ac_ct_RANLIB = @ac_ct_RANLIB@
    157155ac_ct_STRIP = @ac_ct_STRIP@
    158156am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/md2_loader/src/lib/graphics/importer/model.cc

    r4023 r4063  
    3535*/
    3636ModelFaceElement::ModelFaceElement()
    37 {}
     37{
     38  this->next = NULL;
     39}
    3840
    3941/**
     
    4244ModelFaceElement::~ModelFaceElement()
    4345{
     46  if (this->next)
     47    delete this->next;
     48}
     49
     50/**
     51   \brief creates a new ModelFace
     52*/
     53ModelFace::ModelFace()
     54{
     55  this->vertexCount = 0;
     56
     57  this->firstElem = NULL;
     58 
     59  this->material = NULL;
     60 
     61  this->next = NULL;
     62
     63}
     64
     65/**
     66   \brief deletes a ModelFace
     67*/
     68ModelFace::~ModelFace()
     69{
     70  PRINTF(5)("Cleaning up Face\n");
     71
     72  if (this->firstElem != NULL)
     73    delete this->firstElem;
     74 
    4475  if (this->next != NULL)
    4576    delete this->next;
    46 }
    47 
    48 /**
    49    \brief creates a new ModelFace
    50 */
    51 ModelFace::ModelFace()
    52 {
    53   this->vertexCount = 0;
    54 
    55   this->firstElem = NULL;
    56  
    57   this->material = NULL;
    58  
    59   this->next = NULL;
    60 
    61 }
    62 
    63 /**
    64    \brief deletes a ModelFace
    65 */
    66 ModelFace::~ModelFace()
    67 {
    68   PRINTF(5)("Cleaning up Face\n");
    69 
    70   if (this->firstElem != NULL)
    71     {
    72       delete this->firstElem;
    73     }
    74      
    75   if (this->next != NULL)
    76     {
    77       delete this->next;
    78     }
    79 
    8077}
    8178
     
    10299  PRINTF(5)("Cleaning up group\n");
    103100  if (this->firstFace != NULL)
    104     {
    105       delete this->firstFace;
    106     }
     101    delete this->firstFace;
    107102
    108103  if (this->next !=NULL)
     
    175170
    176171  PRINTF(5)("Deleting display Lists.\n");
    177   ModelGroup* walker = this->firstGroup;
    178   while (walker != NULL)
    179     {
    180       glDeleteLists (walker->listNumber, 1);
    181       ModelGroup* delWalker = walker;
    182       walker = walker->next;
    183       delete delWalker;
    184     }
     172  delete this->firstGroup;
    185173
    186174  // deleting Arrays
     
    191179  tIterator<Material>* tmpIt = this->materialList->getIterator();
    192180  Material* material = tmpIt->nextElement();
     181
     182  //! \todo do we really have to delete this material??
    193183  while(material)
    194184    {
     
    227217{
    228218  PRINTF(4)("drawing the 3D-Models\n");
    229   ModelGroup* walker = this->firstGroup;
    230   while (walker != NULL)
    231     {
    232       PRINTF(5)("Drawing model %s\n", walker->name);
    233       glCallList (walker->listNumber);
    234       walker = walker->next;
     219  ModelGroup* tmpGroup = this->firstGroup;
     220  while (tmpGroup != NULL)
     221    {
     222      PRINTF(5)("Drawing model %s\n", tmpGroup->name);
     223      glCallList (tmpGroup->listNumber);
     224      tmpGroup = tmpGroup->next;
    235225    }
    236226}
     
    250240    }
    251241  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    252   ModelGroup* walker = this->firstGroup;
     242  ModelGroup* tmpGroup = this->firstGroup;
    253243  int counter = 0;
    254   while (walker != NULL)
     244  while (tmpGroup != NULL)
    255245    {
    256246      if (counter == groupNumber)
    257247        {
    258           PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    259           glCallList (walker->listNumber);
     248          PRINTF(4)("Drawing model number %i named %s\n", counter, tmpGroup->name);
     249          glCallList (tmpGroup->listNumber);
    260250          return;
    261251        }
    262252      ++counter;
    263       walker = walker->next;
     253      tmpGroup = tmpGroup->next;
    264254    }
    265255  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
     
    277267{
    278268  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    279   ModelGroup* walker = this->firstGroup;
    280   while (walker != NULL)
    281     {
    282       if (!strcmp(walker->name, groupName))
     269  ModelGroup* tmpGroup = this->firstGroup;
     270  while (tmpGroup != NULL)
     271    {
     272      if (!strcmp(tmpGroup->name, groupName))
    283273        {
    284           PRINTF(4)("Drawing model %s\n", walker->name);
    285           glCallList (walker->listNumber);
     274          PRINTF(4)("Drawing model %s\n", tmpGroup->name);
     275          glCallList (tmpGroup->listNumber);
    286276          return;
    287277        }
    288       walker = walker->next;
     278      tmpGroup = tmpGroup->next;
    289279    }
    290280  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    291281  return;
    292 }
    293 
    294 /**
    295    \returns Count of the Models in this File
    296 */
    297 int Model::getGroupCount (void) const
    298 {
    299   return this->groupCount;
    300282}
    301283
     
    331313  if (this->normals)
    332314    delete this->normals;
     315
    333316  this->vertices = NULL;
    334317  this->vTexture = NULL;
     
    410393   With it you should be able to create Models with more than one SubModel inside
    411394*/
    412 bool Model::addGroup (const char* groupString)
     395bool Model::addGroup(const char* groupString)
    413396{
    414397  PRINTF(5)("Read Group: %s.\n", groupString);
     
    594577 
    595578  ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement;
    596   tmpElem->next = NULL;
    597579 
    598580  va_list itemlist;
     
    603585      if (this->currentGroup->currentFace->vertexCount>0)
    604586        tmpElem = tmpElem->next = new ModelFaceElement;
    605       tmpElem->next = NULL;
    606587
    607588      tmpElem->vertexNumber = va_arg (itemlist, int) -1;
     
    834815  glNormalPointer(3, 0, this->normals->getArray());
    835816  glTexCoordPointer(2, GL_FLOAT, 0, this->vTexture->getArray());
    836 
    837817}
    838818
     
    859839  if (elem->vertexNumber != -1)
    860840    glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
    861 
    862841}
    863842
  • orxonox/branches/md2_loader/src/lib/graphics/importer/model.h

    r4023 r4063  
    139139  void draw(int groupNumber) const;
    140140  void draw(char* groupName) const;
    141   int getGroupCount() const;
     141
     142  /** \returns Count of the Models (Groups) in this File */
     143  inline int getGroupCount(void) const {return this->groupCount;}
    142144
    143145  Material* addMaterial(Material* material);
  • orxonox/branches/md2_loader/src/lib/graphics/importer/objModel.cc

    r3916 r4063  
    196196  this->mtlFileName = new char [strlen(mtlFile)+1];
    197197  strcpy(this->mtlFileName, mtlFile);
    198   char* fileName = new char [strlen(objPath) + strlen(this->mtlFileName)+1];
    199   strcpy(fileName, this->objPath);
    200   strcat(fileName, this->mtlFileName);
     198  char* fileName = new char [strlen(this->objPath) + strlen(this->mtlFileName)+1];
     199  sprintf(fileName, "%s%s", this->objPath, this->mtlFileName);
    201200 
    202201
  • orxonox/branches/md2_loader/src/lib/gui/Makefile.in

    r3789 r4063  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115RANLIB = @RANLIB@
    119116SET_MAKE = @SET_MAKE@
    120117SHELL = @SHELL@
     
    125122ac_ct_CC = @ac_ct_CC@
    126123ac_ct_CXX = @ac_ct_CXX@
     124ac_ct_RANLIB = @ac_ct_RANLIB@
    127125ac_ct_STRIP = @ac_ct_STRIP@
    128126am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/md2_loader/src/lib/gui/console/Makefile.in

    r3789 r4063  
    107107EXEEXT = @EXEEXT@
    108108GPROF = @GPROF@
    109 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    110 GTHREAD_LIBS = @GTHREAD_LIBS@
    111109GTK2_CFLAGS = @GTK2_CFLAGS@
    112110GTK2_LIBS = @GTK2_LIBS@
    113111HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    114112HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    115 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    116 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    117113HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    118114HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    136132PACKAGE_VERSION = @PACKAGE_VERSION@
    137133PATH_SEPARATOR = @PATH_SEPARATOR@
     134RANLIB = @RANLIB@
    138135SET_MAKE = @SET_MAKE@
    139136SHELL = @SHELL@
     
    144141ac_ct_CC = @ac_ct_CC@
    145142ac_ct_CXX = @ac_ct_CXX@
     143ac_ct_RANLIB = @ac_ct_RANLIB@
    146144ac_ct_STRIP = @ac_ct_STRIP@
    147145am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.am

    r4024 r4063  
    1111AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
    1212AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui
     13AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gui
    1314AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang
    1415AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util
     
    2425
    2526bin_PROGRAMS=gui
    26 gui_SOURCES=orxonox_gui.cc \
    27             orxonox_gui_gtk.cc \
    28             orxonox_gui_element.cc \
    29             orxonox_gui_video.cc \
    30             orxonox_gui_audio.cc \
    31             orxonox_gui_exec.cc \
    32             orxonox_gui_flags.cc \
    33             orxonox_gui_banner.cc \
    34             orxonox_gui_keys.cc \
    35             orxonox_gui_update.cc
     27gui_SOURCES=gui_main.cc \
     28            gui.cc \
     29            gui_gtk.cc \
     30            gui_element.cc \
     31            gui_video.cc \
     32            gui_audio.cc \
     33            gui_exec.cc \
     34            gui_flags.cc \
     35            gui_banner.cc \
     36            gui_keys.cc \
     37            gui_update.cc
    3638
    37 noinst_HEADERS=orxonox_gui.h \
    38             orxonox_gui_gtk.h \
    39             orxonox_gui_element.h \
    40             orxonox_gui_video.h \
    41             orxonox_gui_audio.h \
    42             orxonox_gui_exec.h \
    43             orxonox_gui_flags.h \
    44             orxonox_gui_banner.h \
    45             orxonox_gui_keys.h \
    46             orxonox_gui_update.h
     39noinst_HEADERS=gui.h \
     40            gui_gtk.h \
     41            gui_element.h \
     42            gui_video.h \
     43            gui_audio.h \
     44            gui_exec.h \
     45            gui_flags.h \
     46            gui_banner.h \
     47            gui_keys.h \
     48            gui_update.h
    4749
    4850#  uncomment the following if orxonox requires the mathlibrary
  • orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.in

    r4024 r4063  
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
    55 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_gtk.$(OBJEXT) \
    56         orxonox_gui_element.$(OBJEXT) orxonox_gui_video.$(OBJEXT) \
    57         orxonox_gui_audio.$(OBJEXT) orxonox_gui_exec.$(OBJEXT) \
    58         orxonox_gui_flags.$(OBJEXT) orxonox_gui_banner.$(OBJEXT) \
    59         orxonox_gui_keys.$(OBJEXT) orxonox_gui_update.$(OBJEXT)
     55am_gui_OBJECTS = gui_main.$(OBJEXT) gui.$(OBJEXT) gui_gtk.$(OBJEXT) \
     56        gui_element.$(OBJEXT) gui_video.$(OBJEXT) gui_audio.$(OBJEXT) \
     57        gui_exec.$(OBJEXT) gui_flags.$(OBJEXT) gui_banner.$(OBJEXT) \
     58        gui_keys.$(OBJEXT) gui_update.$(OBJEXT)
    6059gui_OBJECTS = $(am_gui_OBJECTS)
    6160gui_LDADD = $(LDADD)
     
    6362depcomp = $(SHELL) $(top_srcdir)/depcomp
    6463am__depfiles_maybe = depfiles
    65 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
    66 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    67 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_banner.Po \
    68 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_element.Po \
    69 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    70 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
    71 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_gtk.Po \
    72 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_keys.Po \
    73 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_update.Po \
    74 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     64@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/gui.Po ./$(DEPDIR)/gui_audio.Po \
     65@AMDEP_TRUE@    ./$(DEPDIR)/gui_banner.Po \
     66@AMDEP_TRUE@    ./$(DEPDIR)/gui_element.Po ./$(DEPDIR)/gui_exec.Po \
     67@AMDEP_TRUE@    ./$(DEPDIR)/gui_flags.Po ./$(DEPDIR)/gui_gtk.Po \
     68@AMDEP_TRUE@    ./$(DEPDIR)/gui_keys.Po ./$(DEPDIR)/gui_main.Po \
     69@AMDEP_TRUE@    ./$(DEPDIR)/gui_update.Po ./$(DEPDIR)/gui_video.Po
    7570CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7671        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    117112EXEEXT = @EXEEXT@
    118113GPROF = @GPROF@
    119 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    120 GTHREAD_LIBS = @GTHREAD_LIBS@
    121114GTK2_CFLAGS = @GTK2_CFLAGS@
    122115GTK2_LIBS = @GTK2_LIBS@
    123116HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    124117HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    125 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    126 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    127118HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    128119HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    145136PACKAGE_VERSION = @PACKAGE_VERSION@
    146137PATH_SEPARATOR = @PATH_SEPARATOR@
     138RANLIB = @RANLIB@
    147139SET_MAKE = @SET_MAKE@
    148140SHELL = @SHELL@
     
    153145ac_ct_CC = @ac_ct_CC@
    154146ac_ct_CXX = @ac_ct_CXX@
     147ac_ct_RANLIB = @ac_ct_RANLIB@
    155148ac_ct_STRIP = @ac_ct_STRIP@
    156149am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
     
    194187target_vendor = @target_vendor@
    195188MAINSRCDIR = ../../..
    196 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/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
     189AM_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
    197190
    198191#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
    199192AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    200 gui_SOURCES = orxonox_gui.cc \
    201             orxonox_gui_gtk.cc \
    202             orxonox_gui_element.cc \
    203             orxonox_gui_video.cc \
    204             orxonox_gui_audio.cc \
    205             orxonox_gui_exec.cc \
    206             orxonox_gui_flags.cc \
    207             orxonox_gui_banner.cc \
    208             orxonox_gui_keys.cc \
    209             orxonox_gui_update.cc
    210 
    211 noinst_HEADERS = orxonox_gui.h \
    212             orxonox_gui_gtk.h \
    213             orxonox_gui_element.h \
    214             orxonox_gui_video.h \
    215             orxonox_gui_audio.h \
    216             orxonox_gui_exec.h \
    217             orxonox_gui_flags.h \
    218             orxonox_gui_banner.h \
    219             orxonox_gui_keys.h \
    220             orxonox_gui_update.h
     193gui_SOURCES = gui_main.cc \
     194            gui.cc \
     195            gui_gtk.cc \
     196            gui_element.cc \
     197            gui_video.cc \
     198            gui_audio.cc \
     199            gui_exec.cc \
     200            gui_flags.cc \
     201            gui_banner.cc \
     202            gui_keys.cc \
     203            gui_update.cc
     204
     205noinst_HEADERS = gui.h \
     206            gui_gtk.h \
     207            gui_element.h \
     208            gui_video.h \
     209            gui_audio.h \
     210            gui_exec.h \
     211            gui_flags.h \
     212            gui_banner.h \
     213            gui_keys.h \
     214            gui_update.h
    221215
    222216
     
    296290        -rm -f *.tab.c
    297291
    298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui.Po@am__quote@
    299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@
    300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_banner.Po@am__quote@
    301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_element.Po@am__quote@
    302 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
    304 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_gtk.Po@am__quote@
    305 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@
    306 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_update.Po@am__quote@
    307 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
     292@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@
     293@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_audio.Po@am__quote@
     294@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_banner.Po@am__quote@
     295@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_element.Po@am__quote@
     296@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_exec.Po@am__quote@
     297@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_flags.Po@am__quote@
     298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_gtk.Po@am__quote@
     299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_keys.Po@am__quote@
     300@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_main.Po@am__quote@
     301@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_update.Po@am__quote@
     302@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_video.Po@am__quote@
    308303
    309304.cc.o:
  • orxonox/branches/md2_loader/src/lib/gui/gui/rc

    r3423 r4063  
    1 # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
    2 #
    3 pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
    4 #
    5 # style <name> [= <name>]
    6 # {
    7 #   <option>
    8 # }
    9 #
    10 # widget <widget_set> style <style_name>
    11 # widget_class <widget_class_set> style <style_name>
     1static const gchar* rc_string =
     2(       
     3"style'window'"
     4"{"                     
     5"bg[NORMAL] = { 0, 0, 0 }"
     6"fg[NORMAL] = { 0, 1.0, 0 }"
     7"base[NORMAL] = { 0, 0, 0 }"
     8"base[INSENSITIVE] = { 0, 0, 0 }"
     9"}"
    1210
    13 # Here is a list of all the possible states.  Note that some do not apply to
    14 # certain widgets.
    15 #
    16 # NORMAL - The normal state of a widget, without the mouse over top of
    17 # it, and not being pressed, etc.
    18 #
    19 # PRELIGHT - When the mouse is over top of the widget, colors defined
    20 # using this state will be in effect.
    21 #
    22 # ACTIVE - When the widget is pressed or clicked it will be active, and
    23 # the attributes assigned by this tag will be in effect.
    24 #
    25 # INSENSITIVE - When a widget is set insensitive, and cannot be
    26 # activated, it will take these attributes.
    27 #
    28 # SELECTED - When an object is selected, it takes these attributes.
    29 #
    30 # Given these states, we can set the attributes of the widgets in each of
    31 # these states using the following directives.
    32 #
    33 # fg - Sets the foreground color of a widget.
    34 # bg - Sets the background color of a widget.
    35 # bg_pixmap - Sets the background of a widget to a tiled pixmap.
    36 # font - Sets the font to be used with the given widget.
    37 #
     11"style'scale'"
     12"{"
     13"fg[NORMAL] = { 0, 1.0, 0 }"
     14"bg[NORMAL] = { 0, 1.0, 0 }"
     15"bg[INSENSITIVE] = { 0, 1.0, 0 }"
     16"bg[PRELIGHT] = { 0, 1.0, 0 }"
     17"bg[ACTIVE] =   {0.2, 0.2, 0.2 }"
     18"}"
    3819
    39 # This sets a style called "button".  The name is not really important, as
    40 # it is assigned to the actual widgets at the bottom of the file.
     20"style'button'"
     21"{"
     22"fg[PRELIGHT] = { 0, 0, 0 }"
     23"bg[PRELIGHT] = { 0, 1.0, 0 }"
     24"bg[ACTIVE] = { 0, 1.0, 0 }"
     25"fg[ACTIVE] = { 0, 1.0, 0 }"
     26"bg[NORMAL] = { 0, 0, 0 }"
     27"fg[NORMAL] = { 0, 1.0, 0 }"
     28"bg[INSENSITIVE] = { 1.0, 0, 1.0 }"
     29"fg[INSENSITIVE] = { 1.0, 0, 1.0 }"
     30"base[NORMAL] = { 0, 1.0, 0 }"
     31"base[PRELIGHT] = { 0, 1.0, 0 }"
     32"}"
    4133
    42 style "window"
    43 {
    44   #This sets the padding around the window to the pixmap specified.
    45   #bg_pixmap[<STATE>] = "<pixmap filename>"
    46   #bg_pixmap[NORMAL] = "warning.xpm"
    47   bg[NORMAL] = { 0, 0, 0 }
    48   fg[NORMAL] = { 0, 1.0, 0 }
    49   base[NORMAL] = { 0, 0, 0 }
    50   base[INSENSITIVE] = { 0, 0, 0 }
    51 }
     34"style'main_button' = 'button'"
     35"{"
     36"font = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'"
     37"bg[PRELIGHT] = { 0, 0.75, 0 }"
     38"}"
    5239
    53 style "scale"
    54 {
    55   #Sets the foreground color (font color) to red when in the "NORMAL"
    56   #state.
    57  
    58   fg[NORMAL] = { 0, 1.0, 0 }
    59   bg[NORMAL] = { 0, 1.0, 0 }
    60   bg[INSENSITIVE] = { 0, 1.0, 0 }
    61   bg[PRELIGHT] = { 0, 1.0, 0 }
    62   bg[ACTIVE] =   {0.2, 0.2, 0.2 }
    63  
    64   #Sets the background pixmap of this widget to that of its parent.
    65   bg_pixmap[NORMAL] = "<parent>"
    66 }
     40"style'toggle_button' = 'button'"
     41"{"
     42"fg[NORMAL] = { 0, 1.0, 0 }"
     43"fg[ACTIVE] = { 0, 1.0, 0 }"
     44"text[NORMAL] = { 0, 0, 0}"
     45"}"
    6746
    68 style "button"
    69 {
    70   # This shows all the possible states for a button.  The only one that
    71   # doesn't apply is the SELECTED state.
    72  
    73   fg[PRELIGHT] = { 0, 0, 0 }
    74   bg[PRELIGHT] = { 0, 1.0, 0 }
    75   bg[ACTIVE] = { 0, 1.0, 0 }
    76   fg[ACTIVE] = { 0, 1.0, 0 }
    77   bg[NORMAL] = { 0, 0, 0 }
    78   fg[NORMAL] = { 0, 1.0, 0 }
    79   bg[INSENSITIVE] = { 1.0, 0, 1.0 }
    80   fg[INSENSITIVE] = { 1.0, 0, 1.0 }
    81   base[NORMAL] = { 0, 1.0, 0 }
    82   base[PRELIGHT] = { 0, 1.0, 0 }
    83 }
     47"style'text'"
     48"{"
     49"fg[NORMAL] = { 0, 1.0, 0 }"
     50"}"
    8451
    85 # In this example, we inherit the attributes of the "button" style and then
    86 # override the font and background color when prelit to create a new
    87 # "main_button" style.
     52"style'ruler'"
     53"{"
     54"font = '-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*'"
     55"}"
    8856
    89 style "main_button" = "button"
    90 {
    91   font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
    92   bg[PRELIGHT] = { 0, 0.75, 0 }
    93 }
     57"widget'GtkWindow'              style'window'"
     58"widget'GtkFrame'               style'window'"
     59"widget'Gtk*EventBox'           style'window'"
     60"widget'GtkDialog'              style'window'"
     61"widget'GtkFileSelection'       style'window'"
     62"widget'*Gtk*Scale'             style'scale'"
     63"widget'*GtkCheckButton*'       style'toggle_button'"
     64"widget'*Gtk*Menu*'             style'toggle_button'"
     65"widget'*GtkRadioButton*'       style'toggle_button'"
     66"widget'*GtkButton*'            style'button'"
     67"widget'*Ruler'                 style'ruler'"
     68"widget'*GtkText'               style'text'"
     69"widget'*GtkLabel'              style'text'"
    9470
    95 style "toggle_button" = "button"
    96 {
    97   fg[NORMAL] = { 0, 1.0, 0 }
    98   fg[ACTIVE] = { 0, 1.0, 0 }
    99   text[NORMAL] = { 0, 0, 0}
    100   # This sets the background pixmap of the toggle_button to that of its
    101   # parent widget (as defined in the application).
    102   #bg_pixmap[NORMAL] = "<parent>"
    103 }
    104 
    105 style "text"
    106 {
    107   #bg_pixmap[NORMAL] = "marble.xpm"
    108   fg[NORMAL] = { 0, 1.0, 0 }
    109 }
    110 
    111 style "ruler"
    112 {
    113   font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*"
    114 }
    115 
    116 # pixmap_path "~/.pixmaps"
    117 
    118 # These set the widget types to use the styles defined above.
    119 # The widget types are listed in the class hierarchy, but could probably be
    120 # just listed in this document for the users reference.
    121 
    122 widget_class "GtkWindow"           style "window"
    123 widget_class "GtkFrame"            style "window"
    124 widget_class "Gtk*EventBox"        style "window"
    125 widget_class "GtkDialog"           style "window"
    126 widget_class "GtkFileSelection"    style "window"
    127 widget_class "*Gtk*Scale"          style "scale"
    128 widget_class "*GtkCheckButton*"    style "toggle_button"
    129 widget_class "*Gtk*Menu*"          style "toggle_button"
    130 widget_class "*GtkRadioButton*"    style "toggle_button"
    131 widget_class "*GtkButton*"         style "button"
    132 widget_class "*Ruler"              style "ruler"
    133 widget_class "*GtkText"            style "text"
    134 widget_class "*GtkLabel"           style "text"
     71"widget'main window.*GtkButton*' style 'main_button'"
    13572
    13673
    137 # This sets all the buttons that are children of the "main window" to
    138 # the main_button style.  These must be documented to be taken advantage of.
    139 widget "main window.*GtkButton*" style "main_button"
     74);
  • orxonox/branches/md2_loader/src/lib/util/ini_parser.cc

    r3484 r4063  
    2323        \param filename: the path and name of the file to parse
    2424*/
    25 IniParser::IniParser (char* filename)
     25IniParser::IniParser (const char* filename)
    2626{
    2727  stream = NULL;
     
    4343   \return zero on success or -1 if an error occured;
    4444*/
    45 int IniParser::openFile( char* filename)
     45int IniParser::openFile(const char* filename)
    4646{
    4747  if( filename == NULL) return -1;
     
    144144   lead to unwanted behaviour.
    145145*/
    146 char* IniParser::getVar( char* name, char* section, char* defvalue = "")
     146char* IniParser::getVar(const char* name, char* section, char* defvalue = "")
    147147{
    148148  strcpy (internbuf, defvalue);
  • orxonox/branches/md2_loader/src/lib/util/ini_parser.h

    r3484 r4063  
    2626       
    2727 public:
    28   IniParser (char* filename);
     28  IniParser (const char* filename);
    2929  ~IniParser ();
    3030 
    31   char* getVar( char* name, char* section, char* defvalue);
    32         int openFile( char* name);
     31  char* getVar(const char* name, char* section, char* defvalue);
     32  int openFile(const char* name);
    3333  int getSection( char* section);
    3434  int nextVar( char* name, char* value);
Note: See TracChangeset for help on using the changeset viewer.