Moved old Nuked and Java OPL3 to own namespaces

This helps to avoid clashing of OPL3 classes
This commit is contained in:
alexey.lysiuk 2018-03-08 10:18:49 +02:00
parent 114e56b334
commit cea64ea092
3 changed files with 11 additions and 6 deletions

View file

@ -55,6 +55,9 @@ static FRandom pr_opl3;
#define VOLUME_MUL 0.3333
namespace JavaOPL3
{
class Operator;
static inline double StripIntPart(double num)
@ -1862,7 +1865,9 @@ void OPL3::SetPanning(int c, float left, float right)
}
}
} // JavaOPL3
OPLEmul *JavaOPLCreate(bool stereo)
{
return new OPL3(stereo);
return new JavaOPL3::OPL3(stereo);
}

View file

@ -62,7 +62,7 @@
// Envelope generator
//
namespace OPL3
namespace NukedOPL3
{
typedef Bit16s(*envelope_sinfunc)(Bit16u phase, Bit16u envelope);
@ -1020,8 +1020,8 @@ NukedOPL3::NukedOPL3(bool stereo) {
Reset();
}
} // namespace OPL3
} // namespace NukedOPL3
OPLEmul *NukedOPL3Create(bool stereo) {
return new OPL3::NukedOPL3(stereo);
return new NukedOPL3::NukedOPL3(stereo);
}

View file

@ -32,7 +32,7 @@
#include "opl.h"
#include "musicblock.h"
namespace OPL3
namespace NukedOPL3
{
typedef uintptr_t Bitu;
@ -237,4 +237,4 @@ public:
NukedOPL3(bool stereo);
};
} // namespace OPL3
} // namespace NukedOPL3