Example #1
0
void Slice::_openDataFile(BString &dataFileName)
{
	if (!_dataFd.open(dataFileName.c_str(), O_CREAT | O_RDWR)) {
		log::Fatal::L("Can't open slice dataFile %s\n", dataFileName.c_str());
		throw SliceError("Can't open slice dataFile");
	}
	TSize curSeek = _dataFd.seek(0, SEEK_END);
	if (curSeek < sizeof(SliceDataHeader)) 	{ // create new file
		_dataFd.seek(0, SEEK_SET);
		SliceDataHeader sh;
		sh.version = SliceDataHeader::CURRENT_VERSION;
		sh.sliceID = _sliceID;
		if (_dataFd.write(&sh, sizeof(sh)) != sizeof(sh)) {
			log::Fatal::L("Can't write slice dataFile header %s\n", dataFileName.c_str());
			throw SliceError("Can't write slice dataFile header");
		}
		_size = sizeof(sh);
	}	else {
		_dataFd.seek(0, SEEK_SET);
		SliceDataHeader sh;
		if (_dataFd.read(&sh, sizeof(sh)) != sizeof(sh)) {
			log::Fatal::L("Can't read slice dataFile header %s\n", dataFileName.c_str());
			throw SliceError("Can't read slice dataFile header");
		}
		if (sh.sliceID != _sliceID) {
			log::Fatal::L("SliceID mismatch in %s, %u != %u\n", dataFileName.c_str(), _sliceID, sh.sliceID);
			throw SliceError("SliceID mismatch");
		}
		_size = _dataFd.seek(0, SEEK_END);
	}
}
Example #2
0
			File::File( const BString& strFileName, const BString& strPassword )
			{
				Init();

				m_pRead = (void*)XZip::OpenZip( strFileName.c_str(), strPassword.c_str() );
				RefreshFiles();
			}
Example #3
0
void Slice::_openIndexFile(BString &indexFileName)
{
	if (!_indexFd.open(indexFileName.c_str(), O_CREAT | O_RDWR)) {
		log::Fatal::L("Can't open slice dataFile %s\n", indexFileName.c_str());
		throw SliceError("Can't open slice dataFile");
	}
	TSize curSeek = _indexFd.seek(0, SEEK_END);
	if (curSeek < sizeof(SliceIndexHeader)) {
		_rebuildIndexFromData(indexFileName);
	}	else {
		_indexFd.seek(0, SEEK_SET);
		try
		{
			SliceIndexHeader sh;
			if (_indexFd.read(&sh, sizeof(sh)) != sizeof(sh)) {
				log::Fatal::L("Can't read slice indexFile header %s\n", indexFileName.c_str());
				throw SliceError("Can't read slice indexFile header");
			}
			if (sh.sliceID != _sliceID) {
				log::Fatal::L("SliceID mismatch in %s, %u != %u\n", indexFileName.c_str(), _sliceID, sh.sliceID);
				throw SliceError("SliceID mismatch");
			}
			_indexFd.seek(0, SEEK_END);
		}
		catch (SliceError &er)
		{
			_rebuildIndexFromData(indexFileName);
		}
	}
}
Example #4
0
		BOOTIL_EXPORT void PopupMessage( const char* str, ... )
		{
			BString strBuilt;
			Bootil_FormatString( strBuilt, str );

			Output::Warning( strBuilt.c_str() );
			printf( "%s", strBuilt.c_str() );

			Bootil::Platform::Popup( "Bootil", strBuilt );
		}
Example #5
0
		BOOTIL_EXPORT bool Write( const BString & strFileName, const BString & strOut )
		{
			std::ofstream f( strFileName.c_str(), std::ios_base::out );

			if ( !f.is_open() ) { return false; }

			f.write( strOut.c_str(), strOut.length() );
			f.close();
			return true;
		}
Example #6
0
		BOOTIL_EXPORT void StartProcess( const BString & strProcess, bool AndWait )
		{
			BString strFileName = String::File::GetExtractFilename( strProcess );
			const char* args[32];
			args[0] = strFileName.c_str();
			args[1] = NULL;
			int iFlag = P_NOWAIT;

			if ( AndWait ) { iFlag = P_WAIT; }

			spawnv( P_WAIT, strProcess.c_str(), args );
		}
