mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 17:59:18 +02:00
removed dependencies on the old parser. The code can now be compiled outside of Borland C++
This commit is contained in:
28
AdvSound.cpp
28
AdvSound.cpp
@@ -7,14 +7,10 @@ obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#include "system.hpp"
|
||||
#include "classes.hpp"
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Timer.h"
|
||||
#include "stdafx.h"
|
||||
#include "AdvSound.h"
|
||||
#include "Timer.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
|
||||
TAdvancedSound::TAdvancedSound()
|
||||
{
|
||||
@@ -36,8 +32,8 @@ void TAdvancedSound::Free()
|
||||
{
|
||||
}
|
||||
|
||||
void TAdvancedSound::Init(char *NameOn, char *Name, char *NameOff, double DistanceAttenuation,
|
||||
vector3 pPosition)
|
||||
void TAdvancedSound::Init( std::string const &NameOn, std::string const &Name, std::string const &NameOff, double DistanceAttenuation,
|
||||
vector3 const &pPosition)
|
||||
{
|
||||
SoundStart.Init(NameOn, DistanceAttenuation, pPosition.x, pPosition.y, pPosition.z, true);
|
||||
SoundCommencing.Init(Name, DistanceAttenuation, pPosition.x, pPosition.y, pPosition.z, true);
|
||||
@@ -60,13 +56,17 @@ void TAdvancedSound::Init(char *NameOn, char *Name, char *NameOff, double Distan
|
||||
SoundShut.FA = 0.0;
|
||||
}
|
||||
|
||||
void TAdvancedSound::Load(TQueryParserComp *Parser, vector3 pPosition)
|
||||
void TAdvancedSound::Load(cParser &Parser, vector3 const &pPosition)
|
||||
{
|
||||
AnsiString NameOn = Parser->GetNextSymbol().LowerCase();
|
||||
AnsiString Name = Parser->GetNextSymbol().LowerCase();
|
||||
AnsiString NameOff = Parser->GetNextSymbol().LowerCase();
|
||||
double DistanceAttenuation = Parser->GetNextSymbol().ToDouble();
|
||||
Init(NameOn.c_str(), Name.c_str(), NameOff.c_str(), DistanceAttenuation, pPosition);
|
||||
std::string nameon, name, nameoff;
|
||||
double attenuation;
|
||||
Parser.getTokens( 4 );
|
||||
Parser
|
||||
>> nameon
|
||||
>> name
|
||||
>> nameoff
|
||||
>> attenuation;
|
||||
Init( nameon, name, nameoff, attenuation, pPosition );
|
||||
}
|
||||
|
||||
void TAdvancedSound::TurnOn(bool ListenerInside, vector3 NewPosition)
|
||||
|
||||
Reference in New Issue
Block a user