Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7164 in orxonox.OLD


Ignore:
Timestamp:
Feb 18, 2006, 5:32:35 PM (18 years ago)
Author:
bensch
Message:

deleted unused stuff

Location:
trunk/src/lib
Files:
2 deleted
6 edited

Legend:

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

    r7163 r7164  
    1919                lang/class_list.h \
    2020                util/substring.h \
    21                 util/array.h \
    22                 util/list.h \
    23                 util/t_stack.h \
     21                util/multi_type.h \
    2422                util/color.h \
    2523                util/helper_functions.h \
    26                 util/multi_type.h \
    2724                util/executor/executor.h \
    2825                util/executor/executor_specials.h \
    2926                util/executor/functor_list.h \
    3027                util/count_pointer.h \
     28                util/list.h \
    3129                coord/p_node.h \
    3230                data/data_tank.h \
  • trunk/src/lib/event/event_handler.cc

    r6990 r7164  
    2626#include "class_list.h"
    2727
    28 #include "t_stack.h"
    29 
    3028using namespace std;
    3129
     
    5149  this->state = ES_GAME;
    5250  this->keyMapper = NULL;
    53   this->stateStack = NULL;
    5451  this->eventsGrabbed = false;
    5552}
     
    7875    }
    7976  }
    80   delete this->stateStack;
    8177  delete this->keyMapper;
    8278
     
    9995    this->keyMapper->loadKeyBindings(iniParser);
    10096  }
    101   if (this->stateStack == NULL)
    102     this->stateStack = new tStack<short>;
    10397}
    10498
     
    109103void EventHandler::pushState(elState state)
    110104{
    111   if (likely(state != ES_NULL && state != ES_ALL && this->stateStack != NULL))
    112   {
    113     this->stateStack->push(this->state);
     105  if (likely(state != ES_NULL && state != ES_ALL ))
     106  {
     107    this->stateStack.push(this->state);
    114108    this->setState(state);
    115109  }
     
    126120elState EventHandler::popState()
    127121{
    128   if (unlikely(this->stateStack == NULL))
    129     return ES_NULL;
    130   elState state = (elState)this->stateStack->pop();
     122  elState state =  (elState)stateStack.top();
     123  this->stateStack.pop();
    131124  if (state == ES_NULL)
    132125  {
  • trunk/src/lib/event/event_handler.h

    r6054 r7164  
    1111#include "key_mapper.h"
    1212#include "event_def.h"
     13#include <stack>
    1314
    1415// FORWARD DECLARATION
    1516class EventListener;
    16 template<class T> class tStack;
    1717class IniParser;
    1818
     
    5959  EventListener*             listeners[ES_NUMBER][EV_NUMBER]; //!< a list of registered listeners.
    6060  elState                    state;                           //!< the state of the event handlder.
    61   tStack<short>*             stateStack;                      //!< a stack for the States we are in.
     61  std::stack<short>          stateStack;                      //!< a stack for the States we are in.
    6262  KeyMapper*                 keyMapper;                       //!< reference to the key mapper.
    6363
  • trunk/src/lib/graphics/shader.cc

    r6645 r7164  
    2222#include <stdio.h>
    2323#include "debug.h"
    24 #include "array.h"
    2524
    2625#include "resource_manager.h"
     
    126125
    127126
    128   tArray<char*>* program = fileReadArray(fileName);
    129   if (program == NULL)
    130     return false;
     127  std::vector<char*>* program = fileReadArray(fileName);
    131128
    132129  if (type == SHADER_VERTEX && GLEW_ARB_vertex_shader)
     
    149146  {
    150147    GLint status = 0;
    151     glShaderSourceARB(shader, program->getCount(), (const char**)program->getArray(), NULL);
     148    glShaderSourceARB(shader, program->size(), (const char**)&(*program)[0], NULL);
    152149    glCompileShaderARB(shader);
    153150    // checking on error.
     
    158155      glAttachObjectARB(this->shaderProgram, shader);
    159156  }
    160   for (unsigned int i=0; i< program->getCount(); i++)
    161     delete[] program->getArray()[i];
     157  for (unsigned int i=0; i< program->size(); i++)
     158    delete[] (*program)[i];
    162159  delete program;
    163160}
     
    190187
    191188
    192 tArray<char*>* Shader::fileReadArray(const char* fileName)
     189std::vector<char*>* Shader::fileReadArray(const char* fileName)
    193190{
    194191  FILE*    stream;           //< The stream we use to read the file.
     
    199196    return NULL;
    200197  }
    201   tArray<char*>* file = new tArray<char*>;
     198  std::vector<char*>* file = new std::vector<char*>;
    202199
    203200  char lineBuffer[PARSELINELENGHT];
     
    207204    addString = new char[strlen(lineBuffer)+1];
    208205    strcpy(addString, lineBuffer);
    209     file->addEntry(addString);
     206    file->push_back(addString);
    210207  }
    211208  fclose(stream);
    212   file->finalizeArray();
    213209  return file;
    214210}
  • trunk/src/lib/graphics/shader.h

    r5390 r7164  
    99#include "base_object.h"
    1010#include "glincl.h"
     11#include <vector>
    1112
    12 template<class T> class tArray;
    1313
    1414typedef enum
     
    3838
    3939  char* fileRead(const char* fileName);
    40   tArray<char*>* fileReadArray(const char* fileName);
     40  std::vector<char*>* fileReadArray(const char* fileName);
    4141
    4242  static bool checkShaderAbility();
  • trunk/src/lib/lang/class_list.cc

    r7163 r7164  
    182182ClassList* ClassList::getClassList(ClassID classID)
    183183{
    184   std::vector<ClassList>::iterator classIT = std::find (ClassList::classList->begin(), ClassList::classList->end(), classID);
     184  std::vector<ClassList>::iterator classIT =
     185       std::find (ClassList::classList->begin(), ClassList::classList->end(), classID);
    185186  return (likely(classIT != classList->end()))? &(*classIT) : NULL;
    186187}
Note: See TracChangeset for help on using the changeset viewer.