it builds kinda, but .loc file is fucked and missing asset copying
replaced miles sound system replaced .arc format with a folder
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
#define _SEKRIT
|
||||
#include "..\..\Durango\Miles\include\mss.h"
|
||||
#elif defined _WINDOWS64
|
||||
#include "..\..\windows64\Miles\include\mss.h"
|
||||
#else // PS4
|
||||
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
|
||||
#define _SEKRIT2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,9 +2,17 @@
|
||||
class Mob;
|
||||
class Options;
|
||||
using namespace std;
|
||||
#include "..\..\Minecraft.World\SoundTypes.h"
|
||||
#include "../../Minecraft.World/SoundTypes.h"
|
||||
|
||||
enum eMUSICFILES
|
||||
#include "miniaudio.h"
|
||||
|
||||
constexpr float SFX_3D_MIN_DISTANCE = 1.0f;
|
||||
constexpr float SFX_3D_MAX_DISTANCE = 16.0f;
|
||||
constexpr float SFX_3D_ROLLOFF = 0.5f;
|
||||
constexpr float SFX_VOLUME_MULTIPLIER = 1.5f;
|
||||
constexpr float SFX_MAX_GAIN = 1.5f;
|
||||
|
||||
enum eMusicFiles
|
||||
{
|
||||
eStream_Overworld_Calm1 = 0,
|
||||
eStream_Overworld_Calm2,
|
||||
@@ -15,7 +23,6 @@ enum eMUSICFILES
|
||||
eStream_Overworld_hal4,
|
||||
eStream_Overworld_nuance1,
|
||||
eStream_Overworld_nuance2,
|
||||
#ifndef _XBOX
|
||||
// Add the new music tracks
|
||||
eStream_Overworld_Creative1,
|
||||
eStream_Overworld_Creative2,
|
||||
@@ -27,7 +34,6 @@ enum eMUSICFILES
|
||||
eStream_Overworld_Menu2,
|
||||
eStream_Overworld_Menu3,
|
||||
eStream_Overworld_Menu4,
|
||||
#endif
|
||||
eStream_Overworld_piano1,
|
||||
eStream_Overworld_piano2,
|
||||
eStream_Overworld_piano3, // <-- make piano3 the last overworld one
|
||||
@@ -39,6 +45,7 @@ enum eMUSICFILES
|
||||
// The End
|
||||
eStream_end_dragon,
|
||||
eStream_end_end,
|
||||
// Music Discs
|
||||
eStream_CD_1,
|
||||
eStream_CD_2,
|
||||
eStream_CD_3,
|
||||
@@ -54,17 +61,21 @@ enum eMUSICFILES
|
||||
eStream_Max,
|
||||
};
|
||||
|
||||
enum eMUSICTYPE
|
||||
enum eMusicType
|
||||
{
|
||||
eMusicType_None,
|
||||
eMusicType_Game,
|
||||
eMusicType_CD,
|
||||
eMusicType_Nether = 0,
|
||||
// ???
|
||||
eMusicType_Menu = 2,
|
||||
// ???
|
||||
eMusicType_End = 4,
|
||||
eMusicType_Creative = 5,
|
||||
eMusicType_Overworld = 7,
|
||||
};
|
||||
|
||||
|
||||
enum MUSIC_STREAMSTATE
|
||||
enum eMusicStreamState
|
||||
{
|
||||
eMusicStreamState_Idle=0,
|
||||
eMusicStreamState_Idle = 0,
|
||||
eMusicStreamState_Stop,
|
||||
eMusicStreamState_Stopping,
|
||||
eMusicStreamState_Opening,
|
||||
@@ -76,43 +87,59 @@ enum MUSIC_STREAMSTATE
|
||||
|
||||
typedef struct
|
||||
{
|
||||
F32 x,y,z,volume,pitch;
|
||||
#ifndef _WINDOWS64
|
||||
F32 x, y, z, volume, pitch;
|
||||
#else
|
||||
float x, y, z, volume, pitch;
|
||||
#endif
|
||||
int iSound;
|
||||
bool bIs3D;
|
||||
bool bUseSoundsPitchVal;
|
||||
bool bIs3D;
|
||||
bool bUseSoundsPitchVal;
|
||||
#ifdef _DEBUG
|
||||
char chName[64];
|
||||
#endif
|
||||
}
|
||||
AUDIO_INFO;
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
struct MiniAudioSound
|
||||
{
|
||||
ma_sound sound;
|
||||
AUDIO_INFO info;
|
||||
bool active;
|
||||
};
|
||||
|
||||
extern std::vector<MiniAudioSound*> m_activeSounds;
|
||||
#endif
|
||||
|
||||
class SoundEngine : public ConsoleSoundEngine
|
||||
{
|
||||
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
|
||||
public:
|
||||
SoundEngine();
|
||||
virtual void destroy();
|
||||
void destroy() override;
|
||||
#ifdef _DEBUG
|
||||
void GetSoundName(char *szSoundName,int iSound);
|
||||
void GetSoundName(char* szSoundName, int iSound);
|
||||
#endif
|
||||
virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
|
||||
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
|
||||
virtual void playUI(int iSound, float volume, float pitch);
|
||||
virtual void playMusicTick();
|
||||
virtual void updateMusicVolume(float fVal);
|
||||
virtual void updateSystemMusicPlaying(bool isPlaying);
|
||||
virtual void updateSoundEffectVolume(float fVal);
|
||||
virtual void init(Options *);
|
||||
virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one
|
||||
virtual void add(const wstring& name, File *file);
|
||||
virtual void addMusic(const wstring& name, File *file);
|
||||
virtual void addStreaming(const wstring& name, File *file);
|
||||
virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false);
|
||||
void play(int iSound, float x, float y, float z, float volume, float pitch) override;
|
||||
void playStreaming(const wstring& name, float x, float y, float z, float volume, float pitch, bool bMusicDelay = true) override;
|
||||
void playUI(int iSound, float volume, float pitch) override;
|
||||
void playMusicTick() override;
|
||||
void updateMusicVolume(float fVal) override;
|
||||
void updateSystemMusicPlaying(bool isPlaying) override;
|
||||
void updateSoundEffectVolume(float fVal) override;
|
||||
void init(Options*) override;
|
||||
void tick(shared_ptr<Mob>* players, float a) override; // 4J - updated to take array of local players rather than single one
|
||||
void add(const wstring& name, File* file) override;
|
||||
void addMusic(const wstring& name, File* file) override;
|
||||
void addStreaming(const wstring& name, File* file) override;
|
||||
char* ConvertSoundPathToName(const wstring& name, bool bConvertSpaces = false) override;
|
||||
bool isStreamingWavebankReady(); // 4J Added
|
||||
int getMusicID(int iDomain);
|
||||
int getMusicID(eMusicType iDomain);
|
||||
int getMusicID(const wstring& name);
|
||||
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCD1);
|
||||
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
|
||||
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCreativeMin, int iCreativeMax, int iMenuMin, int iMenuMax, int iCD1);
|
||||
void updateMiniAudio();
|
||||
inline void getGameModeMusicID(Minecraft* pMinecraft, unsigned int i);
|
||||
void playMusicUpdate();
|
||||
|
||||
private:
|
||||
@@ -121,48 +148,56 @@ private:
|
||||
#ifdef __PS3__
|
||||
int initAudioHardware(int iMinSpeakers);
|
||||
#else
|
||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;}
|
||||
int initAudioHardware(int iMinSpeakers) override
|
||||
{
|
||||
return iMinSpeakers;
|
||||
}
|
||||
#endif
|
||||
|
||||
int GetRandomishTrack(int iStart,int iEnd);
|
||||
|
||||
HMSOUNDBANK m_hBank;
|
||||
HDIGDRIVER m_hDriver;
|
||||
HSTREAM m_hStream;
|
||||
int GetRandomishTrack(int iStart, int iEnd);
|
||||
|
||||
MiniAudioSound* m_elytraLoopingSound = nullptr;
|
||||
|
||||
|
||||
ma_engine m_engine;
|
||||
ma_engine_config m_engineConfig;
|
||||
ma_sound m_musicStream;
|
||||
bool m_musicStreamActive;
|
||||
|
||||
static char m_szSoundPath[];
|
||||
static char m_szMusicPath[];
|
||||
static char m_szRedistName[];
|
||||
static char *m_szStreamFileA[eStream_Max];
|
||||
static const char* m_szStreamFileA[eStream_Max];
|
||||
|
||||
AUDIO_LISTENER m_ListenerA[MAX_LOCAL_PLAYERS];
|
||||
int m_validListenerCount;
|
||||
|
||||
|
||||
Random *random;
|
||||
Random* random;
|
||||
int m_musicID;
|
||||
int m_iMusicDelay;
|
||||
int m_StreamState;
|
||||
int m_MusicType;
|
||||
AUDIO_INFO m_StreamingAudioInfo;
|
||||
wstring m_CDMusic;
|
||||
BOOL m_bSystemMusicPlaying;
|
||||
float m_MasterMusicVolume;
|
||||
float m_MasterEffectsVolume;
|
||||
|
||||
C4JThread *m_openStreamThread;
|
||||
static int OpenStreamThreadProc( void* lpParameter );
|
||||
C4JThread* m_openStreamThread;
|
||||
static int OpenStreamThreadProc(void* lpParameter);
|
||||
char m_szStreamName[255];
|
||||
int CurrentSoundsPlaying[eSoundType_MAX+eSFX_MAX];
|
||||
int CurrentSoundsPlaying[eSoundType_MAX + eSFX_MAX];
|
||||
|
||||
// streaming music files - will be different for mash-up packs
|
||||
int m_iStream_Overworld_Min,m_iStream_Overworld_Max;
|
||||
int m_iStream_Nether_Min,m_iStream_Nether_Max;
|
||||
int m_iStream_End_Min,m_iStream_End_Max;
|
||||
int m_iStream_Overworld_Min, m_iStream_Overworld_Max;
|
||||
int m_iStream_Nether_Min, m_iStream_Nether_Max;
|
||||
int m_iStream_End_Min, m_iStream_End_Max;
|
||||
int m_iStream_Creative_Min, m_iStream_Creative_Max;
|
||||
int m_iStream_Menu_Min, m_iStream_Menu_Max;
|
||||
int m_iStream_CD_1;
|
||||
bool *m_bHeardTrackA;
|
||||
bool* m_bHeardTrackA;
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int32_t m_hBGMAudio;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
97230
Minecraft.Client/Common/Audio/miniaudio.h
Normal file
97230
Minecraft.Client/Common/Audio/miniaudio.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -48,6 +48,7 @@
|
||||
#include "..\StringTable.h"
|
||||
#ifndef _XBOX
|
||||
#include "..\ArchiveFile.h"
|
||||
#include "..\FolderFile.h"
|
||||
#endif
|
||||
#include "..\Minecraft.h"
|
||||
#ifdef _XBOX
|
||||
@@ -3464,9 +3465,11 @@ void CMinecraftApp::HandleXuiActions(void)
|
||||
// need to stop the streaming audio - by playing streaming audio from the default texture pack now
|
||||
// reset the streaming sounds back to the normal ones
|
||||
#ifndef _XBOX
|
||||
pMinecraft->soundEngine->SetStreamingSounds(eStream_Overworld_Calm1,eStream_Overworld_piano3,
|
||||
eStream_Nether1,eStream_Nether4,
|
||||
eStream_end_dragon,eStream_end_end,
|
||||
pMinecraft->soundEngine->SetStreamingSounds(eStream_Overworld_Calm1, eStream_Overworld_piano3,
|
||||
eStream_Nether1, eStream_Nether4,
|
||||
eStream_end_dragon, eStream_end_end,
|
||||
eStream_Overworld_Creative1, eStream_Overworld_Creative6,
|
||||
eStream_Overworld_Menu1, eStream_Overworld_Menu4,
|
||||
eStream_CD_1);
|
||||
#endif
|
||||
pMinecraft->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
|
||||
@@ -4083,61 +4086,12 @@ void CMinecraftApp::loadMediaArchive()
|
||||
{
|
||||
wstring mediapath = L"";
|
||||
|
||||
#ifdef __PS3__
|
||||
mediapath = L"Common\\Media\\MediaPS3.arc";
|
||||
#elif _WINDOWS64
|
||||
mediapath = L"Common\\Media\\MediaWindows64.arc";
|
||||
#elif __ORBIS__
|
||||
mediapath = L"Common\\Media\\MediaOrbis.arc";
|
||||
#elif _DURANGO
|
||||
mediapath = L"Common\\Media\\MediaDurango.arc";
|
||||
#elif __PSVITA__
|
||||
mediapath = L"Common\\Media\\MediaPSVita.arc";
|
||||
#endif
|
||||
mediapath = L"Common\\Media";
|
||||
|
||||
if (!mediapath.empty())
|
||||
{
|
||||
m_mediaArchive = new ArchiveFile( File(mediapath) );
|
||||
m_mediaArchive = new FolderFile(mediapath);
|
||||
}
|
||||
#if 0
|
||||
string path = "Common\\media.arc";
|
||||
HANDLE hFile = CreateFile( path.c_str(),
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_FLAG_SEQUENTIAL_SCAN,
|
||||
NULL );
|
||||
|
||||
if( hFile != INVALID_HANDLE_VALUE )
|
||||
{
|
||||
File fileHelper(convStringToWstring(path));
|
||||
DWORD dwFileSize = fileHelper.length();
|
||||
|
||||
// Initialize memory.
|
||||
PBYTE m_fBody = new BYTE[ dwFileSize ];
|
||||
ZeroMemory(m_fBody, dwFileSize);
|
||||
|
||||
DWORD m_fSize = 0;
|
||||
BOOL hr = ReadFile( hFile,
|
||||
m_fBody,
|
||||
dwFileSize,
|
||||
&m_fSize,
|
||||
NULL );
|
||||
|
||||
assert( m_fSize == dwFileSize );
|
||||
|
||||
CloseHandle( hFile );
|
||||
|
||||
m_mediaArchive = new ArchiveFile(m_fBody, m_fSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
assert( false );
|
||||
// AHHHHHHHHHHHH
|
||||
m_mediaArchive = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CMinecraftApp::loadStringTable()
|
||||
|
||||
@@ -22,6 +22,7 @@ using namespace std;
|
||||
#include "..\Common\GameRules\GameRuleManager.h"
|
||||
#include "..\SkinBox.h"
|
||||
#include "..\ArchiveFile.h"
|
||||
#include "..\FolderFile.h"
|
||||
|
||||
typedef struct _JoinFromInviteData
|
||||
{
|
||||
@@ -415,7 +416,7 @@ public:
|
||||
void loadStringTable();
|
||||
|
||||
protected:
|
||||
ArchiveFile *m_mediaArchive;
|
||||
FolderFile *m_mediaArchive;
|
||||
StringTable *m_stringTable;
|
||||
|
||||
public:
|
||||
|
||||
@@ -16,6 +16,14 @@ public:
|
||||
e_AudioType_Nether,
|
||||
e_AudioType_End,
|
||||
|
||||
// @3UR: thanks https://github.com/LCERD/PCK-Studio/blob/500fc74395ce99fe20cbd7598999bfab3b606745/PckStudio.Core/FileFormats/PckAudioFile.cs#L25
|
||||
e_AudioType_Creative,
|
||||
e_AudioType_Menu,
|
||||
e_AudioType_Battle,
|
||||
e_AudioType_Tumble,
|
||||
e_AudioType_Glide,
|
||||
e_AudioType_BuildOff,
|
||||
|
||||
e_AudioType_Max,
|
||||
};
|
||||
enum EAudioParameterType
|
||||
|
||||
BIN
Minecraft.Client/Common/Media/platformskin.swf
Normal file
BIN
Minecraft.Client/Common/Media/platformskin.swf
Normal file
Binary file not shown.
BIN
Minecraft.Client/Common/Media/platformskinHD.swf
Normal file
BIN
Minecraft.Client/Common/Media/platformskinHD.swf
Normal file
Binary file not shown.
@@ -457,7 +457,7 @@ void UIController::loadSkins()
|
||||
// Every platform has one of these, so nothing shared
|
||||
if(m_fScreenHeight==1080.0f)
|
||||
{
|
||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
|
||||
m_iggyLibraries[eLibrary_Platform] = loadSkin(L"platformskinHD.swf", L"platformskinHD.swf");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1554,9 +1554,11 @@ void UIController::NavigateToHomeMenu()
|
||||
{
|
||||
// need to stop the streaming audio - by playing streaming audio from the default texture pack now
|
||||
// reset the streaming sounds back to the normal ones
|
||||
pMinecraft->soundEngine->SetStreamingSounds(eStream_Overworld_Calm1,eStream_Overworld_piano3,
|
||||
eStream_Nether1,eStream_Nether4,
|
||||
eStream_end_dragon,eStream_end_end,
|
||||
pMinecraft->soundEngine->SetStreamingSounds(eStream_Overworld_Calm1, eStream_Overworld_piano3,
|
||||
eStream_Nether1, eStream_Nether4,
|
||||
eStream_end_dragon, eStream_end_end,
|
||||
eStream_Overworld_Creative1, eStream_Overworld_Creative6,
|
||||
eStream_Overworld_Menu1, eStream_Overworld_Menu4,
|
||||
eStream_CD_1);
|
||||
pMinecraft->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user