Changeset 7193 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Mar 7, 2006, 5:05:50 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 43 edited
- 2 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/Makefile.am
r7165 r7193 16 16 util/executor/executor.cc \ 17 17 \ 18 util/loading/resource_manager.cc \ 19 util/loading/resource.cc \ 20 util/loading/game_loader.cc \ 21 util/loading/load_param.cc \ 22 util/loading/load_param_description.cc \ 23 util/loading/factory.cc \ 24 util/loading/dynamic_loader.cc \ 25 \ 18 26 data/data_tank.cc 19 27 … … 31 39 util/executor/executor_specials.h \ 32 40 util/executor/functor_list.h \ 41 \ 42 util/loading/resource_manager.h \ 43 util/loading/resource.h \ 44 util/loading/game_loader.h \ 45 util/loading/load_param.h \ 46 util/loading/load_param_description.h \ 47 util/loading/factory.h \ 48 util/loading/dynamic_loader.h \ 49 \ 33 50 util/count_pointer.h \ 34 51 util/list.h \ 52 \ 35 53 \ 36 54 data/data_tank.h -
trunk/src/lib/coord/p_node.cc
r7192 r7193 18 18 #include "p_node.h" 19 19 20 #include " load_param.h"20 #include "util/loading/load_param.h" 21 21 #include "class_list.h" 22 22 -
trunk/src/lib/graphics/effects/fog_effect.cc
r7107 r7193 19 19 #include "fog_effect.h" 20 20 21 #include " load_param.h"22 #include " factory.h"21 #include "util/loading/load_param.h" 22 #include "util/loading/factory.h" 23 23 24 24 #include "glincl.h" -
trunk/src/lib/graphics/effects/graphics_effect.cc
r6981 r7193 20 20 #include "graphics_effect.h" 21 21 22 #include " load_param.h"22 #include "util/loading/load_param.h" 23 23 24 24 -
trunk/src/lib/graphics/effects/lense_flare.cc
r7015 r7193 19 19 #include "lense_flare.h" 20 20 21 #include " load_param.h"22 #include " factory.h"21 #include "util/loading/load_param.h" 22 #include "util/loading/factory.h" 23 23 24 24 #include "glincl.h" -
trunk/src/lib/graphics/graphics_engine.cc
r7108 r7193 17 17 18 18 #include "graphics_engine.h" 19 #include " resource_manager.h"19 #include "util/loading/resource_manager.h" 20 20 #include "event_handler.h" 21 21 #include "state.h" … … 44 44 45 45 #include "parser/tinyxml/tinyxml.h" 46 #include " load_param.h"47 #include " factory.h"46 #include "util/loading/load_param.h" 47 #include "util/loading/factory.h" 48 48 #include "class_list.h" 49 49 -
trunk/src/lib/graphics/importer/height_map.cc
r7014 r7193 20 20 #include "p_node.h" 21 21 #include "state.h" 22 #include " resource_manager.h"22 #include "util/loading/resource_manager.h" 23 23 #include "debug.h" 24 24 -
trunk/src/lib/graphics/importer/material.cc
r7057 r7193 21 21 #include "texture.h" 22 22 #include "debug.h" 23 #include " resource_manager.h"23 #include "util/loading/resource_manager.h" 24 24 #include <stdlib.h> 25 25 #include <string.h> 26 26 27 27 //! @todo check if we are in RESOURCE MANAGER-mode 28 #include " resource_manager.h"28 #include "util/loading/resource_manager.h" 29 29 30 30 using namespace std; -
trunk/src/lib/graphics/importer/md2Model.cc
r7123 r7193 19 19 20 20 #include "debug.h" 21 #include " resource_manager.h"21 #include "util/loading/resource_manager.h" 22 22 23 23 -
trunk/src/lib/graphics/importer/media_container.cc
r6877 r7193 25 25 #include "media_container.h" 26 26 27 #include " resource_manager.h"27 #include "util/loading/resource_manager.h" 28 28 29 29 /* header for debug output */ -
trunk/src/lib/graphics/importer/model.h
r7123 r7193 46 46 unsigned int numTexCoor; //!< how many Texture Coordinates in the Model 47 47 48 const float* pVertices; //!< array of the Verti ves48 const float* pVertices; //!< array of the Vertices 49 49 sTriangleExt* pTriangles; //!< array of all triangles 50 50 const float* pNormals; //!< array of the Normals … … 55 55 56 56 //! This class defines the basic components of a model 57 class Model : public BaseObject {57 class Model : virtual public BaseObject { 58 58 59 59 public: -
trunk/src/lib/graphics/importer/movie_player.cc
r6731 r7193 25 25 #include "movie_player.h" 26 26 27 #include " resource_manager.h"27 #include "util/loading/resource_manager.h" 28 28 29 29 // header for debug output -
trunk/src/lib/graphics/light.cc
r7109 r7193 23 23 #include "vector.h" 24 24 #include "parser/tinyxml/tinyxml.h" 25 #include " load_param.h"26 #include " factory.h"25 #include "util/loading/load_param.h" 26 #include "util/loading/factory.h" 27 27 #include "debug.h" 28 28 -
trunk/src/lib/graphics/render2D/billboard.cc
r6889 r7193 17 17 #include "billboard.h" 18 18 19 #include " load_param.h"20 #include " factory.h"19 #include "util/loading/load_param.h" 20 #include "util/loading/factory.h" 21 21 22 22 #include "graphics_engine.h" -
trunk/src/lib/graphics/render2D/element_2d.cc
r7052 r7193 24 24 25 25 #include "graphics_engine.h" 26 #include " load_param.h"26 #include "util/loading/load_param.h" 27 27 #include "class_list.h" 28 28 -
trunk/src/lib/graphics/shader.cc
r7164 r7193 23 23 #include "debug.h" 24 24 25 #include " resource_manager.h"25 #include "util/loading/resource_manager.h" 26 26 27 27 -
trunk/src/lib/graphics/text_engine/text.cc
r6645 r7193 20 20 21 21 #include "graphics_engine.h" 22 #include " resource_manager.h"22 #include "util/loading/resource_manager.h" 23 23 #include "class_list.h" 24 24 #include "debug.h" -
trunk/src/lib/graphics/text_engine/text_engine.cc
r6222 r7193 33 33 34 34 #include "graphics_engine.h" 35 #include " resource_manager.h"35 #include "util/loading/resource_manager.h" 36 36 #include "class_list.h" 37 37 -
trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc
r5750 r7193 22 22 #include "graphics_engine.h" 23 23 #include "material.h" 24 #include " factory.h"25 #include " load_param.h"24 #include "util/loading/factory.h" 25 #include "util/loading/load_param.h" 26 26 27 27 CREATE_FACTORY(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN); -
trunk/src/lib/gui/gtk_gui/gui_exec.cc
r5944 r7193 26 26 #include "gui_exec.h" 27 27 28 #include " resource_manager.h"28 #include "util/loading/resource_manager.h" 29 29 #include "parser/ini_parser/ini_parser.h" 30 30 -
trunk/src/lib/lang/base_object.cc
r7123 r7193 19 19 #include "base_object.h" 20 20 21 #include " load_param.h"21 #include "util/loading/load_param.h" 22 22 #include "compiler.h" 23 23 #include "class_list.h" -
trunk/src/lib/network/network_game_manager.cc
r7078 r7193 20 20 #define DEBUG_MODULE_NETWORK 21 21 22 #include " factory.h"22 #include "util/loading/factory.h" 23 23 #include "network_stream.h" 24 24 #include "converter.h" -
trunk/src/lib/particles/box_emitter.cc
r6826 r7193 20 20 #include "particle_system.h" 21 21 22 #include " load_param.h"23 #include " factory.h"22 #include "util/loading/load_param.h" 23 #include "util/loading/factory.h" 24 24 #include "debug.h" 25 25 #include "stdlibincl.h" -
trunk/src/lib/particles/dot_emitter.cc
r6825 r7193 20 20 #include "particle_system.h" 21 21 22 #include " load_param.h"23 #include " factory.h"22 #include "util/loading/load_param.h" 23 #include "util/loading/factory.h" 24 24 #include "debug.h" 25 25 #include "stdlibincl.h" -
trunk/src/lib/particles/dot_particles.cc
r6653 r7193 18 18 #include "dot_particles.h" 19 19 20 #include " load_param.h"21 #include " factory.h"20 #include "util/loading/load_param.h" 21 #include "util/loading/factory.h" 22 22 #include "material.h" 23 23 #include "state.h" -
trunk/src/lib/particles/engine/particle_engine.cc
r7130 r7193 22 22 #include "debug.h" 23 23 #include "stdlibincl.h" 24 #include " load_param.h"24 #include "util/loading/load_param.h" 25 25 26 26 using namespace std; -
trunk/src/lib/particles/model_particles.cc
r6653 r7193 18 18 #include "model_particles.h" 19 19 20 #include " load_param.h"21 #include " factory.h"20 #include "util/loading/load_param.h" 21 #include "util/loading/factory.h" 22 22 #include "material.h" 23 23 #include "state.h" -
trunk/src/lib/particles/particle_emitter.cc
r7027 r7193 20 20 #include "particle_system.h" 21 21 22 #include " load_param.h"22 #include "util/loading/load_param.h" 23 23 #include "debug.h" 24 24 #include "stdlibincl.h" -
trunk/src/lib/particles/particle_system.cc
r7027 r7193 23 23 #include "model.h" 24 24 25 #include " load_param.h"26 #include " factory.h"25 #include "util/loading/load_param.h" 26 #include "util/loading/factory.h" 27 27 #include "material.h" 28 28 #include "state.h" -
trunk/src/lib/particles/plane_emitter.cc
r6873 r7193 20 20 #include "particle_system.h" 21 21 22 #include " load_param.h"23 #include " factory.h"22 #include "util/loading/load_param.h" 23 #include "util/loading/factory.h" 24 24 #include "debug.h" 25 25 #include "stdlibincl.h" -
trunk/src/lib/particles/spark_particles.cc
r6821 r7193 18 18 #include "spark_particles.h" 19 19 20 #include " load_param.h"21 #include " factory.h"20 #include "util/loading/load_param.h" 21 #include "util/loading/factory.h" 22 22 #include "material.h" 23 23 #include "state.h" -
trunk/src/lib/particles/sprite_particles.cc
r7014 r7193 18 18 #include "sprite_particles.h" 19 19 20 #include " load_param.h"21 #include " factory.h"20 #include "util/loading/load_param.h" 21 #include "util/loading/factory.h" 22 22 #include "material.h" 23 23 #include "state.h" -
trunk/src/lib/physics/fields/field.cc
r6512 r7193 20 20 #include "physics_engine.h" 21 21 22 #include " factory.h"23 #include " load_param.h"22 #include "util/loading/factory.h" 23 #include "util/loading/load_param.h" 24 24 using namespace std; 25 25 -
trunk/src/lib/physics/fields/gravity.cc
r6512 r7193 18 18 #include "gravity.h" 19 19 20 #include " load_param.h"21 #include " factory.h"20 #include "util/loading/load_param.h" 21 #include "util/loading/factory.h" 22 22 23 23 using namespace std; -
trunk/src/lib/physics/physics_connection.cc
r6512 r7193 24 24 #include "physics_interface.h" 25 25 26 #include " factory.h"27 #include " load_param.h"26 #include "util/loading/factory.h" 27 #include "util/loading/load_param.h" 28 28 29 29 using namespace std; -
trunk/src/lib/physics/physics_engine.cc
r7130 r7193 20 20 #include "class_list.h" 21 21 #include "parser/tinyxml/tinyxml.h" 22 #include " factory.h"23 #include " load_param.h"22 #include "util/loading/factory.h" 23 #include "util/loading/load_param.h" 24 24 25 25 using namespace std; -
trunk/src/lib/sound/sound_engine.cc
r6858 r7193 24 24 25 25 #include "p_node.h" 26 #include " resource_manager.h"26 #include "util/loading/resource_manager.h" 27 27 #include "debug.h" 28 28 #include "parser/ini_parser/ini_parser.h" -
trunk/src/lib/util/loading/dynamic_loader.h
r7167 r7193 7 7 #define _DYNAMIC_LOADER_H 8 8 9 #include " factory.h"9 #include "util/loading/factory.h" 10 10 11 11 #include <string> -
trunk/src/lib/util/loading/factory.cc
r6341 r7193 15 15 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING 16 16 17 #include " factory.h"17 #include "util/loading/factory.h" 18 18 19 19 //#include "shell_command.h" -
trunk/src/lib/util/loading/game_loader.cc
r6862 r7193 19 19 20 20 #include "game_loader.h" 21 #include " load_param.h"21 #include "util/loading/load_param.h" 22 22 23 23 #include "shell_command.h" 24 24 #include "campaign.h" 25 25 26 #include " resource_manager.h"26 #include "util/loading/resource_manager.h" 27 27 28 28 #include "event_handler.h" -
trunk/src/lib/util/loading/load_param.cc
r7130 r7193 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING 17 17 18 #include " load_param.h"18 #include "util/loading/load_param.h" 19 19 #include "load_param_description.h" 20 20 -
trunk/src/lib/util/loading/resource.cc
r7192 r7193 16 16 //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ 17 17 18 #include " proto_class.h"18 #include "resource.h" 19 19 20 20 using namespace std; … … 25 25 * @todo this constructor is not jet implemented - do it 26 26 */ 27 ProtoClass::ProtoClass()27 Resource::Resource () 28 28 { 29 this->setClassID(CL_ PROTO_ID, "ProtoClass");29 this->setClassID(CL_RESOURCE, "Resource"); 30 30 31 31 /* If you make a new class, what is most probably the case when you write this file … … 45 45 * standard deconstructor 46 46 */ 47 ProtoClass::~ProtoClass()47 Resource::~Resource () 48 48 { 49 49 // delete what has to be deleted here -
trunk/src/lib/util/loading/resource.h
r7192 r7193 1 1 /*! 2 * @file proto_class.h2 * @file resource.h 3 3 * @brief Definition of ... 4 4 */ 5 5 6 #ifndef _ PROTO_CLASS_H7 #define _ PROTO_CLASS_H6 #ifndef _RESOURCE_H 7 #define _RESOURCE_H 8 8 9 9 #include "base_object.h" 10 #include "multi_type.h" 11 10 12 11 13 // FORWARD DECLARATION … … 14 16 15 17 //! A class for ... 16 class ProtoClass :public BaseObject {18 class Resource : virtual public BaseObject { 17 19 18 20 public: 19 ProtoClass();20 virtual ~ ProtoClass();21 Resource(); 22 virtual ~Resource(); 21 23 24 virtual bool load(const char* fileName, const MultiType& param1, const MultiType& param2); 25 virtual bool reload(); 26 virtual bool unload(); 22 27 23 28 private: … … 25 30 }; 26 31 27 #endif /* _ PROTO_CLASS_H */32 #endif /* _RESOURCE_H */ -
trunk/src/lib/util/loading/resource_manager.cc
r7059 r7193 16 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD 17 17 18 #include " resource_manager.h"18 #include "util/loading/resource_manager.h" 19 19 20 20 #include "substring.h" … … 592 592 if (resource->count == 0) 593 593 { 594 // deleting the Resource 595 switch(resource->type) 596 { 597 #ifndef NO_MODEL 598 case OBJ: 599 case PRIM: 600 delete (Model*)resource->pointer; 601 break; 602 case MD2: 603 delete (MD2Data*)resource->pointer; 604 break; 605 #endif /* NO_MODEL */ 606 #ifndef NO_AUDIO 607 case WAV: 608 delete (SoundBuffer*)resource->pointer; 609 break; 610 case OGG: 611 delete (OggPlayer*)resource->pointer; 612 break; 613 #endif /* NO_AUDIO */ 614 #ifndef NO_TEXT 615 case TTF: 616 delete (Font*)resource->pointer; 617 break; 618 #endif /* NO_TEXT */ 619 #ifndef NO_TEXTURES 620 case IMAGE: 621 delete (Texture*)resource->pointer; 622 break; 623 #endif /* NO_TEXTURES */ 624 #ifndef NO_SHADERS 625 case SHADER: 626 delete (Shader*)resource->pointer; 627 break; 628 #endif /* NO_SHADERS */ 629 default: 630 PRINTF(2)("NOT YET IMPLEMENTED !!FIX FIX!!\n"); 631 return false; 632 break; 633 } 594 delete resource->pointer; 634 595 // deleting the List Entry: 635 596 PRINTF(4)("Resource %s safely removed.\n", resource->name); -
trunk/src/lib/util/loading/resource_manager.h
r6651 r7193 65 65 }; 66 66 67 //! A Struct that keeps track about Aresource its name its Type, and so on67 //! A Struct that keeps track about a resource its name its Type, and so on 68 68 struct Resource 69 69 {
Note: See TracChangeset
for help on using the changeset viewer.