Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


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/world_entities
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • 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.