Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5143 in orxonox.OLD


Ignore:
Timestamp:
Aug 27, 2005, 12:32:41 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: minor cleanup

Location:
trunk/src
Files:
12 edited

Legend:

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

    r5142 r5143  
    3232#define FUNCTOR_MAX_ARGUMENTS                5
    3333
    34 typedef enum ParameterType
     34typedef enum
    3535{
    3636  ParameterNull,
     
    4343  ParameterLong,
    4444  /* ... */
    45 };
     45} ParameterType;
    4646
    4747
  • trunk/src/lib/event/event.h

    r5093 r5143  
    1111
    1212#include "base_object.h"
    13 #include "event_def.h"
    1413#include "sdlincl.h"
    15 
    1614
    1715//! An abstract event class
  • trunk/src/lib/event/event_listener.h

    r5039 r5143  
    1 /*! 
     1/*!
    22 * @file event_listener.h
    33  *  Definition of an event listener base class
     
    1010#include "base_object.h"
    1111#include "event.h"
    12 #include "event_def.h"
    13 
    1412
    1513//! A class for event listener
  • trunk/src/lib/physics/physics_interface.h

    r5039 r5143  
    77#define _PHYSICS_INTERFACE_H
    88
     9#include "base_object.h"
     10
    911#include "vector.h"
    10 #include "base_object.h"
    1112
    1213#ifndef NULL
  • trunk/src/util/shell_command.cc

    r5142 r5143  
    4848    paramCount = FUNCTOR_MAX_ARGUMENTS;
    4949  this->paramCount = paramCount;
    50   this->parameters = new ParameterType[paramCount];
     50  this->parameters = new long[paramCount];
    5151
    5252  for (unsigned int i = 0; i < paramCount; i++)
     
    146146          commandBegin++;
    147147        if (strncmp (commandBegin, elem->getName(), strlen(elem->getName())))
    148             continue;
     148          continue;
    149149        objectPointer = ClassList::getList(elem->classID)->firstElement();
    150150      }
    151151      else
    152152      {
     153        while(*commandBegin == ' ')
     154          commandBegin++;
     155        tIterator<BaseObject>* iterBO = ClassList::getList(elem->classID)->getIterator();
     156        BaseObject* enumBO = iterBO->firstElement();
     157        {
     158          if( !strncmp(commandBegin, enumBO->getName(), strlen(enumBO->getName())))
     159          {
     160            objectPointer = enumBO;
     161            break;
     162          }
     163          enumBO = iterBO->nextElement();
     164        }
     165        delete iterBO;
    153166
     167        if (objectPointer == NULL)
     168          break;
     169        commandBegin = commandBegin + strlen(objectPointer->getName());
     170        while(*commandBegin == ' ')
     171          commandBegin++;
    154172      }
    155173      const char* commandEnd = strchr(commandBegin, ' ');
    156174      if (commandEnd == NULL)
    157         commandEnd = executionString + strlen(executionString);
     175        commandEnd = commandBegin + strlen(commandBegin);
    158176
    159177      if (objectPointer != NULL)
     178      {
    160179        elem->executeCommand(objectPointer, commandEnd);
    161       delete iterator;
    162       return true;
     180        delete iterator;
     181        return true;
     182      }
    163183    }
    164184    elem = iterator->nextElement();
  • trunk/src/util/shell_command.h

    r5142 r5143  
    1010
    1111#include "helper_functions.h"
     12#include "functor_list.h"
    1213
    1314#include <stdarg.h>
     
    1516#define MAX_SHELL_COMMAND_SIZE
    1617
    17 #include "functor_list.h"
    1818
    1919
     
    9494    void*                            functionPointer;     //!< The pointeer to the function of the Class (or static pointer if ClassID == CL_NULL )
    9595    unsigned int                     paramCount;          //!< the count of parameters
    96     ParameterType*                   parameters;          //!< Parameters
     96    long*                            parameters;          //!< Parameters
    9797    bool                             isSingleton;         //!< if the Class is Singleton @todo autocheck
    9898
  • trunk/src/world_entities/environment.cc

    r5054 r5143  
    1818
    1919#include "environment.h"
    20 #include "stdincl.h"
    21 #include "world_entity.h"
     20
     21#include "resource_manager.h"
     22
    2223#include "vector.h"
    2324#include "objModel.h"
  • trunk/src/world_entities/player.cc

    r5064 r5143  
    1818#include "player.h"
    1919
     20#include "shell_command.h"
    2021#include "track_manager.h"
    2122#include "objModel.h"
     
    114115
    115116
     117  ShellCommand<Player>::registerCommand("init", CL_PLAYER, &Player::init);
    116118  //this->weaponMan->addWeapon(turret, 3, 0);
    117119
  • trunk/src/world_entities/terrain.cc

    r4998 r5143  
    2323#include "factory.h"
    2424#include "load_param.h"
    25 
     25#include "resource_manager.h"
    2626#include "spatial_separation.h"
    2727
  • trunk/src/world_entities/weapons/weapon.cc

    r5041 r5143  
    2323#include "projectile.h"
    2424
     25#include "resource_manager.h"
    2526#include "class_list.h"
    2627#include "load_param.h"
  • trunk/src/world_entities/world_entity.cc

    r5066 r5143  
    1919
    2020#include "world_entity.h"
     21
     22#include "resource_manager.h"
     23#include "load_param.h"
    2124#include "list.h"
    2225#include "vector.h"
  • trunk/src/world_entities/world_entity.h

    r5061 r5143  
    88
    99#include "p_node.h"
    10 #include "resource_manager.h"
     10
    1111#include "factory.h"
    12 #include "load_param.h"
    13 #include "bv_tree.h"
    1412#include "model.h"
    1513
     
    2018class SoundBuffer;
    2119class SoundSource;
     20class BVTree;
    2221
    2322
     
    5049
    5150  /** @returns a reference to the obb tree of this worldentity */
    52   BVTree* getOBBTree() { return this->obbTree; }
     51  BVTree* getOBBTree() { return this->obbTree; };
    5352
    5453  virtual void postSpawn ();
Note: See TracChangeset for help on using the changeset viewer.