mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
************************************************************
* Merged Source Code from Development Trunk: Revision 4063 * ************************************************************ - Source Code is merged from: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP - This will be the Source for the Beta 2011 Test git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4064 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "vobject.h"
|
||||
#include "utilities.h"
|
||||
|
||||
#include "VFS/vfs.h"
|
||||
#include <vfs/Core/vfs.h>
|
||||
|
||||
extern void WriteMessageToFile( const STR16 pString );
|
||||
|
||||
@@ -34,7 +34,7 @@ UINT32 MDItemVideoObjects::getVObjectForItem(UINT32 key)
|
||||
{
|
||||
return it->second;
|
||||
}
|
||||
THROWEXCEPTION(BuildString().add(L"Item key [").add(key).add(L"] not registered").get());
|
||||
SGP_THROW(_BS(L"Item key not registered : ") << key << _BS::wget);
|
||||
}
|
||||
|
||||
void MDItemVideoObjects::registerItem(UINT32 key, vfs::Path const& sFileName)
|
||||
@@ -42,7 +42,7 @@ void MDItemVideoObjects::registerItem(UINT32 key, vfs::Path const& sFileName)
|
||||
std::map<UINT32,UINT32>::iterator it = m_mapVObjects.find(key);
|
||||
if(it != m_mapVObjects.end())
|
||||
{
|
||||
THROWEXCEPTION(BuildString().add(L"Item image [").add(key).add(L"] already registered").get());
|
||||
SGP_THROW(_BS(L"Item image already registered : ") << key << _BS::wget);
|
||||
}
|
||||
// LOAD INTERFACE GUN PICTURES
|
||||
UINT32 uiVObject;
|
||||
@@ -51,7 +51,7 @@ void MDItemVideoObjects::registerItem(UINT32 key, vfs::Path const& sFileName)
|
||||
FilenameForBPP(const_cast<STR>(sFileName.to_string().c_str()), VObjectDesc.ImageFile);
|
||||
if(! AddVideoObject( &VObjectDesc, &uiVObject ))
|
||||
{
|
||||
THROWEXCEPTION( BuildString().add(L"Could not add video object for file \"").add(sFileName).get() );
|
||||
SGP_THROW(_BS(L"Could not add video object for file \"") << sFileName << _BS::wget);
|
||||
}
|
||||
m_mapVObjects.insert(std::make_pair(key,uiVObject));
|
||||
}
|
||||
@@ -70,7 +70,7 @@ bool MDItemVideoObjects::registerItemsFromFilePattern(vfs::Path const& sFilePatt
|
||||
wss.str(it.value()->getName().c_wcs());
|
||||
if( !(wss >> item) )
|
||||
{
|
||||
std::wstring err = BuildString().add(L"Could not extract item number from file \"").add(wss.str()).add(L"\"").get();
|
||||
std::wstring err = _BS(L"Could not extract item number from file \"") << wss.str() << L"\"" << _BS::wget;
|
||||
WriteMessageToFile( const_cast<STR16>(err.c_str()) );
|
||||
continue;
|
||||
}
|
||||
@@ -78,10 +78,9 @@ bool MDItemVideoObjects::registerItemsFromFilePattern(vfs::Path const& sFilePatt
|
||||
{
|
||||
this->registerItem(item, it.value()->getPath());
|
||||
}
|
||||
catch(CBasicException& ex)
|
||||
catch(std::exception& ex)
|
||||
{
|
||||
RETHROWEXCEPTION( BuildString().add(L"Registering item from file \"").add(wss.str()).add(L"\" failed").get().c_str(),
|
||||
&ex );
|
||||
SGP_RETHROW( _BS(L"Registering item from file \"") << wss.str() << L"\" failed" << _BS::wget, ex );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user