Example #7
0
		//-----------------------------------------------------------------------------
		//  
		//-----------------------------------------------------------------------------
		BOOTIL_EXPORT void Warning( const char* str, ... )
		{
			BString strBuilt;
			Bootil_FormatString( strBuilt, str );

			Output::Msg( "%s", strBuilt.c_str() );

			for ( Debug::IListener::List::iterator i = Debug::Listeners().begin(); i != Debug::Listeners().end(); i++ )
			{
				(*i)->Warning( strBuilt.c_str() );
			}
		}
Example #8
0
		BOOTIL_EXPORT void SetupAssociation( BString ext )
		{
			//Write our file association to the registry -NOTE: must run in administrator mode once to work
			HKEY hKey;
			LPDWORD dwDisp = 0;
			BString strmv = "\"" + FullProgramName() + "\" %1";
			String::File::ToWindowsSlashes( strmv );
			BString keyName = ext + "\\shell\\open\\command";
			LONG lRet  = RegCreateKeyEx( HKEY_CLASSES_ROOT, keyName.c_str(), 0L, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, dwDisp );

			if ( !lRet )
			{ RegSetValueEx( hKey, NULL, 0, REG_SZ, ( BYTE* )strmv.c_str(), strmv.length() + 1 ); }
		}
void SFMLImage::load(const BString& path)
{
    BImage::load(path);
    SFMLApplication* app = (SFMLApplication*)BApplication::instance();
    if (!_image.loadFromFile(app->context()->path + path))
    {
        Log::error("Cannot load image %s", path.c_str());
        return ;
    }
    _size.setWidth(_image.getSize().x);
    _size.setHeight(_image.getSize().y);
    glGenTextures(1, &_textureId); 
    glBindTexture(GL_TEXTURE_2D, _textureId); 
    /*glTexParameteri(GL_TEXTURE_2D, 
                    GL_TEXTURE_MAG_FILTER, 
                    GL_LINEAR); 
    glTexParameteri(GL_TEXTURE_2D, 
                    GL_TEXTURE_MIN_FILTER, 
                    GL_LINEAR_MIPMAP_LINEAR);*/
    //GLfloat maxA;
    //glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxA);
    glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    //glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT,maxA);//Anisotropic Filtering Attempt
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, _size.width(), _size.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, _image.getPixelsPtr());
    _image = sf::Image();
}
Example #10
0
			File::File( void* pBuffer, unsigned int iSize, const BString& strPassword )
			{
				Init();

				m_pRead = (void*)XZip::OpenZip( pBuffer, iSize, strPassword.c_str() );
				RefreshFiles();
			}
void AndroidApplication::createFilesystem()
{
    DIR *dp;
    struct dirent* entry;
    BString key;
    std::basic_string<char> s;
    s.resize(12, 'a');
    if((dp  = opendir(_storageDirectory.c_str())) == NULL)
        return ;

   // Log::info("Storage Directory = %s", _storageDirectory.c_str());
    while ((entry = readdir(dp)) != NULL)
    {
    	if (entry->d_type == DT_DIR && findEntryInDirMap(entry->d_name, &key))
    	{
    		_dirMap[key].setPath(_storageDirectory);
    	}
    }
    closedir(dp);

    DirMap::iterator it = _dirMap.begin();
    DirMap::iterator ite = _dirMap.end();

    for (; it != ite; ++it)
    {
    	if (!it->second.isValid())
    	{
    		BString path = _storageDirectory + "/" + it->second.dirName();
    		if (mkdir(path.c_str(), 0777))
    			it->second.setPath(_storageDirectory);
    	}
    }

}
Example #12
0
		//-----------------------------------------------------------------------------
		//  
		//-----------------------------------------------------------------------------
		BOOTIL_EXPORT void Msg( const char* str, ... )
		{
			BString strBuilt;
			Bootil_FormatString( strBuilt, str );

			printf( "%s", strBuilt.c_str() );
			Platform::DebuggerOutput( strBuilt );

			if ( Bootil::IsShuttingDown() )
				return;

			for ( Debug::IListener::List::iterator i = Debug::Listeners().begin(); i != Debug::Listeners().end(); i++ )
			{
				(*i)->Msg( strBuilt.c_str() );
			}
		}
