Changeset 4063 in orxonox.OLD for orxonox/branches/md2_loader/src/lib
- Timestamp:
- May 5, 2005, 2:37:08 PM (20 years ago)
- 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 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 RANLIB = @RANLIB@ 119 116 SET_MAKE = @SET_MAKE@ 120 117 SHELL = @SHELL@ … … 125 122 ac_ct_CC = @ac_ct_CC@ 126 123 ac_ct_CXX = @ac_ct_CXX@ 124 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 125 ac_ct_STRIP = @ac_ct_STRIP@ 128 126 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/md2_loader/src/lib/graphics/Makefile.in
r3789 r4063 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 RANLIB = @RANLIB@ 119 116 SET_MAKE = @SET_MAKE@ 120 117 SHELL = @SHELL@ … … 125 122 ac_ct_CC = @ac_ct_CC@ 126 123 ac_ct_CXX = @ac_ct_CXX@ 124 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 125 ac_ct_STRIP = @ac_ct_STRIP@ 128 126 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/md2_loader/src/lib/graphics/importer/Makefile.in
r3907 r4063 119 119 EXEEXT = @EXEEXT@ 120 120 GPROF = @GPROF@ 121 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@122 GTHREAD_LIBS = @GTHREAD_LIBS@123 121 GTK2_CFLAGS = @GTK2_CFLAGS@ 124 122 GTK2_LIBS = @GTK2_LIBS@ 125 123 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 126 124 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 127 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@128 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@129 125 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 130 126 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 147 143 PACKAGE_VERSION = @PACKAGE_VERSION@ 148 144 PATH_SEPARATOR = @PATH_SEPARATOR@ 145 RANLIB = @RANLIB@ 149 146 SET_MAKE = @SET_MAKE@ 150 147 SHELL = @SHELL@ … … 155 152 ac_ct_CC = @ac_ct_CC@ 156 153 ac_ct_CXX = @ac_ct_CXX@ 154 ac_ct_RANLIB = @ac_ct_RANLIB@ 157 155 ac_ct_STRIP = @ac_ct_STRIP@ 158 156 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/md2_loader/src/lib/graphics/importer/model.cc
r4023 r4063 35 35 */ 36 36 ModelFaceElement::ModelFaceElement() 37 {} 37 { 38 this->next = NULL; 39 } 38 40 39 41 /** … … 42 44 ModelFaceElement::~ModelFaceElement() 43 45 { 46 if (this->next) 47 delete this->next; 48 } 49 50 /** 51 \brief creates a new ModelFace 52 */ 53 ModelFace::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 */ 68 ModelFace::~ModelFace() 69 { 70 PRINTF(5)("Cleaning up Face\n"); 71 72 if (this->firstElem != NULL) 73 delete this->firstElem; 74 44 75 if (this->next != NULL) 45 76 delete this->next; 46 }47 48 /**49 \brief creates a new ModelFace50 */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 ModelFace65 */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 80 77 } 81 78 … … 102 99 PRINTF(5)("Cleaning up group\n"); 103 100 if (this->firstFace != NULL) 104 { 105 delete this->firstFace; 106 } 101 delete this->firstFace; 107 102 108 103 if (this->next !=NULL) … … 175 170 176 171 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; 185 173 186 174 // deleting Arrays … … 191 179 tIterator<Material>* tmpIt = this->materialList->getIterator(); 192 180 Material* material = tmpIt->nextElement(); 181 182 //! \todo do we really have to delete this material?? 193 183 while(material) 194 184 { … … 227 217 { 228 218 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; 235 225 } 236 226 } … … 250 240 } 251 241 PRINTF(4)("drawing the requested 3D-Models if found.\n"); 252 ModelGroup* walker= this->firstGroup;242 ModelGroup* tmpGroup = this->firstGroup; 253 243 int counter = 0; 254 while ( walker!= NULL)244 while (tmpGroup != NULL) 255 245 { 256 246 if (counter == groupNumber) 257 247 { 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); 260 250 return; 261 251 } 262 252 ++counter; 263 walker = walker->next;253 tmpGroup = tmpGroup->next; 264 254 } 265 255 PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name); … … 277 267 { 278 268 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)) 283 273 { 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); 286 276 return; 287 277 } 288 walker = walker->next;278 tmpGroup = tmpGroup->next; 289 279 } 290 280 PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name); 291 281 return; 292 }293 294 /**295 \returns Count of the Models in this File296 */297 int Model::getGroupCount (void) const298 {299 return this->groupCount;300 282 } 301 283 … … 331 313 if (this->normals) 332 314 delete this->normals; 315 333 316 this->vertices = NULL; 334 317 this->vTexture = NULL; … … 410 393 With it you should be able to create Models with more than one SubModel inside 411 394 */ 412 bool Model::addGroup 395 bool Model::addGroup(const char* groupString) 413 396 { 414 397 PRINTF(5)("Read Group: %s.\n", groupString); … … 594 577 595 578 ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement; 596 tmpElem->next = NULL;597 579 598 580 va_list itemlist; … … 603 585 if (this->currentGroup->currentFace->vertexCount>0) 604 586 tmpElem = tmpElem->next = new ModelFaceElement; 605 tmpElem->next = NULL;606 587 607 588 tmpElem->vertexNumber = va_arg (itemlist, int) -1; … … 834 815 glNormalPointer(3, 0, this->normals->getArray()); 835 816 glTexCoordPointer(2, GL_FLOAT, 0, this->vTexture->getArray()); 836 837 817 } 838 818 … … 859 839 if (elem->vertexNumber != -1) 860 840 glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3); 861 862 841 } 863 842 -
orxonox/branches/md2_loader/src/lib/graphics/importer/model.h
r4023 r4063 139 139 void draw(int groupNumber) const; 140 140 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;} 142 144 143 145 Material* addMaterial(Material* material); -
orxonox/branches/md2_loader/src/lib/graphics/importer/objModel.cc
r3916 r4063 196 196 this->mtlFileName = new char [strlen(mtlFile)+1]; 197 197 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); 201 200 202 201 -
orxonox/branches/md2_loader/src/lib/gui/Makefile.in
r3789 r4063 89 89 EXEEXT = @EXEEXT@ 90 90 GPROF = @GPROF@ 91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@92 GTHREAD_LIBS = @GTHREAD_LIBS@93 91 GTK2_CFLAGS = @GTK2_CFLAGS@ 94 92 GTK2_LIBS = @GTK2_LIBS@ 95 93 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 96 94 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@99 95 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 100 96 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 117 113 PACKAGE_VERSION = @PACKAGE_VERSION@ 118 114 PATH_SEPARATOR = @PATH_SEPARATOR@ 115 RANLIB = @RANLIB@ 119 116 SET_MAKE = @SET_MAKE@ 120 117 SHELL = @SHELL@ … … 125 122 ac_ct_CC = @ac_ct_CC@ 126 123 ac_ct_CXX = @ac_ct_CXX@ 124 ac_ct_RANLIB = @ac_ct_RANLIB@ 127 125 ac_ct_STRIP = @ac_ct_STRIP@ 128 126 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/md2_loader/src/lib/gui/console/Makefile.in
r3789 r4063 107 107 EXEEXT = @EXEEXT@ 108 108 GPROF = @GPROF@ 109 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@110 GTHREAD_LIBS = @GTHREAD_LIBS@111 109 GTK2_CFLAGS = @GTK2_CFLAGS@ 112 110 GTK2_LIBS = @GTK2_LIBS@ 113 111 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 114 112 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 115 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@116 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@117 113 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 118 114 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 136 132 PACKAGE_VERSION = @PACKAGE_VERSION@ 137 133 PATH_SEPARATOR = @PATH_SEPARATOR@ 134 RANLIB = @RANLIB@ 138 135 SET_MAKE = @SET_MAKE@ 139 136 SHELL = @SHELL@ … … 144 141 ac_ct_CC = @ac_ct_CC@ 145 142 ac_ct_CXX = @ac_ct_CXX@ 143 ac_ct_RANLIB = @ac_ct_RANLIB@ 146 144 ac_ct_STRIP = @ac_ct_STRIP@ 147 145 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -
orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.am
r4024 r4063 11 11 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer 12 12 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui 13 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui/gui 13 14 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/lang 14 15 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/util … … 24 25 25 26 bin_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 27 gui_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 36 38 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.h39 noinst_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 47 49 48 50 # uncomment the following if orxonox requires the mathlibrary -
orxonox/branches/md2_loader/src/lib/gui/gui/Makefile.in
r4024 r4063 53 53 binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) 54 54 PROGRAMS = $(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) 55 am_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) 60 59 gui_OBJECTS = $(am_gui_OBJECTS) 61 60 gui_LDADD = $(LDADD) … … 63 62 depcomp = $(SHELL) $(top_srcdir)/depcomp 64 63 am__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 75 70 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ 76 71 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) … … 117 112 EXEEXT = @EXEEXT@ 118 113 GPROF = @GPROF@ 119 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@120 GTHREAD_LIBS = @GTHREAD_LIBS@121 114 GTK2_CFLAGS = @GTK2_CFLAGS@ 122 115 GTK2_LIBS = @GTK2_LIBS@ 123 116 HAVE_CURL_FALSE = @HAVE_CURL_FALSE@ 124 117 HAVE_CURL_TRUE = @HAVE_CURL_TRUE@ 125 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@126 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@127 118 HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@ 128 119 HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@ … … 145 136 PACKAGE_VERSION = @PACKAGE_VERSION@ 146 137 PATH_SEPARATOR = @PATH_SEPARATOR@ 138 RANLIB = @RANLIB@ 147 139 SET_MAKE = @SET_MAKE@ 148 140 SHELL = @SHELL@ … … 153 145 ac_ct_CC = @ac_ct_CC@ 154 146 ac_ct_CXX = @ac_ct_CXX@ 147 ac_ct_RANLIB = @ac_ct_RANLIB@ 155 148 ac_ct_STRIP = @ac_ct_STRIP@ 156 149 am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ … … 194 187 target_vendor = @target_vendor@ 195 188 MAINSRCDIR = ../../.. 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)/ai189 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 197 190 198 191 #AM_LDFLAGS=$(GTK2_LIBS) $(GTHREAD_LIBS) 199 192 AM_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 193 gui_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 205 noinst_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 221 215 222 216 … … 296 290 -rm -f *.tab.c 297 291 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@ 308 303 309 304 .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> 1 static 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 "}" 12 10 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 "}" 38 19 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 "}" 41 33 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 "}" 52 39 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 "}" 67 46 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 "}" 84 51 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 "}" 88 56 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'" 94 70 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'" 135 72 136 73 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 23 23 \param filename: the path and name of the file to parse 24 24 */ 25 IniParser::IniParser (c har* filename)25 IniParser::IniParser (const char* filename) 26 26 { 27 27 stream = NULL; … … 43 43 \return zero on success or -1 if an error occured; 44 44 */ 45 int IniParser::openFile( char* filename)45 int IniParser::openFile(const char* filename) 46 46 { 47 47 if( filename == NULL) return -1; … … 144 144 lead to unwanted behaviour. 145 145 */ 146 char* IniParser::getVar( char* name, char* section, char* defvalue = "")146 char* IniParser::getVar(const char* name, char* section, char* defvalue = "") 147 147 { 148 148 strcpy (internbuf, defvalue); -
orxonox/branches/md2_loader/src/lib/util/ini_parser.h
r3484 r4063 26 26 27 27 public: 28 IniParser (c har* filename);28 IniParser (const char* filename); 29 29 ~IniParser (); 30 30 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); 33 33 int getSection( char* section); 34 34 int nextVar( char* name, char* value);
Note: See TracChangeset
for help on using the changeset viewer.