- Timestamp:
- Oct 12, 2005, 1:23:08 AM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/class_id.h
r5364 r5366 111 111 CL_NULL_ELEMENT_2D = 0x00000f22, 112 112 CL_SHELL_BUFFER = 0x00000f32, 113 CL_GLGUI_HANDLER = 0x00000f40, 113 114 114 115 -
trunk/src/defs/sdlincl.h
r4662 r5366 1 1 /*! 2 \file sdlincl.h3 \briefThis file includes sdl Headers.4 5 no Class is defined here, but the SDL Headers2 * @file sdlincl.h 3 * This file includes sdl Headers. 4 * 5 * no Class is defined here, but the SDL Headers 6 6 */ 7 7 … … 9 9 #define _SDLINCL_H 10 10 11 #include "confincl.h" 12 13 #ifdef HAVE_SDL_H 14 #include <SDL.h> 15 #else 11 16 #include <SDL/SDL.h> 17 #endif 12 18 13 19 #endif /* _SDLINCL_H */ -
trunk/src/lib/event/event.h
r5239 r5366 2 2 * @file event.h 3 3 * an abstract event 4 * 5 * @todo remove HUGE class-overhead. This could also be a struct 6 */ 4 */ 7 5 8 6 #ifndef _EVENT_H 9 7 #define _EVENT_H 10 8 11 12 //#include "base_object.h"13 9 #include "sdlincl.h" 14 10 -
trunk/src/lib/graphics/graphics_engine.h
r5346 r5366 71 71 bool hwSupportsEXT(const char* extension); 72 72 73 /** \brief swaps the GL_BUFFERS */73 /** @brief swaps the GL_BUFFERS */ 74 74 inline static void swapBuffers() { SDL_GL_SwapBuffers(); }; 75 75 -
trunk/src/lib/gui/gl_gui/Makefile.am
r5364 r5366 10 10 11 11 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 12 glgui_handler.cc \ 12 13 glgui_widget.cc \ 13 14 glgui_button.cc \ -
trunk/src/lib/gui/gl_gui/Makefile.in
r5364 r5366 55 55 libORXglgui_a_LIBADD = 56 56 am_libORXglgui_a_OBJECTS = libORXglgui_a-glmenu_imagescreen.$(OBJEXT) \ 57 libORXglgui_a-glgui_handler.$(OBJEXT) \ 57 58 libORXglgui_a-glgui_widget.$(OBJEXT) \ 58 59 libORXglgui_a-glgui_button.$(OBJEXT) \ … … 70 71 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_container.Po \ 71 72 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_frame.Po \ 73 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_handler.Po \ 72 74 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po \ 73 75 @AMDEP_TRUE@ ./$(DEPDIR)/libORXglgui_a-glgui_widget.Po \ … … 198 200 libORXglgui_a_CPPFLAGS = -DBUILD_ORXONOX 199 201 libORXglgui_a_SOURCES = glmenu/glmenu_imagescreen.cc \ 202 glgui_handler.cc \ 200 203 glgui_widget.cc \ 201 204 glgui_button.cc \ … … 268 271 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_container.Po@am__quote@ 269 272 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_frame.Po@am__quote@ 273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_handler.Po@am__quote@ 270 274 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_pushbutton.Po@am__quote@ 271 275 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libORXglgui_a-glgui_widget.Po@am__quote@ … … 304 308 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 305 309 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glmenu_imagescreen.obj `if test -f 'glmenu/glmenu_imagescreen.cc'; then $(CYGPATH_W) 'glmenu/glmenu_imagescreen.cc'; else $(CYGPATH_W) '$(srcdir)/glmenu/glmenu_imagescreen.cc'; fi` 310 311 libORXglgui_a-glgui_handler.o: glgui_handler.cc 312 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_handler.o -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" -c -o libORXglgui_a-glgui_handler.o `test -f 'glgui_handler.cc' || echo '$(srcdir)/'`glgui_handler.cc; \ 313 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_handler.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo"; exit 1; fi 314 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_handler.cc' object='libORXglgui_a-glgui_handler.o' libtool=no @AMDEPBACKSLASH@ 315 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_handler.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_handler.TPo' @AMDEPBACKSLASH@ 316 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 317 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_handler.o `test -f 'glgui_handler.cc' || echo '$(srcdir)/'`glgui_handler.cc 318 319 libORXglgui_a-glgui_handler.obj: glgui_handler.cc 320 @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libORXglgui_a-glgui_handler.obj -MD -MP -MF "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" -c -o libORXglgui_a-glgui_handler.obj `if test -f 'glgui_handler.cc'; then $(CYGPATH_W) 'glgui_handler.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_handler.cc'; fi`; \ 321 @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo" "$(DEPDIR)/libORXglgui_a-glgui_handler.Po"; else rm -f "$(DEPDIR)/libORXglgui_a-glgui_handler.Tpo"; exit 1; fi 322 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glgui_handler.cc' object='libORXglgui_a-glgui_handler.obj' libtool=no @AMDEPBACKSLASH@ 323 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ depfile='$(DEPDIR)/libORXglgui_a-glgui_handler.Po' tmpdepfile='$(DEPDIR)/libORXglgui_a-glgui_handler.TPo' @AMDEPBACKSLASH@ 324 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ 325 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libORXglgui_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libORXglgui_a-glgui_handler.obj `if test -f 'glgui_handler.cc'; then $(CYGPATH_W) 'glgui_handler.cc'; else $(CYGPATH_W) '$(srcdir)/glgui_handler.cc'; fi` 306 326 307 327 libORXglgui_a-glgui_widget.o: glgui_widget.cc -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.cc
r5360 r5366 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include "glgui_ .h"18 #include "glgui_checkbutton.h" 19 19 20 20 using namespace std; … … 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiCheckButton::GLGuiCheckButton () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiCheckButton::~GLGuiCheckButton() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui ::init()43 GLGuiCheckButton::init() 44 44 { 45 this->setClassID(CL_GLGUI_ , "GLGui");45 this->setClassID(CL_GLGUI_CHECKBUTTON, "GLGuiCheckButton"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiCheckButton 51 51 */ 52 void GLGui ::draw()52 void GLGuiCheckButton::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_checkbutton.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h2 * @file glgui_checkbutton.h 3 3 * The gl_ widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H7 #ifndef _GLGUI_CHECKBUTTON_H 8 8 #define _GLGUI__H 9 9 10 #include " base_object.h"10 #include "glgui_button.h" 11 11 12 12 // FORWARD DECLARATION … … 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiCheckButton : public GLGuiButton { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiCheckButton(); 22 virtual ~GLGuiCheckButton(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_CHECKBUTTON_H */ -
trunk/src/lib/gui/gl_gui/glgui_handler.cc
r5316 r5366 10 10 11 11 ### File Specific: 12 main-programmer: ...12 main-programmer: Benjamin Grauer 13 13 co-programmer: ... 14 14 */ … … 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 17 17 18 #include " proto_singleton.h"18 #include "glgui_handler.h" 19 19 20 20 using namespace std; 21 22 21 23 22 /** 24 23 * standard constructor 25 24 */ 26 ProtoSingleton::ProtoSingleton()25 GLGuiHandler::GLGuiHandler () 27 26 { 28 this->setClassID(CL_ PROTO_ID, "ProtoSingleton");29 this->setName(" ProtoSingleton");27 this->setClassID(CL_GLGUI_HANDLER, "GLGuiHandler"); 28 this->setName("GLGuiHandler"); 30 29 31 30 /* If you make a new class, what is most probably the case when you write this file … … 46 45 * the singleton reference to this class 47 46 */ 48 ProtoSingleton* ProtoSingleton::singletonRef = NULL;47 GLGuiHandler* GLGuiHandler::singletonRef = NULL; 49 48 50 49 /** 51 50 @brief standard deconstructor 52 51 */ 53 ProtoSingleton::~ProtoSingleton()52 GLGuiHandler::~GLGuiHandler () 54 53 { 55 ProtoSingleton::singletonRef = NULL;54 GLGuiHandler::singletonRef = NULL; 56 55 } -
trunk/src/lib/gui/gl_gui/glgui_handler.h
r5316 r5366 4 4 */ 5 5 6 #ifndef _ PROTO_SINGLETON_H7 #define _ PROTO_SINGLETON_H6 #ifndef _GLGUI_HANDLER_H 7 #define _GLGUI_HANDLER_H 8 8 9 9 #include "base_object.h" … … 12 12 13 13 //! A default singleton class. 14 class ProtoSingleton: public BaseObject {14 class GLGuiHandler : public BaseObject { 15 15 16 16 public: 17 virtual ~ ProtoSingleton(void);17 virtual ~GLGuiHandler(void); 18 18 /** @returns a Pointer to the only object of this Class */ 19 inline static ProtoSingleton* getInstance(void) { if (!singletonRef) singletonRef = new ProtoSingleton(); return singletonRef; };19 inline static GLGuiHandler* getInstance(void) { if (!singletonRef) singletonRef = new GLGuiHandler(); return singletonRef; }; 20 20 21 21 private: 22 ProtoSingleton(void);23 static ProtoSingleton* singletonRef;22 GLGuiHandler(void); 23 static GLGuiHandler* singletonRef; 24 24 }; 25 25 26 #endif /* _ PROTO_SINGLETON_H */26 #endif /* _GLGUI_HANDLER_H */ -
trunk/src/lib/gui/gl_gui/glgui_image.cc
r5360 r5366 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GUI 17 17 18 #include "glgui_ .h"18 #include "glgui_image.h" 19 19 20 20 using namespace std; … … 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiImage::GLGuiImage () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiImage::~GLGuiImage() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui::init()43 void GLGuiImage::init() 44 44 { 45 this->setClassID(CL_GLGUI_, "GLGui ");45 this->setClassID(CL_GLGUI_, "GLGuiImage"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiImage 51 51 */ 52 void GLGui ::draw()52 void GLGuiImage::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_image.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h3 * The gl_ widget of th openglGUI2 * @file glgui_image.h 3 * The gl_Image widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H8 #define _GLGUI_ _H7 #ifndef _GLGUI_IMAGE_H 8 #define _GLGUI_IMAGE_H 9 9 10 10 #include "base_object.h" … … 12 12 // FORWARD DECLARATION 13 13 14 //! This is part of the openglGUI class14 //! This is Image part of the openglGUI class 15 15 /** 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiImage : public GLGuiWidget { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiImage(); 22 virtual ~GLGuiImage(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_IMAGE_H */ -
trunk/src/lib/gui/gl_gui/glgui_menu.cc
r5360 r5366 23 23 * standard constructor 24 24 */ 25 GLGui ::GLGui()25 GLGuiMenu::GLGuiMenu () 26 26 { 27 27 this->init(); … … 33 33 * standard deconstructor 34 34 */ 35 GLGui ::~GLGui()35 GLGuiMenu::~GLGuiMenu() 36 36 { 37 37 … … 41 41 * initializes the GUI-element 42 42 */ 43 GLGui::init()43 void GLGuiMenu::init() 44 44 { 45 this->setClassID(CL_GLGUI_ , "GLGui");45 this->setClassID(CL_GLGUI_MENU, "GLGuiMenu"); 46 46 47 47 } 48 48 49 49 /** 50 * draws the GLGui 50 * draws the GLGuiMenu 51 51 */ 52 void GLGui ::draw()52 void GLGuiMenu::draw() 53 53 { 54 54 -
trunk/src/lib/gui/gl_gui/glgui_menu.h
r5360 r5366 1 1 /*! 2 * @file glgui_ .h3 * The gl_ widget of th openglGUI2 * @file glgui_menu.h 3 * The gl_Menu widget of th openglGUI 4 4 * 5 5 */ 6 6 7 #ifndef _GLGUI_ _H8 #define _GLGUI_ _H7 #ifndef _GLGUI_MENU_H 8 #define _GLGUI_MENU_H 9 9 10 10 #include "base_object.h" … … 12 12 // FORWARD DECLARATION 13 13 14 //! This is part of the openglGUI class14 //! This is Menu part of the openglGUI class 15 15 /** 16 16 * 17 17 */ 18 class GLGui : public GLGui{18 class GLGuiMenu : public GLGuiMenu { 19 19 20 20 public: 21 GLGui ();22 virtual ~GLGui ();21 GLGuiMenu(); 22 virtual ~GLGuiMenu(); 23 23 24 24 void init(); … … 30 30 }; 31 31 32 #endif /* _GLGUI_ _H */32 #endif /* _GLGUI_MENU_H */ -
trunk/src/lib/gui/gl_gui/glgui_widget.cc
r5364 r5366 46 46 this->setClassID(CL_GLGUI_WIDGET, "GLGuiWidget"); 47 47 48 this->managed = false; 49 this->focusable = true; 50 this->clickable = true; 51 52 this->backGround = NULL; 53 this->renderModel = 0; 48 54 } -
trunk/src/lib/gui/gl_gui/glgui_widget.h
r5365 r5366 1 1 /*! 2 3 4 2 * @file glgui_widget.h 3 * The gl_widget of the openglGUI 4 */ 5 5 6 6 #ifndef _GLGUI_WIDGET_H … … 15 15 //! This is part of the openglGUI class 16 16 /** 17 18 17 * A widget is the main class of all the elements of th GUI. 18 */ 19 19 class GLGuiWidget : public Element2D { 20 public:21 GLGuiWidget();22 virtual ~GLGuiWidget();20 public: 21 GLGuiWidget(); 22 virtual ~GLGuiWidget(); 23 23 24 void init();24 void init(); 25 25 26 void show();27 void hide();26 void show(); 27 void hide(); 28 28 29 29 30 virtual void draw() = 0;31 virtual void update() = 0;30 virtual void draw() = 0; 31 virtual void update() = 0; 32 32 33 private: 34 bool managed; //!< if this GUI-element should be managed. true means it gets deleted with the deletion of it's parent. 35 bool focusable; //!< If it can receive focus. 36 bool clickable; //!< if it can be clicked upon. 33 protected: 34 Material* backGround; 35 GLuint renderModel; 37 36 38 Material* backGround; 39 GLuint renderModel; 37 private: 38 bool managed; //!< if this GUI-element should be managed. true means it gets deleted with the deletion of it's parent. 39 bool focusable; //!< If it can receive focus. 40 bool clickable; //!< if it can be clicked upon. 41 40 42 41 43 -
trunk/src/util/resource_manager.cc
r5346 r5366 217 217 BaseObject* ResourceManager::load(const char* fileName, ResourcePriority prio, void* param1, void* param2, void* param3) 218 218 { 219 if (fileName == NULL) 220 return NULL; 219 221 ResourceType tmpType; 220 222 #ifndef NO_MODEL … … 284 286 void* param1, void* param2, void* param3) 285 287 { 288 if (fileName == NULL) 289 return NULL; 290 286 291 // searching if the resource was loaded before. 287 292 Resource* tmpResource = this->locateResourceByInfo(fileName, type, param1, param2, param3); … … 320 325 else 321 326 { 322 PRINTF(2)(" Sorry, %s does not exist. Loading a cube-Model instead\n", fullName);327 PRINTF(2)("File %s in %s does not exist. Loading a cube-Model instead\n", fileName, dataDir); 323 328 tmpResource->pointer = ResourceManager::load("cube", PRIM, prio, &tmpResource->modelSize); 324 329 } … … 461 466 bool ResourceManager::unload(void* pointer, ResourcePriority prio) 462 467 { 468 if (pointer == NULL) 469 return false; 463 470 // if pointer is existent. and only one resource of this type exists. 464 471 Resource* tmpResource = this->locateResourceByPointer(pointer); 465 if (tmpResource == NULL) 466 { 467 PRINTF(2)("Resource not Found %p\n", pointer); 468 return false; 469 } 470 else 472 if (tmpResource != NULL) 471 473 return unload(tmpResource, prio); 474 else 475 { 476 PRINTF(2)("Resource not Found %p\n", pointer); 477 return false; 478 } 472 479 } 473 480
Note: See TracChangeset
for help on using the changeset viewer.