Moved file manager to io subdir, made irrlicht compilation default,

started removing #ifdefs HAVE_IRRLICHT.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3239 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-03-12 03:49:31 +00:00
parent d0f22f1d78
commit 8a60edf241
33 changed files with 68 additions and 223 deletions

View File

@ -91,6 +91,8 @@ supertuxkart_SOURCES = \
graphics/skid_marks.hpp \
graphics/smoke.cpp \
graphics/smoke.hpp \
io/file_manager.cpp \
io/file_manager.hpp \
io/xml_node.cpp \
io/xml_node.hpp \
io/xml_reader.cpp \
@ -150,8 +152,6 @@ supertuxkart_SOURCES = \
highscores.hpp \
highscore_manager.cpp \
highscore_manager.hpp \
file_manager.cpp \
file_manager.hpp \
loader.cpp \
loader.hpp \
race_manager.cpp \

View File

@ -31,10 +31,10 @@
# include <AL/alc.h>
#endif
#include "audio/sfx_openal.hpp"
#include "user_config.hpp"
#include "file_manager.hpp"
#include "race_manager.hpp"
#include "user_config.hpp"
#include "audio/sfx_openal.hpp"
#include "io/file_manager.hpp"
SFXManager* sfx_manager= NULL;

View File

@ -34,8 +34,8 @@
#include <SDL/SDL.h>
#include <SDL/SDL_endian.h>
#include "file_manager.hpp"
#include "user_config.hpp"
#include "io/file_manager.hpp"
SFXOpenAL::SFXOpenAL(ALuint buffer, bool positional, float rolloff, float gain) : SFXBase()
{

View File

@ -31,9 +31,9 @@
#endif
#include "user_config.hpp"
#include "file_manager.hpp"
#include "audio/music_ogg.hpp"
#include "audio/sfx_openal.hpp"
#include "io/file_manager.hpp"
#include "utils/string_utils.hpp"
SoundManager* sound_manager= NULL;

View File

@ -24,9 +24,9 @@
#include <stdio.h>
#include "race_manager.hpp"
#include "file_manager.hpp"
#include "user_config.hpp"
#include "challenges/challenge_data.hpp"
#include "io/file_manager.hpp"
#include "utils/string_utils.hpp"
UnlockManager* unlock_manager=0;

View File

@ -20,8 +20,8 @@
#include <iostream>
#include <stdexcept>
#include "file_manager.hpp"
#include "grand_prix_data.hpp"
#include "io/file_manager.hpp"
#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#include "tracks/track_manager.hpp"

View File

@ -21,7 +21,7 @@
#include <set>
#include "file_manager.hpp"
#include "io/file_manager.hpp"
#include "utils/string_utils.hpp"
GrandPrixManager *grand_prix_manager = NULL;

View File

@ -22,7 +22,7 @@
using namespace core;
#include "user_config.hpp"
#include "file_manager.hpp"
#include "io/file_manager.hpp"
IrrDriver *irr_driver = NULL;

View File

@ -17,18 +17,15 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "credits_menu.hpp"
#include "gui/credits_menu.hpp"
#include <fstream>
#include <stdexcept>
#include <iostream>
#if defined(WIN32) && !defined(__CYGWIN__)
# define strdup _strdup
#endif
#include "file_manager.hpp"
#include "gui/menu_manager.hpp"
#include "gui/widget_manager.hpp"
#include "io/file_manager.hpp"
#include "utils/translation.hpp"
enum WidgetTokens

View File

@ -19,9 +19,9 @@
#include <vector>
#include "file_manager.hpp"
#include "user_config.hpp"
#include "gui/font.hpp"
#include "io/file_manager.hpp"
#include "utils/string_utils.hpp"
Font* font_gui;

View File

@ -23,8 +23,8 @@
#include <sstream>
#include "race_manager.hpp"
#include "file_manager.hpp"
#include "user_config.hpp"
#include "io/file_manager.hpp"
#include "lisp/parser.hpp"
#include "lisp/writer.hpp"
#include "utils/string_utils.hpp"

View File

@ -13,27 +13,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "enet", "enet.vcproj", "{B0E
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
irrlicht-debug|Win32 = irrlicht-debug|Win32
debug|Win32 = debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Debug|Win32.ActiveCfg = Debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Debug|Win32.Build.0 = Debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.irrlicht-debug|Win32.ActiveCfg = irrlicht-debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.irrlicht-debug|Win32.Build.0 = irrlicht-debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.debug|Win32.ActiveCfg = Debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.debug|Win32.Build.0 = Debug|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Release|Win32.ActiveCfg = Release|Win32
{B1BC2764-1A43-4800-A654-788B0D05EDA2}.Release|Win32.Build.0 = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Debug|Win32.ActiveCfg = Debug|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Debug|Win32.Build.0 = Debug|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.irrlicht-debug|Win32.ActiveCfg = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.irrlicht-debug|Win32.Build.0 = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.debug|Win32.ActiveCfg = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.debug|Win32.Build.0 = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Release|Win32.ActiveCfg = Release|Win32
{54AA44B9-B07B-49DA-8B1A-05BBFE8AD5D4}.Release|Win32.Build.0 = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.Debug|Win32.ActiveCfg = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.Debug|Win32.Build.0 = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.irrlicht-debug|Win32.ActiveCfg = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.irrlicht-debug|Win32.Build.0 = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.debug|Win32.ActiveCfg = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.debug|Win32.Build.0 = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.Release|Win32.ActiveCfg = Release|Win32
{B0E92B97-089A-4D5B-BF17-77F1BC5DAEEF}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection

View File

@ -17,7 +17,7 @@
</ToolFiles>
<Configurations>
<Configuration
Name="irrlicht-debug|Win32"
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
@ -66,97 +66,9 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib sg.lib ssg.lib ul.lib ssgAux.lib fnt.lib intl.lib Irrlicht.lib ws2_32.lib"
OutputFile="./../../../$(ProjectName)_irr_d.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(STK_LIB)&quot;;&quot;$(IRR_LIB)&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="libcmt.lib"
GenerateDebugInformation="true"
GenerateMapFile="false"
MapFileName=""
MapExports="false"
SubSystem="1"
LinkTimeCodeGeneration="0"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
Profile="false"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;&quot;$(STK_INCLUDE)&quot;;../../../src/enet/include"
PreprocessorDefinitions="BT_NO_PROFILE;HAVE_OPENAL;HAVE_OGGVORBIS;_DEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\&quot;SVN\&quot;;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;DEBUG;PACKAGE=\&quot;supertuxkart\&quot;;HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT"
GeneratePreprocessedFile="0"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
FloatingPointExceptions="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="opengl32.lib user32.lib gdi32.lib winmm.lib advapi32.lib SDL.lib SDLmain.lib OpenAL32.lib libogg.lib libvorbis.lib libvorbisfile.lib sg.lib ssg.lib ul.lib ssgAux.lib fnt.lib intl.lib ws2_32.lib"
OutputFile="./../../../$(ProjectName)_d.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="&quot;$(STK_LIB)&quot;"
AdditionalLibraryDirectories="&quot;$(STK_LIB)&quot;;&quot;$(IRR_LIB)&quot;"
IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="libcmt.lib"
GenerateDebugInformation="true"
@ -219,7 +131,7 @@
Name="VCCLCompilerTool"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="../../../src;../../../src/bullet/src;&quot;$(STK_INCLUDE)&quot;;../../../src/enet/include"
PreprocessorDefinitions="HAVE_OPENAL;HAVE_OGGVORBIS;NDEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\&quot;SVN\&quot;;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;BT_NO_PROFILE;PACKAGE=\&quot;supertuxkart\&quot;;HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT"
PreprocessorDefinitions="HAVE_OPENAL;HAVE_OGGVORBIS;NDEBUG;_CONSOLE;WIN32;NOMINMAX;VERSION=\&quot;SVN\&quot;;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;BT_NO_PROFILE;PACKAGE=\&quot;supertuxkart\&quot;;HAVE_GETTEXT;ENABLE_NLS;HAVE_GLUT;HAVE_IRRLICHT"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -293,10 +205,6 @@
RelativePath="../../../src\explosion.cpp"
>
</File>
<File
RelativePath="..\..\file_manager.cpp"
>
</File>
<File
RelativePath="..\..\grand_prix_data.cpp"
>
@ -840,6 +748,10 @@
<Filter
Name="io"
>
<File
RelativePath="..\..\io\file_manager.cpp"
>
</File>
<File
RelativePath="..\..\io\xml_node.cpp"
>
@ -871,10 +783,6 @@
RelativePath="../../../src\explosion.hpp"
>
</File>
<File
RelativePath="..\..\file_manager.hpp"
>
</File>
<File
RelativePath="..\..\grand_prix_data.hpp"
>
@ -1522,6 +1430,10 @@
<Filter
Name="io"
>
<File
RelativePath="..\..\io\file_manager.hpp"
>
</File>
<File
RelativePath="..\..\io\xml_node.hpp"
>

View File

@ -18,7 +18,7 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "file_manager.hpp"
#include "io/file_manager.hpp"
#include <stdexcept>
#include <sstream>
@ -30,25 +30,19 @@
# ifndef __CYGWIN__
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
// Some portabilty defines
# define access _access
# define F_OK 04
# endif
# define CONFIGDIR "."
#else
# define CONFIGDIR ".supertuxkart"
#endif
#ifdef HAVE_IRRLICHT
# include "irrlicht.h"
#endif
#include "irrlicht.h"
// ul.h includes windows.h, so this define is necessary
#define _WINSOCKAPI_
#include <plib/ul.h>
#include "btBulletDynamicsCommon.h"
#ifdef HAVE_IRRLICHT
# include "graphics/irr_driver.hpp"
#endif
#include "graphics/irr_driver.hpp"
#include "material_manager.hpp"
#include "utils/string_utils.hpp"
@ -97,11 +91,8 @@ FileManager* file_manager = 0;
*/
FileManager::FileManager()
{
#ifdef HAVE_IRRLICHT
//
m_device = createDevice(video::EDT_NULL);
m_file_system = m_device->getFileSystem();
#endif
m_is_full_path = false;
if ( getenv ( "SUPERTUXKART_DATADIR" ) != NULL )
@ -109,17 +100,9 @@ FileManager::FileManager()
#ifdef __APPLE__
else if( macSetBundlePathIfRelevant( m_root_dir ) ) { /* nothing to do */ }
#endif
#ifdef HAVE_IRRLICHT
else if(m_file_system->existFile("data/stk_config.data"))
#else
else if ( access ( "data/stk_config.data", F_OK ) == 0 )
#endif
m_root_dir = "." ;
#ifdef HAVE_IRRLICHT
else if(m_file_system->existFile("../data/stk_config.data"))
#else
else if ( access ( "../data/stk_config.data", F_OK ) == 0 )
#endif
m_root_dir = ".." ;
else
#ifdef SUPERTUXKART_DATADIR
@ -135,9 +118,7 @@ FileManager::FileManager()
pushTextureSearchPath(m_root_dir+"/data/textures");
pushModelSearchPath (m_root_dir+"/data/models" );
pushMusicSearchPath (m_root_dir+"/data/music" );
#ifdef HAVE_IRRLICHT
m_file_system->addFolderFileArchive("data/models");
#endif
// Add more paths from the STK_MUSIC_PATH environment variable
if(getenv("SUPERTUXKART_MUSIC_PATH")!=NULL)
{
@ -183,14 +164,12 @@ FileManager::FileManager()
/** Remove the dummy file system (which is called from IrrDriver before
* creating the actual device.
*/
#ifdef HAVE_IRRLICHT
void FileManager::dropFileSystem()
{
m_device->drop();
} // dropFileSystem
#endif
//-----------------------------------------------------------------------------
#ifdef HAVE_IRRLICHT
/** This function is used to re-initialise the file-manager after reading in
* the user configuration data.
*/
@ -201,66 +180,49 @@ void FileManager::setDevice(IrrlichtDevice *device)
// file_manager has a pointer to the file system.
m_file_system = m_device->getFileSystem();
} // reInit
#endif
//-----------------------------------------------------------------------------
FileManager::~FileManager()
{
popMusicSearchPath();
popModelSearchPath();
popTextureSearchPath();
#ifdef HAVE_IRRLICHT
// m_file_system is ref-counted, so no delete/drop necessary.
m_file_system = NULL;
m_device->drop();
#endif
} // ~FileManager
//-----------------------------------------------------------------------------
#ifdef HAVE_IRRLICHT
XMLReader *FileManager::getXMLReader(const std::string &f)
{
io::IXMLReader *r = m_file_system->createXMLReader(f.c_str());
return new XMLReader(r);
} // getXMLReader
#endif
//-----------------------------------------------------------------------------
void FileManager::pushModelSearchPath(const std::string& path)
{
m_model_search_path.push_back(path);
#ifdef HAVE_IRRLICHT
m_file_system->addFolderFileArchive(path.c_str());
#endif
} // pushModelSearchPath
//-----------------------------------------------------------------------------
void FileManager::pushTextureSearchPath(const std::string& path)
{
m_texture_search_path.push_back(path);
#ifdef HAVE_IRRLICHT
m_file_system->addFolderFileArchive(path.c_str());
#endif
} // pushTextureSearchPath
//-----------------------------------------------------------------------------
bool FileManager::findFile(std::string& full_path,
const std::string& fname,
const std::vector<std::string>& search_path) const
{
#ifndef HAVE_IRRLICHT
struct stat mystat;
#endif
for(std::vector<std::string>::const_reverse_iterator i = search_path.rbegin();
i != search_path.rend(); ++i)
{
full_path = *i + "/" + fname;
#ifdef HAVE_IRRLICHT
if(m_file_system->existFile(full_path.c_str())) return true;
#else
if(stat(full_path.c_str(), &mystat) >= 0) return true;
#endif
}
full_path="";
return false;

View File

@ -23,16 +23,13 @@
#include <vector>
#include <set>
#ifdef HAVE_IRRLICHT
# include "irrlicht.h"
using namespace irr;
#include "irrlicht.h"
using namespace irr;
#include "io/xml_reader.hpp"
#endif
class FileManager
{
private:
#ifdef HAVE_IRRLICHT
/** Handle to irrlicht's file systems. */
io::IFileSystem *m_file_system;
/** Pointer to the irrlicht device. This is necessary before reInit is
@ -40,7 +37,6 @@ private:
* for details. */
IrrlichtDevice *m_device;
#endif
bool m_is_full_path;
std::string m_root_dir;
std::vector<std::string> m_texture_search_path,
@ -56,14 +52,9 @@ private:
public:
FileManager();
~FileManager();
#ifdef HAVE_IRRLICHT
void setDevice(IrrlichtDevice *device);
void dropFileSystem();
XMLReader *getXMLReader(const std::string &f);
// io::IXMLWriter *getXMLWriter(const std::string &f)
//{ return m_file_system->createXMLWriter(f.c_str());}
#endif
std::string getHomeDir () const;
std::string getTrackDir () const;

View File

@ -18,8 +18,9 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "items/attachment_manager.hpp"
#include "file_manager.hpp"
#include "loader.hpp"
#include "io/file_manager.hpp"
AttachmentManager *attachment_manager = 0;

View File

@ -22,11 +22,11 @@
#include <sstream>
#include "user_config.hpp"
#include "file_manager.hpp"
#include "loader.hpp"
#include "material_manager.hpp"
#include "material.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "items/item_manager.hpp"
#include "items/bubblegumitem.hpp"
#include "karts/kart.hpp"

View File

@ -23,10 +23,10 @@
#include <stdexcept>
#include <sstream>
#include "file_manager.hpp"
#include "material_manager.hpp"
#include "material.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "items/bowling.hpp"
#include "items/cake.hpp"
#include "items/plunger.hpp"

View File

@ -27,9 +27,8 @@
#include <plib/ssg.h>
#include "bullet/Demos/OpenGL/GL_ShapeDrawer.h"
#include "loader.hpp"
#include "items/item_manager.hpp"
#include "file_manager.hpp"
#include "user_config.hpp"
#include "material_manager.hpp"
#include "audio/sound_manager.hpp"
@ -41,6 +40,8 @@
#include "graphics/smoke.hpp"
#include "gui/menu_manager.hpp"
#include "gui/race_gui.hpp"
#include "io/file_manager.hpp"
#include "items/item_manager.hpp"
#include "karts/kart_model.hpp"
#include "karts/kart_properties_manager.hpp"
#include "network/race_state.hpp"

View File

@ -19,12 +19,12 @@
#include "karts/kart_model.hpp"
#include "file_manager.hpp"
#include "loader.hpp"
#include "stk_config.hpp"
#include "user_config.hpp"
#include "graphics/irr_driver.hpp"
#include "graphics/mesh_tools.hpp"
#include "io/file_manager.hpp"
#include "utils/constants.hpp"
#include "utils/ssg_help.hpp"

View File

@ -24,10 +24,10 @@
#include <plib/ssg.h>
#include "material_manager.hpp"
#include "loader.hpp"
#include "file_manager.hpp"
#include "stk_config.hpp"
#include "user_config.hpp"
#include "karts/kart_model.hpp"
#include "io/file_manager.hpp"
#include "lisp/parser.hpp"
#include "lisp/lisp.hpp"
#include "utils/ssg_help.hpp"

View File

@ -23,11 +23,11 @@
#include <algorithm>
#include <ctime>
#include "file_manager.hpp"
#include "stk_config.hpp"
#include "user_config.hpp"
#include "callback_manager.hpp"
#include "challenges/unlock_manager.hpp"
#include "io/file_manager.hpp"
#include "karts/kart_properties.hpp"
#include "utils/string_utils.hpp"

View File

@ -34,9 +34,9 @@
#include "loader.hpp"
#include "material_manager.hpp"
#include "file_manager.hpp"
#include "material.hpp"
#include "graphics/moving_texture.hpp"
#include "io/file_manager.hpp"
#include "physics/moving_physics.hpp"
Loader* loader = 0;

View File

@ -46,7 +46,6 @@
#include "user_config.hpp"
#include "race_manager.hpp"
#include "file_manager.hpp"
#include "loader.hpp"
#include "main_loop.hpp"
#include "material_manager.hpp"
@ -59,13 +58,12 @@
#include "audio/sound_manager.hpp"
#include "audio/sfx_manager.hpp"
#include "challenges/unlock_manager.hpp"
#ifdef HAVE_IRRLICHT
# include "graphics/irr_driver.hpp"
#endif
#include "graphics/irr_driver.hpp"
#include "graphics/scene.hpp"
#include "gui/menu_manager.hpp"
#include "gui/menu_manager.hpp"
#include "gui/widget_manager.hpp"
#include "io/file_manager.hpp"
#include "items/attachment_manager.hpp"
#include "items/item_manager.hpp"
#include "items/projectile_manager.hpp"
@ -440,13 +438,8 @@ void InitTuxkart()
// unlock manager is needed when reading the config file
unlock_manager = new UnlockManager();
user_config = new UserConfig();
#ifdef HAVE_IRRLICHT
irr_driver = new IrrDriver();
#endif
loader = new Loader();
#ifndef HAVE_IRRLICHT
loader->setCreateStateCallback(getAppState);
#endif
sound_manager = new SoundManager();
sfx_manager = new SFXManager();
// The order here can be important, e.g. KartPropertiesManager needs
@ -514,9 +507,7 @@ void CleanTuxKart()
if(translations) delete translations;
if(file_manager) delete file_manager;
if(stk_scene) delete stk_scene;
#ifdef HAVE_IRRLICHT
if(irr_driver) delete irr_driver;
#endif
}
//=============================================================================
@ -553,9 +544,6 @@ int main(int argc, char *argv[] )
//FIXME: this needs a better organization
inputDriver = new SDLDriver ();
#ifndef HAVE_IRRLICHT
ssgInit();
#endif
main_loop = new MainLoop();
// loadMaterials needs ssgLoadTextures (internally), which can

View File

@ -21,9 +21,9 @@
#include <stdexcept>
#include "file_manager.hpp"
#include "stk_config.hpp"
#include "graphics/irr_driver.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/string_utils.hpp"

View File

@ -22,8 +22,8 @@
#include <stdexcept>
#include <sstream>
#include "file_manager.hpp"
#include "material.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "utils/string_utils.hpp"

View File

@ -23,7 +23,6 @@
#include <algorithm>
#include <ctime>
#include "file_manager.hpp"
#include "race_manager.hpp"
#include "user_config.hpp"
#include "callback_manager.hpp"
@ -36,6 +35,7 @@
#include "graphics/camera.hpp"
#include "graphics/scene.hpp"
#include "gui/menu_manager.hpp"
#include "io/file_manager.hpp"
#include "items/item_manager.hpp"
#include "items/projectile_manager.hpp"
#include "karts/auto_kart.hpp"

View File

@ -28,10 +28,10 @@ using namespace irr;
#define _WINSOCKAPI_
#include <plib/sg.h>
#include "file_manager.hpp"
#include "graphics/irr_driver.hpp"
#include "graphics/mesh_tools.hpp"
#include "graphics/scene.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "modes/world.hpp"
#include "tracks/track.hpp"

View File

@ -23,7 +23,7 @@
#include <stdio.h>
#include <sstream>
#include "file_manager.hpp"
#include "io/file_manager.hpp"
#include "lisp/parser.hpp"
#include "audio/music_information.hpp"

View File

@ -24,10 +24,8 @@
#include <sstream>
#define _WINSOCKAPI_
#include <plib/ssgAux.h>
#ifdef HAVE_IRRLICHT
#include "irrlicht.h"
#endif
#include "file_manager.hpp"
#include "loader.hpp"
#include "stk_config.hpp"
#include "material_manager.hpp"
@ -37,6 +35,7 @@
#include "graphics/irr_driver.hpp"
#include "graphics/mesh_tools.hpp"
#include "graphics/scene.hpp"
#include "io/file_manager.hpp"
#include "io/xml_node.hpp"
#include "items/item.hpp"
#include "items/item_manager.hpp"

View File

@ -17,17 +17,17 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "file_manager.hpp"
#include "tracks/track_manager.hpp"
#include <stdio.h>
#include <stdexcept>
#include <algorithm>
#include <sstream>
#include "track_manager.hpp"
#include "track.hpp"
#include "stk_config.hpp"
#include "audio/sound_manager.hpp"
#include "io/file_manager.hpp"
#include "tracks/track.hpp"
TrackManager* track_manager = 0;

View File

@ -40,8 +40,8 @@
#include "stk_config.hpp"
#include "actionmap.hpp"
#include "race_manager.hpp"
#include "file_manager.hpp"
#include "challenges/unlock_manager.hpp"
#include "io/file_manager.hpp"
#include "lisp/lisp.hpp"
#include "lisp/parser.hpp"
#include "lisp/writer.hpp"

View File

@ -18,8 +18,9 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "translation.hpp"
#include "file_manager.hpp"
#include "utils/translation.hpp"
#include "io/file_manager.hpp"
Translations* translations=NULL;