Commit 2f315b43 authored by hybrid's avatar hybrid

Fix some project issues.

Adapted some more methods to the new string API.
renamed FileSystem method.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2150 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 2f2f23c2
......@@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="19.Quake3Explorer"
Name="21.Quake3Explorer"
ProjectGUID="{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
Keyword="Win32Proj">
<Platforms>
......
......@@ -2,8 +2,8 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="19.Quake3Explorer_vc9"
ProjectGUID="{CDC4AAA9-72E1-4ffa-A04D-7EF59D8B97CD}"
Name="21.Quake3Explorer_vc9"
ProjectGUID="{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
RootNamespace="19.Quake3Explorer_vc9"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
......@@ -62,7 +62,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\bin\Win32-VisualStudio\19.Quake3MapExplorer.exe"
OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
GenerateDebugInformation="true"
......@@ -141,7 +141,7 @@
/>
<Tool
Name="VCLinkerTool"
OutputFile="..\..\bin\Win32-VisualStudio\19.Quake3MapExplorer.exe"
OutputFile="..\..\bin\Win32-VisualStudio\21.Quake3MapExplorer.exe"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\lib\Win32-visualstudio"
GenerateDebugInformation="false"
......@@ -182,6 +182,22 @@
RelativePath=".\main.cpp"
>
</File>
<File
RelativePath=".\q3factory.cpp"
>
</File>
<File
RelativePath=".\q3factory.h"
>
</File>
<File
RelativePath=".\sound.cpp"
>
</File>
<File
RelativePath=".\sound.h"
>
</File>
</Files>
<Globals>
</Globals>
......
[Project]
FileName=example.dev
Name=Irrlicht Example 16 Quake3 Map Shader
Name=Irrlicht Example 21 Quake3 Explorer
UnitCount=1
Type=1
Ver=1
......@@ -18,7 +18,7 @@ Icon=
ExeOutput=../../bin/Win32-gcc
ObjectOutput=obj
OverrideOutput=1
OverrideOutputName=16.Quake3MapShader.exe
OverrideOutputName=21.Quake3Explorer.exe
HostApplication=
Folders=
CommandLine=
......
......@@ -21,7 +21,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "04.Movement_vc9", "04.Movem
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc9", "05.UserInterface\UserInterface_vc9.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "05.UserInterface_vc8", "05.UserInterface\UserInterface_vc9.vcproj", "{622C9DD7-0391-49FF-AF53-24F9D5A8EC53}"
ProjectSection(ProjectDependencies) = postProject
{E08E042A-6C45-411B-92BE-3CC31331019F} = {E08E042A-6C45-411B-92BE-3CC31331019F}
EndProjectSection
......@@ -94,6 +94,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "19.MouseAndJoystick_vc9", "
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "20.ManagedLights_vc9", "20.ManagedLights\ManagedLights_vc9.vcproj", "{16007FE2-142B-47F8-93E1-519BA3F39E71}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "21.Quake3Explorer_vc9", "21.Quake3Explorer\Quake3Explorer_vc9.vcproj", "{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -179,6 +181,12 @@ Global
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.ActiveCfg = Debug|Win32
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Debug|Win32.Build.0 = Debug|Win32
{FE853A36-E0D1-4AC5-A792-B643E70D2953}.Release|Win32.ActiveCfg = Release|Win32
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Debug|Win32.ActiveCfg = Debug|Win32
{16007FE2-142B-47F8-93E1-519BA3F39E71}.Release|Win32.ActiveCfg = Release|Win32
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.ActiveCfg = Debug|Win32
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Debug|Win32.Build.0 = Debug|Win32
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.ActiveCfg = Release|Win32
{CDC4AAA9-72E1-4FFA-A04D-7EF59D8B97CD}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
// This is a Demo of the Irrlicht Engine (c) 2005-2008 by N.Gebhardt.
// This is a Demo of the Irrlicht Engine (c) 2005-2009 by N.Gebhardt.
// This file is not documented.
#include "CMainMenu.h"
......
......@@ -151,7 +151,6 @@ namespace scene
//! Holding Frame Data for a Mesh
struct SMD3MeshBuffer : public IReferenceCounted
{
virtual ~SMD3MeshBuffer () {}
SMD3MeshHeader MeshHeader;
core::stringc Shader;
......
......@@ -92,10 +92,13 @@ public:
//! Adds an external archive loader to the engine.
virtual void addArchiveLoader(IArchiveLoader* loader) = 0;
//! return the amount of currently attached Archives
virtual u32 getFileArchiveCount() = 0;
//! removes an archive from the file system.
virtual bool unregisterFileArchive( u32 index ) = 0;
//! get the Archive number index
virtual IFileArchive* getFileArchive( u32 index ) = 0;
......@@ -114,7 +117,6 @@ public:
return registerFileArchive ( filename, ignoreCase, ignorePaths );
}
//! Adds an unzipped archive ( or basedirectory with subdirectories..) to the file system.
/** Useful for handling data which will be in a zip file
\param filename: Filename of the unzipped zip archive base directory to add to the file system.
......@@ -164,23 +166,24 @@ public:
\return String containing the directory of the file. */
virtual core::string<c16> getFileDir(const core::string<c16>& filename) const = 0;
//! Returns the base part of a filename, i.e. the name without the directory
//! part. If no directory is prefixed, the full name is returned.
/** \param filename: The file to get the basename from
//! Returns the base part of a filename, i.e. the name without the directory part.
/** If no directory is prefixed, the full name is returned.
\param filename: The file to get the basename from
\param keepExtension True if filename with extension is returned otherwise everything
after the final '.' is removed as well. */
virtual core::string<c16> getFileBasename(const core::string<c16>& filename, bool keepExtension=true) const = 0;
//! flaten a path and file name for example: "/you/me/../." becomes "/you"
virtual core::string<c16>& flatenFilename( core::string<c16>& directory, const core::string<c16>& root = "/" ) const = 0;
//! flatten a path and file name for example: "/you/me/../." becomes "/you"
virtual core::string<c16>& flattenFilename( core::string<c16>& directory, const core::string<c16>& root = "/" ) const = 0;
//! Creates a list of files and directories in the current working directory and returns it.
/** \return a Pointer to the created IFileList is returned. After the list has been used
it has to be deleted using its IFileList::drop() method.
See IReferenceCounted::drop() for more information. */
virtual eFileSystemType setFileListSystem( eFileSystemType listType) = 0;
virtual IFileList* createFileList() = 0;
virtual eFileSystemType setFileListSystem( eFileSystemType listType) = 0;
//! Determines if a file exists and could be opened.
/** \param filename is the string identifying the file which should be tested for existence.
\return Returns true if file exists, and false if it does not exist or an error occured. */
......@@ -245,9 +248,9 @@ public:
virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver=0) = 0;
};
} // end namespace io
} // end namespace irr
#endif
......@@ -949,7 +949,7 @@ namespace scene
\param polyCountY Number of quads used for the vertical tiling
\return Pointer to the sphere mesh if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* addSphereMesh(const c16* name,
virtual IAnimatedMesh* addSphereMesh(const core::string<c16>& name,
f32 radius=5.f, u32 polyCountX = 16,
u32 polyCountY = 16) = 0;
......
......@@ -168,6 +168,7 @@ bool CFileSystem::registerFileArchive( const core::string<c16>& filename, bool i
}
//! removes an archive to the file system.
bool CFileSystem::unregisterFileArchive( u32 index )
{
......@@ -181,12 +182,14 @@ bool CFileSystem::unregisterFileArchive( u32 index )
return ret;
}
//! gets an archive
u32 CFileSystem::getFileArchiveCount()
{
return FileArchive.size();
}
IFileArchive* CFileSystem::getFileArchive( u32 index )
{
return index < getFileArchiveCount () ? FileArchive [ index ] : 0;
......@@ -241,7 +244,7 @@ bool CFileSystem::changeWorkingDirectoryTo(const core::string<c16>& newDirectory
if ( FileSystemType != FILESYSTEM_NATIVE )
{
WorkingDirectory [ FILESYSTEM_VIRTUAL ].append ( newDirectory );
flatenFilename ( WorkingDirectory [ FILESYSTEM_VIRTUAL ], "" );
flattenFilename ( WorkingDirectory [ FILESYSTEM_VIRTUAL ], "" );
success = 1;
}
else
......@@ -264,8 +267,7 @@ bool CFileSystem::changeWorkingDirectoryTo(const core::string<c16>& newDirectory
return success;
}
/*!
*/
core::string<c16> CFileSystem::getAbsolutePath(const core::string<c16>& filename) const
{
c16 *p=0;
......@@ -353,7 +355,7 @@ core::string<c16> CFileSystem::getFileBasename(const core::string<c16>& filename
//! flaten a path and file name for example: "/you/me/../." becomes "/you"
core::string<c16>& CFileSystem::flatenFilename( core::string<c16>& directory, const core::string<c16>& root ) const
core::string<c16>& CFileSystem::flattenFilename( core::string<c16>& directory, const core::string<c16>& root ) const
{
directory.replace ( '\\', '/' );
if ( lastChar ( directory ) != '/' )
......@@ -424,7 +426,7 @@ IFileList* CFileSystem::createFileList()
core::string<c16> current;
current = FileArchive[i]->getArchiveName() + WorkingDirectory [ FILESYSTEM_VIRTUAL ];
flatenFilename ( current );
flattenFilename ( current );
if ( changeWorkingDirectoryTo ( current ) )
{
......
......@@ -74,8 +74,8 @@ public:
/** \param filename: The file to get the basename from */
virtual core::string<c16> getFileBasename(const core::string<c16>& filename, bool keepExtension=true) const;
//! flaten a path and file name for example: "/you/me/../." becomes "/you"
virtual core::string<c16>& flatenFilename( core::string<c16>& directory, const core::string<c16>& root = "/" ) const;
//! flatten a path and file name for example: "/you/me/../." becomes "/you"
virtual core::string<c16>& flattenFilename( core::string<c16>& directory, const core::string<c16>& root = "/" ) const;
//! Creates a list of files and directories in the current working directory
//! and returns it.
......
......@@ -135,7 +135,7 @@ const wchar_t* CGUIFileOpenDialog::getFileName() const
//! Returns the directory of the selected file. Returns NULL, if no directory was selected.
const core::string<c16>& CGUIFileOpenDialog::getDirectoryName()
{
FileSystem->flatenFilename ( FileDirectory );
FileSystem->flattenFilename ( FileDirectory );
return FileDirectory;
}
......
......@@ -950,6 +950,7 @@ IAnimatedMesh* CSceneManager::addTerrainMesh(const core::string<c16>& name,
return animatedMesh;
}
//! Adds an arrow mesh to the mesh pool.
IAnimatedMesh* CSceneManager::addArrowMesh(const core::string<c16>& name,
video::SColor vtxColor0, video::SColor vtxColor1,
......@@ -983,14 +984,10 @@ IAnimatedMesh* CSceneManager::addArrowMesh(const core::string<c16>& name,
}
//! Adds a static sphere mesh to the mesh pool.
IAnimatedMesh* CSceneManager::addSphereMesh(const c16* name,
IAnimatedMesh* CSceneManager::addSphereMesh(const core::string<c16>& name,
f32 radius, u32 polyCountX, u32 polyCountY)
{
if (!name)
return 0;
if (MeshCache->isMeshLoaded(name))
return MeshCache->getMeshByFilename(name);
......@@ -1559,7 +1556,7 @@ ISceneNodeAnimator* CSceneManager::createFlyCircleAnimator(
f32 startPosition)
{
const f32 orbitDurationMs = (core::DEGTORAD * 360.f) / speed;
u32 effectiveTime = os::Timer::getTime() + (u32)(orbitDurationMs * startPosition);
const u32 effectiveTime = os::Timer::getTime() + (u32)(orbitDurationMs * startPosition);
ISceneNodeAnimator* anim = new CSceneNodeAnimatorFlyCircle(
effectiveTime, center,
......
......@@ -218,8 +218,8 @@ namespace scene
f32 width1);
//! Adds a static sphere mesh to the mesh pool.
IAnimatedMesh* addSphereMesh(const c16* name,
f32 radius, u32 polyCountX, u32 polyCountY);
IAnimatedMesh* addSphereMesh(const core::string<c16>& name,
f32 radius=5.f, u32 polyCountX=16, u32 polyCountY=16);
//! Adds a particle system scene node.
virtual IParticleSystemSceneNode* addParticleSystemSceneNode(
......
......@@ -524,7 +524,7 @@ IFileArchive* CArchiveLoaderMount::createArchive(const core::string<c16>& filena
core::string<c16> save = FileSystem->getWorkingDirectory ();
core::string<c16> fullPath = FileSystem->getAbsolutePath ( filename );
FileSystem->flatenFilename ( fullPath );
FileSystem->flattenFilename ( fullPath );
if ( FileSystem->changeWorkingDirectoryTo ( fullPath ) )
{
......
......@@ -1137,6 +1137,10 @@
RelativePath="..\..\include\IGUIImage.h"
>
</File>
<File
RelativePath="..\..\include\IGUIImageList.h"
>
</File>
<File
RelativePath="..\..\include\IGUIInOutFader.h"
>
......@@ -1177,6 +1181,10 @@
RelativePath="..\..\include\IGUIToolbar.h"
>
</File>
<File
RelativePath="..\..\include\IGUITreeView.h"
>
</File>
<File
RelativePath="..\..\include\IGUIWindow.h"
>
......@@ -1278,6 +1286,14 @@
RelativePath="CGUIImage.h"
>
</File>
<File
RelativePath=".\CGUIImageList.cpp"
>
</File>
<File
RelativePath=".\CGUIImageList.h"
>
</File>
<File
RelativePath="CGUIInOutFader.cpp"
>
......@@ -1390,6 +1406,14 @@
RelativePath="CGUIToolBar.h"
>
</File>
<File
RelativePath=".\CGUITreeView.cpp"
>
</File>
<File
RelativePath=".\CGUITreeView.h"
>
</File>
<File
RelativePath="CGUIWindow.cpp"
>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment