Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7207 in orxonox.OLD for branches/std/src/lib


Ignore:
Timestamp:
Mar 9, 2006, 11:35:50 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: evil was within

Location:
branches/std/src/lib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/std/src/lib/graphics/importer/md2Model.cc

    r7203 r7207  
    7979  this->setClassID(CL_MD2_MODEL, "MD2Model");
    8080  /* this creates the data container via ressource manager */
    81   this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
     81  if (!modelFileName.empty())
     82    this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
    8283  if( unlikely(this->data == NULL))
    8384    PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n");
  • branches/std/src/lib/graphics/text_engine/text.cc

    r7193 r7207  
    3232 * @param type The renderType to display this font in
    3333 */
    34 Text::Text(const char* fontFile, unsigned int textSize)
     34Text::Text(const std::string& fontFile, unsigned int textSize)
    3535{
    3636  this->init();
    3737
    38   if (fontFile != NULL)
     38  if (!fontFile.empty())
    3939    this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
    4040  this->setSizeY2D(textSize);
     
    7878 * @param fontSize the Size of the Font
    7979 */
    80 void Text::setFont(const char* fontFile, unsigned int fontSize)
     80void Text::setFont(const std::string& fontFile, unsigned int fontSize)
    8181{
    8282  Font* tmpFont;
     
    9090
    9191  // load a new Font
    92   if (fontFile != NULL)
     92  if (!fontFile.empty())
    9393  {
    9494    tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize);
     
    9696      this->font = tmpFont;
    9797    else
    98       PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
     98      PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str());
    9999  }
    100100}
  • branches/std/src/lib/graphics/text_engine/text.h

    r6981 r7207  
    3939{
    4040  public:
    41     Text(const char* fontFile = NULL, unsigned int fontSize = TEXT_DEFAULT_SIZE);
     41    Text(const std::string& fontFile = "", unsigned int fontSize = TEXT_DEFAULT_SIZE);
    4242    virtual ~Text();
    4343    void init();
    4444
    45     void setFont(const char* fontFile, unsigned int renderSize);
     45    void setFont(const std::string& fontFile, unsigned int renderSize);
    4646
    4747    void setText(const char* text, bool isExtern = false);
  • branches/std/src/lib/shell/shell_input.cc

    r6222 r7207  
    4141 * this also generates a ShellCompletion automatically.
    4242*/
    43 ShellInput::ShellInput () : Text ((const char*)NULL)
     43ShellInput::ShellInput () : Text ("")
    4444{
    4545  this->pressedKey = SDLK_FIRST;
  • branches/std/src/lib/sound/sound_engine.cc

    r7203 r7207  
    117117   acctualy this is nothing more than a wrapper around the ResourceManager.
    118118*/
    119 SoundSource* SoundEngine::createSource(const char* fileName, PNode* sourceNode)
     119SoundSource* SoundEngine::createSource(const std::string& fileName, PNode* sourceNode)
    120120{
    121121  return new SoundSource(sourceNode, (SoundBuffer*)ResourceManager::getInstance()->load(fileName, WAV, RP_LEVEL));
  • branches/std/src/lib/sound/sound_engine.h

    r6849 r7207  
    3333    void loadSettings(IniParser* iniParser);
    3434
    35     SoundSource* createSource(const char* fileName, PNode* sourceNode = NULL);
     35    SoundSource* createSource(const std::string& fileName, PNode* sourceNode = NULL);
    3636
    3737    /** @param listener the listener in the scene */
  • branches/std/src/lib/util/loading/resource_manager.cc

    r7206 r7207  
    486486        {
    487487          tmpResource->param[0] = param0;
    488           tmpResource->pointer = new Shader(fullName, NULL);
     488          tmpResource->pointer = new Shader(fullName, "");
    489489        }
    490490      }
Note: See TracChangeset for help on using the changeset viewer.