Example #13
0
void Slice::_rebuildIndexFromData(BString &indexFileName)
{
	_indexFd.truncate(0);
	SliceIndexHeader sh;
	sh.version = SliceIndexHeader::CURRENT_VERSION;
	sh.sliceID = _sliceID;
	if (_indexFd.write(&sh, sizeof(sh)) != sizeof(sh)) {
		log::Fatal::L("Can't write slice indexFile header %s\n", indexFileName.c_str());
		throw SliceError("Can't write slice indexFile header");
	}
	if (_size <= sizeof(SliceDataHeader))
		return;
	
	log::Warning::L("Begin rebuild slice index file %s\n", indexFileName.c_str());

	Buffer buf(MAX_BUF_SIZE + sizeof(IndexEntry) * 2);
	_dataFd.seek(sizeof(SliceDataHeader), SEEK_SET);
	TSeek curSeek = sizeof(SliceDataHeader);
	while (curSeek < _size)	{
		IndexEntry &ie = *(IndexEntry*)buf.reserveBuffer(sizeof(IndexEntry));
		if (_dataFd.read(&ie.header, sizeof(ie.header)) != sizeof(ie.header)) {
			log::Fatal::L("Can't read an item header from slice dataFile while rebuilding %s\n", indexFileName.c_str());
			throw SliceError("Can't read an item header from slice dataFile");
		}

		auto resSeek = _dataFd.seek(ie.header.size, SEEK_CUR);
		if (resSeek <= 0) {
			log::Fatal::L("Can't seek slice dataFile while rebuilding %s\n", indexFileName.c_str());
			throw SliceError("Can't seek slice dataFile\n");
		}
		curSeek = resSeek;
		
		if (ie.header.status & ST_ITEM_DELETED) {
			buf.truncate(buf.writtenSize() - sizeof(IndexEntry));
		} else {
			ie.pointer.seek = curSeek;
			ie.pointer.sliceID = _sliceID;
		}
		if ((buf.writtenSize() >= MAX_BUF_SIZE) || (curSeek >= _size)) {
			if (_indexFd.write(buf.begin(), buf.writtenSize()) != (ssize_t)buf.writtenSize()) {
				log::Fatal::L("Can't write data to slice indexFile header %s\n", indexFileName.c_str());
				throw SliceError("Can't write data to slice indexFile header");
			}
			buf.clear();
		}
	}
}
Example #14
0
		BOOTIL_EXPORT bool IsFolder( const BString& strFileName )
		{
			struct stat fileStat; 
			int err = stat( strFileName.c_str(), &fileStat ); 
			if ( err != 0 ) return false;

			return (fileStat.st_mode & S_IFMT) == S_IFDIR;
		}
Example #15
0
void Buffer::add(const BString &value)
{
	TSize size = value.size();
	_fit(sizeof(size) + size);
	memcpy(_writePos, &size, sizeof(size));
	_writePos += sizeof(size);
	memcpy(_writePos, value.c_str(), size);
	_writePos += size;	
}
Example #16
0
			BOOTIL_EXPORT void DoAssert( const char* strFile, unsigned int iLine, const char* strFunction, const char* strModule, const char* format, ... )
			{
				BString strBuilt;
				Bootil_FormatString( strBuilt, format );

				BString strError = String::Format::Print( "%s\n\nModule:\t%s\nFile:\t%s\nLine:\t%i\nFunction:\t%s\n", strBuilt.c_str(), strModule, strFile, iLine, strFunction );

				Output::Warning( "%s", strError.c_str() );
			}
Example #17
0
		BOOTIL_EXPORT bool Write( const BString & strFileName, const Bootil::Buffer & bufferOut )
		{
			std::ofstream f( strFileName.c_str(), std::ios_base::out | std::ios::binary );

			if ( !f.is_open() ) { return false; }

			f.write( reinterpret_cast<char*>( bufferOut.GetBase() ), bufferOut.GetWritten() );
			f.close();
			return true;
		}
