mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
NO_SOUND Define
This commit is contained in:
@@ -1,68 +1,68 @@
|
|||||||
#ifndef NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__
|
#ifndef NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__
|
||||||
#define NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__
|
#define NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__
|
||||||
|
|
||||||
//package net.minecraft.client.sound;
|
//package net.minecraft.client.sound;
|
||||||
|
|
||||||
#if defined(ANDROID) && !defined(PRE_ANDROID23)
|
#if defined(ANDROID) && !defined(PRE_ANDROID23)
|
||||||
#include "../../platform/audio/SoundSystemSL.h"
|
#include "../../platform/audio/SoundSystemSL.h"
|
||||||
#elif defined(__APPLE__) || defined(PLATFORM_DESKTOP)
|
#elif (defined(__APPLE__) || defined(PLATFORM_DESKTOP)) && !defined(NO_SOUND)
|
||||||
#include "../../platform/audio/SoundSystemAL.h"
|
#include "../../platform/audio/SoundSystemAL.h"
|
||||||
#else
|
#else
|
||||||
#include "../../platform/audio/SoundSystem.h"
|
#include "../../platform/audio/SoundSystem.h"
|
||||||
#endif
|
#endif
|
||||||
#include "SoundRepository.h"
|
#include "SoundRepository.h"
|
||||||
#include "../../util/Random.h"
|
#include "../../util/Random.h"
|
||||||
|
|
||||||
class Minecraft;
|
class Minecraft;
|
||||||
class Mob;
|
class Mob;
|
||||||
class Options;
|
class Options;
|
||||||
|
|
||||||
class SoundEngine
|
class SoundEngine
|
||||||
{
|
{
|
||||||
static const int SOUND_DISTANCE = 16;
|
static const int SOUND_DISTANCE = 16;
|
||||||
|
|
||||||
#if defined(ANDROID) && !defined(PRE_ANDROID23) && !defined(RPI)
|
#if defined(ANDROID) && !defined(PRE_ANDROID23) && !defined(RPI)
|
||||||
SoundSystemSL soundSystem;
|
SoundSystemSL soundSystem;
|
||||||
#elif defined(__APPLE__) || defined(PLATFORM_DESKTOP)
|
#elif (defined(__APPLE__) || defined(PLATFORM_DESKTOP)) && !defined(NO_SOUND)
|
||||||
SoundSystemAL soundSystem;
|
SoundSystemAL soundSystem;
|
||||||
#else
|
#else
|
||||||
SoundSystem soundSystem;
|
SoundSystem soundSystem;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Options* options;
|
Options* options;
|
||||||
int idCounter;
|
int idCounter;
|
||||||
//static bool loaded;
|
//static bool loaded;
|
||||||
Random random;
|
Random random;
|
||||||
//int noMusicDelay = random.nextInt(20 * 60 * 10);
|
//int noMusicDelay = random.nextInt(20 * 60 * 10);
|
||||||
float _x;
|
float _x;
|
||||||
float _y;
|
float _y;
|
||||||
float _z;
|
float _z;
|
||||||
float _yRot;
|
float _yRot;
|
||||||
float _invMaxDistance;
|
float _invMaxDistance;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SoundEngine(float maxDistance);
|
SoundEngine(float maxDistance);
|
||||||
|
|
||||||
~SoundEngine();
|
~SoundEngine();
|
||||||
|
|
||||||
void init(Minecraft* mc, Options* options);
|
void init(Minecraft* mc, Options* options);
|
||||||
void destroy();
|
void destroy();
|
||||||
|
|
||||||
void enable(bool status);
|
void enable(bool status);
|
||||||
|
|
||||||
void updateOptions();
|
void updateOptions();
|
||||||
void update(Mob* player, float a);
|
void update(Mob* player, float a);
|
||||||
|
|
||||||
void play(const std::string& name, float x, float y, float z, float volume, float pitch);
|
void play(const std::string& name, float x, float y, float z, float volume, float pitch);
|
||||||
void playUI(const std::string& name, float volume, float pitch);
|
void playUI(const std::string& name, float volume, float pitch);
|
||||||
|
|
||||||
float _getVolumeMult(float x, float y, float z);
|
float _getVolumeMult(float x, float y, float z);
|
||||||
private:
|
private:
|
||||||
void loadLibrary() {}
|
void loadLibrary() {}
|
||||||
SoundDesc _pp(const std::string& fn);
|
SoundDesc _pp(const std::string& fn);
|
||||||
|
|
||||||
SoundRepository sounds;
|
SoundRepository sounds;
|
||||||
Minecraft* mc;
|
Minecraft* mc;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__*/
|
#endif /*NET_MINECRAFT_CLIENT_SOUND__SoundEngine_H__*/
|
||||||
|
|||||||
Reference in New Issue
Block a user