Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 24, 2009, 4:25:33 PM (15 years ago)
Author:
rgrieder
Message:

Expanded Core class by loadGraphics and unloadGraphics which don't do anything at the moment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource/src/core/Core.cc

    r3323 r3343  
    6868#include "CoreIncludes.h"
    6969#include "Factory.h"
     70#include "GameMode.h"
    7071#include "Identifier.h"
    7172#include "Language.h"
     
    230231
    231232    Core::Core(const std::string& cmdLine)
     233        : bGraphicsLoaded_(false)
    232234    {
    233235        if (singletonRef_s != 0)
     
    315317        // Destroy command line arguments
    316318        CommandLine::destroyAllArguments();
    317         // Also delete external console command that don't belong to an Identifier
     319        // Also delete external console commands that don't belong to an Identifier
    318320        CommandExecutor::destroyExternalCommands();
    319321        // Clean up class hierarchy stuff (identifiers, XMLPort, configValues, consoleCommand)
     
    323325
    324326        // Don't assign singletonRef_s with NULL! Recreation is not supported
     327    }
     328
     329    void Core::loadGraphics()
     330    {
     331        if (bGraphicsLoaded_)
     332            return;
     333
     334        GameMode::setShowsGraphics(true);
     335        bGraphicsLoaded_ = true;
     336    }
     337
     338    void Core::unloadGraphics()
     339    {
     340        if (!bGraphicsLoaded_)
     341            return;
     342
     343        bGraphicsLoaded_ = false;
     344        GameMode::setShowsGraphics(false);
    325345    }
    326346
Note: See TracChangeset for help on using the changeset viewer.