Example #18
0
		BOOTIL_EXPORT void StartProcess( const BString & strProcess, bool AndWait )
		{
			pid_t pid = fork();

			if ( pid != 0 )
			{
				bool isOk = ( pid > 0 );

				if ( isOk && AndWait )
				{ wait(); }
			}
			else
			{
				const char* args[2];
				args[0] = strProcess.c_str();
				args[1] = NULL;
				execvp( strProcess.c_str(), ( char * const* )args );
			}
		}
Example #19
0
		BOOTIL_EXPORT void OpenWebpage( const BString & strURL )
		{
			pid_t pid;
			const char* args[2];
			args[0] = strURL.c_str();
			args[1] = NULL;
			pid = fork();

			if ( pid == 0 )
			{ execvp( "/usr/bin/xdg-open", ( char * const* )args ); }
		}
Example #20
0
void SliceManager::_init()
{
	BString dataPath;
	_formDataPath(dataPath);
	Directory::makeDirRecursive(dataPath.c_str());
	
	BString indexPath;
	_formIndexPath(indexPath);
	Directory::makeDirRecursive(indexPath.c_str());
	
	try
	{
		Directory dir(dataPath.c_str());
		BString dataFileName;
		BString indexFileName;
		while (dir.next()) {
			if (dir.name()[0] == '.')
				continue;
			TSliceID sliceID = strtoul(dir.name(), NULL, 10);
			dataFileName.sprintfSet("%s/%u", dataPath.c_str(), sliceID);
			indexFileName.sprintfSet("%s/%u", indexPath.c_str(), sliceID);
			TSlicePtr slice(new Slice(sliceID, dataFileName, indexFileName));
			if (sliceID >= _slices.size())
				_slices.resize(sliceID + 1);
			_slices[sliceID] = slice;
		}
		return;
	}
	catch (Directory::Error &er)
	{
		log::Error::L("Can't open slice storage data path %s\n", dataPath.c_str());
	}
	throw SliceError("Can't initialize sliceManager");
}
Example #21
0
			bool File::AddFile( const BString & ZipName, const BString & LocalFileName )
			{
				EnsureWriter();
				AutoBuffer file;

				if ( !Bootil::File::Read( LocalFileName, file ) )
				{ return false; }

				if ( ZR_OK != XZip::ZipAdd( ( XZip::HZIP )m_Write, ZipName.c_str(), file.GetBase(), file.GetWritten() ) )
				{ return false; }

				return true;
			}
Example #22
0
		//-----------------------------------------------------------------------------
		//  
		//-----------------------------------------------------------------------------
		BOOTIL_EXPORT void Error( const char* str, ... )
		{
			BString strBuilt;
			Bootil_FormatString( strBuilt, str );

			Debug::s_strError = strBuilt;

			for ( Debug::IListener::List::iterator i = Debug::Listeners().begin(); i != Debug::Listeners().end(); i++ )
			{
				(*i)->Error( strBuilt.c_str() );
			}

			Msg( "Error:\n\n" );
			Msg( "%s", strBuilt.c_str() );
			Msg( "\n\n" );

			Bootil::Platform::Popup( "Error", strBuilt );

			#ifdef _WIN32
			//	_asm { int 3 }
			#endif

			exit( 0 );
		}
