/*****************************************************************************
 * $LastChangedDate: 2009-11-22 22:39:11 -0500 (Sun, 22 Nov 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Initialize/start module.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#define SKY_MODULE_CC 1
#include "base/module.hh"
#include "base/module_macros.hh"
using namespace base;
#include "world/module.hh"
using namespace world;
#include "sky/module.hh"
#include "sky/conf.hh"

namespace sky {

/*****************************************************************************
 * Initialize module.
 *****************************************************************************/
void
Init( const base::InitArgs& initArgs )
{
    MODULE_INIT_LOAD_CONF_TXT( sky )
}

/*****************************************************************************
 * Start module.
 *****************************************************************************/
void
Start( void )
{
    // Start Sky objects.
    // This isn't a good way to disable the Sky
    // because if GET_SKY() is ever called outside the Sky module,
    // then disabling won't really work.
    if ( SKY_CONF.mSkyEnabled )
        GET_SKY().Make();  // don't call instance if not enabled
}

} // namespace sky
