Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7393 in orxonox.OLD


Ignore:
Timestamp:
Apr 27, 2006, 1:05:17 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: ClassList better, and some shell-commands

Location:
trunk/src
Files:
4 edited

Legend:

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

    r7391 r7393  
    132132  CL_GAME_WORLD                 =    0x00101000,
    133133  CL_GAME_WORLD_DATA            =    0x00102000,
     134  CL_GAME_RULES                 =    0x00104000,
    134135
    135136  CL_CAMPAIGN                   =    0x00000101,
     
    142143  CL_MULTI_PLAYER_WORLD_DATA    =    0x00000108,
    143144  CL_MOVIE_LOADER               =    0x00000109,
    144   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
    146   CL_SINGLEPLAYER_SHOOTEMUP     =    0x00000112,          ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild
    147   CL_MISSION_GOAL               =    0x00000113,          ///HACK: this is no story entity: it is a CL_BASE_OBJECT, bensch: to rebuild
     145
     146  CL_MULTIPLAYER_TEAM_DEATHMATCH=    0x00000111,
     147  CL_SINGLEPLAYER_SHOOTEMUP     =    0x00000112,
     148
     149  CL_MISSION_GOAL               =    0x00000113,
    148150
    149151  /// SUPER-PNodes
  • trunk/src/lib/shell/shell_completion.cc

    r7389 r7393  
    112112      this->objectComplete(completeString, classID);
    113113    if (completeType & FunctionCompletion)
    114       this->functionComplete(completeString, inputSplits.getString(0));
     114      this->commandComplete(completeString, inputSplits.getString(0));
    115115    if (completeType & AliasCompletion)
    116116      this->aliasComplete(completeString);
     
    144144
    145145  /**
    146    * @brief completes a Function
    147    * @param functionBegin the beginning of the function String
     146   * @brief completes a Command
     147   * @param commandBegin the beginning of the function String
    148148   * @param classID the class' ID to complete the function of
    149149   */
    150   bool ShellCompletion::functionComplete(const std::string& functionBegin, const std::string& className)
     150  bool ShellCompletion::commandComplete(const std::string& commandBegin, const std::string& className)
    151151  {
    152152    std::list<std::string> fktList;
    153153    ShellCommandClass::getCommandListOfClass(className, fktList);
    154154    //printf("%s\n", boList->firstElement()->getName());
    155     if (!this->addToCompleteList(fktList, functionBegin, FunctionCompletion))
     155    if (!this->addToCompleteList(fktList, commandBegin, FunctionCompletion))
    156156      return false;
    157157    return true;
  • trunk/src/lib/shell/shell_completion.h

    r7388 r7393  
    4848    bool objectComplete(const std::string& objectBegin, long classID);
    4949    //  bool objectMatch(const char* objectBegin, long classID, unsigned int* length);
    50     bool functionComplete(const std::string& functionBegin, const std::string& className);
     50    bool commandComplete(const std::string& commandBegin, const std::string& className);
    5151    //  bool functionMatch(const char* functionBegin, long classID, unsigned int* length);
    5252    bool aliasComplete(const std::string& aliasBegin);
    5353
     54    // Generally Completes.
    5455    bool generalComplete(std::string& input,
    5556                         const std::string& begin, const std::string& displayAs = "%s",
     
    6061    bool addToCompleteList(const std::list<BaseObject*>& inputList, const std::string& completionBegin, ShellCompletion::CompletionType type);
    6162
    62     void clearCompletionList();
    6363
    6464    // Helpers.
     65    void clearCompletionList();
    6566    static const std::string& ShellCompletion::typeToString(ShellCompletion::CompletionType type);
    6667
  • trunk/src/lib/shell/shell_input.h

    r7374 r7393  
    4545    void removeCharacters(unsigned int characterCount = 1);
    4646    void setRepeatDelay(float repeatDelay, float repeatRate);
     47
    4748    bool executeCommand();
    4849
Note: See TracChangeset for help on using the changeset viewer.