Example #23
0
bool Slice::_writeItem(File &putTmpFile, BString &buf, IndexEntry &ie)
{
	if (_dataFd.seek(_size, SEEK_SET) != (off_t)_size) {
		log::Fatal::L("Can't seek slice dataFile %u\n", _sliceID);
		return false;
	}
	const ItemHeader &itemHeader = ie.header;
	if (_dataFd.write(&itemHeader, sizeof(itemHeader)) != sizeof(itemHeader)) {
		log::Fatal::L("Can't write header to slice dataFile %u\n", _sliceID);
		return false;
	}
	auto leftSize = ie.header.size;
	while (leftSize > 0) {
		TItemSize chunkSize = MAX_BUF_SIZE;
		if (chunkSize > leftSize)
			chunkSize = leftSize;
		buf.clear();
		if (putTmpFile.read(buf.reserveBuffer(chunkSize), chunkSize) != (ssize_t)chunkSize) {
			log::Fatal::L("Can't read data from put tmp file %u\n", _sliceID);
			return false;
		}
		if (_dataFd.write(buf.c_str(), buf.size()) != (ssize_t)buf.size()) {
			log::Fatal::L("Can't write data to slice dataFile %u\n", _sliceID);
			return false;
		}
		leftSize -= chunkSize;
	}
	ie.pointer.sliceID = _sliceID;
	ie.pointer.seek = _size;
		
	if (_indexFd.write(&ie, sizeof(ie)) != sizeof(ie))	{
		log::Fatal::L("Can't write index entry to slice indexFile %u\n", _sliceID);
		return false;
	}
	_size = _dataFd.seek(0, SEEK_CUR);
	return true;
}
Example #24
0
		BOOTIL_EXPORT int FindFiles( String::List* files, String::List* folders, const BString & strFind, bool bUpUpFolders )
		{
			WIN32_FIND_DATAA FindFileData;
			HANDLE hFind;
			unsigned int iFiles = 0;
			hFind = FindFirstFileExA( strFind.c_str(), FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0 );

			while ( hFind != INVALID_HANDLE_VALUE )
			{
				BString strName = FindFileData.cFileName;

				if ( FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && folders )
				{
					bool bInclude = true;

					if ( bUpUpFolders || ( ( strName != "." ) && ( strName != ".." ) ) )
					{
						folders->push_back( strName );
						iFiles++;
					}
				}
				else if ( files )
				{
					files->push_back( strName );
					iFiles++;
				}

				if ( !FindNextFileA( hFind, &FindFileData ) )
				{
					break;
				}
			}

			FindClose( hFind );
			return iFiles;
		}
Example #25
0
		BOOTIL_EXPORT int FindFiles( String::List* files, String::List* folders, const BString& strFind, bool bUpUpFolders )
		{
			BString dirName = strdup( strFind.c_str() );
			dirName = dirname( (char*)dirName.c_str() );

			BString findName = strdup( strFind.c_str() );
			findName = basename( (char*)findName.c_str() );

			DIR *dp;
			dirent *dirp;
			int iFiles = 0;

			if ( (dp = opendir(dirName.c_str())) == NULL )
				return 0;

			while ( (dirp = readdir(dp)) != NULL )
			{
				BString name(dirp->d_name);
				BString fullName = dirName + "/" + name;

				if ( wildcmp(findName.c_str(), name.c_str()) )
				{
					if ( Bootil::File::IsFolder(fullName) && folders )
					{
						if ( bUpUpFolders || (name != "." && name != "..") )
						{
							folders->push_back( fullName );
							iFiles++;
						}
					}
					else if ( files )
					{
						files->push_back( fullName );
						iFiles++;
					}
				}
			}

			closedir(dp);
			return iFiles;
		}
Example #26
0
		BOOTIL_EXPORT void DebuggerOutput( const BString & strText )
		{
			printf( "%s", strText.c_str() );
		}
Example #27
0
			BOOTIL_EXPORT float Float( const BString & str )
			{
				if ( str == "" ) { return 0.0f; }

				return ( float )atof( str.c_str() );
			}
Example #28
0
			BOOTIL_EXPORT double Double( const BString & str )
			{
				if ( str == "" ) { return 0.0f; }

				return atof( str.c_str() );
			}
