Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7193 in orxonox.OLD for trunk


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
Files:
112 edited
2 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/defs/class_id.h

    r7167 r7193  
    8484  CL_WORLD_ENTITY               =    0x40000000,
    8585
    86   CL_GRAPHICS_EFFECT            =    0x80000000,
    87 
     86  CL_RESOURCE                   =    0x80000000,
    8887
    8988  /// subsuper-classes
     
    143142  CL_MOVIE_LOADER               =    0x00000109,
    144143  CL_GAME_RULES                 =    0x00000110,          ///HACK: this is no story entity, bensch: to rebuild
    145   CL_MULTIPLAYER_TEAM_DEATHMATCH =   0x00000111,          ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild
     144  CL_MULTIPLAYER_TEAM_DEATHMATCH=    0x00000111,          ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild
    146145
    147146  /// SUPER-PNodes
     
    277276  CL_SHADER                     =    0x00000811,
    278277  CL_LIGHT                      =    0x00000821,
    279   CL_FOG_EFFECT                 =    0x00000841,
    280   CL_LENSE_FLARE                =    0x00000842,
    281   CL_EXPLOSION                  =    0x00000850,
    282   CL_LIGHTNING_BOLT             =    0x00000851,
    283 
    284     // Particles
    285   CL_PARTICLE_SYSTEM            =    0x00a01000,
    286   CL_DOT_PARTICLES              =    0x00a02000,
    287   CL_SPARK_PARTICLES            =    0x00a04000,
    288   CL_SPRITE_PARTICLES           =    0x00a08000,
    289   CL_MODEL_PARTICLES            =    0x00a10000,
     278
     279  CL_GRAPHICS_EFFECT            =    0x00a01000,
     280
     281  CL_FOG_EFFECT                 =    0x00000a10,
     282  CL_LENSE_FLARE                =    0x00000a12,
     283  CL_EXPLOSION                  =    0x00000a20,
     284  CL_LIGHTNING_BOLT             =    0x00000a21,
     285
     286
     287  // Particles
     288  CL_PARTICLE_SYSTEM            =    0x00a02000,
     289  CL_DOT_PARTICLES              =    0x00000aa1,
     290  CL_SPARK_PARTICLES            =    0x00000aa2,
     291  CL_SPRITE_PARTICLES           =    0x00000aa3,
     292  CL_MODEL_PARTICLES            =    0x00000aa4,
    290293  //  CL_PNODE_PARTICLES            =    0x00a20000,
    291294
    292 
    293   CL_PARTICLE_EMITTER           =    0x00a40000,
    294   CL_DOT_EMITTER                =    0x00000a21,
    295   CL_PLANE_EMITTER              =    0x00000a22,
    296   CL_BOX_EMITTER                =    0x00000a23,
    297   CL_SPHERE_EMITTER             =    0x00000a24,
     295  CL_PARTICLE_EMITTER           =    0x00a04000,
     296  CL_DOT_EMITTER                =    0x00000ab1,
     297  CL_PLANE_EMITTER              =    0x00000ab2,
     298  CL_BOX_EMITTER                =    0x00000ab3,
     299  CL_SPHERE_EMITTER             =    0x00000ab4,
    298300  //  CL_MODEL_EMITTER              =    0x00000a25,
    299301
  • trunk/src/defs/include_paths.am

    r5822 r7193  
    3333AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
    3434AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
    35 AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/loading
    3635AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/track
    3736AM_CXXFLAGS+=-I$(MAINSRCDIR)/subprojects
  • 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{
  • trunk/src/orxonox.cc

    r7167 r7193  
    3333
    3434#include "parser/ini_parser/ini_parser.h"
    35 #include "game_loader.h"
     35#include "util/loading/game_loader.h"
    3636
    3737//ENGINES
    3838#include "graphics_engine.h"
    3939#include "sound_engine.h"
    40 #include "resource_manager.h"
     40#include "util/loading/resource_manager.h"
    4141#include "cd_engine.h"
    4242#include "text_engine.h"
    4343#include "event_handler.h"
    4444
    45 #include "factory.h"
     45#include "util/loading/factory.h"
    4646#include "fast_factory.h"
    4747
     
    5353#include "shell_buffer.h"
    5454
    55 #include "load_param_description.h"
     55#include "util/loading/load_param_description.h"
    5656
    5757#include "network_manager.h"
     
    289289}
    290290
    291 #include "dynamic_loader.h"
     291#include "util/loading/dynamic_loader.h"
    292292
    293293/**
  • trunk/src/story_entities/campaign.cc

    r7032 r7193  
    1919#include "campaign.h"
    2020
    21 #include "factory.h"
    22 #include "load_param.h"
     21#include "util/loading/factory.h"
     22#include "util/loading/load_param.h"
    2323#include "state.h"
    2424
  • trunk/src/story_entities/campaign_data.cc

    r6874 r7193  
    1717#include "campaign_data.h"
    1818
    19 #include "factory.h"
    20 #include "load_param.h"
     19#include "util/loading/factory.h"
     20#include "util/loading/load_param.h"
    2121
    2222#include "story_entity.h"
  • trunk/src/story_entities/dedicated_server_world.cc

    r6512 r7193  
    2020#include "class_list.h"
    2121
    22 #include "load_param.h"
     22#include "util/loading/load_param.h"
    2323#include "fast_factory.h"
    24 #include "factory.h"
     24#include "util/loading/factory.h"
    2525
    2626#include "world_entity.h"
  • trunk/src/story_entities/game_world.cc

    r7132 r7193  
    2020#include "game_world_data.h"
    2121
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323#include "state.h"
    2424#include "class_list.h"
    2525#include "substring.h"
    2626
    27 #include "game_loader.h"
     27#include "util/loading/game_loader.h"
    2828
    2929#include "p_node.h"
     
    4242#include "light.h"
    4343
    44 #include "factory.h"
     44#include "util/loading/factory.h"
    4545#include "fast_factory.h"
    46 #include "load_param.h"
     46#include "util/loading/load_param.h"
    4747#include "shell_command.h"
    4848
  • trunk/src/story_entities/game_world_data.cc

    r7126 r7193  
    2121#include "game_world_data.h"
    2222
    23 #include "resource_manager.h"
     23#include "util/loading/resource_manager.h"
    2424#include "state.h"
    2525#include "class_list.h"
    2626#include "substring.h"
    2727
    28 #include "game_loader.h"
     28#include "util/loading/game_loader.h"
    2929
    3030#include "p_node.h"
     
    4444#include "light.h"
    4545
    46 #include "factory.h"
     46#include "util/loading/factory.h"
    4747#include "fast_factory.h"
    48 #include "load_param.h"
     48#include "util/loading/load_param.h"
    4949
    5050#include "graphics_engine.h"
  • trunk/src/story_entities/movie_loader.cc

    r7049 r7193  
    1717
    1818#include "movie_player.h"
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "event_handler.h"
    2121#include "graphics_engine.h"
    22 #include "load_param.h"
     22#include "util/loading/load_param.h"
    2323#include "state.h"
    2424
  • trunk/src/story_entities/multi_player_world.cc

    r6989 r7193  
    1919#include "multi_player_world_data.h"
    2020
    21 #include "factory.h"
    22 #include "load_param.h"
     21#include "util/loading/factory.h"
     22#include "util/loading/load_param.h"
    2323#include "shell_command.h"
    2424
  • trunk/src/story_entities/multi_player_world_data.cc

    r7097 r7193  
    1818#include "multi_player_world_data.h"
    1919
    20 #include "resource_manager.h"
     20#include "util/loading/resource_manager.h"
    2121#include "state.h"
    2222#include "class_list.h"
    2323#include "substring.h"
    2424
    25 #include "game_loader.h"
     25#include "util/loading/game_loader.h"
    2626#include "cd_engine.h"
    2727
     
    3939#include "playable.h"
    4040
    41 #include "factory.h"
     41#include "util/loading/factory.h"
    4242#include "fast_factory.h"
    43 #include "load_param.h"
     43#include "util/loading/load_param.h"
    4444
    4545#include "network_manager.h"
  • trunk/src/story_entities/simple_game_menu.cc

    r7131 r7193  
    2222#include "class_list.h"
    2323
    24 #include "load_param.h"
     24#include "util/loading/load_param.h"
    2525#include "fast_factory.h"
    26 #include "factory.h"
     26#include "util/loading/factory.h"
    2727
    2828#include "p_node.h"
  • trunk/src/story_entities/single_player_world.cc

    r6989 r7193  
    2222#include "class_list.h"
    2323
    24 #include "load_param.h"
     24#include "util/loading/load_param.h"
    2525#include "fast_factory.h"
    26 #include "factory.h"
     26#include "util/loading/factory.h"
    2727
    2828#include "world_entity.h"
  • trunk/src/story_entities/single_player_world_data.cc

    r6424 r7193  
    1818#include "single_player_world_data.h"
    1919
    20 #include "load_param.h"
     20#include "util/loading/load_param.h"
    2121
    2222
  • trunk/src/story_entities/story_entity.cc

    r7033 r7193  
    2222#include "story_entity.h"
    2323
    24 #include "resource_manager.h"
    25 #include "load_param.h"
     24#include "util/loading/resource_manager.h"
     25#include "util/loading/load_param.h"
    2626
    2727
  • trunk/src/subprojects/collision_detection/collision_test_entity.cc

    r7157 r7193  
    1818#include "collision_test_entity.h"
    1919
    20 #include "resource_manager.h"
     20#include "util/loading/resource_manager.h"
    2121
    2222#include "vector.h"
    2323#include "objModel.h"
    2424#include "obb_tree.h"
    25 #include "factory.h"
     25#include "util/loading/factory.h"
    2626
    2727using namespace std;
  • trunk/src/subprojects/framework.cc

    r7159 r7193  
    2121#include "debug.h"
    2222#include "light.h"
    23 #include "resource_manager.h"
     23#include "util/loading/resource_manager.h"
    2424#include "camera.h"
    2525#include "parser/ini_parser/ini_parser.h"
  • trunk/src/subprojects/importer/importer.cc

    r7165 r7193  
    2727#include "vertex_array_model.h"
    2828
    29 #include "resource_manager.h"
     29#include "util/loading/resource_manager.h"
    3030
    3131Model* obj;
  • trunk/src/subprojects/particles/particle_fun.cc

    r5348 r7193  
    2424#include "graphics_engine.h"
    2525#include "light.h"
    26 #include "resource_manager.h"
     26#include "util/loading/resource_manager.h"
    2727
    2828#include <dirent.h>
  • trunk/src/util/Makefile.am

    r7167 r7193  
    1414                        animation/animation.cc \
    1515                        animation/animation_player.cc \
    16                         \
    17                         loading/resource_manager.cc \
    18                         loading/game_loader.cc \
    19                         loading/load_param.cc \
    20                         loading/load_param_description.cc \
    21                         loading/factory.cc \
    22                         loading/dynamic_loader.cc \
    2316                        \
    2417                        track/pilot_node.cc \
     
    3831                        animation/t_animation.h \
    3932                        \
    40                         loading/resource_manager.h \
    41                         loading/game_loader.h \
    42                         loading/load_param.h \
    43                         loading/load_param_description.h \
    44                         loading/factory.h \
    45                         loading/dynamic_loader.h \
    46                         \
    4733                        track/pilot_node.h \
    4834                        track/track_manager.h \
  • trunk/src/util/game_rules.cc

    r7035 r7193  
    1717#include "game_rules.h"
    1818
    19 #include "load_param.h"
     19#include "util/loading/load_param.h"
    2020
    2121
  • trunk/src/util/multiplayer_team_deathmatch.cc

    r7118 r7193  
    1717#include "multiplayer_team_deathmatch.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 "render2D/billboard.h"
  • trunk/src/util/track/track_manager.cc

    r7130 r7193  
    1919
    2020#include "base_object.h"
    21 #include "load_param.h"
     21#include "util/loading/load_param.h"
    2222#include "p_node.h"
    2323#include "track_node.h"
  • trunk/src/world_entities/creatures/md2_creature.cc

    r7078 r7193  
    2222#include "objModel.h"
    2323#include "md2Model.h"
    24 #include "resource_manager.h"
     24#include "util/loading/resource_manager.h"
    2525#include "state.h"
    2626
     
    3030#include "weapons/cannon.h"
    3131
    32 #include "factory.h"
     32#include "util/loading/factory.h"
    3333#include "key_mapper.h"
    3434#include "event_handler.h"
  • trunk/src/world_entities/effects/lightning_bolt.cc

    r7113 r7193  
    1717#include "lightning_bolt.h"
    1818
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "material.h"
    2121
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323
    2424
  • trunk/src/world_entities/elements/image_entity.cc

    r7016 r7193  
    1818#include "image_entity.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
    2323#include "graphics_engine.h"
  • trunk/src/world_entities/elements/text_element.cc

    r7021 r7193  
    1818#include "text_element.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
    2323#include "graphics_engine.h"
  • trunk/src/world_entities/environment.cc

    r6512 r7193  
    2020#include "environment.h"
    2121
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323
    2424#include "vector.h"
    2525#include "objModel.h"
    2626#include "obb_tree.h"
    27 #include "factory.h"
     27#include "util/loading/factory.h"
    2828
    2929using namespace std;
  • trunk/src/world_entities/environments/building.cc

    r7041 r7193  
    1818#include "building.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/world_entities/environments/model_entity.cc

    r7048 r7193  
    1818#include "model_entity.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/world_entities/environments/water.cc

    r7126 r7193  
    1717
    1818#include "water.h"
    19 #include "factory.h"
    20 #include "load_param.h"
     19#include "util/loading/factory.h"
     20#include "util/loading/load_param.h"
    2121
    2222#include "grid.h"
    2323#include "material.h"
    2424
    25 #include "resource_manager.h"
     25#include "util/loading/resource_manager.h"
    2626#include "shader.h"
    2727
  • trunk/src/world_entities/movie_entity.cc

    r7115 r7193  
    1717
    1818#include "media_container.h"
    19 #include "load_param.h"
    20 #include "factory.h"
     19#include "util/loading/load_param.h"
     20#include "util/loading/factory.h"
    2121
    2222using namespace std;
  • trunk/src/world_entities/npcs/ground_turret.cc

    r7105 r7193  
    2323
    2424
    25 #include "factory.h"
     25#include "util/loading/factory.h"
    2626#include "network_game_manager.h"
    27 #include "load_param.h"
     27#include "util/loading/load_param.h"
    2828
    2929#include "effects/explosion.h"
  • trunk/src/world_entities/planet.cc

    r6912 r7193  
    1818#include "planet.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 "static_model.h"
    2323
  • trunk/src/world_entities/playable.cc

    r7173 r7193  
    2121#include "player.h"
    2222#include "state.h"
    23 #include "load_param.h"
     23#include "util/loading/load_param.h"
    2424
    2525#include "world_entities/projectiles/projectile.h"
  • trunk/src/world_entities/power_ups/laser_power_up.cc

    r6815 r7193  
    1717
    1818#include "laser_power_up.h"
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "state.h"
    2121#include "network_game_manager.h"
  • trunk/src/world_entities/power_ups/param_power_up.cc

    r7130 r7193  
    1717
    1818#include "param_power_up.h"
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "state.h"
    2121
    2222#include "primitive_model.h"
    2323
    24 #include "factory.h"
    25 #include "load_param.h"
     24#include "util/loading/factory.h"
     25#include "util/loading/load_param.h"
    2626#include "network_game_manager.h"
    2727
  • trunk/src/world_entities/power_ups/power_up.cc

    r7103 r7193  
    2121#include "primitive_model.h"
    2222
    23 #include "resource_manager.h"
    24 #include "load_param.h"
     23#include "util/loading/resource_manager.h"
     24#include "util/loading/load_param.h"
    2525
    2626using namespace std;
  • trunk/src/world_entities/power_ups/turret_power_up.cc

    r7065 r7193  
    1717
    1818#include "turret_power_up.h"
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "network_game_manager.h"
    2121#include "state.h"
  • trunk/src/world_entities/power_ups/weapon_power_up.cc

    r7130 r7193  
    1717
    1818#include "weapon_power_up.h"
    19 #include "factory.h"
     19#include "util/loading/factory.h"
    2020#include "state.h"
    2121#include "network_game_manager.h"
     
    2323#include "primitive_model.h"
    2424
    25 #include "factory.h"
    26 #include "load_param.h"
     25#include "util/loading/factory.h"
     26#include "util/loading/load_param.h"
    2727
    2828using namespace std;
  • trunk/src/world_entities/projectiles/bomb.cc

    r7084 r7193  
    1919#include "model.h"
    2020#include "primitive_model.h"
    21 
    22 #include "fast_factory.h"
    23 
    24 
    25 #include "object_manager.h"
    2621
    2722#include "dot_emitter.h"
  • trunk/src/world_entities/projectiles/guided_missile.cc

    r7102 r7193  
    1717
    1818#include "guided_missile.h"
    19 
    20 #include "fast_factory.h"
    2119
    2220#include "state.h"
  • trunk/src/world_entities/projectiles/hyperblast.cc

    r7086 r7193  
    1717
    1818#include "hyperblast.h"
    19 
    20 #include "fast_factory.h"
    2119
    2220#include "state.h"
  • trunk/src/world_entities/projectiles/laser.cc

    r7086 r7193  
    1717
    1818#include "laser.h"
    19 #include <assert.h>
    20 
    21 
    22 #include "fast_factory.h"
     19#include <cassert>
    2320
    2421#include "state.h"
  • trunk/src/world_entities/projectiles/projectile.cc

    r7084 r7193  
    2222#include "world_entities/weapons/weapon.h"
    2323#include "model.h"
    24 #include "resource_manager.h"
     24#include "util/loading/resource_manager.h"
    2525
    2626using namespace std;
  • trunk/src/world_entities/projectiles/projectile.h

    r7084 r7193  
    1111
    1212#include "world_entity.h"
     13#include "fast_factory.h"
    1314
    1415#include "sound_source.h"
  • trunk/src/world_entities/projectiles/rocket.cc

    r7086 r7193  
    1717
    1818#include "rocket.h"
    19 
    20 #include "fast_factory.h"
    2119
    2220#include "state.h"
  • trunk/src/world_entities/projectiles/test_bullet.cc

    r6825 r7193  
    1818#include "test_bullet.h"
    1919
    20 #include "fast_factory.h"
    21 
    2220#include "state.h"
    2321#include "class_list.h"
     
    2523#include "dot_emitter.h"
    2624#include "sprite_particles.h"
    27 
    2825
    2926using namespace std;
  • trunk/src/world_entities/recorder.cc

    r6731 r7193  
    1616#include "recorder.h"
    1717
    18 #include "load_param.h"
    19 #include "factory.h"
    20 #include "resource_manager.h"
     18#include "util/loading/load_param.h"
     19#include "util/loading/factory.h"
     20#include "util/loading/resource_manager.h"
    2121#include "state.h"
    2222
  • trunk/src/world_entities/satellite.h

    r5994 r7193  
    99#include "world_entity.h"
    1010#include "comincl.h"
    11 #include "resource_manager.h"
     11#include "util/loading/resource_manager.h"
    1212
    1313
  • trunk/src/world_entities/skybox.cc

    r7125 r7193  
    1818#include "skybox.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 "static_model.h"
    2323
     
    2727#include "network_game_manager.h"
    2828#include "converter.h"
    29 #include "resource_manager.h"
     29#include "util/loading/resource_manager.h"
    3030
    3131
  • trunk/src/world_entities/space_ships/helicopter.cc

    r7096 r7193  
    2424#include "weapons/cannon.h"
    2525
    26 #include "factory.h"
     26#include "util/loading/factory.h"
    2727#include "key_mapper.h"
    2828#include "event_handler.h"
  • trunk/src/world_entities/space_ships/hover.cc

    r7072 r7193  
    2424#include "weapons/cannon.h"
    2525
    26 #include "factory.h"
     26#include "util/loading/factory.h"
    2727#include "key_mapper.h"
    2828#include "event_handler.h"
  • trunk/src/world_entities/space_ships/space_ship.cc

    r7173 r7193  
    2020#include "space_ship.h"
    2121
    22 #include "resource_manager.h"
     22#include "util/loading/resource_manager.h"
    2323
    2424#include "weapons/test_gun.h"
     
    2929#include "sprite_particles.h"
    3030
    31 #include "factory.h"
     31#include "util/loading/factory.h"
    3232#include "key_mapper.h"
    3333#include "event_handler.h"
     
    4545#include "player.h"
    4646
    47 #include "load_param.h"
     47#include "util/loading/load_param.h"
    4848
    4949
  • trunk/src/world_entities/space_ships/turbine_hover.cc

    r7126 r7193  
    2424#include "weapons/cannon.h"
    2525
    26 #include "factory.h"
     26#include "util/loading/factory.h"
    2727#include "key_mapper.h"
    2828#include "event_handler.h"
  • trunk/src/world_entities/spawning_point.cc

    r6512 r7193  
    1717#include "spawning_point.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 "compiler.h"
  • trunk/src/world_entities/terrain.cc

    r7055 r7193  
    1818#include "terrain.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 "spatial_separation.h"
    2323
    24 #include "resource_manager.h"
     24#include "util/loading/resource_manager.h"
    2525#include "model.h"
    2626#include "network_game_manager.h"
     
    186186  {
    187187    PRINTF(4)("fetching %s\n", vegetationFile);
    188     this->vegetation = (Model*)ResourceManager::getInstance()->load(vegetationFile, OBJ, RP_CAMPAIGN);
     188    this->vegetation = dynamic_cast<Model*>(ResourceManager::getInstance()->load(vegetationFile, OBJ, RP_CAMPAIGN));
    189189  }
    190190  else
  • trunk/src/world_entities/test_entity.cc

    r7113 r7193  
    1919
    2020#include "executor/executor.h"
    21 #include "factory.h"
    22 #include "load_param.h"
     21#include "util/loading/factory.h"
     22#include "util/loading/load_param.h"
    2323
    2424#include "test_entity.h"
  • trunk/src/world_entities/weapons/aim.cc

    r6760 r7193  
    1818#include "aim.h"
    1919
    20 #include "load_param.h"
     20#include "util/loading/load_param.h"
    2121#include "graphics_engine.h"
    2222#include "state.h"
  • trunk/src/world_entities/weapons/aiming_turret.cc

    r7070 r7193  
    2525#include "animation3d.h"
    2626
    27 #include "factory.h"
     27#include "util/loading/factory.h"
    2828
    2929CREATE_FACTORY(AimingTurret, CL_AIMING_TURRET);
  • trunk/src/world_entities/weapons/cannon.cc

    r7130 r7193  
    2727#include "world_entities/projectiles/projectile.h"
    2828#include "weapon_manager.h"
    29 #include "factory.h"
     29#include "util/loading/factory.h"
    3030
    3131#include "vector.h"
  • trunk/src/world_entities/weapons/crosshair.cc

    r6990 r7193  
    1919#include "event_handler.h"
    2020
    21 #include "load_param.h"
     21#include "util/loading/load_param.h"
    2222#include "graphics_engine.h"
    2323#include "glincl.h"
  • trunk/src/world_entities/weapons/hyperblaster.cc

    r7130 r7193  
    2727#include "world_entities/projectiles/projectile.h"
    2828#include "weapon_manager.h"
    29 #include "factory.h"
     29#include "util/loading/factory.h"
    3030
    3131#include "animation3d.h"
  • trunk/src/world_entities/weapons/targeting_turret.cc

    r7081 r7193  
    2525#include "animation3d.h"
    2626
    27 #include "factory.h"
     27#include "util/loading/factory.h"
    2828
    2929CREATE_FACTORY(TargetingTurret, CL_TARGETING_TURRET);
  • trunk/src/world_entities/weapons/test_gun.cc

    r7095 r7193  
    2727#include "static_model.h"
    2828#include "weapon_manager.h"
    29 #include "factory.h"
     29#include "util/loading/factory.h"
    3030
    3131#include "animation3d.h"
  • trunk/src/world_entities/weapons/turret.cc

    r7070 r7193  
    2525#include "animation3d.h"
    2626
    27 #include "factory.h"
     27#include "util/loading/factory.h"
    2828
    2929CREATE_FACTORY(Turret, CL_TURRET);
  • trunk/src/world_entities/weapons/weapon.cc

    r7126 r7193  
    2424#include "world_entities/projectiles/projectile.h"
    2525
    26 #include "resource_manager.h"
     26#include "util/loading/resource_manager.h"
    2727#include "class_list.h"
    28 #include "load_param.h"
     28#include "util/loading/load_param.h"
    2929#include "state.h"
    3030#include "animation3d.h"
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6972 r7193  
    2525#include "playable.h"
    2626
    27 #include "load_param.h"
    28 #include "factory.h"
     27#include "util/loading/load_param.h"
     28#include "util/loading/factory.h"
    2929
    3030#include "t_animation.h"
  • trunk/src/world_entities/world_entity.cc

    r7125 r7193  
    2222#include "model.h"
    2323#include "md2Model.h"
    24 #include "resource_manager.h"
    25 #include "load_param.h"
     24#include "util/loading/resource_manager.h"
     25#include "util/loading/load_param.h"
    2626#include "vector.h"
    2727#include "obb_tree.h"
     
    8686  if (this->healthWidget != NULL)
    8787    delete this->healthWidget;
    88 
    8988}
    9089
     
    147146    if (this->scaling <= 0.0)
    148147    {
     148      PRINTF(1)("YOU GAVE ME A CRAPY SCALE resetting to 1.0\n");
    149149      this->scaling = 1.0;
    150       PRINTF(1)("YOU GAVE ME A CRAPY SCALE resetting to 1\n");
    151150    }
    152151    if(strstr(fileName, ".obj"))
    153152    {
    154153      PRINTF(4)("fetching OBJ file: %s\n", fileName);
    155       if (this->scaling == 1.0)
    156         this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN), modelNumber);
    157       else
    158         this->setModel((Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, this->scaling), modelNumber);
     154      BaseObject* loadedModel = ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, this->scaling);
     155      if (loadedModel != NULL)
     156        this->setModel(dynamic_cast<Model*>(loadedModel), modelNumber);
    159157
    160158      if( modelNumber == 0)
     
    190188  if (this->models[modelNumber] != NULL)
    191189  {
    192     Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(this->models[modelNumber]);
     190    Resource* resource = ResourceManager::getInstance()->locateResourceByPointer(dynamic_cast<BaseObject*>(this->models[modelNumber]));
    193191    if (resource != NULL)
    194192      ResourceManager::getInstance()->unload(resource, RP_LEVEL);
Note: See TracChangeset for help on using the changeset viewer.