Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7193 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Mar 7, 2006, 5:05:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new style for resources (prework/movement)

Location:
trunk/src/lib
Files:
43 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/Makefile.am

    r7165 r7193  
    1616                util/executor/executor.cc \
    1717                \
     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                \
    1826                data/data_tank.cc
    1927
     
    3139                util/executor/executor_specials.h \
    3240                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                \
    3350                util/count_pointer.h \
    3451                util/list.h \
     52                \
    3553                \
    3654                data/data_tank.h
  • trunk/src/lib/coord/p_node.cc

    r7192 r7193  
    1818#include "p_node.h"
    1919
    20 #include "load_param.h"
     20#include "util/loading/load_param.h"
    2121#include "class_list.h"
    2222
  • trunk/src/lib/graphics/effects/fog_effect.cc

    r7107 r7193  
    1919#include "fog_effect.h"
    2020
    21 #include "load_param.h"
    22 #include "factory.h"
     21#include "util/loading/load_param.h"
     22#include "util/loading/factory.h"
    2323
    2424#include "glincl.h"
  • trunk/src/lib/graphics/effects/graphics_effect.cc

    r6981 r7193  
    2020#include "graphics_effect.h"
    2121
    22 #include "load_param.h"
     22#include "util/loading/load_param.h"
    2323
    2424
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r7015 r7193  
    1919#include "lense_flare.h"
    2020
    21 #include "load_param.h"
    22 #include "factory.h"
     21#include "util/loading/load_param.h"
     22#include "util/loading/factory.h"
    2323
    2424#include "glincl.h"
  • trunk/src/lib/graphics/graphics_engine.cc

    r7108 r7193  
    1717
    1818#include "graphics_engine.h"
    19 #include "resource_manager.h"
     19#include "util/loading/resource_manager.h"
    2020#include "event_handler.h"
    2121#include "state.h"
     
    4444
    4545#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"
    4848#include "class_list.h"
    4949
  • trunk/src/lib/graphics/importer/height_map.cc

    r7014 r7193  
    2020#include "p_node.h"
    2121#include "state.h"
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323#include "debug.h"
    2424
  • trunk/src/lib/graphics/importer/material.cc

    r7057 r7193  
    2121#include "texture.h"
    2222#include "debug.h"
    23 #include "resource_manager.h"
     23#include "util/loading/resource_manager.h"
    2424#include <stdlib.h>
    2525#include <string.h>
    2626
    2727//! @todo check if we are in RESOURCE MANAGER-mode
    28 #include "resource_manager.h"
     28#include "util/loading/resource_manager.h"
    2929
    3030using namespace std;
  • trunk/src/lib/graphics/importer/md2Model.cc

    r7123 r7193  
    1919
    2020#include "debug.h"
    21 #include "resource_manager.h"
     21#include "util/loading/resource_manager.h"
    2222
    2323
  • trunk/src/lib/graphics/importer/media_container.cc

    r6877 r7193  
    2525#include "media_container.h"
    2626
    27 #include "resource_manager.h"
     27#include "util/loading/resource_manager.h"
    2828
    2929/* header for debug output */
  • trunk/src/lib/graphics/importer/model.h

    r7123 r7193  
    4646  unsigned int     numTexCoor;           //!< how many Texture Coordinates in the Model
    4747
    48   const float*     pVertices;            //!< array of the Vertives
     48  const float*     pVertices;            //!< array of the Vertices
    4949  sTriangleExt*    pTriangles;           //!< array of all triangles
    5050  const float*     pNormals;             //!< array of the Normals
     
    5555
    5656//! This class defines the basic components of a model
    57 class Model : public BaseObject {
     57class Model : virtual public BaseObject {
    5858
    5959  public:
  • trunk/src/lib/graphics/importer/movie_player.cc

    r6731 r7193  
    2525#include "movie_player.h"
    2626
    27 #include "resource_manager.h"
     27#include "util/loading/resource_manager.h"
    2828
    2929// header for debug output
  • trunk/src/lib/graphics/light.cc

    r7109 r7193  
    2323#include "vector.h"
    2424#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"
    2727#include "debug.h"
    2828
  • trunk/src/lib/graphics/render2D/billboard.cc

    r6889 r7193  
    1717#include "billboard.h"
    1818
    19 #include "load_param.h"
    20 #include "factory.h"
     19#include "util/loading/load_param.h"
     20#include "util/loading/factory.h"
    2121
    2222#include "graphics_engine.h"
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r7052 r7193  
    2424
    2525#include "graphics_engine.h"
    26 #include "load_param.h"
     26#include "util/loading/load_param.h"
    2727#include "class_list.h"
    2828
  • trunk/src/lib/graphics/shader.cc

    r7164 r7193  
    2323#include "debug.h"
    2424
    25 #include "resource_manager.h"
     25#include "util/loading/resource_manager.h"
    2626
    2727
  • trunk/src/lib/graphics/text_engine/text.cc

    r6645 r7193  
    2020
    2121#include "graphics_engine.h"
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323#include "class_list.h"
    2424#include "debug.h"
  • trunk/src/lib/graphics/text_engine/text_engine.cc

    r6222 r7193  
    3333
    3434#include "graphics_engine.h"
    35 #include "resource_manager.h"
     35#include "util/loading/resource_manager.h"
    3636#include "class_list.h"
    3737
  • trunk/src/lib/gui/gl_gui/glmenu/glmenu_imagescreen.cc

    r5750 r7193  
    2222#include "graphics_engine.h"
    2323#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"
    2626
    2727CREATE_FACTORY(GLMenuImageScreen, CL_GLMENU_IMAGE_SCREEN);
  • trunk/src/lib/gui/gtk_gui/gui_exec.cc

    r5944 r7193  
    2626#include "gui_exec.h"
    2727
    28 #include "resource_manager.h"
     28#include "util/loading/resource_manager.h"
    2929#include "parser/ini_parser/ini_parser.h"
    3030
  • trunk/src/lib/lang/base_object.cc

    r7123 r7193  
    1919#include "base_object.h"
    2020
    21 #include "load_param.h"
     21#include "util/loading/load_param.h"
    2222#include "compiler.h"
    2323#include "class_list.h"
  • trunk/src/lib/network/network_game_manager.cc

    r7078 r7193  
    2020#define DEBUG_MODULE_NETWORK
    2121
    22 #include "factory.h"
     22#include "util/loading/factory.h"
    2323#include "network_stream.h"
    2424#include "converter.h"
  • trunk/src/lib/particles/box_emitter.cc

    r6826 r7193  
    2020#include "particle_system.h"
    2121
    22 #include "load_param.h"
    23 #include "factory.h"
     22#include "util/loading/load_param.h"
     23#include "util/loading/factory.h"
    2424#include "debug.h"
    2525#include "stdlibincl.h"
  • trunk/src/lib/particles/dot_emitter.cc

    r6825 r7193  
    2020#include "particle_system.h"
    2121
    22 #include "load_param.h"
    23 #include "factory.h"
     22#include "util/loading/load_param.h"
     23#include "util/loading/factory.h"
    2424#include "debug.h"
    2525#include "stdlibincl.h"
  • trunk/src/lib/particles/dot_particles.cc

    r6653 r7193  
    1818#include "dot_particles.h"
    1919
    20 #include "load_param.h"
    21 #include "factory.h"
     20#include "util/loading/load_param.h"
     21#include "util/loading/factory.h"
    2222#include "material.h"
    2323#include "state.h"
  • trunk/src/lib/particles/engine/particle_engine.cc

    r7130 r7193  
    2222#include "debug.h"
    2323#include "stdlibincl.h"
    24 #include "load_param.h"
     24#include "util/loading/load_param.h"
    2525
    2626using namespace std;
  • trunk/src/lib/particles/model_particles.cc

    r6653 r7193  
    1818#include "model_particles.h"
    1919
    20 #include "load_param.h"
    21 #include "factory.h"
     20#include "util/loading/load_param.h"
     21#include "util/loading/factory.h"
    2222#include "material.h"
    2323#include "state.h"
  • trunk/src/lib/particles/particle_emitter.cc

    r7027 r7193  
    2020#include "particle_system.h"
    2121
    22 #include "load_param.h"
     22#include "util/loading/load_param.h"
    2323#include "debug.h"
    2424#include "stdlibincl.h"
  • trunk/src/lib/particles/particle_system.cc

    r7027 r7193  
    2323#include "model.h"
    2424
    25 #include "load_param.h"
    26 #include "factory.h"
     25#include "util/loading/load_param.h"
     26#include "util/loading/factory.h"
    2727#include "material.h"
    2828#include "state.h"
  • trunk/src/lib/particles/plane_emitter.cc

    r6873 r7193  
    2020#include "particle_system.h"
    2121
    22 #include "load_param.h"
    23 #include "factory.h"
     22#include "util/loading/load_param.h"
     23#include "util/loading/factory.h"
    2424#include "debug.h"
    2525#include "stdlibincl.h"
  • trunk/src/lib/particles/spark_particles.cc

    r6821 r7193  
    1818#include "spark_particles.h"
    1919
    20 #include "load_param.h"
    21 #include "factory.h"
     20#include "util/loading/load_param.h"
     21#include "util/loading/factory.h"
    2222#include "material.h"
    2323#include "state.h"
  • trunk/src/lib/particles/sprite_particles.cc

    r7014 r7193  
    1818#include "sprite_particles.h"
    1919
    20 #include "load_param.h"
    21 #include "factory.h"
     20#include "util/loading/load_param.h"
     21#include "util/loading/factory.h"
    2222#include "material.h"
    2323#include "state.h"
  • trunk/src/lib/physics/fields/field.cc

    r6512 r7193  
    2020#include "physics_engine.h"
    2121
    22 #include "factory.h"
    23 #include "load_param.h"
     22#include "util/loading/factory.h"
     23#include "util/loading/load_param.h"
    2424using namespace std;
    2525
  • trunk/src/lib/physics/fields/gravity.cc

    r6512 r7193  
    1818#include "gravity.h"
    1919
    20 #include "load_param.h"
    21 #include "factory.h"
     20#include "util/loading/load_param.h"
     21#include "util/loading/factory.h"
    2222
    2323using namespace std;
  • trunk/src/lib/physics/physics_connection.cc

    r6512 r7193  
    2424#include "physics_interface.h"
    2525
    26 #include "factory.h"
    27 #include "load_param.h"
     26#include "util/loading/factory.h"
     27#include "util/loading/load_param.h"
    2828
    2929using namespace std;
  • trunk/src/lib/physics/physics_engine.cc

    r7130 r7193  
    2020#include "class_list.h"
    2121#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"
    2424
    2525using namespace std;
  • trunk/src/lib/sound/sound_engine.cc

    r6858 r7193  
    2424
    2525#include "p_node.h"
    26 #include "resource_manager.h"
     26#include "util/loading/resource_manager.h"
    2727#include "debug.h"
    2828#include "parser/ini_parser/ini_parser.h"
  • trunk/src/lib/util/loading/dynamic_loader.h

    r7167 r7193  
    77#define _DYNAMIC_LOADER_H
    88
    9 #include "factory.h"
     9#include "util/loading/factory.h"
    1010
    1111#include <string>
  • trunk/src/lib/util/loading/factory.cc

    r6341 r7193  
    1515#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING
    1616
    17 #include "factory.h"
     17#include "util/loading/factory.h"
    1818
    1919//#include "shell_command.h"
  • trunk/src/lib/util/loading/game_loader.cc

    r6862 r7193  
    1919
    2020#include "game_loader.h"
    21 #include "load_param.h"
     21#include "util/loading/load_param.h"
    2222
    2323#include "shell_command.h"
    2424#include "campaign.h"
    2525
    26 #include "resource_manager.h"
     26#include "util/loading/resource_manager.h"
    2727
    2828#include "event_handler.h"
  • trunk/src/lib/util/loading/load_param.cc

    r7130 r7193  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING
    1717
    18 #include "load_param.h"
     18#include "util/loading/load_param.h"
    1919#include "load_param_description.h"
    2020
  • trunk/src/lib/util/loading/resource.cc

    r7192 r7193  
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "resource.h"
    1919
    2020using namespace std;
     
    2525 * @todo this constructor is not jet implemented - do it
    2626*/
    27 ProtoClass::ProtoClass ()
     27Resource::Resource ()
    2828{
    29    this->setClassID(CL_PROTO_ID, "ProtoClass");
     29   this->setClassID(CL_RESOURCE, "Resource");
    3030
    3131   /* If you make a new class, what is most probably the case when you write this file
     
    4545 * standard deconstructor
    4646*/
    47 ProtoClass::~ProtoClass ()
     47Resource::~Resource ()
    4848{
    4949  // delete what has to be deleted here
  • trunk/src/lib/util/loading/resource.h

    r7192 r7193  
    11/*!
    2  * @file proto_class.h
     2 * @file resource.h
    33 * @brief Definition of ...
    44*/
    55
    6 #ifndef _PROTO_CLASS_H
    7 #define _PROTO_CLASS_H
     6#ifndef _RESOURCE_H
     7#define _RESOURCE_H
    88
    99#include "base_object.h"
     10#include "multi_type.h"
     11
    1012
    1113// FORWARD DECLARATION
     
    1416
    1517//! A class for ...
    16 class ProtoClass : public BaseObject {
     18class Resource : virtual public BaseObject {
    1719
    1820 public:
    19   ProtoClass();
    20   virtual ~ProtoClass();
     21  Resource();
     22  virtual ~Resource();
    2123
     24  virtual bool load(const char* fileName, const MultiType& param1, const MultiType& param2);
     25  virtual bool reload();
     26  virtual bool unload();
    2227
    2328 private:
     
    2530};
    2631
    27 #endif /* _PROTO_CLASS_H */
     32#endif /* _RESOURCE_H */
  • trunk/src/lib/util/loading/resource_manager.cc

    r7059 r7193  
    1616#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
    1717
    18 #include "resource_manager.h"
     18#include "util/loading/resource_manager.h"
    1919
    2020#include "substring.h"
     
    592592    if (resource->count == 0)
    593593    {
    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;
    634595      // deleting the List Entry:
    635596      PRINTF(4)("Resource %s safely removed.\n", resource->name);
  • trunk/src/lib/util/loading/resource_manager.h

    r6651 r7193  
    6565};
    6666
    67 //! A Struct that keeps track about A resource its name its Type, and so on
     67//! A Struct that keeps track about a resource its name its Type, and so on
    6868struct Resource
    6969{
Note: See TracChangeset for help on using the changeset viewer.