void AndroidSoundEngine::playBGM(const BString& name, const BString& path, int level, short int volume, bool isLooping)
{

	if (_bgms.find(level) != _bgms.end())
	{
		if (_bgms[level].path == path && _bgms[level].BGMPlayer != NULL)
		{
			playBGM(level);
			return ;
		}
		destroyBGM(level);
	}

	SLresult result;

	BReader* reader = BReader::create();

	if (!reader->open(path))
	{
		Log::error("Error cannot open audio file <%s>", path.c_str());
		return ;
	}

	BGMInfo info;

	info.name = name;
	info.path = path;
	info.fd = reader->fd();
	info.start = reader->start();
	info.length = reader->length();
	info.volume = volume;
	info.loop = isLooping;
	info.seek = 0;

	reader->close();

	SLDataLocator_AndroidFD _dataLocatorIn;
	_dataLocatorIn.locatorType = SL_DATALOCATOR_ANDROIDFD;
	_dataLocatorIn.fd = info.fd;
	_dataLocatorIn.offset = info.start;
	_dataLocatorIn.length = info.length;
	SLDataFormat_MIME _dataFormat;
	_dataFormat.formatType = SL_DATAFORMAT_MIME;
	_dataFormat.mimeType = NULL;
	_dataFormat.containerType = SL_CONTAINERTYPE_UNSPECIFIED;

	SLDataSource _dataSource;
   _dataSource.pLocator = &_dataLocatorIn;
   _dataSource.pFormat = &_dataFormat;
   SLDataLocator_OutputMix _dataLocatorOut;
   _dataLocatorOut.locatorType = SL_DATALOCATOR_OUTPUTMIX;
   _dataLocatorOut.outputMix = _outputMix;
   SLDataSink _dataSink;
   _dataSink.pLocator = &_dataLocatorOut;
   _dataSink.pFormat = NULL;
   Log::debug("A1");
   // Creates BGM player and retrieves its interfaces.
	const SLuint32 _BGMPlayerIIDCount = 3;
	const SLInterfaceID _BGMPlayerIIDs[] = { SL_IID_PLAY, SL_IID_SEEK, SL_IID_VOLUME };
	const SLboolean _BGMPlayerReqs[] = { SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE, SL_BOOLEAN_TRUE };
	result = (*_engine)->CreateAudioPlayer(_engine, &info.BGMPlayerObj, &_dataSource, &_dataSink,
	 _BGMPlayerIIDCount, _BGMPlayerIIDs, _BGMPlayerReqs);
	 Log::debug("A2");
	slCheckErrorWithStatus(result, "Problem creating BGM player (Error %d).", result);
	result = (*info.BGMPlayerObj)->Realize(info.BGMPlayerObj, SL_BOOLEAN_FALSE);
	slCheckErrorWithStatus(result, "Problem realizing BGM player (Error %d).", result);

	result = (*info.BGMPlayerObj)->GetInterface(info.BGMPlayerObj, SL_IID_PLAY, &info.BGMPlayer);
	slCheckErrorWithStatus(result, "Problem getting SL_IID_PLAY for BGM player (Error %d).", result);

	result = (*info.BGMPlayerObj)->GetInterface(info.BGMPlayerObj, SL_IID_SEEK, &info.BGMPlayerSeek);
	slCheckErrorWithStatus(result, "Problem getting SL_IID_SEEK for BGM player (Error %d).", result);
	// Enables looping and starts playing.
	if (isLooping)
	{
		result = (*info.BGMPlayerSeek)->SetLoop(info.BGMPlayerSeek, SL_BOOLEAN_TRUE, 0, SL_TIME_UNKNOWN);
		slCheckErrorWithStatus(result, "Problem setting BGM player loop (Error %d).", result);
	}
    result = (*info.BGMPlayer)->SetPlayState(info.BGMPlayer, SL_PLAYSTATE_PLAYING);
    info.state = SL_PLAYSTATE_PLAYING;
    slCheckErrorWithStatus(result, "Problem starting BGMplayer (Error %d).", result);

    result = (*info.BGMPlayerObj)->GetInterface(info.BGMPlayerObj, SL_IID_VOLUME, &info.BGMPlayerVolume);
    slCheckErrorWithStatus(result, "Problem getting SL_IID_VOLUME for BGM player (Error %d).", result);
    result = (*info.BGMPlayerVolume)->SetVolumeLevel(info.BGMPlayerVolume, (float)volume / 100.f * -MINIMUM_VOLUME + MINIMUM_VOLUME);
    slCheckErrorWithStatus(result, "Problem setting VOLUME for BGM player (Error %d).", result);
    _bgms[level] = info;
}
Example #30
0
			BOOTIL_EXPORT int Int( const BString & str )
			{
				if ( str == "" ) { return 0; }

				return atoi( str.c_str() );
			}