Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7428 in orxonox.OLD


Ignore:
Timestamp:
Apr 29, 2006, 12:13:38 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: move the Pollution of the ShellCommand to some other File

Location:
trunk/src
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/Makefile.am

    r7151 r7428  
    2929                $(WorldEntities_SOURCES_) \
    3030                $(StoryEntities_SOURCES_) \
     31                lib/shell/some_shell_commands.cc \
    3132                orxonox.cc \
    3233                \
  • trunk/src/lib/coord/p_node.cc

    r7221 r7428  
    2929
    3030#include "synchronizeable.h"
    31 
    32 #include "shell_command.h"
    33 SHELL_COMMAND(debugNode, PNode, debugNodeSC);
    3431
    3532using namespace std;
  • trunk/src/lib/graphics/graphics_engine.cc

    r7370 r7428  
    571571  //  LightManager::getInstance()->draw();
    572572
    573   GraphicsEngine::storeMatrices();
    574   Shader::suspendShader();
    575 
    576   Render2D::getInstance()->draw(E2D_LAYER_ALL);
    577   Shader::restoreShader();
    578 
    579573  if (this->graphicsEffects != NULL)
    580574  {
     
    584578      dynamic_cast<GraphicsEffect*>(*it)->draw();
    585579  }
     580  GraphicsEngine::storeMatrices();
     581  Shader::suspendShader();
     582
     583  Render2D::getInstance()->draw(E2D_LAYER_ALL);
     584  Shader::restoreShader();
    586585}
    587586
  • trunk/src/lib/graphics/text_engine/font.cc

    r7221 r7428  
    2929#include "stdlibincl.h"
    3030#include "compiler.h"
    31 
    3231using namespace std;
    3332
  • trunk/src/lib/graphics/text_engine/font.h

    r7221 r7428  
    7474    inline TTF_Font* getTTF() const { return this->fontTTF; };
    7575
    76 
    7776    /** @returns the default Font */
    7877    inline static Font* getDefaultFont() { if (Font::defaultFont == NULL) initDefaultFont(); return Font::defaultFont; };
  • trunk/src/lib/graphics/text_engine/text_engine.cc

    r7193 r7428  
    3737
    3838#include "debug.h"
    39 
    4039///////////////////
    4140/// TEXT-ENGINE ///
     
    104103/**
    105104 *  function to disable TTF_fonts
    106 */
     105 */
    107106void TextEngine::disableFonts()
    108107{
  • trunk/src/lib/lang/class_list.cc

    r7403 r7428  
    2222#include "debug.h"
    2323#include <string.h>
    24 #include <math.h>
     24#include <cmath>
    2525#include <algorithm>
    26 #include "shell_command.h"
    27 
    2826using namespace std;
    29 
    30 #ifndef NO_SHELL_COMMAND
    31 SHELL_COMMAND_STATIC(debug, ClassList, ClassList::debugS)
    32     ->describe("Shows all registered classes, if param1: is a valid ClassName only values of this class are shown. param2: how much output")
    33     ->defaultValues(MT_NULL, 1);
    34 #endif
    3527
    3628/**
     
    353345    {
    354346      lenCount = 1;
    355       while (pow(10, lenCount) <= (*cl).objectList.size())
     347      while (std::pow((float)10, (int)lenCount) <= (*cl).objectList.size())
    356348        ++lenCount;
    357349      for (int i=0; i < 30-(*cl).className.size() - lenCount; i++)
  • trunk/src/lib/shell/Makefile.am

    r7374 r7428  
    2222                shell_completion.h \
    2323                shell_completion_plugin.h
     24
     25EXTRA_DIST = some_shell_commands.cc
  • trunk/src/lib/shell/some_shell_commands.cc

    r7426 r7428  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
    1515
     16/*!
     17 * @file some_shell_commands.cc
     18 * @brief All the ShellCommands, that should not pollute the SourceCode.
     19 */
     20
    1621//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1722
    18 #include "proto_class.h"
    19 
    20 using namespace std;
     23#include "shell/shell_command.h"
     24using namespace OrxShell;
    2125
    2226
    23 /**
    24  * standard constructor
    25  * @todo this constructor is not jet implemented - do it
    26 */
    27 ProtoClass::ProtoClass ()
    28 {
    29    this->setClassID(CL_PROTO_ID, "ProtoClass");
    3027
    31    /* If you make a new class, what is most probably the case when you write this file
    32       don't forget to:
    33        1. Add the new file new_class.cc to the ./src/Makefile.am
    34        2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
     28#include "class_list.h"
     29  SHELL_COMMAND_STATIC(debug, ClassList, ClassList::debugS)
     30      ->describe("Shows all registered classes, if param1: is a valid ClassName only values of this class are shown. param2: how much output")
     31      ->defaultValues(MT_NULL, 1);
    3532
    36       Advanced Topics:
    37       - if you want to let your object be managed via the ObjectManager make sure to read
    38         the object_manager.h header comments. You will use this most certanly only if you
    39         make many objects of your class, like a weapon bullet.
    40    */
    41 }
     33#include "p_node.h"
     34  SHELL_COMMAND(debugNode, PNode, debugNodeSC);
     35  SHELL_COMMAND(setPosition, PNode, setAbsCoor);
    4236
    4337
    44 /**
    45  * standard deconstructor
    46 */
    47 ProtoClass::~ProtoClass ()
    48 {
    49   // delete what has to be deleted here
    50 }
     38#include "material.h"
     39  SHELL_COMMAND(setDiffuseTexture, Material, setDiffuseMap)
     40      ->defaultValues(MT_NULL, (int)GL_TEXTURE_2D)
     41      ->completionPlugin(0, CompletorFileSystem());
     42
Note: See TracChangeset for help on using the changeset viewer.