aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/AchievementPopup.h2
-rw-r--r--Minecraft.Client/Common/Audio/miniaudio.h34
-rw-r--r--Minecraft.Client/Common/Consoles_App.cpp532
-rw-r--r--Minecraft.Client/Common/Consoles_App.h46
-rw-r--r--Minecraft.Client/Common/GameRules/ApplySchematicRuleDefinition.h8
-rw-r--r--Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp36
-rw-r--r--Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h6
-rw-r--r--Minecraft.Client/Common/GameRules/GameRule.h4
-rw-r--r--Minecraft.Client/Common/GameRules/GameRuleManager.cpp2
-rw-r--r--Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp4
-rw-r--r--Minecraft.Client/Common/GameRules/LevelGenerationOptions.h12
-rw-r--r--Minecraft.Client/Common/Network/GameNetworkManager.cpp10
-rw-r--r--Minecraft.Client/Common/Network/GameNetworkManager.h18
-rw-r--r--Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp2
-rw-r--r--Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp2
-rw-r--r--Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h2
-rw-r--r--Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp18
-rw-r--r--Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h8
-rw-r--r--Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp32
-rw-r--r--Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h14
-rw-r--r--Minecraft.Client/Common/UI/UIComponent_Panorama.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp12
-rw-r--r--Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h16
-rw-r--r--Minecraft.Client/Common/UI/UIController.cpp18
-rw-r--r--Minecraft.Client/Common/UI/UIController.h20
-rw-r--r--Minecraft.Client/Common/UI/UIGroup.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIGroup.h12
-rw-r--r--Minecraft.Client/Common/UI/UILayer.cpp6
-rw-r--r--Minecraft.Client/Common/UI/UILayer.h8
-rw-r--r--Minecraft.Client/Common/UI/UIScene.cpp16
-rw-r--r--Minecraft.Client/Common/UI/UIScene.h14
-rw-r--r--Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp74
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadMenu.h10
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp6
-rw-r--r--Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp94
-rw-r--r--Minecraft.Client/Common/XUI/XUI_MultiGameJoinLoad.cpp2
-rw-r--r--Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp102
-rw-r--r--Minecraft.Client/Common/zlib/zconf.h2
-rw-r--r--Minecraft.Client/CreateWorldScreen.cpp4
-rw-r--r--Minecraft.Client/DemoLevel.h2
-rw-r--r--Minecraft.Client/DemoMode.cpp4
-rw-r--r--Minecraft.Client/Durango/Durango_App.cpp30
-rw-r--r--Minecraft.Client/Durango/Iggy/include/rrCore.h56
-rw-r--r--Minecraft.Client/Durango/Miles/include/mss.h428
-rw-r--r--Minecraft.Client/Durango/Miles/include/rrCore.h56
-rw-r--r--Minecraft.Client/Durango/Network/DQRNetworkManager.cpp120
-rw-r--r--Minecraft.Client/Durango/Network/DQRNetworkManager.h24
-rw-r--r--Minecraft.Client/Durango/XML/ATGXmlParser.cpp408
-rw-r--r--Minecraft.Client/GameRenderer.cpp4
-rw-r--r--Minecraft.Client/GameRenderer.h6
-rw-r--r--Minecraft.Client/Gui.cpp12
-rw-r--r--Minecraft.Client/Gui.h4
-rw-r--r--Minecraft.Client/LevelRenderer.cpp16
-rw-r--r--Minecraft.Client/LevelRenderer.h8
-rw-r--r--Minecraft.Client/LocalPlayer.h10
-rw-r--r--Minecraft.Client/MinecartRenderer.cpp2
-rw-r--r--Minecraft.Client/Minecraft.cpp34
-rw-r--r--Minecraft.Client/Minecraft.h16
-rw-r--r--Minecraft.Client/MinecraftServer.cpp60
-rw-r--r--Minecraft.Client/MinecraftServer.h32
-rw-r--r--Minecraft.Client/MultiPlayerLevel.cpp2
-rw-r--r--Minecraft.Client/MultiPlayerLevel.h2
-rw-r--r--Minecraft.Client/Orbis/Iggy/include/rrCore.h56
-rw-r--r--Minecraft.Client/Orbis/Miles/include/mss.h428
-rw-r--r--Minecraft.Client/Orbis/Miles/include/rrCore.h56
-rw-r--r--Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.cpp4
-rw-r--r--Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.h14
-rw-r--r--Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.cpp154
-rw-r--r--Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.h90
-rw-r--r--Minecraft.Client/Orbis/OrbisExtras/OrbisTypes.h4
-rw-r--r--Minecraft.Client/Orbis/Orbis_App.cpp2
-rw-r--r--Minecraft.Client/Orbis/user_malloc.cpp6
-rw-r--r--Minecraft.Client/PS3/Iggy/include/rrCore.h56
-rw-r--r--Minecraft.Client/PS3/Miles/include/mss.h428
-rw-r--r--Minecraft.Client/PS3/Miles/include/rrCore.h56
-rw-r--r--Minecraft.Client/PS3/Network/SonyRemoteStorage_PS3.cpp72
-rw-r--r--Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h4
-rw-r--r--Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp2
-rw-r--r--Minecraft.Client/PS3/PS3Extras/Ps3Stubs.h90
-rw-r--r--Minecraft.Client/PS3/PS3Extras/Ps3Types.h11
-rw-r--r--Minecraft.Client/PS3/PS3_App.cpp6
-rw-r--r--Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseDataStorage_SPU.h6
-rw-r--r--Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseLightStorage_SPU.h6
-rw-r--r--Minecraft.Client/PSVita/Iggy/include/rrCore.h56
-rw-r--r--Minecraft.Client/PSVita/Miles/include/mss.h428
-rw-r--r--Minecraft.Client/PSVita/Miles/include/rrCore.h56
-rw-r--r--Minecraft.Client/PSVita/PSVitaExtras/PSVitaStubs.h94
-rw-r--r--Minecraft.Client/PSVita/PSVitaExtras/PSVitaTypes.h6
-rw-r--r--Minecraft.Client/PSVita/PSVitaExtras/PsVitaStubs.cpp170
-rw-r--r--Minecraft.Client/PSVita/PSVitaExtras/libdivide.h292
-rw-r--r--Minecraft.Client/PSVita/PSVitaExtras/zconf.h2
-rw-r--r--Minecraft.Client/PSVita/PSVita_App.cpp2
-rw-r--r--Minecraft.Client/PlayerChunkMap.cpp12
-rw-r--r--Minecraft.Client/PlayerChunkMap.h6
-rw-r--r--Minecraft.Client/PlayerConnection.h10
-rw-r--r--Minecraft.Client/ProgressRenderer.cpp6
-rw-r--r--Minecraft.Client/ProgressRenderer.h2
-rw-r--r--Minecraft.Client/ScrolledSelectionList.h4
-rw-r--r--Minecraft.Client/SelectWorldScreen.cpp2
-rw-r--r--Minecraft.Client/ServerLevel.cpp8
-rw-r--r--Minecraft.Client/ServerLevel.h2
-rw-r--r--Minecraft.Client/ServerPlayer.cpp10
-rw-r--r--Minecraft.Client/ServerPlayer.h4
-rw-r--r--Minecraft.Client/StringTable.cpp2
-rw-r--r--Minecraft.Client/TileRenderer.cpp16
-rw-r--r--Minecraft.Client/Timer.cpp20
-rw-r--r--Minecraft.Client/Timer.h6
-rw-r--r--Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h36
-rw-r--r--Minecraft.Client/Windows64/Iggy/include/rrCore.h56
-rw-r--r--Minecraft.Client/Windows64/Windows64_App.cpp2
-rw-r--r--Minecraft.Client/Windows64/Windows64_Xuid.h26
-rw-r--r--Minecraft.Client/Xbox/4JLibs/inc/4J_Storage.h24
-rw-r--r--Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp2
-rw-r--r--Minecraft.Client/Xbox/Network/NetworkPlayerXbox.h2
-rw-r--r--Minecraft.Client/Xbox/Sentient/Include/SenClientUGCTypes.h20
-rw-r--r--Minecraft.Client/Xbox/XML/ATGXmlParser.cpp406
-rw-r--r--Minecraft.Client/stdafx.h1
117 files changed, 2951 insertions, 2957 deletions
diff --git a/Minecraft.Client/AchievementPopup.h b/Minecraft.Client/AchievementPopup.h
index 3085dc6e..4304a7e5 100644
--- a/Minecraft.Client/AchievementPopup.h
+++ b/Minecraft.Client/AchievementPopup.h
@@ -13,7 +13,7 @@ private:
wstring title;
wstring desc;
Achievement *ach;
- __int64 startTime;
+ int64_t startTime;
ItemRenderer *ir;
bool isHelper;
diff --git a/Minecraft.Client/Common/Audio/miniaudio.h b/Minecraft.Client/Common/Audio/miniaudio.h
index 24e676bb..01e27040 100644
--- a/Minecraft.Client/Common/Audio/miniaudio.h
+++ b/Minecraft.Client/Common/Audio/miniaudio.h
@@ -3791,8 +3791,8 @@ extern "C" {
typedef signed int ma_int32;
typedef unsigned int ma_uint32;
#if defined(_MSC_VER) && !defined(__clang__)
- typedef signed __int64 ma_int64;
- typedef unsigned __int64 ma_uint64;
+ typedef signed long long ma_int64;
+ typedef unsigned long long ma_uint64;
#else
#if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
#pragma GCC diagnostic push
@@ -11249,7 +11249,7 @@ struct ma_sound
float* pProcessingCache; /* Will be null if pDataSource is null. */
ma_uint32 processingCacheFramesRemaining;
ma_uint32 processingCacheCap;
- ma_bool8 ownsDataSource;
+ ma_bool8 ownsDataSource;
/*
We're declaring a resource manager data source object here to save us a malloc when loading a
@@ -11596,7 +11596,7 @@ IMPLEMENTATION
#include <sys/time.h> /* select() (used for ma_sleep()). */
#include <time.h> /* For nanosleep() */
- #include <unistd.h>
+ #include <unistd.h>
#endif
/* For fstat(), etc. */
@@ -11729,7 +11729,7 @@ IMPLEMENTATION
#endif
#if _MSC_VER >= 1600 && (defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 160040219)
- static MA_INLINE unsigned __int64 ma_xgetbv(int reg)
+ static MA_INLINE unsigned long long ma_xgetbv(int reg)
{
return _xgetbv(reg);
}
@@ -17622,7 +17622,7 @@ static ma_result ma_thread_create__posix(ma_thread* pThread, ma_thread_priority
(void)stackSize; /* Suppress unused parameter warning. */
}
#endif
-
+
if (scheduler != -1) {
int priorityMin = sched_get_priority_min(scheduler);
@@ -23061,7 +23061,7 @@ static ma_result ma_context_get_MMDevice__wasapi(ma_context* pContext, ma_device
CoInitializeResult = ma_CoInitializeEx(pContext, NULL, MA_COINIT_VALUE);
{
hr = ma_CoCreateInstance(pContext, &MA_CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL, &MA_IID_IMMDeviceEnumerator, (void**)&pDeviceEnumerator);
- }
+ }
if (CoInitializeResult == S_OK || CoInitializeResult == S_FALSE) { ma_CoUninitialize(pContext); }
if (FAILED(hr)) { /* <-- This is checking the call above to ma_CoCreateInstance(). */
@@ -29687,7 +29687,7 @@ static ma_result ma_device_start__alsa(ma_device* pDevice)
}
if (pDevice->type == ma_device_type_playback || pDevice->type == ma_device_type_duplex) {
- /*
+ /*
When data is written to the device we wait for the device to get ready to receive data with poll(). In my testing
I have observed that poll() can sometimes block forever unless the device is started explicitly with snd_pcm_start()
or some data is written with snd_pcm_writei().
@@ -35996,7 +35996,7 @@ static ma_result ma_device_init_internal__coreaudio(ma_context* pContext, ma_dev
#endif
}
-
+
status = ((ma_AudioUnitSetProperty_proc)pContext->coreaudio.AudioUnitSetProperty)(pData->audioUnit, kAudioUnitProperty_StreamFormat, formatScope, formatElement, &bestFormat, sizeof(bestFormat));
if (status != noErr) {
((ma_AudioComponentInstanceDispose_proc)pContext->coreaudio.AudioComponentInstanceDispose)(pData->audioUnit);
@@ -39310,7 +39310,7 @@ static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUs
(void)error;
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] ERROR CALLBACK: error=%d, AAudioStream_getState()=%d\n", error, ((MA_PFN_AAudioStream_getState)pDevice->pContext->aaudio.AAudioStream_getState)(pStream));
-
+
/*
When we get an error, we'll assume that the stream is in an erroneous state and needs to be restarted. From the documentation,
we cannot do this from the error callback. Therefore we are going to use an event thread for the AAudio backend to do this
@@ -39322,13 +39322,13 @@ static void ma_stream_error_callback__aaudio(ma_AAudioStream* pStream, void* pUs
else {
job = ma_job_init(MA_JOB_TYPE_DEVICE_AAUDIO_REROUTE);
job.data.device.aaudio.reroute.pDevice = pDevice;
-
+
if (pStream == pDevice->aaudio.pStreamCapture) {
job.data.device.aaudio.reroute.deviceType = ma_device_type_capture;
} else {
job.data.device.aaudio.reroute.deviceType = ma_device_type_playback;
}
-
+
result = ma_device_job_thread_post(&pDevice->pContext->aaudio.jobThread, &job);
if (result != MA_SUCCESS) {
ma_log_postf(ma_device_get_log(pDevice), MA_LOG_LEVEL_INFO, "[AAudio] Device Disconnected. Failed to post job for rerouting.\n");
@@ -39925,7 +39925,7 @@ static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type dev
/* We got disconnected! Retry a few times, until we find a connected device! */
iAttempt = 0;
- while (iAttempt++ < maxAttempts) {
+ while (iAttempt++ < maxAttempts) {
/* Device tearing down? No need to reroute! */
if (ma_atomic_bool32_get(&pDevice->aaudio.isTearingDown)) {
result = MA_SUCCESS; /* Caller should continue as normal. */
@@ -40023,7 +40023,7 @@ static ma_result ma_device_reinit__aaudio(ma_device* pDevice, ma_device_type dev
break;
}
}
-
+
return result;
}
@@ -61704,7 +61704,7 @@ static ma_result ma_default_vfs_info(ma_vfs* pVFS, ma_vfs_file file, ma_file_inf
/* Not implemented. Fall back to seek/tell/seek. */
ma_int64 cursor;
ma_int64 sizeInBytes;
-
+
result = ma_default_vfs_tell(pVFS, file, &cursor);
if (result != MA_SUCCESS) {
return result;
@@ -76937,7 +76937,7 @@ static void ma_engine_node_process_pcm_frames__sound(ma_node* pNode, const float
if (pSound->processingCacheFramesRemaining > 0) {
MA_MOVE_MEMORY(pSound->pProcessingCache, ma_offset_pcm_frames_ptr_f32(pSound->pProcessingCache, frameCountIn, dataSourceChannels), pSound->processingCacheFramesRemaining * ma_get_bytes_per_frame(ma_format_f32, dataSourceChannels));
}
-
+
totalFramesRead += (ma_uint32)frameCountOut; /* Safe cast. */
if (result != MA_SUCCESS || ma_sound_at_end(pSound)) {
@@ -78439,7 +78439,7 @@ static ma_result ma_sound_init_from_data_source_internal(ma_engine* pEngine, con
if (pSound->processingCacheCap == 0) {
pSound->processingCacheCap = 512;
}
-
+
pSound->pProcessingCache = (float*)ma_calloc(pSound->processingCacheCap * ma_get_bytes_per_frame(ma_format_f32, engineNodeConfig.channelsIn), &pEngine->allocationCallbacks);
if (pSound->pProcessingCache == NULL) {
ma_engine_node_uninit(&pSound->engineNode, &pEngine->allocationCallbacks);
diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp
index 3aae68d2..21eca0f4 100644
--- a/Minecraft.Client/Common/Consoles_App.cpp
+++ b/Minecraft.Client/Common/Consoles_App.cpp
@@ -207,7 +207,7 @@ CMinecraftApp::CMinecraftApp()
#ifdef _XBOX
// m_bTransferSavesToXboxOne=false;
// m_uiTransferSlotC=5;
-#endif
+#endif
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
m_bUseDPadForDebug = false;
@@ -224,7 +224,7 @@ CMinecraftApp::CMinecraftApp()
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
- m_vBannedListA[i] = new vector<PBANNEDLISTDATA>;
+ m_vBannedListA[i] = new vector<PBANNEDLISTDATA>;
}
LocaleAndLanguageInit();
@@ -270,7 +270,7 @@ void CMinecraftApp::DebugPrintf(int user, const char *szFormat, ...)
{
SceUID tty2 = sceIoOpen("tty2:", SCE_O_WRONLY, 0);
if(tty2>=0)
- {
+ {
std::string string1(buf);
sceIoWrite(tty2, string1.c_str(), string1.length());
sceIoClose(tty2);
@@ -281,7 +281,7 @@ void CMinecraftApp::DebugPrintf(int user, const char *szFormat, ...)
{
SceUID tty3 = sceIoOpen("tty3:", SCE_O_WRONLY, 0);
if(tty3>=0)
- {
+ {
std::string string1(buf);
sceIoWrite(tty3, string1.c_str(), string1.length());
sceIoClose(tty3);
@@ -331,7 +331,7 @@ void CMinecraftApp::SetAction(int iPad, eXuiAction action, LPVOID param)
m_eXuiAction[iPad]=action;
m_eXuiActionParam[iPad] = param;
}
-}
+}
bool CMinecraftApp::IsAppPaused()
{
@@ -367,7 +367,7 @@ void CMinecraftApp::HandleButtonPresses(int iPad)
// // test an update of the profile data
// void *pData=ProfileManager.GetGameDefinedProfileData(iPad);
- //
+ //
// unsigned char *pchData= (unsigned char *)pData;
// int iCount=0;
// for(int i=0;i<GAME_DEFINED_PROFILE_DATA_BYTES;i++)
@@ -456,7 +456,7 @@ bool CMinecraftApp::LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player,
CraftingPanelScreenInput* initData = new CraftingPanelScreenInput();
initData->player = player;
- initData->iContainerType=RECIPE_TYPE_3x3;
+ initData->iContainerType=RECIPE_TYPE_3x3;
initData->iPad = iPad;
initData->x = x;
initData->y = y;
@@ -589,7 +589,7 @@ bool CMinecraftApp::LoadContainerMenu(int iPad,shared_ptr<Container> inventory,
initData->container = container;
initData->iPad = iPad;
- // Load the scene.
+ // Load the scene.
if(app.GetLocalPlayerCount()>1)
{
initData->bSplitscreen=true;
@@ -912,7 +912,7 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
// 4J-JEV: We cannot change these in-game, as they could affect localised strings and font.
// XB1: Fix for #172947 - Content: Gameplay: While playing in language different form system default one and resetting options to their defaults in active gameplay causes in-game language to change and HUD to disappear
- if (!app.GetGameStarted())
+ if (!app.GetGameStarted())
{
GameSettingsA[iPad]->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language
GameSettingsA[iPad]->ucLocale = MINECRAFT_LANGUAGE_DEFAULT; // use the system locale
@@ -1022,7 +1022,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
case PROFILE_VERSION_1:
case PROFILE_VERSION_2:
// need to fill in values for the new profile data. No need to save the profile - that'll happen if they get changed, or if the auto save for the profile kicks in
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu
@@ -1068,7 +1068,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_3:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->uiBitmaskValues=0L; // reset
pGameSettings->uiBitmaskValues|=GAMESETTING_CLOUDS; //eGameSetting_Clouds - on
@@ -1202,7 +1202,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_7:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
// reset the display new message counter
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
@@ -1225,7 +1225,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
#endif
case PROFILE_VERSION_8:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
// reset the display new message counter
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
@@ -1243,7 +1243,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
break;
case PROFILE_VERSION_9:
// PS3DEC13
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
pGameSettings->uiBitmaskValues&=~GAMESETTING_PS3EULAREAD; //eGameSetting_PS3_EULA_Read - off
@@ -1254,7 +1254,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
}
break;
case PROFILE_VERSION_10:
- {
+ {
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->uiBitmaskValues|=GAMESETTING_DISPLAYUPDATEMSG; //eGameSetting_DisplayUpdateMessage (counter)
pGameSettings->ucLanguage = MINECRAFT_LANGUAGE_DEFAULT; // use the system language
@@ -1273,7 +1273,7 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
}
break;
default:
- {
+ {
// This might be from a version during testing of new profile updates
app.DebugPrintf("Don't know what to do with this profile version!\n");
#ifndef _CONTENT_PACKAGE
@@ -1375,7 +1375,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
if(iPad==ProfileManager.GetPrimaryPad())
{
pMinecraft->options->set(Options::Option::SOUND,((float)GameSettingsA[iPad]->ucSoundFXVolume)/100.0f);
- }
+ }
break;
case eGameSetting_Gamma:
if(iPad==ProfileManager.GetPrimaryPad())
@@ -1387,10 +1387,10 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
float fVal=((float)GameSettingsA[iPad]->ucGamma)*327.68f;
RenderManager.UpdateGamma((unsigned short)fVal);
#endif
- }
+ }
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
if(iPad==ProfileManager.GetPrimaryPad())
{
pMinecraft->options->toggle(Options::Option::DIFFICULTY,GameSettingsA[iPad]->usBitmaskValues&0x03);
@@ -1538,7 +1538,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
//nothing to do here
break;
case eGameSetting_BedrockFog:
- {
+ {
bool bInGame=pMinecraft->level!=NULL;
// Game Host only
@@ -1618,7 +1618,7 @@ DWORD CMinecraftApp::GetPlayerSkinId(int iPad)
// 4J Stu - DLC skins are numbered using decimal rather than hex to make it easier to number manually
swprintf(chars, 256, L"dlcskin%08d.png", GET_DLC_SKIN_ID_FROM_BITMASK(dwSkin));
- Pack=app.m_dlcManager.getPackContainingSkin(chars);
+ Pack=app.m_dlcManager.getPackContainingSkin(chars);
if(Pack)
{
@@ -1742,7 +1742,7 @@ void CMinecraftApp::ValidateFavoriteSkins(int iPad)
if( pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Skin, L"") || (pSkinFile && pSkinFile->isFree()))
{
- GameSettingsA[iPad]->uiFavoriteSkinA[uiValidSkin++]=GameSettingsA[iPad]->uiFavoriteSkinA[i];
+ GameSettingsA[iPad]->uiFavoriteSkinA[uiValidSkin++]=GameSettingsA[iPad]->uiFavoriteSkinA[i];
}
}
}
@@ -1774,7 +1774,7 @@ unsigned int CMinecraftApp::GetMashupPackWorlds(int iPad)
void CMinecraftApp::SetMinecraftLanguage(int iPad, unsigned char ucLanguage)
{
- GameSettingsA[iPad]->ucLanguage = ucLanguage;
+ GameSettingsA[iPad]->ucLanguage = ucLanguage;
GameSettingsA[iPad]->bSettingsChanged = true;
}
@@ -1793,7 +1793,7 @@ unsigned char CMinecraftApp::GetMinecraftLanguage(int iPad)
void CMinecraftApp::SetMinecraftLocale(int iPad, unsigned char ucLocale)
{
- GameSettingsA[iPad]->ucLocale = ucLocale;
+ GameSettingsA[iPad]->ucLocale = ucLocale;
GameSettingsA[iPad]->bSettingsChanged = true;
}
@@ -1834,7 +1834,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
if(iPad==ProfileManager.GetPrimaryPad())
{
ActionGameSettings(iPad,eVal);
- }
+ }
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
@@ -1849,7 +1849,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
if((GameSettingsA[iPad]->usBitmaskValues&0x03)!=(ucVal&0x03))
{
GameSettingsA[iPad]->usBitmaskValues&=~0x03;
@@ -2194,9 +2194,9 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
- case eGameSetting_UISize:
+ }
+ break;
+ case eGameSetting_UISize:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_UISIZE)!=((ucVal&0x03)<<11))
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_UISIZE;
@@ -2208,7 +2208,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
GameSettingsA[iPad]->bSettingsChanged=true;
}
break;
- case eGameSetting_UISizeSplitscreen:
+ case eGameSetting_UISizeSplitscreen:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_UISIZE_SPLITSCREEN)!=((ucVal&0x03)<<13))
{
GameSettingsA[iPad]->uiBitmaskValues&=~GAMESETTING_UISIZE_SPLITSCREEN;
@@ -2233,8 +2233,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
case eGameSetting_PS3_EULA_Read:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PS3EULAREAD)!=(ucVal&0x01)<<16)
{
@@ -2248,8 +2248,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
case eGameSetting_PSVita_NetworkModeAdhoc:
if((GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_PSVITANETWORKMODEADHOC)!=(ucVal&0x01)<<17)
{
@@ -2263,8 +2263,8 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
}
ActionGameSettings(iPad,eVal);
GameSettingsA[iPad]->bSettingsChanged=true;
- }
- break;
+ }
+ break;
}
}
@@ -2289,7 +2289,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
case eGameSetting_Gamma:
return GameSettingsA[iPad]->ucGamma;
break;
- case eGameSetting_Difficulty:
+ case eGameSetting_Difficulty:
return GameSettingsA[iPad]->usBitmaskValues&0x0003;
break;
case eGameSetting_Sensitivity_InGame:
@@ -2353,7 +2353,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
break;
case eGameSetting_DisplayUpdateMessage:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_DISPLAYUPDATEMSG)>>4;
- break;
+ break;
case eGameSetting_BedrockFog:
return (GameSettingsA[iPad]->uiBitmaskValues&GAMESETTING_BEDROCKFOG)>>6;
break;
@@ -2685,13 +2685,13 @@ void CMinecraftApp::HandleXuiActions(void)
param = m_eXuiActionParam[i];
if(eAction!=eAppAction_Idle)
- {
+ {
switch(eAction)
{
// the renderer will capture a screenshot
case eAppAction_SocialPost:
if(ProfileManager.IsFullVersion())
- {
+ {
// Facebook Share
if( CSocialManager::Instance()->IsTitleAllowedToPostImages() && CSocialManager::Instance()->AreAllUsersAllowedToPostImages() )
{
@@ -2761,7 +2761,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_AutosaveSaveGame:
- {
+ {
// Need to run a check to see if the save exists in order to stop the dialog asking if we want to overwrite it coming up on an autosave
bool bSaveExists;
StorageManager.DoesSaveExist(&bSaveExists);
@@ -2771,7 +2771,7 @@ void CMinecraftApp::HandleXuiActions(void)
{
// flag the render to capture the screenshot for the save
- SetAction(i,eAppAction_AutosaveSaveGameCapturedThumbnail);
+ SetAction(i,eAppAction_AutosaveSaveGameCapturedThumbnail);
}
}
@@ -2834,7 +2834,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_AutosaveSaveGameCapturedThumbnail:
- {
+ {
app.SetAutosaveTimerTime();
SetAction(i,eAppAction_Idle);
@@ -2884,7 +2884,7 @@ void CMinecraftApp::HandleXuiActions(void)
case eAppAction_ExitPlayer:
// a secondary player has chosen to quit
{
- int iPlayerC=g_NetworkManager.GetPlayerCount();
+ int iPlayerC=g_NetworkManager.GetPlayerCount();
// Since the player is exiting, let's flush any profile writes for them, and hope we're not breaking TCR 136...
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
@@ -2905,7 +2905,7 @@ void CMinecraftApp::HandleXuiActions(void)
// not required - it's done within the removeLocalPlayerIdx
// if(pMinecraft->level->isClientSide)
- // {
+ // {
// // we need to remove the qnetplayer, or this player won't be able to get back into the game until qnet times out and removes them
// g_NetworkManager.NotifyPlayerLeaving(g_NetworkManager.GetLocalPlayerByUserIndex(i));
// }
@@ -2944,9 +2944,9 @@ void CMinecraftApp::HandleXuiActions(void)
if(iPlayerC>2) // one player is about to leave here - they'll be set to idle in the qnet manager player leave
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
@@ -2961,9 +2961,9 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
@@ -2978,7 +2978,7 @@ void CMinecraftApp::HandleXuiActions(void)
#ifdef _DURANGO
ProfileManager.RemoveGamepadFromGame(i);
-#endif
+#endif
SetAction(i,eAppAction_Idle);
}
@@ -2991,7 +2991,7 @@ void CMinecraftApp::HandleXuiActions(void)
StorageManager.ForceQueuedProfileWrites(i);
#else
ProfileManager.ForceQueuedProfileWrites(i);
-#endif
+#endif
// if there are any tips showing, we need to close them
pMinecraft->gui->clearMessages(i);
@@ -3026,9 +3026,9 @@ void CMinecraftApp::HandleXuiActions(void)
if(iPlayerC>2) // one player is about to leave here - they'll be set to idle in the qnet manager player leave
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
@@ -3043,9 +3043,9 @@ void CMinecraftApp::HandleXuiActions(void)
else
{
for(int iPlayer=0;iPlayer<XUSER_MAX_COUNT;iPlayer++)
- {
+ {
if((iPlayer!=i) && pMinecraft->localplayers[iPlayer])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(iPlayer,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
@@ -3100,7 +3100,7 @@ void CMinecraftApp::HandleXuiActions(void)
SetAction(i,eAppAction_Idle);
// If we're already leaving don't exit
- if (g_NetworkManager.IsLeavingGame())
+ if (g_NetworkManager.IsLeavingGame())
{
break;
}
@@ -3131,7 +3131,7 @@ void CMinecraftApp::HandleXuiActions(void)
Minecraft::GetInstance()->forceStatsSave(j);
}
}
- LeaderboardManager::Instance()->CloseSession();
+ LeaderboardManager::Instance()->CloseSession();
#elif (defined _XBOX)
ProfileManager.ForceQueuedProfileWrites();
#endif
@@ -3151,7 +3151,7 @@ void CMinecraftApp::HandleXuiActions(void)
#ifdef _DURANGO
ProfileManager.RemoveGamepadFromGame(i);
-#endif
+#endif
SetAction(i,eAppAction_Idle);
return;
}
@@ -3173,9 +3173,9 @@ void CMinecraftApp::HandleXuiActions(void)
if(g_NetworkManager.GetPlayerCount()>1)
{
for(int j=0;j<XUSER_MAX_COUNT;j++)
- {
+ {
if(pMinecraft->localplayers[j])
- {
+ {
if(g_NetworkManager.IsLocalGame())
{
app.SetRichPresenceContext(j,CONTEXT_GAME_STATE_BLANK);
@@ -3194,7 +3194,7 @@ void CMinecraftApp::HandleXuiActions(void)
{
app.SetRichPresenceContext(i,CONTEXT_GAME_STATE_BLANK);
if(g_NetworkManager.IsLocalGame())
- {
+ {
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYER_1POFFLINE,false);
}
else
@@ -3230,7 +3230,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::ExitWorldThreadProc;
- loadingParams->lpParam = param;
+ loadingParams->lpParam = param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
// If param is non-null then this is a forced exit by the server, so make sure the player knows why
@@ -3243,11 +3243,11 @@ void CMinecraftApp::HandleXuiActions(void)
completionData->iPad = DEFAULT_XUI_MENU_USER;
loadingParams->completionData = completionData;
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
break;
case eAppAction_ExitWorldTrial:
- {
+ {
SetAction(i,eAppAction_Idle);
pMinecraft->gui->clearMessages();
@@ -3274,7 +3274,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &UIScene_PauseMenu::ExitWorldThreadProc;
- loadingParams->lpParam = param;
+ loadingParams->lpParam = param;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3344,7 +3344,7 @@ void CMinecraftApp::HandleXuiActions(void)
//app.NavigateToScene(i,eUIScene_FullscreenProgress, loadingParams, true);
}
- }
+ }
break;
case eAppAction_WaitForRespawnComplete:
player = pMinecraft->localplayers[i];
@@ -3384,8 +3384,8 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_PrimaryPlayerSignedOut:
- {
- //SetAction(i,eAppAction_Idle);
+ {
+ //SetAction(i,eAppAction_Idle);
// clear the autosavetimer that might be displayed
ui.ShowAutosaveCountdownTimer(false);
@@ -3403,10 +3403,10 @@ void CMinecraftApp::HandleXuiActions(void)
// 4J-PB - the libs will display the Returned to Title screen
// UINT uiIDA[1];
// uiIDA[0]=IDS_CONFIRM_OK;
- //
+ //
// ui.RequestMessageBox(IDS_RETURNEDTOMENU_TITLE, IDS_RETURNEDTOTITLESCREEN_TEXT, uiIDA, 1, i,&CMinecraftApp::PrimaryPlayerSignedOutReturned,this,app.GetStringTable());
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(i,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -3454,7 +3454,7 @@ void CMinecraftApp::HandleXuiActions(void)
if (!gameStarted)
{
- // 1. Exit
+ // 1. Exit
MinecraftServer::HaltServer();
// Fix for #12530 - TCR 001 BAS Game Stability: Title will crash if the player disconnects while starting a new world and then opts to play the tutorial once they have been returned to the Main Menu.
@@ -3478,7 +3478,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
else
{
-#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
+#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
if(UIScene_LoadOrJoinMenu::isSaveTransferRunning())
{
// the save transfer is still in progress, delay jumping back to the main menu until we've cleaned up
@@ -3547,7 +3547,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
LoadingInputParams *loadingParams = new LoadingInputParams();
- loadingParams->func = &CMinecraftApp::SignoutExitWorldThreadProc;
+ loadingParams->func = &CMinecraftApp::SignoutExitWorldThreadProc;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3585,7 +3585,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_TrialOver:
- {
+ {
SetAction(i,eAppAction_Idle);
UINT uiIDA[2];
uiIDA[0]=IDS_UNLOCK_TITLE;
@@ -3597,7 +3597,7 @@ void CMinecraftApp::HandleXuiActions(void)
// INVITES
case eAppAction_DashboardTrialJoinFromInvite:
- {
+ {
TelemetryManager->RecordUpsellPresented(i, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID);
SetAction(i,eAppAction_Idle);
@@ -3609,7 +3609,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_ExitAndJoinFromInvite:
- {
+ {
UINT uiIDA[3];
SetAction(i,eAppAction_Idle);
@@ -3618,7 +3618,7 @@ void CMinecraftApp::HandleXuiActions(void)
#if defined(_XBOX_ONE) || defined(__ORBIS__)
// Show save option is saves ARE disabled
if(ProfileManager.IsFullVersion() && StorageManager.GetSaveDisabled() && i==ProfileManager.GetPrimaryPad() && g_NetworkManager.IsHost() && GetGameStarted() )
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
uiIDA[2]=IDS_EXIT_GAME_NO_SAVE;
@@ -3628,7 +3628,7 @@ void CMinecraftApp::HandleXuiActions(void)
else
#else
if(ProfileManager.IsFullVersion() && !StorageManager.GetSaveDisabled() && i==ProfileManager.GetPrimaryPad() && g_NetworkManager.IsHost() && GetGameStarted() )
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
uiIDA[2]=IDS_EXIT_GAME_NO_SAVE;
@@ -3648,7 +3648,7 @@ void CMinecraftApp::HandleXuiActions(void)
ui.RequestErrorMessage(IDS_UNLOCK_TITLE, IDS_UNLOCK_ACCEPT_INVITE, uiIDA, 2, i,&CMinecraftApp::UnlockFullInviteReturned,this);
}
else
- {
+ {
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestAlertMessage(IDS_EXIT_GAME, IDS_CONFIRM_LEAVE_VIA_INVITE, uiIDA, 2,i,&CMinecraftApp::ExitAndJoinFromInvite,this);
@@ -3736,7 +3736,7 @@ void CMinecraftApp::HandleXuiActions(void)
if(ProfileManager.IsSignedIn(index) )
{
if(index==i || pMinecraft->localplayers[index]!=NULL )
- {
+ {
m_InviteData.dwLocalUsersMask |= g_NetworkManager.GetLocalPlayerMask( index );
}
}
@@ -3745,7 +3745,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::ExitAndJoinFromInviteThreadProc;
- loadingParams->lpParam = (LPVOID)&m_InviteData;
+ loadingParams->lpParam = (LPVOID)&m_InviteData;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bShowBackground=TRUE;
@@ -3783,7 +3783,7 @@ void CMinecraftApp::HandleXuiActions(void)
if( index != inviteData->dwUserIndex && ProfileManager.IsSignedIn(index) )
{
if( (m_InviteData.dwLocalUsersMask & g_NetworkManager.GetLocalPlayerMask( index ) ) == 0 )
- {
+ {
ProfileManager.RemoveGamepadFromGame(index);
}
}
@@ -3824,7 +3824,7 @@ void CMinecraftApp::HandleXuiActions(void)
if( !GetChangingSessionType() && !g_NetworkManager.IsLocalGame() )
{
- SetGameStarted(false);
+ SetGameStarted(false);
SetChangingSessionType(true);
SetReallyChangingSessionType(true);
@@ -3843,7 +3843,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CGameNetworkManager::ChangeSessionTypeThreadProc;
- loadingParams->lpParam = NULL;
+ loadingParams->lpParam = NULL;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
#ifdef __PS3__
@@ -3865,7 +3865,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
loadingParams->completionData = completionData;
- ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
+ ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
}
else if( g_NetworkManager.IsLeavingGame() )
@@ -3892,9 +3892,9 @@ void CMinecraftApp::HandleXuiActions(void)
case eAppAction_SetDefaultOptions:
SetAction(i,eAppAction_Idle);
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
- SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
+ SetDefaultOptions((C4JStorage::PROFILESETTINGS *)param,i);
#else
- SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
+ SetDefaultOptions((C_4JProfile::PROFILESETTINGS *)param,i);
#endif
// if the profile data has been changed, then force a profile write
@@ -3924,7 +3924,7 @@ void CMinecraftApp::HandleXuiActions(void)
LoadingInputParams *loadingParams = new LoadingInputParams();
loadingParams->func = &CMinecraftApp::RemoteSaveThreadProc;
- loadingParams->lpParam = NULL;
+ loadingParams->lpParam = NULL;
UIFullscreenProgressCompletionData *completionData = new UIFullscreenProgressCompletionData();
completionData->bRequiresUserAction=FALSE;
@@ -3966,7 +3966,7 @@ void CMinecraftApp::HandleXuiActions(void)
if(!app.GetGameStarted()) MinecraftServer::HaltServer(true);
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(i,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -3983,12 +3983,12 @@ void CMinecraftApp::HandleXuiActions(void)
{
TelemetryManager->RecordBanLevel(i);
-#if defined _XBOX
- INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
+#if defined _XBOX
+ INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
// write the level to the banned level list, and exit the world
AddLevelToBannedLevelList(i,((NetworkPlayerXbox *)pHost)->GetUID(),GetUniqueMapName(),true);
#elif defined _XBOX_ONE
- INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
+ INetworkPlayer *pHost=g_NetworkManager.GetHostPlayer();
AddLevelToBannedLevelList(i,pHost->GetUID(),GetUniqueMapName(),true);
#endif
// primary player would exit the world, secondary would exit the player
@@ -4004,7 +4004,7 @@ void CMinecraftApp::HandleXuiActions(void)
}
break;
case eAppAction_LevelInBanLevelList:
- {
+ {
UINT uiIDA[2];
uiIDA[0]=IDS_BUTTON_REMOVE_FROM_BAN_LIST;
uiIDA[1]=IDS_EXIT_GAME;
@@ -4043,7 +4043,7 @@ void CMinecraftApp::HandleXuiActions(void)
break;
case eAppAction_ReloadTexturePack:
- {
+ {
SetAction(i,eAppAction_Idle);
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->textures->reloadAll();
@@ -4051,7 +4051,7 @@ void CMinecraftApp::HandleXuiActions(void)
if(!pMinecraft->skins->isUsingDefaultSkin())
{
- TexturePack *pTexturePack = pMinecraft->skins->getSelected();
+ TexturePack *pTexturePack = pMinecraft->skins->getSelected();
DLCPack *pDLCPack=pTexturePack->getDLCPack();
@@ -4069,7 +4069,7 @@ void CMinecraftApp::HandleXuiActions(void)
// 4J-PB - If the texture pack has audio, we need to switch to this
if(pMinecraft->skins->getSelected()->hasAudio())
{
- Minecraft::GetInstance()->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
+ Minecraft::GetInstance()->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1);
}
}
break;
@@ -4078,7 +4078,7 @@ void CMinecraftApp::HandleXuiActions(void)
{
#ifndef _XBOX
app.DebugPrintf(
- "[Consoles_App] eAppAction_ReloadFont, ingame='%s'.\n",
+ "[Consoles_App] eAppAction_ReloadFont, ingame='%s'.\n",
app.GetGameStarted() ? "Yes" : "No" );
SetAction(i,eAppAction_Idle);
@@ -4129,7 +4129,7 @@ void CMinecraftApp::HandleXuiActions(void)
eTMS = app.GetTMSAction(i);
if(eTMS!=eTMSAction_Idle)
- {
+ {
switch(eTMS)
{
// TMS++ actions
@@ -4154,7 +4154,7 @@ void CMinecraftApp::HandleXuiActions(void)
#endif
case eTMSAction_TMSPP_UserFileList:
// retrieve the file list first
-#if defined _XBOX
+#if defined _XBOX
SetTMSAction(i,eTMSAction_TMSPP_UserFileList_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_TitleUser,"\\",eTMSAction_TMSPP_XUIDSFile);
#elif defined _XBOX_ONE
@@ -4173,7 +4173,7 @@ void CMinecraftApp::HandleXuiActions(void)
SetTMSAction(i,eTMSAction_TMSPP_DLCFile);
#endif
- break;
+ break;
case eTMSAction_TMSPP_DLCFile:
#if defined _XBOX || defined _XBOX_ONE
SetTMSAction(i,eTMSAction_TMSPP_DLCFile_Waiting);
@@ -4207,7 +4207,7 @@ void CMinecraftApp::HandleXuiActions(void)
case eTMSAction_TMSPP_RetrieveFiles_HelpAndOptions:
case eTMSAction_TMSPP_RetrieveFiles_DLCMain:
// retrieve the file list first
-#if defined _XBOX
+#if defined _XBOX
// pass in the next app action on the call or callback completing
SetTMSAction(i,eTMSAction_TMSPP_XUIDSFile_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_Title,"\\",eTMSAction_TMSPP_DLCFileOnly);
@@ -4219,7 +4219,7 @@ void CMinecraftApp::HandleXuiActions(void)
#endif
break;
case eTMSAction_TMSPP_RetrieveUserFilelist_DLCFileOnly:
-#if defined _XBOX
+#if defined _XBOX
SetTMSAction(i,eTMSAction_TMSPP_UserFileList_Waiting);
app.TMSPP_RetrieveFileList(i,C4JStorage::eGlobalStorage_TitleUser,"\\",eTMSAction_TMSPP_XUIDSFile);
#elif defined _XBOX_ONE
@@ -4361,7 +4361,7 @@ void CMinecraftApp::loadMediaArchive()
mediapath = L"Common\\Media\\MediaPSVita.arc";
#endif
- if (!mediapath.empty())
+ if (!mediapath.empty())
{
m_mediaArchive = new ArchiveFile( File(mediapath) );
}
@@ -4442,7 +4442,7 @@ int CMinecraftApp::PrimaryPlayerSignedOutReturned(void *pParam,int iPad,const C4
// We always create a session before kicking of any of the game code, so even though we may still be joining/creating a game
// at this point we want to handle it differently from just being in a menu
if( g_NetworkManager.IsInSession() )
- {
+ {
app.SetAction(iPad,eAppAction_PrimaryPlayerSignedOutReturned);
}
else
@@ -4459,7 +4459,7 @@ int CMinecraftApp::EthernetDisconnectReturned(void *pParam,int iPad,const C4JSto
// if the player is null, we're in the menus
if(Minecraft::GetInstance()->player!=NULL)
- {
+ {
app.SetAction(pMinecraft->player->GetXboxPad(),eAppAction_EthernetDisconnectedReturned);
}
else
@@ -4587,7 +4587,7 @@ int CMinecraftApp::SignoutExitWorldThreadProc( void* lpParameter )
// 4J-JEV: Fix for #106402 - TCR #014 BAS Debug Output:
// TU12: Mass Effect Mash-UP: Save file "Default_DisplayName" is created on all storage devices after signing out from a re-launched pre-generated world
- app.m_gameRules.unloadCurrentGameRules(); //
+ app.m_gameRules.unloadCurrentGameRules(); //
MinecraftServer::resetFlags();
@@ -4690,7 +4690,7 @@ int CMinecraftApp::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::EMes
}
#elif defined(__ORBIS__)
else
- {
+ {
// Determine why they're not "signed in live"
if (ProfileManager.isSignedInPSN(iPad))
{
@@ -4702,7 +4702,7 @@ int CMinecraftApp::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::EMes
ui.RequestErrorMessage( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad);
}
else
- {
+ {
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -4759,7 +4759,7 @@ int CMinecraftApp::UnlockFullExitReturned(void *pParam,int iPad,C4JStorage::EMes
}
#elif defined(__ORBIS__)
else
- {
+ {
// Determine why they're not "signed in live"
if (ProfileManager.isSignedInPSN(iPad))
{
@@ -4773,7 +4773,7 @@ int CMinecraftApp::UnlockFullExitReturned(void *pParam,int iPad,C4JStorage::EMes
pApp->SetAction(pMinecraft->player->GetXboxPad(),eAppAction_ExitWorldTrial);
}
else
- {
+ {
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -4858,7 +4858,7 @@ void CMinecraftApp::ProfileReadErrorCallback(void *pParam)
void CMinecraftApp::ClearSignInChangeUsersMask()
{
- // 4J-PB - When in the main menu, the user is on pad 0, and any change they make to their profile will be to pad 0 data
+ // 4J-PB - When in the main menu, the user is on pad 0, and any change they make to their profile will be to pad 0 data
// If they then go in as a secondary player to a splitscreen game, their profile will not be read again on pad 1 if they were previously in a splitscreen game
// This is because m_uiLastSignInData remembers they were in previously, and doesn't read the profile data for them again
// Fix this by resetting the m_uiLastSignInData on pressing play game for secondary users. The Primary user does a read profile on play game anyway
@@ -4964,12 +4964,12 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
bool bPlayerChanged=(uiChangedPlayers&(1<<i))==(1<<i);
bool bPlayerSignedIn=((uiSignInData&(1<<i))!=0);
- if( bPlayerChanged && (!bPlayerSignedIn || (bPlayerSignedIn && !ProfileManager.AreXUIDSEqual(pApp->m_currentSigninInfo[i].xuid, info.xuid) ) ))
+ if( bPlayerChanged && (!bPlayerSignedIn || (bPlayerSignedIn && !ProfileManager.AreXUIDSEqual(pApp->m_currentSigninInfo[i].xuid, info.xuid) ) ))
{
// 4J-PB - invalidate their banned level list
pApp->DebugPrintf("Player at index %d Left - invalidating their banned list\n",i);
pApp->InvalidateBannedList(i);
-
+
// 4J-HG: If either the player is in the network manager or in the game, need to exit player
// TODO: Do we need to check the network manager?
if (g_NetworkManager.GetLocalPlayerByUserIndex(i) != NULL || Minecraft::GetInstance()->localplayers[i] != NULL)
@@ -5020,7 +5020,7 @@ void CMinecraftApp::SignInChangeCallback(LPVOID pParam,bool bPrimaryPlayerChange
// 4J-JEV: Need to kick of loading of profile data for sub-sign in players.
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
- if( i != iPrimaryPlayer
+ if( i != iPrimaryPlayer
&& ( uiChangedPlayers & (1<<i) )
&& ( uiSignInData & (1<<i) )
)
@@ -5140,7 +5140,7 @@ void CMinecraftApp::NotificationsCallback(LPVOID pParam,DWORD dwNotification, un
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CMinecraftApp::NowDisplayFullVersionPurchase, &app,true);
@@ -5157,7 +5157,7 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CMinecraftApp::NowDisplayFullVersionPurchase, &app,true);
@@ -5169,7 +5169,7 @@ int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,i
}
//4J-PB - we need to exit the trial, or we'll be in the pause menu with ignore input true
- app.SetAction(iPad,eAppAction_ExitWorldTrial);
+ app.SetAction(iPad,eAppAction_ExitWorldTrial);
return 0;
}
@@ -5212,9 +5212,9 @@ void CMinecraftApp::UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUps
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad());
break;
-#endif
+#endif
case eUpsellResponse_Declined:
- default:
+ default:
senResponse = eSen_UpsellOutcome_Declined;
break;
};
@@ -5230,7 +5230,7 @@ void CMinecraftApp::UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUps
break;
};
- // Always the primary pad that gets an upsell
+ // Always the primary pad that gets an upsell
TelemetryManager->RecordUpsellResponded(ProfileManager.GetPrimaryPad(), eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, senResponse);
}
@@ -5255,7 +5255,7 @@ int CMinecraftApp::DebugInputCallback(LPVOID pParam)
{
if(app.DebugSettingsOn())
{
- app.ActionDebugMask(i);
+ app.ActionDebugMask(i);
}
else
{
@@ -5347,7 +5347,7 @@ void CMinecraftApp::MountNextDLC(int iPad)
if(StorageManager.MountInstalledDLC(iPad,m_iTotalDLCInstalled,&CMinecraftApp::DLCMountedCallback,this)!=ERROR_IO_PENDING )
{
// corrupt DLC
- app.DebugPrintf("Failed to mount DLC %d for pad %d\n",m_iTotalDLCInstalled,iPad);
+ app.DebugPrintf("Failed to mount DLC %d for pad %d\n",m_iTotalDLCInstalled,iPad);
++m_iTotalDLCInstalled;
app.MountNextDLC(iPad);
}
@@ -5475,15 +5475,15 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// void CMinecraftApp::InstallDefaultCape()
// {
// if(!m_bDefaultCapeInstallAttempted)
-// {
+// {
// // we only attempt to install the cape once per launch of the game
// m_bDefaultCapeInstallAttempted=true;
-//
+//
// wstring wTemp=L"Default_Cape.png";
// bool bRes=app.IsFileInMemoryTextures(wTemp);
// // if the file is not already in the memory textures, then read it from TMS
// if(!bRes)
-// {
+// {
// BYTE *pBuffer=NULL;
// DWORD dwSize=0;
// // 4J-PB - out for now for DaveK so he doesn't get the birthday cape
@@ -5493,13 +5493,13 @@ int CMinecraftApp::DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD d
// if(eTMSStatus==C4JStorage::ETMSStatus_Idle)
// {
// app.AddMemoryTextureFile(wTemp,pBuffer,dwSize);
-// }
+// }
// #endif
// }
// }
// }
-void CMinecraftApp::HandleDLC(DLCPack *pack)
+void CMinecraftApp::HandleDLC(DLCPack *pack)
{
DWORD dwFilesProcessed = 0;
#ifndef _XBOX
@@ -5552,9 +5552,9 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
File texturePCKPath(wsTemp );
if(texturePCKPath.exists())
{
- app.DebugPrintf("Found a replacement .pck\n");
+ app.DebugPrintf("Found a replacement .pck\n");
m_dlcManager.readDLCDataFile(dwFilesProcessed, wsTemp,pack);
- }
+ }
else
{
m_dlcManager.readDLCDataFile(dwFilesProcessed, szFullFilename,pack);
@@ -5564,7 +5564,7 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
#endif
}
- }
+ }
while( FindNextFile( hFind, &wfd ) );
// Close the find handle.
@@ -5577,8 +5577,8 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
// int CMinecraftApp::DLCReadCallback(LPVOID pParam,C4JStorage::DLC_FILE_DETAILS *pDLCData)
// {
-//
-//
+//
+//
// return 0;
// }
@@ -5587,7 +5587,7 @@ void CMinecraftApp::HandleDLC(DLCPack *pack)
// Desc: Initializes the timer variables
//-------------------------------------------------------------------------------------
void CMinecraftApp::InitTime()
-{
+{
// Get the frequency of the timer
LARGE_INTEGER qwTicksPerSec;
@@ -5599,8 +5599,8 @@ void CMinecraftApp::InitTime()
// Zero out the elapsed and total time
m_Time.qwAppTime.QuadPart = 0;
- m_Time.fAppTime = 0.0f;
- m_Time.fElapsedTime = 0.0f;
+ m_Time.fAppTime = 0.0f;
+ m_Time.fElapsedTime = 0.0f;
}
//-------------------------------------------------------------------------------------
@@ -5612,14 +5612,14 @@ void CMinecraftApp::UpdateTime()
LARGE_INTEGER qwNewTime;
LARGE_INTEGER qwDeltaTime;
- QueryPerformanceCounter( &qwNewTime );
+ QueryPerformanceCounter( &qwNewTime );
qwDeltaTime.QuadPart = qwNewTime.QuadPart - m_Time.qwTime.QuadPart;
- m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
+ m_Time.qwAppTime.QuadPart += qwDeltaTime.QuadPart;
m_Time.qwTime.QuadPart = qwNewTime.QuadPart;
m_Time.fElapsedTime = m_Time.fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
- m_Time.fAppTime = m_Time.fSecsPerTick * ((FLOAT)(m_Time.qwAppTime.QuadPart));
+ m_Time.fAppTime = m_Time.fSecsPerTick * ((FLOAT)(m_Time.qwAppTime.QuadPart));
}
@@ -5652,8 +5652,8 @@ bool CMinecraftApp::isXuidDeadmau5(PlayerUID xuid)
return false;
}
-void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD dwBytes)
-{
+void CMinecraftApp::AddMemoryTextureFile(const wstring &wName,PBYTE pbData,DWORD dwBytes)
+{
EnterCriticalSection(&csMemFilesLock);
// check it's not already in
PMEMDATA pData=NULL;
@@ -5729,7 +5729,7 @@ bool CMinecraftApp::DefaultCapeExists()
EnterCriticalSection(&csMemFilesLock);
auto it = m_MEM_Files.find(wTex);
- if(it != m_MEM_Files.end()) val = true;
+ if(it != m_MEM_Files.end()) val = true;
LeaveCriticalSection(&csMemFilesLock);
return val;
@@ -5741,7 +5741,7 @@ bool CMinecraftApp::IsFileInMemoryTextures(const wstring &wName)
EnterCriticalSection(&csMemFilesLock);
auto it = m_MEM_Files.find(wName);
- if(it != m_MEM_Files.end()) val = true;
+ if(it != m_MEM_Files.end()) val = true;
LeaveCriticalSection(&csMemFilesLock);
return val;
@@ -5760,14 +5760,14 @@ void CMinecraftApp::GetMemFileDetails(const wstring &wName,PBYTE *ppbData,DWORD
LeaveCriticalSection(&csMemFilesLock);
}
-void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
-{
+void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
+{
EnterCriticalSection(&csMemTPDLock);
// check it's not already in
PMEMDATA pData=NULL;
auto it = m_MEM_TPD.find(iConfig);
if(it == m_MEM_TPD.end())
- {
+ {
pData = (PMEMDATA)new BYTE[sizeof(MEMDATA)];
ZeroMemory( pData, sizeof(MEMDATA) );
pData->pbData=pbData;
@@ -5780,8 +5780,8 @@ void CMinecraftApp::AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes)
LeaveCriticalSection(&csMemTPDLock);
}
-void CMinecraftApp::RemoveMemoryTPDFile(int iConfig)
-{
+void CMinecraftApp::RemoveMemoryTPDFile(int iConfig)
+{
EnterCriticalSection(&csMemTPDLock);
// check it's not already in
PMEMDATA pData=NULL;
@@ -5843,7 +5843,7 @@ bool CMinecraftApp::IsFileInTPD(int iConfig)
EnterCriticalSection(&csMemTPDLock);
auto it = m_MEM_TPD.find(iConfig);
- if(it != m_MEM_TPD.end()) val = true;
+ if(it != m_MEM_TPD.end()) val = true;
LeaveCriticalSection(&csMemTPDLock);
return val;
@@ -5869,18 +5869,18 @@ void CMinecraftApp::GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes)
// #ifndef _CONTENT_PACKAGE
// // read the local file
// File gtsFile( wsFile->c_str() );
-//
-// __int64 fileSize = gtsFile.length();
-//
+//
+// int64_t fileSize = gtsFile.length();
+//
// if(fileSize!=0)
// {
// FileInputStream fis(gtsFile);
// byteArray ba((int)fileSize);
// fis.read(ba);
// fis.close();
-//
+//
// bRes=StorageManager.WriteTMSFile(iQuadrant,eStorageFacility,(WCHAR *)wsFile->c_str(),ba.data, ba.length);
-//
+//
// }
// #endif
// return bRes;
@@ -5930,7 +5930,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
CMinecraftApp *pClass = (CMinecraftApp *)pParam;
// Exit with or without saving
// Decline means save in this dialog
- if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
+ if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
{
if( result==C4JStorage::EMessage_ResultDecline ) // Save
{
@@ -5942,7 +5942,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
DLCPack * pDLCPack=tPack->getDLCPack();
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
- {
+ {
// upsell
// get the dlc texture pack
@@ -5962,7 +5962,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad
// Give the player a warning about the trial version of the texture pack
ui.RequestErrorMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, iPad,&CMinecraftApp::WarningTrialTexturePackReturned,pClass);
- return S_OK;
+ return S_OK;
}
}
#ifndef _XBOX_ONE
@@ -6035,7 +6035,7 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor
DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack();
const char *pchPackName=wstringtofilename(pDLCPack->getName());
app.DebugPrintf("Texture Pack - %s\n",pchPackName);
- SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
+ SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName);
if(pSONYDLCInfo!=NULL)
{
@@ -6056,27 +6056,27 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor
#if defined __ORBIS__ || defined __PSVITA__ || defined __PS3__
if(app.CheckForEmptyStore(iPad)==false)
#endif
- {
+ {
if(app.DLCAlreadyPurchased(chSkuID))
{
app.DownloadAlreadyPurchased(chSkuID);
}
else
{
- app.Checkout(chSkuID);
+ app.Checkout(chSkuID);
}
}
}
}
}
}
-#endif //
+#endif //
#ifdef _XBOX_ONE
if(result==C4JStorage::EMessage_ResultAccept)
{
if(ProfileManager.IsSignedIn(iPad))
- {
+ {
if (ProfileManager.IsSignedInLive(iPad))
{
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();
@@ -6089,17 +6089,17 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor
StorageManager.InstallOffer(1,(WCHAR *)pDLCInfo->wsProductId.c_str(),NULL,NULL);
- // the license change coming in when the offer has been installed will cause this scene to refresh
+ // the license change coming in when the offer has been installed will cause this scene to refresh
}
else
- {
+ {
// 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why.
UINT uiIDA[1] = { IDS_CONFIRM_OK };
- ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad);
+ ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad);
}
}
}
-
+
#endif
#ifdef _XBOX
@@ -6116,7 +6116,7 @@ int CMinecraftApp::WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStor
if(result==C4JStorage::EMessage_ResultAccept)
{
if(ProfileManager.IsSignedIn(iPad))
- {
+ {
// need to allow downloads here, or the player would need to quit the game to let the download of a texture pack happen. This might affect the network traffic, since the download could take all the bandwidth...
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -6136,7 +6136,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
//CMinecraftApp* pClass = (CMinecraftApp*)pParam;
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
INT saveOrCheckpointId = 0;
@@ -6148,7 +6148,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
DLCPack * pDLCPack=tPack->getDLCPack();
if(!pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
- {
+ {
// upsell
// get the dlc texture pack
@@ -6168,7 +6168,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
// Give the player a warning about the trial version of the texture pack
ui.RequestErrorMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, iPad,&CMinecraftApp::WarningTrialTexturePackReturned,NULL);
- return S_OK;
+ return S_OK;
}
}
//bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
@@ -6183,7 +6183,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
int CMinecraftApp::ExitAndJoinFromInviteDeclineSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
StorageManager.SetSaveDisabled(false);
@@ -6372,7 +6372,7 @@ UINT CMinecraftApp::GetNextTip()
}
else
{
- if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
+ if(bShowSkinDLCTip && ProfileManager.IsFullVersion())
{
bShowSkinDLCTip=false;
if( app.DLCInstallProcessCompleted() )
@@ -6484,7 +6484,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*CONTROLLER_ACTION_DROP*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DROP ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_CAMERA*}", GetActionReplacement(iPad,MINECRAFT_ACTION_RENDER_THIRD_PERSON ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_MENU_PAGEDOWN*}", GetActionReplacement(iPad,ACTION_MENU_PAGEDOWN ) );
- text = replaceAll(text, L"{*CONTROLLER_ACTION_DISMOUNT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_SNEAK_TOGGLE ) );
+ text = replaceAll(text, L"{*CONTROLLER_ACTION_DISMOUNT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_SNEAK_TOGGLE ) );
text = replaceAll(text, L"{*CONTROLLER_VK_A*}", GetVKReplacement(VK_PAD_A) );
text = replaceAll(text, L"{*CONTROLLER_VK_B*}", GetVKReplacement(VK_PAD_B) );
text = replaceAll(text, L"{*CONTROLLER_VK_X*}", GetVKReplacement(VK_PAD_X) );
@@ -6499,7 +6499,7 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*ICON_SHANK_03*}", GetIconReplacement(XZP_ICON_SHANK_03) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_UP*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_UP ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_DOWN*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_DOWN ) );
- text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_RIGHT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_RIGHT ) );
+ text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_RIGHT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_RIGHT ) );
text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_LEFT*}", GetActionReplacement(iPad,MINECRAFT_ACTION_DPAD_LEFT ) );
#if defined _XBOX_ONE || defined __PSVITA__
text = replaceAll(text, L"{*CONTROLLER_VK_START*}", GetVKReplacement(VK_PAD_START ) );
@@ -6515,13 +6515,13 @@ wstring CMinecraftApp::FormatHTMLString(int iPad, const wstring &desc, int shado
text = replaceAll(text, L"{*IMAGEROOT*}", imageRoot);
#endif // _XBOX
- // Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
+ // Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered with padding space, which looks no good
DWORD dwLanguage = XGetLanguage( );
switch(dwLanguage)
{
- case XC_LANGUAGE_KOREAN:
+ case XC_LANGUAGE_KOREAN:
case XC_LANGUAGE_JAPANESE:
- case XC_LANGUAGE_TCHINESE:
+ case XC_LANGUAGE_TCHINESE:
text = replaceAll(text, L"&nbsp;", L"" );
break;
}
@@ -6664,7 +6664,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_LTHUMB_UPLEFT :
case VK_PAD_LTHUMB_UPRIGHT :
case VK_PAD_LTHUMB_DOWNRIGHT:
- case VK_PAD_LTHUMB_DOWNLEFT :
+ case VK_PAD_LTHUMB_DOWNLEFT :
return app.GetString( IDS_CONTROLLER_LEFT_STICK );
case VK_PAD_RTHUMB_UP :
case VK_PAD_RTHUMB_DOWN :
@@ -6673,7 +6673,7 @@ wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey)
case VK_PAD_RTHUMB_UPLEFT :
case VK_PAD_RTHUMB_UPRIGHT :
case VK_PAD_RTHUMB_DOWNRIGHT:
- case VK_PAD_RTHUMB_DOWNLEFT :
+ case VK_PAD_RTHUMB_DOWNLEFT :
return app.GetString( IDS_CONTROLLER_RIGHT_STICK );
default:
break;
@@ -6836,7 +6836,7 @@ HRESULT CMinecraftApp::RegisterMojangData(WCHAR *pXuidName, PlayerUID xuid, WCHA
// ignore the names if we don't recognize them
if(pXuidName!=NULL)
- {
+ {
if( wcscmp( pXuidName, L"XUID_NOTCH" ) == 0 )
{
eTempXuid = eXUID_Notch; // might be needed for the apple at some point
@@ -6876,7 +6876,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
// #ifdef _XBOX
// if(pType!=NULL)
- // {
+ // {
// if(wcscmp(pType,L"XboxOneTransfer")==0)
// {
// if(iValue>0)
@@ -6892,7 +6892,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
// {
// app.m_uiTransferSlotC=iValue;
// }
- //
+ //
// }
// #endif
@@ -6901,7 +6901,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR *pType, int iValue)
}
#if (defined _XBOX || defined _WINDOWS64)
-HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, __uint64 ullOfferID_Full, __uint64 ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
+HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGender, uint64_t ullOfferID_Full, uint64_t ullOfferID_Trial, WCHAR *pFirstSkin, unsigned int uiSortIndex, int iConfig, WCHAR *pDataFile)
{
HRESULT hr=S_OK;
DLC_INFO *pDLCData=new DLC_INFO;
@@ -6916,18 +6916,18 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR *pType, WCHAR *pBannerName, int iGe
#ifndef __ORBIS__
// ignore the names if we don't recognize them
if(pBannerName!=L"")
- {
+ {
wcsncpy_s( pDLCData->wchBanner, pBannerName, MAX_BANNERNAME_SIZE);
}
if(pDataFile[0]!=0)
- {
+ {
wcsncpy_s( pDLCData->wchDataFile, pDataFile, MAX_BANNERNAME_SIZE);
}
#endif
if(pType!=NULL)
- {
+ {
if(wcscmp(pType,L"Skin")==0)
{
pDLCData->eDLCType=e_DLC_SkinPack;
@@ -7006,12 +7006,12 @@ HRESULT CMinecraftApp::RegisterDLCData(eDLCContentType eType, WCHAR *pwchBannerN
// ignore the names if we don't recognize them
if(pwchBannerName!=L"")
- {
+ {
wcsncpy_s( pDLCData->wchBanner, pwchBannerName, MAX_BANNERNAME_SIZE);
}
if(pwchProductName[0]!=0)
- {
+ {
pDLCData->wsDisplayName=pwchProductName;
}
@@ -7053,7 +7053,7 @@ HRESULT CMinecraftApp::RegisterDLCData(char *pchDLCName, unsigned int uiSortInde
pDLCData->iConfig = app.GetiConfigFromName(pchDLCName);
pDLCData->uiSortIndex=uiSortIndex;
- pDLCData->eDLCType = app.GetDLCTypeFromName(pchDLCName);
+ pDLCData->eDLCType = app.GetDLCTypeFromName(pchDLCName);
strcpy(pDLCData->chImageURL,pchImageURL);
//bool bIsTrialDLC = app.GetTrialFromName(pchDLCName);
@@ -7125,7 +7125,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfo(char *pchDLCName)
string tempString=pchDLCName;
if(DLCInfo.size()>0)
- {
+ {
auto it = DLCInfo.find(tempString);
if( it == DLCInfo.end() )
@@ -7198,7 +7198,7 @@ bool CMinecraftApp::GetDLCFullOfferIDForPackID(const int iPackID,wstring &Produc
{
auto it = DLCTextures_PackID.find(iPackID);
if( it == DLCTextures_PackID.end() )
- {
+ {
return false;
}
else
@@ -7270,7 +7270,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial)
{
//DLC_INFO *pDLCInfo=NULL;
if(DLCInfo_Trial.size()>0)
- {
+ {
auto it = DLCInfo_Trial.find(ullOfferID_Trial);
if( it == DLCInfo_Trial.end() )
@@ -7327,7 +7327,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(WCHAR *pwchProductID)
{
wstring wsTemp = pwchProductID;
if(DLCInfo_Full.size()>0)
- {
+ {
auto it = DLCInfo_Full.find(wsTemp);
if( it == DLCInfo_Full.end() )
@@ -7367,7 +7367,7 @@ DLC_INFO *CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full)
{
if(DLCInfo_Full.size()>0)
- {
+ {
auto it = DLCInfo_Full.find(ullOfferID_Full);
if( it == DLCInfo_Full.end() )
@@ -7479,11 +7479,11 @@ int CMinecraftApp::ExitGameFromRemoteSaveDialogReturned(void *pParam,int iPad,C4
//CScene_Pause* pClass = (CScene_Pause*)pParam;
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultDecline)
+ if(result==C4JStorage::EMessage_ResultDecline)
{
app.SetAction(iPad,eAppAction_ExitWorld);
}
- else
+ else
{
#ifndef _XBOX
// Inform fullscreen progress scene that it's not being cancelled after all
@@ -7564,7 +7564,7 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char *ps
m_vBannedListA[iPad]->push_back(pBannedListData);
if(bWriteToTMS)
- {
+ {
DWORD dwDataBytes=(DWORD)(sizeof(BANNEDLISTDATA)*m_vBannedListA[iPad]->size());
PBANNEDLISTDATA pBannedList = (BANNEDLISTDATA *)(new CHAR [dwDataBytes]);
int iCount=0;
@@ -7592,7 +7592,7 @@ bool CMinecraftApp::IsInBannedLevelList(int iPad, PlayerUID xuid, char *pszLevel
#ifdef _XBOX_ONE
PlayerUID bannedPlayerUID = pData->wchPlayerUID;
if(IsEqualXUID (bannedPlayerUID,xuid) && (strcmp(pData->pszLevelName,pszLevelName)==0))
-#else
+#else
if(IsEqualXUID (pData->xuid,xuid) && (strcmp(pData->pszLevelName,pszLevelName)==0))
#endif
{
@@ -7693,7 +7693,7 @@ bool CMinecraftApp::AlreadySeenCreditText(const wstring &wstemp)
wstring temp=m_vCreditText.at(i);
// if they are the same, break out of the case
- if(temp.compare(wstemp)==0)
+ if(temp.compare(wstemp)==0)
{
return true;
}
@@ -8081,7 +8081,7 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame
break;
case eGameHostOption_FireSpreads:
return (uiHostSettings&GAME_HOST_OPTION_BITMASK_FIRESPREADS);
- break;
+ break;
case eGameHostOption_CheatsEnabled:
return (uiHostSettings&(GAME_HOST_OPTION_BITMASK_HOSTFLY|GAME_HOST_OPTION_BITMASK_HOSTHUNGER|GAME_HOST_OPTION_BITMASK_HOSTINVISIBLE));
break;
@@ -8099,7 +8099,7 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame
break;
case eGameHostOption_DisableSaving:
return (uiHostSettings&GAME_HOST_OPTION_BITMASK_DISABLESAVE);
- break;
+ break;
case eGameHostOption_WasntSaveOwner:
return (uiHostSettings&GAME_HOST_OPTION_BITMASK_NOTOWNER);
case eGameHostOption_WorldSize:
@@ -8118,7 +8118,7 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame
return !(uiHostSettings&GAME_HOST_OPTION_BITMASK_NATURALREGEN);
case eGameHostOption_DoDaylightCycle:
return !(uiHostSettings&GAME_HOST_OPTION_BITMASK_DODAYLIGHTCYCLE);
- break;
+ break;
}
return false;
@@ -8178,7 +8178,7 @@ unsigned int CMinecraftApp::FromBigEndian(unsigned int uiValue)
// Keep it in big endian
return uiValue;
#else
- unsigned int uiReturn = ( ( uiValue >> 24 ) & 0x000000ff ) |
+ unsigned int uiReturn = ( ( uiValue >> 24 ) & 0x000000ff ) |
( ( uiValue >> 8 ) & 0x0000ff00 ) |
( ( uiValue << 8 ) & 0x00ff0000 ) |
( ( uiValue << 24 ) & 0xff000000 );
@@ -8204,7 +8204,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
uiCount+=8;
while(uiCount<dwImageBytes)
- {
+ {
uiChunkLen=*(unsigned int *)&ucPtr[uiCount];
uiChunkLen=FromBigEndian(uiChunkLen);
uiCount+=sizeof(int);
@@ -8228,7 +8228,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
pszKeyword++;
if(strcmp(szKeyword,"4J_SEED")==0)
{
- // read the seed value
+ // read the seed value
unsigned int uiValueC=0;
while(*pszKeyword!=0 && (pszKeyword < ucPtr + uiCount + uiChunkLen) )
{
@@ -8240,7 +8240,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
else if(strcmp(szKeyword,"4J_HOSTOPTIONS")==0)
{
bHostOptionsRead = true;
- // read the host options value
+ // read the host options value
unsigned int uiValueC=0;
unsigned char pszHostOptions[9]; // Hex representation of unsigned int
ZeroMemory(&pszHostOptions,9);
@@ -8257,7 +8257,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
}
else if(strcmp(szKeyword,"4J_TEXTUREPACK")==0)
{
- // read the texture pack value
+ // read the texture pack value
unsigned int uiValueC=0;
unsigned char pszTexturePack[9]; // Hex representation of unsigned int
ZeroMemory(&pszTexturePack,9);
@@ -8282,7 +8282,7 @@ void CMinecraftApp::GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsig
return;
}
-unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
+unsigned int CMinecraftApp::CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId)
{
int iTextMetadataBytes = 0;
if(hasSeed)
@@ -8349,7 +8349,7 @@ bool CMinecraftApp::GetTerrainFeaturePosition(_eTerrainFeatureType eType,int *pX
*pX=pFeatureData->x;
*pZ=pFeatureData->z;
return true;
- }
+ }
}
return false;
@@ -8494,7 +8494,7 @@ unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, bool bPromo
{
// promote
if(bPromote)
- {
+ {
m_DLCDownloadQueue.erase(m_DLCDownloadQueue.begin()+iPosition);
m_DLCDownloadQueue.insert(m_DLCDownloadQueue.begin(),pCurrent);
}
@@ -8506,10 +8506,10 @@ unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, bool bPromo
}
DLCRequest *pDLCreq = new DLCRequest;
- pDLCreq->dwType=m_dwContentTypeA[eType];
+ pDLCreq->dwType=m_dwContentTypeA[eType];
pDLCreq->eState=e_DLC_ContentState_Idle;
- m_DLCDownloadQueue.push_back(pDLCreq);
+ m_DLCDownloadQueue.push_back(pDLCreq);
m_bAllDLCContentRetrieved=false;
LeaveCriticalSection(&csDLCDownloadQueue);
@@ -8541,7 +8541,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
{
// promote
if(bPromote)
- {
+ {
m_TMSPPDownloadQueue.erase(m_TMSPPDownloadQueue.begin()+iPosition);
m_TMSPPDownloadQueue.insert(m_TMSPPDownloadQueue.begin(),pCurrent);
bPromoted=true;
@@ -8575,17 +8575,17 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
{
// first check if the image is already in the memory textures, since we might be loading some from the Title Update partition
if(pDLC->wchDataFile[0]!=0)
- {
+ {
//WCHAR *cString = pDLC->wchDataFile;
// 4J-PB - shouldn't check this here - let the TMS files override it, so if they are on TMS, we'll take them first
//int iIndex = app.GetLocalTMSFileIndex(pDLC->wchDataFile,true);
//if(iIndex!=-1)
- {
+ {
bool bPresent = app.IsFileInTPD(pDLC->iConfig);
if(!bPresent)
- {
+ {
// this may already be present in the vector because of a previous trial/full offer
bool bAlreadyInQueue=false;
@@ -8599,7 +8599,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
pTMSPPreq->CallbackFunc=&CMinecraftApp::TMSPPFileReturned;
@@ -8611,7 +8611,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
pTMSPPreq->eState=e_TMS_ContentState_Queued;
m_bAllTMSContentRetrieved=false;
m_TMSPPDownloadQueue.push_back(pTMSPPreq);
- }
+ }
}
else
{
@@ -8635,20 +8635,20 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
// is this the right type?
if(pDLC->eDLCType==eType)
- {
+ {
WCHAR *cString = pDLC->wchBanner;
// 4J-PB - shouldn't check this here - let the TMS files override it, so if they are on TMS, we'll take them first
- // is the file in the TMS XZP?
+ // is the file in the TMS XZP?
//int iIndex = app.GetLocalTMSFileIndex(cString,true);
//if(iIndex!=-1)
- {
- bool bPresent = app.IsFileInMemoryTextures(cString);
+ {
+ bool bPresent = app.IsFileInMemoryTextures(cString);
if(!bPresent) // retrieve it from TMSPP
- {
+ {
bool bAlreadyInQueue=false;
for( TMSPPRequest *pCurrent : m_TMSPPDownloadQueue )
{
@@ -8660,7 +8660,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
pTMSPPreq->CallbackFunc=&CMinecraftApp::TMSPPFileReturned;
@@ -8673,7 +8673,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
pTMSPPreq->eState=e_TMS_ContentState_Queued;
m_bAllTMSContentRetrieved=false;
- m_TMSPPDownloadQueue.push_back(pTMSPPreq);
+ m_TMSPPDownloadQueue.push_back(pTMSPPreq);
app.DebugPrintf("===m_TMSPPDownloadQueue Adding %ls, q size is %d\n",pTMSPPreq->wchFilename,m_TMSPPDownloadQueue.size());
}
}
@@ -8697,11 +8697,11 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
//int iIndex = app.GetLocalTMSFileIndex(cString,true);
//if(iIndex!=-1)
- {
+ {
bool bPresent = app.IsFileInMemoryTextures(cString);
if(!bPresent)
- {
+ {
// this may already be present in the vector because of a previous trial/full offer
bool bAlreadyInQueue=false;
@@ -8715,7 +8715,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
}
if(!bAlreadyInQueue)
- {
+ {
//app.DebugPrintf("Adding a request to the TMSPP download queue - %ls\n",pDLC->wchBanner);
TMSPPRequest *pTMSPPreq = new TMSPPRequest;
ZeroMemory(pTMSPPreq,sizeof(TMSPPRequest));
@@ -8734,7 +8734,7 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool
m_bAllTMSContentRetrieved=false;
m_TMSPPDownloadQueue.push_back(pTMSPPreq);
app.DebugPrintf("===m_TMSPPDownloadQueue Adding %ls, q size is %d\n",pTMSPPreq->wchFilename,m_TMSPPDownloadQueue.size());
- }
+ }
}
}
}
@@ -8845,7 +8845,7 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
pCurrent->eState=e_TMS_ContentState_Retrieved;
if(pFileData!=NULL)
- {
+ {
#ifdef _XBOX_ONE
@@ -8853,7 +8853,7 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
switch(pCurrent->eType)
{
case e_DLC_TexturePackData:
- {
+ {
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
PBYTE pbData = new BYTE [pFileData->dwSize];
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
@@ -8862,13 +8862,13 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
app.DebugPrintf("Got texturepack data\n");
// get the config value for the texture pack
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
- app.AddMemoryTPDFile(iConfig, pbData, pFileData->dwSize);
+ app.AddMemoryTPDFile(iConfig, pbData, pFileData->dwSize);
}
break;
default:
// 4J-PB - check the data is an image
if(pFileData->pbData[0]==0x89)
- {
+ {
// 4J-PB - we need to allocate memory for the file data and copy into it, since the current data is a reference into the blob download memory
PBYTE pbData = new BYTE [pFileData->dwSize];
memcpy(pbData,pFileData->pbData,pFileData->dwSize);
@@ -8888,11 +8888,11 @@ int CMinecraftApp::TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JSto
switch(pCurrent->eType)
{
case e_DLC_TexturePackData:
- {
+ {
app.DebugPrintf("--- Got texturepack data %ls\n",pCurrent->wchFilename);
// get the config value for the texture pack
int iConfig=app.GetTPConfigVal(pCurrent->wchFilename);
- app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->dwSize);
+ app.AddMemoryTPDFile(iConfig, pFileData->pbData, pFileData->dwSize);
}
break;
default:
@@ -9149,7 +9149,7 @@ void CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, D
for(unsigned int i=0;i<dwSkinBoxC;i++)
{
if(pModel)
- {
+ {
ModelPart *pModelPart=pModel->AddOrRetrievePart(&SkinBoxA[i]);
pvModelPart->push_back(pModelPart);
pvSkinBoxes->push_back(&SkinBoxA[i]);
@@ -9179,7 +9179,7 @@ vector<ModelPart *> * CMinecraftApp::SetAdditionalSkinBoxes(DWORD dwSkinID, vect
for( auto& it : *pvSkinBoxA )
{
if(pModel)
- {
+ {
ModelPart *pModelPart=pModel->AddOrRetrievePart(it);
pvModelPart->push_back(pModelPart);
}
@@ -9266,7 +9266,7 @@ void CMinecraftApp::SetAnimOverrideBitmask(DWORD dwSkinID,unsigned int uiAnimOve
DWORD CMinecraftApp::getSkinIdFromPath(const wstring &skin)
{
- bool dlcSkin = false;
+ bool dlcSkin = false;
unsigned int skinId = 0;
if(skin.size() >= 14)
@@ -9323,7 +9323,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
#if defined __PSVITA__ || defined __PS3__ || defined __ORBIS__
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
Minecraft *pMinecraft = Minecraft::GetInstance();
if( pMinecraft->skins->selectTexturePackById(app.GetRequiredTexturePackID()) )
@@ -9334,7 +9334,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
{
// we need to enable background downloading for the DLC
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
- SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo(app.GetRequiredTexturePackID());
+ SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo(app.GetRequiredTexturePackID());
if(pSONYDLCInfo!=NULL)
{
char chName[42];
@@ -9363,7 +9363,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
}
else
{
- app.Checkout(chSkuID);
+ app.Checkout(chSkuID);
}
}
}
@@ -9379,7 +9379,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
if(result!=C4JStorage::EMessage_Cancelled)
{
if(app.GetRequiredTexturePackID()!=0)
- {
+ {
// we need to enable background downloading for the DLC
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -9397,7 +9397,7 @@ int CMinecraftApp::TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::E
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
ullIndexA[0]=pDLCInfo->ullOfferID_Trial;
StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
- }
+ }
}
}
#endif
@@ -9440,39 +9440,39 @@ byteArray CMinecraftApp::getArchiveFile(const wstring &filename)
// DLC
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
-int CMinecraftApp::GetDLCInfoCount()
-{
+int CMinecraftApp::GetDLCInfoCount()
+{
return (int)DLCInfo.size();
}
#elif defined _XBOX_ONE
-int CMinecraftApp::GetDLCInfoTrialOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTrialOffersCount()
+{
return 0;
}
-int CMinecraftApp::GetDLCInfoFullOffersCount()
-{
+int CMinecraftApp::GetDLCInfoFullOffersCount()
+{
return (int)DLCInfo_Full.size();
}
#else
-int CMinecraftApp::GetDLCInfoTrialOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTrialOffersCount()
+{
return (int)DLCInfo_Trial.size();
}
-int CMinecraftApp::GetDLCInfoFullOffersCount()
-{
+int CMinecraftApp::GetDLCInfoFullOffersCount()
+{
return (int)DLCInfo_Full.size();
}
#endif
-int CMinecraftApp::GetDLCInfoTexturesOffersCount()
-{
+int CMinecraftApp::GetDLCInfoTexturesOffersCount()
+{
return (int)DLCTextures_PackID.size();
}
// AUTOSAVE
-void CMinecraftApp::SetAutosaveTimerTime(void)
+void CMinecraftApp::SetAutosaveTimerTime(void)
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
m_uiAutosaveTimer= GetTickCount()+1000*60;
@@ -9481,23 +9481,23 @@ void CMinecraftApp::SetAutosaveTimerTime(void)
#endif
}// value x 15 to get mins, x60 for secs
-bool CMinecraftApp::AutosaveDue(void)
-{
+bool CMinecraftApp::AutosaveDue(void)
+{
return (GetTickCount()>m_uiAutosaveTimer);
}
-unsigned int CMinecraftApp::SecondsToAutosave()
-{
- return (m_uiAutosaveTimer - GetTickCount() ) / 1000;
+unsigned int CMinecraftApp::SecondsToAutosave()
+{
+ return (m_uiAutosaveTimer - GetTickCount() ) / 1000;
}
-void CMinecraftApp::SetTrialTimerStart(void)
+void CMinecraftApp::SetTrialTimerStart(void)
{
m_fTrialTimerStart=m_Time.fAppTime; mfTrialPausedTime=0.0f;
}
-float CMinecraftApp::getTrialTimer(void)
-{
+float CMinecraftApp::getTrialTimer(void)
+{
return m_Time.fAppTime-m_fTrialTimerStart-mfTrialPausedTime;
}
@@ -9532,7 +9532,7 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable()
//#else
// for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
// {
- // if( (i!=userIndex) && (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) )
+ // if( (i!=userIndex) && (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) )
// {
// iOtherConnectedControllers++;
// }
@@ -9607,7 +9607,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
case XC_LOCALE_UNITED_ARAB_EMIRATES:
case XC_LOCALE_GREAT_BRITAIN:
locales.push_back(eMCLang_enGB);
- break;
+ break;
default: //XC_LOCALE_UNITED_STATES
break;
}
@@ -9707,7 +9707,7 @@ void CMinecraftApp::getLocale(vector<wstring> &vecWstrLocales)
break;
case XC_LANGUAGE_BNORWEGIAN :
locales.push_back(eMCLang_nbNO);
- locales.push_back(eMCLang_noNO);
+ locales.push_back(eMCLang_noNO);
locales.push_back(eMCLang_nnNO);
break;
case XC_LANGUAGE_DUTCH :
diff --git a/Minecraft.Client/Common/Consoles_App.h b/Minecraft.Client/Common/Consoles_App.h
index ec36b765..40674088 100644
--- a/Minecraft.Client/Common/Consoles_App.h
+++ b/Minecraft.Client/Common/Consoles_App.h
@@ -28,7 +28,7 @@ typedef struct _JoinFromInviteData
DWORD dwUserIndex; // dwUserIndex
DWORD dwLocalUsersMask; // dwUserMask
const INVITE_INFO *pInviteInfo; // pInviteInfo
-}
+}
JoinFromInviteData;
class Player;
@@ -55,7 +55,7 @@ class Merchant;
class CMinecraftAudio;
-class CMinecraftApp
+class CMinecraftApp
#ifdef _XBOX
: public CXuiModule
@@ -92,7 +92,7 @@ public:
#ifdef _EXTENDED_ACHIEVEMENTS
/* 4J-JEV:
- * We need more space in the profile data because of the new achievements and statistics
+ * We need more space in the profile data because of the new achievements and statistics
* necessary for the new expanded achievement set.
*/
static const int GAME_DEFINED_PROFILE_DATA_BYTES = 2*972; // per user
@@ -164,7 +164,7 @@ public:
void SetGlobalXuiAction(eXuiAction action) {m_eGlobalXuiAction=action;}
eXuiAction GetXuiAction(int iPad) {return m_eXuiAction[iPad];}
void SetAction(int iPad, eXuiAction action, LPVOID param = NULL);
- void SetTMSAction(int iPad, eTMSAction action) {m_eTMSAction[iPad]=action; }
+ void SetTMSAction(int iPad, eTMSAction action) {m_eTMSAction[iPad]=action; }
eTMSAction GetTMSAction(int iPad) {return m_eTMSAction[iPad];}
eXuiServerAction GetXuiServerAction(int iPad) {return m_eXuiServerAction[iPad];}
LPVOID GetXuiServerActionParam(int iPad) {return m_eXuiServerActionParam[iPad];}
@@ -282,7 +282,7 @@ public:
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal);
void ActionDebugMask(int iPad, bool bSetAllClear=false);
- //
+ //
bool IsLocalMultiplayerAvailable();
// for sign in change monitoring
@@ -359,7 +359,7 @@ public:
// Texture Pack Data files (icon, banner, comparison shot & text)
void AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes);
- void RemoveMemoryTPDFile(int iConfig);
+ void RemoveMemoryTPDFile(int iConfig);
bool IsFileInTPD(int iConfig);
void GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes);
int GetTPDSize() {return m_MEM_TPD.size();}
@@ -444,7 +444,7 @@ private:
static int BannedLevelDialogReturned(void *pParam,int iPad,const C4JStorage::EMessageResult);
static int TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
- VBANNEDLIST *m_vBannedListA[XUSER_MAX_COUNT];
+ VBANNEDLIST *m_vBannedListA[XUSER_MAX_COUNT];
void HandleButtonPresses(int iPad);
@@ -472,7 +472,7 @@ private:
static unsigned int m_uiLastSignInData;
- // We've got sizeof(GAME_SETTINGS) bytes reserved at the start of the gamedefined data per player for settings
+ // We've got sizeof(GAME_SETTINGS) bytes reserved at the start of the gamedefined data per player for settings
GAME_SETTINGS *GameSettingsA[XUSER_MAX_COUNT];
// For promo work
@@ -517,7 +517,7 @@ private:
eXuiAction m_eXuiAction[XUSER_MAX_COUNT];
eTMSAction m_eTMSAction[XUSER_MAX_COUNT];
LPVOID m_eXuiActionParam[XUSER_MAX_COUNT];
- eXuiAction m_eGlobalXuiAction;
+ eXuiAction m_eGlobalXuiAction;
eXuiServerAction m_eXuiServerAction[XUSER_MAX_COUNT];
LPVOID m_eXuiServerActionParam[XUSER_MAX_COUNT];
eXuiServerAction m_eGlobalXuiServerAction;
@@ -541,20 +541,20 @@ private:
// Trial timer
float m_fTrialTimerStart,mfTrialPausedTime;
typedef struct TimeInfo
- {
- LARGE_INTEGER qwTime;
- LARGE_INTEGER qwAppTime;
+ {
+ LARGE_INTEGER qwTime;
+ LARGE_INTEGER qwAppTime;
- float fAppTime;
- float fElapsedTime;
- float fSecsPerTick;
- } TIMEINFO;
+ float fAppTime;
+ float fElapsedTime;
+ float fSecsPerTick;
+ } TIMEINFO;
TimeInfo m_Time;
protected:
- static const int MAX_TIPS_GAMETIP = 50;
- static const int MAX_TIPS_TRIVIATIP = 20;
+ static const int MAX_TIPS_GAMETIP = 50;
+ static const int MAX_TIPS_TRIVIATIP = 20;
static TIPSTRUCT m_GameTipA[MAX_TIPS_GAMETIP];
static TIPSTRUCT m_TriviaTipA[MAX_TIPS_TRIVIATIP];
static Random *TipRandom;
@@ -606,7 +606,7 @@ public:
DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId);
DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName);
#else
- static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, __uint64, __uint64, WCHAR *, unsigned int, int, WCHAR *pDataFile);
+ static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, uint64_t, uint64_t, WCHAR *, unsigned int, int, WCHAR *pDataFile);
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
@@ -634,7 +634,7 @@ private:
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
static unordered_map<int, char * > DLCTextures_PackID; // for mash-up packs & texture packs
- static unordered_map<string,DLC_INFO * > DLCInfo;
+ static unordered_map<string,DLC_INFO * > DLCInfo;
static unordered_map<wstring, ULONGLONG > DLCInfo_SkinName; // skin name, full offer id
#elif defined(_DURANGO)
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
@@ -729,7 +729,7 @@ public:
// World seed from png image
void GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsigned char *pszSeed,unsigned int &uiHostOptions,bool &bHostOptionsRead,DWORD &uiTexturePack);
- unsigned int CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
+ unsigned int CreateImageTextData(PBYTE bTextMetadata, int64_t seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
// Game rules
GameRuleManager m_gameRules;
@@ -773,7 +773,7 @@ public:
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote=false);
int GetDLCInfoTexturesOffersCount();
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
- DLC_INFO *GetDLCInfo(int iIndex);
+ DLC_INFO *GetDLCInfo(int iIndex);
DLC_INFO *GetDLCInfo(char *);
DLC_INFO *GetDLCInfoFromTPackID(int iTPID);
bool GetDLCNameForPackID(const int iPackID,char **ppchKeyID);
@@ -935,5 +935,5 @@ private:
#endif
};
-//singleton
+//singleton
//extern CMinecraftApp app;
diff --git a/Minecraft.Client/Common/GameRules/ApplySchematicRuleDefinition.h b/Minecraft.Client/Common/GameRules/ApplySchematicRuleDefinition.h
index 21c42dea..e5dffb3c 100644
--- a/Minecraft.Client/Common/GameRules/ApplySchematicRuleDefinition.h
+++ b/Minecraft.Client/Common/GameRules/ApplySchematicRuleDefinition.h
@@ -19,17 +19,17 @@ private:
ConsoleSchematicFile::ESchematicRotation m_rotation;
int m_dimension;
- __int64 m_totalBlocksChanged;
- __int64 m_totalBlocksChangedLighting;
+ int64_t m_totalBlocksChanged;
+ int64_t m_totalBlocksChangedLighting;
bool m_completed;
void updateLocationBox();
-public:
+public:
ApplySchematicRuleDefinition(LevelGenerationOptions *levelGenOptions);
~ApplySchematicRuleDefinition();
virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_ApplySchematic; }
-
+
virtual void writeAttributes(DataOutputStream *dos, UINT numAttrs);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
index 01a8119e..7b69c4b4 100644
--- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
+++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.cpp
@@ -38,7 +38,7 @@ void ConsoleSchematicFile::save(DataOutputStream *dos)
dos->writeInt(m_zSize);
byteArray ba(new BYTE[ m_data.length ], m_data.length);
- Compression::getCompression()->CompressLZXRLE( ba.data, &ba.length,
+ Compression::getCompression()->CompressLZXRLE( ba.data, &ba.length,
m_data.data, m_data.length);
dos->writeInt(ba.length);
@@ -71,13 +71,13 @@ void ConsoleSchematicFile::load(DataInputStream *dis)
m_ySize = dis->readInt();
m_zSize = dis->readInt();
- int compressedSize = dis->readInt();
+ int compressedSize = dis->readInt();
byteArray compressedBuffer(compressedSize);
dis->readFully(compressedBuffer);
if(m_data.data != NULL)
{
- delete [] m_data.data;
+ delete [] m_data.data;
m_data.data = NULL;
}
@@ -145,7 +145,7 @@ void ConsoleSchematicFile::load(DataInputStream *dis)
double z = pos->get(2)->data;
if( type == eTYPE_PAINTING || type == eTYPE_ITEM_FRAME )
- {
+ {
x = ((IntTag *) eTag->get(L"TileX") )->data;
y = ((IntTag *) eTag->get(L"TileY") )->data;
z = ((IntTag *) eTag->get(L"TileZ") )->data;
@@ -184,7 +184,7 @@ void ConsoleSchematicFile::save_tags(DataOutputStream *dos)
delete tag;
}
-__int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
+int64_t ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{
int xStart = static_cast<int>(std::fmax<double>(destinationBox->x0, (double)chunk->x*16));
int xEnd = static_cast<int>(std::fmin<double>(destinationBox->x1, (double)((xStart >> 4) << 4) + 16));
@@ -281,7 +281,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
// blockData[i] = Tile::endStone_Id;
// }
//}
-
+
PIXBeginNamedEvent(0,"Setting Block data");
chunk->setBlockData(blockData);
PIXEndNamedEvent();
@@ -323,7 +323,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
// At the point that this is called, we have all the neighbouring chunks loaded in (and generally post-processed, apart from this lighting pass), so
// we can do the sort of lighting that might propagate out of the chunk.
-__int64 ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
+int64_t ConsoleSchematicFile::applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot)
{
int xStart = max(destinationBox->x0, (double)chunk->x*16);
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);
@@ -445,7 +445,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
shared_ptr<TileEntity> teCopy = chunk->getTileEntity( (int)targetX & 15, (int)targetY & 15, (int)targetZ & 15 );
if ( teCopy != NULL )
- {
+ {
CompoundTag *teData = new CompoundTag();
te->save(teData);
@@ -478,7 +478,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
for (auto it = m_entities.begin(); it != m_entities.end();)
{
Vec3 *source = it->first;
-
+
double targetX = source->x;
double targetY = source->y + destinationBox->y0;
double targetZ = source->z;
@@ -498,7 +498,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
if( e->GetType() == eTYPE_PAINTING )
{
shared_ptr<Painting> painting = dynamic_pointer_cast<Painting>(e);
-
+
double tileX = painting->xTile;
double tileZ = painting->zTile;
schematicCoordToChunkCoord(destinationBox, painting->xTile, painting->zTile, rot, tileX, tileZ);
@@ -511,7 +511,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
else if( e->GetType() == eTYPE_ITEM_FRAME )
{
shared_ptr<ItemFrame> frame = dynamic_pointer_cast<ItemFrame>(e);
-
+
double tileX = frame->xTile;
double tileZ = frame->zTile;
schematicCoordToChunkCoord(destinationBox, frame->xTile, frame->zTile, rot, tileX, tileZ);
@@ -559,7 +559,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
zStart-=1;
else if(zStart < 0 && zStart%2 !=0)
zStart-=1;
-
+
// We want the end to be odd to have a total size that is even
if(xEnd > 0 && xEnd%2 == 0)
xEnd+=1;
@@ -613,7 +613,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
// Every x is a whole row
for(int xPos = xStart; xPos < xStart + xSize; ++xPos)
- {
+ {
int xc = xPos >> 4;
int x0 = xPos - xc * 16;
@@ -622,7 +622,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
if (x1 > 16) x1 = 16;
for(int zPos = zStart; zPos < zStart + zSize;)
- {
+ {
int zc = zPos >> 4;
int z0 = zStart - zc * 16;
@@ -713,11 +713,11 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
}
// 4J-JEV: Changed to check for instances of minecarts and hangingEntities instead of just eTYPE_PAINTING, eTYPE_ITEM_FRAME and eTYPE_MINECART
- if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY))
+ if (mobCanBeSaved || e->instanceof(eTYPE_MINECART) || e->GetType() == eTYPE_BOAT || e->instanceof(eTYPE_HANGING_ENTITY))
{
CompoundTag *eTag = new CompoundTag();
if( e->save(eTag) )
- {
+ {
ListTag<DoubleTag> *pos = (ListTag<DoubleTag> *) eTag->getList(L"Pos");
pos->get(0)->data -= xStart;
@@ -725,7 +725,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
pos->get(2)->data -= zStart;
if( e->instanceof(eTYPE_HANGING_ENTITY) )
- {
+ {
((IntTag *) eTag->get(L"TileX") )->data -= xStart;
((IntTag *) eTag->get(L"TileY") )->data -= yStart;
((IntTag *) eTag->get(L"TileZ") )->data -= zStart;
@@ -766,7 +766,7 @@ void ConsoleSchematicFile::getBlocksAndData(LevelChunk *chunk, byteArray *data,
// skyLightP += skyLightData.length;
// return;
//}
-
+
bool bHasLower, bHasUpper;
bHasLower = bHasUpper = false;
int lowerY0, lowerY1, upperY0, upperY1;
diff --git a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
index f37a6058..b0eebf9e 100644
--- a/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
+++ b/Minecraft.Client/Common/GameRules/ConsoleSchematicFile.h
@@ -58,7 +58,7 @@ private:
vector<shared_ptr<TileEntity> > m_tileEntities;
vector< pair<Vec3 *, CompoundTag *> > m_entities;
-public:
+public:
byteArray m_data;
public:
@@ -72,8 +72,8 @@ public:
void save(DataOutputStream *dos);
void load(DataInputStream *dis);
- __int64 applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
- __int64 applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
+ int64_t applyBlocksAndData(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
+ int64_t applyLighting(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
void applyTileEntities(LevelChunk *chunk, AABB *chunkBox, AABB *destinationBox, ESchematicRotation rot);
static void generateSchematicFile(DataOutputStream *dos, Level *level, int xStart, int yStart, int zStart, int xEnd, int yEnd, int zEnd, bool bSaveMobs, Compression::ECompressionTypes);
diff --git a/Minecraft.Client/Common/GameRules/GameRule.h b/Minecraft.Client/Common/GameRules/GameRule.h
index bdc2ceff..3b9dba7e 100644
--- a/Minecraft.Client/Common/GameRules/GameRule.h
+++ b/Minecraft.Client/Common/GameRules/GameRule.h
@@ -14,7 +14,7 @@ public:
typedef struct _ValueType
{
union{
- __int64 i64;
+ int64_t i64;
int i;
char c;
bool b;
@@ -44,7 +44,7 @@ public:
virtual ~GameRule();
Connection *getConnection() { return m_connection; }
-
+
ValueType getParameter(const wstring &parameterName);
void setParameter(const wstring &parameterName,ValueType value);
GameRuleDefinition *getGameRuleDefinition();
diff --git a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp
index f18aa7ae..8f172443 100644
--- a/Minecraft.Client/Common/GameRules/GameRuleManager.cpp
+++ b/Minecraft.Client/Common/GameRules/GameRuleManager.cpp
@@ -385,7 +385,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
// Read File.
// version_number
- __int64 version = dis.readShort();
+ int64_t version = dis.readShort();
unsigned char compressionType = 0;
if(version == 0)
{
diff --git a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp
index e49ee293..59fde56e 100644
--- a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp
+++ b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.cpp
@@ -175,7 +175,7 @@ void LevelGenerationOptions::addAttribute(const wstring &attributeName, const ws
{
if(attributeName.compare(L"seed") == 0)
{
- m_seed = _fromString<__int64>(attributeValue);
+ m_seed = _fromString<int64_t>(attributeValue);
app.DebugPrintf("LevelGenerationOptions: Adding parameter m_seed=%I64d\n",m_seed);
}
else if(attributeName.compare(L"spawnX") == 0)
@@ -700,7 +700,7 @@ void LevelGenerationOptions::deleteBaseSaveData() { if(m_pbBaseSaveData) delete
bool LevelGenerationOptions::hasLoadedData() { return m_hasLoadedData; }
void LevelGenerationOptions::setLoadedData() { m_hasLoadedData = true; }
-__int64 LevelGenerationOptions::getLevelSeed() { return m_seed; }
+int64_t LevelGenerationOptions::getLevelSeed() { return m_seed; }
int LevelGenerationOptions::getLevelHasBeenInCreative() { return m_bHasBeenInCreative; }
Pos *LevelGenerationOptions::getSpawnPos() { return m_spawnPos; }
bool LevelGenerationOptions::getuseFlatWorld() { return m_useFlatWorld; }
diff --git a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.h b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.h
index aa128ff8..cf669019 100644
--- a/Minecraft.Client/Common/GameRules/LevelGenerationOptions.h
+++ b/Minecraft.Client/Common/GameRules/LevelGenerationOptions.h
@@ -19,7 +19,7 @@ class GrSource
public:
// 4J-JEV:
// Moved all this here; I didn't like that all this header information
- // was being mixed in with all the game information as they have
+ // was being mixed in with all the game information as they have
// completely different lifespans.
virtual bool requiresTexturePack()=0;
@@ -146,7 +146,7 @@ public:
private:
// This should match the "MapOptionsRule" definition in the XML schema
- __int64 m_seed;
+ int64_t m_seed;
bool m_useFlatWorld;
Pos *m_spawnPos;
int m_bHasBeenInCreative;
@@ -171,13 +171,13 @@ public:
~LevelGenerationOptions();
virtual ConsoleGameRules::EGameRuleType getActionType();
-
+
virtual void writeAttributes(DataOutputStream *dos, UINT numAttributes);
virtual void getChildren(vector<GameRuleDefinition *> *children);
virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);
virtual void addAttribute(const wstring &attributeName, const wstring &attributeValue);
- __int64 getLevelSeed();
+ int64_t getLevelSeed();
int getLevelHasBeenInCreative();
Pos *getSpawnPos();
bool getuseFlatWorld();
@@ -190,7 +190,7 @@ public:
private:
void clearSchematics();
-public:
+public:
ConsoleSchematicFile *loadSchematicFile(const wstring &filename, PBYTE pbData, DWORD dwLen);
public:
@@ -211,7 +211,7 @@ public:
void loadBaseSaveData();
static int packMounted(LPVOID pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask);
-
+
// 4J-JEV:
// ApplySchematicRules contain limited state
// which needs to be reset BEFORE a new game starts.
diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Common/Network/GameNetworkManager.cpp
index dbae3010..92ea8ad0 100644
--- a/Minecraft.Client/Common/Network/GameNetworkManager.cpp
+++ b/Minecraft.Client/Common/Network/GameNetworkManager.cpp
@@ -45,8 +45,8 @@
CGameNetworkManager g_NetworkManager;
CPlatformNetworkManager *CGameNetworkManager::s_pPlatformNetworkManager;
-__int64 CGameNetworkManager::messageQueue[512];
-__int64 CGameNetworkManager::byteQueue[512];
+int64_t CGameNetworkManager::messageQueue[512];
+int64_t CGameNetworkManager::byteQueue[512];
int CGameNetworkManager::messageQueuePos = 0;
CGameNetworkManager::CGameNetworkManager()
@@ -194,7 +194,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
ProfileManager.SetDeferredSignoutEnabled(true);
#endif
- __int64 seed = 0;
+ int64_t seed = 0;
if(lpParameter != NULL)
{
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;
@@ -287,7 +287,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
}
}
- static __int64 sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running
+ static int64_t sseed = seed; // Create static version so this will be valid until next call to this function & whilst thread is running
ServerStoppedCreate(false);
if( g_NetworkManager.IsHost() )
{
@@ -929,7 +929,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
int CGameNetworkManager::ServerThreadProc( void* lpParameter )
{
- __int64 seed = 0;
+ int64_t seed = 0;
if(lpParameter != NULL)
{
NetworkGameInitData *param = (NetworkGameInitData *)lpParameter;
diff --git a/Minecraft.Client/Common/Network/GameNetworkManager.h b/Minecraft.Client/Common/Network/GameNetworkManager.h
index bb7633c2..15c7f0b0 100644
--- a/Minecraft.Client/Common/Network/GameNetworkManager.h
+++ b/Minecraft.Client/Common/Network/GameNetworkManager.h
@@ -100,11 +100,11 @@ public:
void SetSessionsUpdatedCallback( void (*SessionsUpdatedCallback)(LPVOID pParam), LPVOID pSearchParam );
void GetFullFriendSessionInfo( FriendSessionInfo *foundSession, void (* FriendSessionUpdatedFn)(bool success, void *pParam), void *pParam );
void ForceFriendsSessionRefresh();
-
+
// Session joining and leaving
bool JoinGameFromInviteInfo( int userIndex, int userMask, const INVITE_INFO *pInviteInfo);
- eJoinGameResult JoinGame(FriendSessionInfo *searchResult, int localUsersMask);
+ eJoinGameResult JoinGame(FriendSessionInfo *searchResult, int localUsersMask);
static void CancelJoinGame(LPVOID lpParam); // Not part of the shared interface
bool LeaveGame(bool bMigrateHost);
static int JoinFromInvite_SignInReturned(void *pParam,bool bContinue, int iPad);
@@ -113,13 +113,13 @@ public:
void ResetLeavingGame();
// Threads
-
+
bool IsNetworkThreadRunning();
static int RunNetworkGameThreadProc( void* lpParameter );
static int ServerThreadProc( void* lpParameter );
static int ExitAndJoinFromInviteThreadProc( void* lpParam );
-#if (defined __PS3__) || (defined __ORBIS__) || (defined __PSVITA__)
+#if (defined __PS3__) || (defined __ORBIS__) || (defined __PSVITA__)
static int MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result);
static int PSNSignInReturned_0(void* pParam, bool bContinue, int iPad);
@@ -130,7 +130,7 @@ public:
static void _LeaveGame();
static int ChangeSessionTypeThreadProc( void* lpParam );
- // System flags
+ // System flags
void SystemFlagSet(INetworkPlayer *pNetworkPlayer, int index);
bool SystemFlagGet(INetworkPlayer *pNetworkPlayer, int index);
@@ -145,8 +145,8 @@ public:
void ServerStoppedCreate(bool create); // Create the signal
void ServerStopped(); // Signal that we are ready
- void ServerStoppedWait(); // Wait for the signal
- void ServerStoppedDestroy(); // Destroy signal
+ void ServerStoppedWait(); // Wait for the signal
+ void ServerStoppedDestroy(); // Destroy signal
bool ServerStoppedValid(); // Is non-NULL
#ifdef __PSVITA__
@@ -164,9 +164,9 @@ public:
// Used for debugging output
static const int messageQueue_length = 512;
- static __int64 messageQueue[messageQueue_length];
+ static int64_t messageQueue[messageQueue_length];
static const int byteQueue_length = 512;
- static __int64 byteQueue[byteQueue_length];
+ static int64_t byteQueue[byteQueue_length];
static int messageQueuePos;
// Methods called from PlatformNetworkManager
diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp
index 80fbd98c..a898c136 100644
--- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp
+++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp
@@ -734,7 +734,7 @@ void CPlatformNetworkManagerStub::SearchForGames()
info->data.playerCount = lanSessions[i].playerCount;
info->data.maxPlayers = lanSessions[i].maxPlayers;
- info->sessionId = (SessionID)((unsigned __int64)inet_addr(lanSessions[i].hostIP) | ((unsigned __int64)lanSessions[i].hostPort << 32));
+ info->sessionId = (SessionID)((uint64_t)inet_addr(lanSessions[i].hostIP) | ((uint64_t)lanSessions[i].hostPort << 32));
friendsSessions[0].push_back(info);
}
diff --git a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp
index a7a4628b..21cd82aa 100644
--- a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp
+++ b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.cpp
@@ -132,6 +132,6 @@ int NetworkPlayerSony::GetTimeSinceLastChunkPacket_ms()
return INT_MAX;
}
- __int64 currentTime = System::currentTimeMillis();
+ int64_t currentTime = System::currentTimeMillis();
return (int)( currentTime - m_lastChunkPacketTime );
}
diff --git a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h
index f3415a41..2c61f78d 100644
--- a/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h
+++ b/Minecraft.Client/Common/Network/Sony/NetworkPlayerSony.h
@@ -39,5 +39,5 @@ public:
private:
SQRNetworkPlayer *m_sqrPlayer;
Socket *m_pSocket;
- __int64 m_lastChunkPacketTime;
+ int64_t m_lastChunkPacketTime;
};
diff --git a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp
index a040b28b..79c9835b 100644
--- a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp
+++ b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.cpp
@@ -145,7 +145,7 @@ bool SQRNetworkPlayer::IsReady()
{
return ( ( m_flags & SNP_FLAG_READY_MASK ) == SNP_FLAG_READY_MASK );
}
-
+
PlayerUID SQRNetworkPlayer::GetUID()
{
return m_ISD.m_UID;
@@ -224,7 +224,7 @@ void SQRNetworkPlayer::SendData( SQRNetworkPlayer *pPlayerTarget, const void *da
{
AckFlags ackFlags = ack ? e_flag_AckRequested : e_flag_AckNotRequested;
// Our network is connected as a star. If we are the host, then we can send to any remote player. If we're a client, we can send only to the host.
- // The host can also send to other local players, but this doesn't need to go through Rudp.
+ // The host can also send to other local players, but this doesn't need to go through Rudp.
if( m_host )
{
if( ( m_type == SNP_TYPE_HOST ) && ( pPlayerTarget->m_type == SNP_TYPE_LOCAL ) )
@@ -286,7 +286,7 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack
sendBlock.end = NULL;
sendBlock.current = NULL;
sendBlock.ack = ackFlags;
- m_sendQueue.push(sendBlock);
+ m_sendQueue.push(sendBlock);
}
else
{
@@ -299,13 +299,13 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack
sendBlock.current = sendBlock.start;
sendBlock.ack = ackFlags;
memcpy( sendBlock.start, dataCurrent, dataSize);
- m_sendQueue.push(sendBlock);
+ m_sendQueue.push(sendBlock);
dataRemaining -= dataSize;
dataCurrent += dataSize;
}
}
- m_totalBytesInSendQueue += dataSize;
+ m_totalBytesInSendQueue += dataSize;
// if the queue had something in it already, then the UDP callback will fire and call SendMoreInternal
// so we don't call it here, to avoid a deadlock
@@ -343,7 +343,7 @@ int SQRNetworkPlayer::WriteDataPacket(const void* data, int dataSize, AckFlags a
// nothing was sent!
}
else
- {
+ {
assert(ret==packetSize || ret > headerSize); // we must make sure we've sent the entire packet or the header and some data at least
ret -= headerSize;
if(ackFlags == e_flag_AckRequested)
@@ -443,7 +443,7 @@ void SQRNetworkPlayer::ReadAck()
#ifndef _CONTENT_PACKAGE
#ifdef PRINT_ACK_STATS
- __int64 timeTaken = System::currentTimeMillis() - m_ackStats[0];
+ int64_t timeTaken = System::currentTimeMillis() - m_ackStats[0];
if(timeTaken < m_minAckTime)
m_minAckTime = timeTaken;
if(timeTaken > m_maxAckTime)
@@ -525,7 +525,7 @@ void SQRNetworkPlayer::SendMoreInternal()
{
keepSending = true;
}
- }
+ }
else if( ( ret >= 0 ) || ( ret == sc_wouldBlockFlag ) )
{
@@ -543,7 +543,7 @@ void SQRNetworkPlayer::SendMoreInternal()
// Is CELL_RUDP_ERROR_WOULDBLOCK, nothing has yet been sent
remainingBytes = dataSize;
}
- m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes;
+ m_sendQueue.front().current = m_sendQueue.front().end - remainingBytes;
}
}
} while (keepSending);
diff --git a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h
index d0efe635..a72e5a41 100644
--- a/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h
+++ b/Minecraft.Client/Common/Network/Sony/SQRNetworkPlayer.h
@@ -68,11 +68,11 @@ class SQRNetworkPlayer
};
#ifndef _CONTENT_PACKAGE
- std::vector<__int64> m_ackStats;
+ std::vector<int64_t> m_ackStats;
int m_minAckTime;
int m_maxAckTime;
int m_totalAcks;
- __int64 m_totalAckTime;
+ int64_t m_totalAckTime;
int m_averageAckTime;
#endif
@@ -89,7 +89,7 @@ class SQRNetworkPlayer
{
public:
unsigned char m_smallId; // Id to uniquely and permanently identify this player between machines - assigned by the server
- PlayerUID m_UID;
+ PlayerUID m_UID;
};
SQRNetworkPlayer(SQRNetworkManager *manager, eSQRNetworkPlayerType playerType, bool onHost, SceNpMatching2RoomMemberId roomMemberId, int localPlayerIdx, int rudpCtx, PlayerUID *pUID);
@@ -114,7 +114,7 @@ class SQRNetworkPlayer
int WriteDataPacket(const void* data, int dataSize, AckFlags ackFlags);
void ReadAck();
void WriteAck();
-
+
int GetOutstandingAckCount();
int GetSendQueueSizeBytes();
int GetSendQueueSizeMessages();
diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp
index 4468d163..02fc73cf 100644
--- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp
+++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.cpp
@@ -25,11 +25,11 @@ static SceRemoteStorageStatus statParams;
// {
// app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n");
// }
-//
+//
// void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
// {
// app.DebugPrintf("remoteStorageCallback err : 0x%08x\n");
-//
+//
// app.getRemoteStorage()->getRemoteFileInfo(&statParams, remoteStorageGetInfoCallback, NULL);
// }
@@ -193,7 +193,7 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
}
-__int64 SonyRemoteStorage::getSaveSeed()
+int64_t SonyRemoteStorage::getSaveSeed()
{
if(m_getInfoStatus != e_infoFound)
return 0;
@@ -223,9 +223,9 @@ const char* SonyRemoteStorage::getRemoteSaveFilename()
int SonyRemoteStorage::getSaveFilesize()
{
- if(m_getInfoStatus == e_infoFound)
+ if(m_getInfoStatus == e_infoFound)
{
- return m_remoteFileInfo->fileSize;
+ return m_remoteFileInfo->fileSize;
}
return 0;
}
@@ -288,9 +288,9 @@ bool SonyRemoteStorage::saveIsAvailable()
if(m_getInfoStatus != e_infoFound)
return false;
#ifdef __PS3__
- return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA);
+ return (getSavePlatform() == SAVE_FILE_PLATFORM_PSVITA);
#elif defined __PSVITA__
- return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3);
+ return (getSavePlatform() == SAVE_FILE_PLATFORM_PS3);
#else // __ORBIS__
return true;
#endif
@@ -320,7 +320,7 @@ int SonyRemoteStorage::getDataProgress()
int nextChunk = ((sizeTransferred + chunkSize) * 100) / totalSize;
- __int64 time = System::currentTimeMillis();
+ int64_t time = System::currentTimeMillis();
int elapsedSecs = (time - m_startTime) / 1000;
float estimatedTransfered = float(elapsedSecs * transferRatePerSec);
int progVal = m_dataProgress + (estimatedTransfered / float(totalSize)) * 100;
@@ -341,15 +341,15 @@ bool SonyRemoteStorage::shutdown()
if(m_bInitialised)
{
int ret = sceRemoteStorageTerm();
- if(ret >= 0)
+ if(ret >= 0)
{
app.DebugPrintf("Term request done \n");
m_bInitialised = false;
free(m_memPoolBuffer);
m_memPoolBuffer = NULL;
return true;
- }
- else
+ }
+ else
{
app.DebugPrintf("Error in Term request: 0x%x \n", ret);
return false;
@@ -409,7 +409,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData& descData)
char seed[22];
app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack);
- __int64 iSeed = strtoll(seed,NULL,10);
+ int64_t iSeed = strtoll(seed,NULL,10);
SetU64HexBytes(descData.m_seed, iSeed);
// Save the host options that this world was last played with
SetU32HexBytes(descData.m_hostOptions, uiHostOptions);
@@ -433,7 +433,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
char descDataVersion[9];
sprintf(descDataVersion,"%08x",sc_CurrentDescDataVersion);
memcpy(descData.m_descDataVersion,descDataVersion,8); // Don't copy null
-
+
descData.m_platform[0] = SAVE_FILE_PLATFORM_LOCAL & 0xff;
descData.m_platform[1] = (SAVE_FILE_PLATFORM_LOCAL >> 8) & 0xff;
@@ -448,7 +448,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
char seed[22];
app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack);
- __int64 iSeed = strtoll(seed,NULL,10);
+ int64_t iSeed = strtoll(seed,NULL,10);
SetU64HexBytes(descData.m_seed, iSeed);
// Save the host options that this world was last played with
SetU32HexBytes(descData.m_hostOptions, uiHostOptions);
@@ -468,7 +468,7 @@ void SonyRemoteStorage::GetDescriptionData( DescriptionData_V2& descData)
uint32_t SonyRemoteStorage::GetU32FromHexBytes(char* hexBytes)
{
char hexString[9];
- ZeroMemory(hexString,9);
+ ZeroMemory(hexString,9);
memcpy(hexString, hexBytes,8);
uint32_t u32Val = 0;
@@ -481,7 +481,7 @@ uint32_t SonyRemoteStorage::GetU32FromHexBytes(char* hexBytes)
uint64_t SonyRemoteStorage::GetU64FromHexBytes(char* hexBytes)
{
char hexString[17];
- ZeroMemory(hexString,17);
+ ZeroMemory(hexString,17);
memcpy(hexString, hexBytes,16);
uint64_t u64Val = 0;
diff --git a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h
index d38a06e2..89ecc066 100644
--- a/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h
+++ b/Minecraft.Client/Common/Network/Sony/SonyRemoteStorage.h
@@ -1,4 +1,4 @@
-#pragma once
+#pragma once
#include "..\..\Common\Network\Sony\sceRemoteStorage\header\sceRemoteStorage.h"
@@ -43,7 +43,7 @@ public:
char m_saveFileDesc[128];
class DescriptionData
- {
+ {
// this stuff is read from a JSON query, so it all has to be text based, max 256 bytes
public:
char m_platform[4];
@@ -54,7 +54,7 @@ public:
};
class DescriptionData_V2
- {
+ {
// this stuff is read from a JSON query, so it all has to be text based, max 256 bytes
public:
char m_platformNone[4]; // set to no platform, to indicate we're using the newer version of the data
@@ -73,7 +73,7 @@ public:
public:
int m_descDataVersion;
ESavePlatform m_savePlatform;
- __int64 m_seed;
+ int64_t m_seed;
uint32_t m_hostOptions;
uint32_t m_texturePack;
uint32_t m_saveVersion;
@@ -115,7 +115,7 @@ public:
const char* getLocalFilename();
const char* getSaveNameUTF8();
ESavePlatform getSavePlatform();
- __int64 getSaveSeed();
+ int64_t getSaveSeed();
unsigned int getSaveHostOptions();
unsigned int getSaveTexturePack();
@@ -140,7 +140,7 @@ public:
static int LoadSaveDataThumbnailReturned(LPVOID lpParam,PBYTE pbThumbnail,DWORD dwThumbnailBytes);
static int setDataThread(void* lpParam);
- SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {}
+ SonyRemoteStorage() : m_memPoolBuffer(NULL), m_bInitialised(false),m_getInfoStatus(e_noInfoFound) {}
protected:
const char* getRemoteSaveFilename();
@@ -154,7 +154,7 @@ protected:
unsigned int m_thumbnailDataSize;
C4JThread* m_SetDataThread;
PSAVE_INFO m_setDataSaveInfo;
- __int64 m_startTime;
+ int64_t m_startTime;
bool m_bAborting;
bool m_bTransferStarted;
diff --git a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp
index cb6443a1..a52ebd72 100644
--- a/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp
+++ b/Minecraft.Client/Common/UI/UIComponent_Panorama.cpp
@@ -47,7 +47,7 @@ void UIComponent_Panorama::tick()
EnterCriticalSection(&pMinecraft->m_setLevelCS);
if(pMinecraft->level!=NULL)
{
- __int64 i64TimeOfDay =0;
+ int64_t i64TimeOfDay =0;
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
if(pMinecraft->level->dimension->id==0)
{
@@ -104,7 +104,7 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp
IggyPlayerSetDisplaySize( getMovie(), m_movieWidth, m_movieHeight );
IggyPlayerDrawTilesStart ( getMovie() );
-
+
m_renderWidth = tileWidth;
m_renderHeight = tileHeight;
IggyPlayerDrawTile ( getMovie() ,
@@ -112,7 +112,7 @@ void UIComponent_Panorama::render(S32 width, S32 height, C4JRender::eViewportTyp
tileYStart ,
tileXStart + tileWidth ,
tileYStart + tileHeight ,
- 0 );
+ 0 );
IggyPlayerDrawTilesEnd ( getMovie() );
}
else
diff --git a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
index 74683a62..653b0592 100644
--- a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
+++ b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.cpp
@@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa
return success;
}
-void UIControl_SpaceIndicatorBar::init(UIString label, int id, __int64 min, __int64 max)
+void UIControl_SpaceIndicatorBar::init(UIString label, int id, int64_t min, int64_t max)
{
m_label = label;
m_id = id;
@@ -61,11 +61,11 @@ void UIControl_SpaceIndicatorBar::reset()
setSaveGameOffset(0.0f);
}
-void UIControl_SpaceIndicatorBar::addSave(__int64 size)
+void UIControl_SpaceIndicatorBar::addSave(int64_t size)
{
float startPercent = (float)((m_currentTotal-m_min))/(m_max-m_min);
- m_sizeAndOffsets.push_back( pair<__int64, float>(size, startPercent) );
+ m_sizeAndOffsets.push_back( pair<int64_t, float>(size, startPercent) );
m_currentTotal += size;
setTotalSize(m_currentTotal);
@@ -75,7 +75,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
{
if(index >= 0 && index < m_sizeAndOffsets.size())
{
- pair<__int64,float> values = m_sizeAndOffsets[index];
+ pair<int64_t,float> values = m_sizeAndOffsets[index];
setSaveSize(values.first);
setSaveGameOffset(values.second);
}
@@ -86,7 +86,7 @@ void UIControl_SpaceIndicatorBar::selectSave(int index)
}
}
-void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
+void UIControl_SpaceIndicatorBar::setSaveSize(int64_t size)
{
m_currentSave = size;
@@ -99,7 +99,7 @@ void UIControl_SpaceIndicatorBar::setSaveSize(__int64 size)
IggyResult out = IggyPlayerCallMethodRS ( m_parentScene->getMovie() , &result, getIggyValuePath() , m_setSaveSizeFunc , 1 , value );
}
-void UIControl_SpaceIndicatorBar::setTotalSize(__int64 size)
+void UIControl_SpaceIndicatorBar::setTotalSize(int64_t size)
{
float percent = (float)((m_currentTotal-m_min))/(m_max-m_min);
diff --git a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h
index 8eed3944..52eb3f6d 100644
--- a/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h
+++ b/Minecraft.Client/Common/UI/UIControl_SpaceIndicatorBar.h
@@ -6,28 +6,28 @@ class UIControl_SpaceIndicatorBar : public UIControl_Base
{
private:
IggyName m_setSaveSizeFunc, m_setTotalSizeFunc, m_setSaveGameOffsetFunc;
- __int64 m_min;
- __int64 m_max;
- __int64 m_currentSave, m_currentTotal;
+ int64_t m_min;
+ int64_t m_max;
+ int64_t m_currentSave, m_currentTotal;
float m_currentOffset;
- vector<pair<__int64,float> > m_sizeAndOffsets;
+ vector<pair<int64_t,float> > m_sizeAndOffsets;
public:
UIControl_SpaceIndicatorBar();
virtual bool setupControl(UIScene *scene, IggyValuePath *parent, const string &controlName);
- void init(UIString label, int id, __int64 min, __int64 max);
+ void init(UIString label, int id, int64_t min, int64_t max);
virtual void ReInit();
void reset();
- void addSave(__int64 size);
+ void addSave(int64_t size);
void selectSave(int index);
private:
- void setSaveSize(__int64 size);
- void setTotalSize(__int64 totalSize);
+ void setSaveSize(int64_t size);
+ void setTotalSize(int64_t totalSize);
void setSaveGameOffset(float offset);
}; \ No newline at end of file
diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp
index 12370bb0..840ed389 100644
--- a/Minecraft.Client/Common/UI/UIController.cpp
+++ b/Minecraft.Client/Common/UI/UIController.cpp
@@ -144,7 +144,7 @@ extern "C" void *__real_malloc(size_t t);
extern "C" void __real_free(void *t);
#endif
-__int64 UIController::iggyAllocCount = 0;
+int64_t UIController::iggyAllocCount = 0;
static unordered_map<void *,size_t> allocations;
static void * RADLINK AllocateFunction ( void * alloc_callback_user_data , size_t size_requested , size_t * size_returned )
{
@@ -502,7 +502,7 @@ void UIController::tick()
}
// Clear out the cached movie file data
- __int64 currentTime = System::currentTimeMillis();
+ int64_t currentTime = System::currentTimeMillis();
for (auto it = m_cachedMovieData.begin(); it != m_cachedMovieData.end();)
{
if(it->second.m_expiry < currentTime)
@@ -622,7 +622,7 @@ IggyLibrary UIController::loadSkin(const wstring &skinPath, const wstring &skinN
IggyMemoryUseInfo memoryInfo;
rrbool res;
int iteration = 0;
- __int64 totalStatic = 0;
+ int64_t totalStatic = 0;
while(res = IggyDebugGetMemoryUseInfo ( NULL ,
lib ,
"" ,
@@ -753,7 +753,7 @@ void UIController::CleanUpSkinReload()
byteArray UIController::getMovieData(const wstring &filename)
{
// Cache everything we load in the current tick
- __int64 targetTime = System::currentTimeMillis() + (1000LL * 60);
+ int64_t targetTime = System::currentTimeMillis() + (1000LL * 60);
auto it = m_cachedMovieData.find(filename);
if(it == m_cachedMovieData.end() )
{
@@ -1441,8 +1441,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
//!(app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<<eDebugSetting_ToggleFont)) &&
key == ACTION_MENU_STICK_PRESS)
{
- __int64 totalStatic = 0;
- __int64 totalDynamic = 0;
+ int64_t totalStatic = 0;
+ int64_t totalDynamic = 0;
app.DebugPrintf(app.USER_SR, "********************************\n");
app.DebugPrintf(app.USER_SR, "BEGIN TOTAL SWF MEMORY USAGE\n\n");
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
@@ -1451,8 +1451,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
}
for(unsigned int i = 0; i < eLibrary_Count; ++i)
{
- __int64 libraryStatic = 0;
- __int64 libraryDynamic = 0;
+ int64_t libraryStatic = 0;
+ int64_t libraryDynamic = 0;
if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY)
{
@@ -2481,7 +2481,7 @@ void UIController::OverrideSFX(int iPad, int iAction,bool bVal)
void UIController::PlayUISFX(ESoundEffect eSound)
{
- __uint64 time = System::currentTimeMillis();
+ uint64_t time = System::currentTimeMillis();
// Don't play multiple SFX on the same tick
// (prevents horrible sounds when programmatically setting multiple checkboxes)
diff --git a/Minecraft.Client/Common/UI/UIController.h b/Minecraft.Client/Common/UI/UIController.h
index d362c4c1..5b897b13 100644
--- a/Minecraft.Client/Common/UI/UIController.h
+++ b/Minecraft.Client/Common/UI/UIController.h
@@ -16,7 +16,7 @@ class UIControl;
class UIController : public IUIController
{
public:
- static __int64 iggyAllocCount;
+ static int64_t iggyAllocCount;
// MGH - added to prevent crash loading Iggy movies while the skins were being reloaded
static CRITICAL_SECTION ms_reloadSkinCS;
@@ -30,7 +30,7 @@ private:
CRITICAL_SECTION m_navigationLock;
static const int UI_REPEAT_KEY_DELAY_MS = 300; // How long from press until the first repeat
- static const int UI_REPEAT_KEY_REPEAT_RATE_MS = 100; // How long in between repeats
+ static const int UI_REPEAT_KEY_REPEAT_RATE_MS = 100; // How long in between repeats
DWORD m_actionRepeatTimer[XUSER_MAX_COUNT][ACTION_MAX_MENU+1];
float m_fScreenWidth;
@@ -50,7 +50,7 @@ private:
eFont_Korean,
};
-
+
// 4J-JEV: It's important that currentFont == targetFont, unless updateCurrentLanguage is going to be called.
EFont m_eCurrentFont, m_eTargetFont;
@@ -76,7 +76,7 @@ private:
// 4J-PB - ui element type for PSVita touch control
#ifdef __PSVITA__
- typedef struct
+ typedef struct
{
UIControl *pControl;
S32 x1,y1,x2,y2;
@@ -141,7 +141,7 @@ private:
C4JRender::eViewportType m_currentRenderViewport;
bool m_bCustomRenderPosition;
-
+
static DWORD m_dwTrialTimerLimitSecs;
unordered_map<wstring, byteArray> m_substitutionTextures;
@@ -149,7 +149,7 @@ private:
typedef struct _CachedMovieData
{
byteArray m_ba;
- __int64 m_expiry;
+ int64_t m_expiry;
} CachedMovieData;
unordered_map<wstring, CachedMovieData> m_cachedMovieData;
@@ -173,7 +173,7 @@ private:
C4JThread *m_reloadSkinThread;
bool m_navigateToHomeOnReload;
int m_accumulatedTicks;
- __uint64 m_lastUiSfx; // Tracks time (ms) of last UI sound effect
+ uint64_t m_lastUiSfx; // Tracks time (ms) of last UI sound effect
D3D11_RECT m_customRenderingClearRect;
@@ -217,7 +217,7 @@ protected:
void postInit();
-public:
+public:
CRITICAL_SECTION m_Allocatorlock;
void SetupFont();
bool PendingFontChange();
@@ -249,7 +249,7 @@ private:
void tickInput();
void handleInput();
void handleKeyPress(unsigned int iPad, unsigned int key);
-
+
protected:
static rrbool RADLINK ExternalFunctionCallback( void * user_callback_data , Iggy * player , IggyExternalFunctionCallUTF16 * call );
@@ -319,7 +319,7 @@ private:
public:
void CloseAllPlayersScenes();
void CloseUIScenes(int iPad, bool forceIPad = false);
-
+
virtual bool IsPauseMenuDisplayed(int iPad);
virtual bool IsContainerMenuDisplayed(int iPad);
virtual bool IsIgnorePlayerJoinMenuDisplayed(int iPad);
diff --git a/Minecraft.Client/Common/UI/UIGroup.cpp b/Minecraft.Client/Common/UI/UIGroup.cpp
index e8bb9fe6..79d3c38f 100644
--- a/Minecraft.Client/Common/UI/UIGroup.cpp
+++ b/Minecraft.Client/Common/UI/UIGroup.cpp
@@ -81,7 +81,7 @@ void UIGroup::tick()
}
// Handle deferred update focus
- if (m_updateFocusStateCountdown > 0)
+ if (m_updateFocusStateCountdown > 0)
{
m_updateFocusStateCountdown--;
if (m_updateFocusStateCountdown == 0)_UpdateFocusState();
@@ -233,7 +233,7 @@ void UIGroup::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
}
}
-// FOCUS
+// FOCUS
// Check that a layer may recieve focus, specifically that there is no infocus layer above
bool UIGroup::RequestFocus(UILayer* layerPtr)
@@ -389,16 +389,16 @@ unsigned int UIGroup::GetLayerIndex(UILayer* layerPtr)
// can't get here...
return 0;
}
-
-void UIGroup::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
+
+void UIGroup::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
{
- __int64 groupStatic = 0;
- __int64 groupDynamic = 0;
+ int64_t groupStatic = 0;
+ int64_t groupDynamic = 0;
app.DebugPrintf(app.USER_SR, "-- BEGIN GROUP %d\n",m_group);
for(unsigned int i = 0; i < eUILayer_COUNT; ++i)
{
app.DebugPrintf(app.USER_SR, " \\- BEGIN LAYER %d\n",i);
- m_layers[i]->PrintTotalMemoryUsage(groupStatic, groupDynamic);
+ m_layers[i]->PrintTotalMemoryUsage(groupStatic, groupDynamic);
app.DebugPrintf(app.USER_SR, " \\- END LAYER %d\n",i);
}
app.DebugPrintf(app.USER_SR, "-- Group static: %d, Group dynamic: %d\n", groupStatic, groupDynamic);
@@ -412,7 +412,7 @@ int UIGroup::getCommandBufferList()
return m_commandBufferList;
}
-// Returns the first scene of given type if it exists, NULL otherwise
+// Returns the first scene of given type if it exists, NULL otherwise
UIScene *UIGroup::FindScene(EUIScene sceneType)
{
UIScene *pScene = NULL;
diff --git a/Minecraft.Client/Common/UI/UIGroup.h b/Minecraft.Client/Common/UI/UIGroup.h
index 28369f27..403a32ae 100644
--- a/Minecraft.Client/Common/UI/UIGroup.h
+++ b/Minecraft.Client/Common/UI/UIGroup.h
@@ -19,10 +19,10 @@ private:
UIScene_HUD *m_hud;
C4JRender::eViewportType m_viewportType;
-
+
EUIGroup m_group;
int m_iPad;
-
+
bool m_bMenuDisplayed;
bool m_bPauseMenuDisplayed;
bool m_bContainerMenuDisplayed;
@@ -88,7 +88,7 @@ public:
void SetViewportType(C4JRender::eViewportType type);
C4JRender::eViewportType GetViewportType();
-
+
virtual void HandleDLCMountingComplete();
virtual void HandleDLCInstalled();
#ifdef _XBOX_ONE
@@ -99,15 +99,15 @@ public:
bool IsFullscreenGroup();
void handleUnlockFullVersion();
-
- void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
+
+ void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
unsigned int GetLayerIndex(UILayer* layerPtr);
int getCommandBufferList();
UIScene *FindScene(EUIScene sceneType);
-private:
+private:
void _UpdateFocusState();
void updateStackStates();
};
diff --git a/Minecraft.Client/Common/UI/UILayer.cpp b/Minecraft.Client/Common/UI/UILayer.cpp
index b3cf72a0..2063778b 100644
--- a/Minecraft.Client/Common/UI/UILayer.cpp
+++ b/Minecraft.Client/Common/UI/UILayer.cpp
@@ -877,10 +877,10 @@ void UILayer::handleUnlockFullVersion()
}
}
-void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
+void UILayer::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
{
- __int64 layerStatic = 0;
- __int64 layerDynamic = 0;
+ int64_t layerStatic = 0;
+ int64_t layerDynamic = 0;
for(auto& it : m_components)
{
it->PrintTotalMemoryUsage(layerStatic, layerDynamic);
diff --git a/Minecraft.Client/Common/UI/UILayer.h b/Minecraft.Client/Common/UI/UILayer.h
index 47c776ab..ec6a1f8a 100644
--- a/Minecraft.Client/Common/UI/UILayer.h
+++ b/Minecraft.Client/Common/UI/UILayer.h
@@ -66,12 +66,12 @@ public:
// INPUT
void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
-#ifdef __PSVITA__
+#ifdef __PSVITA__
// Current active scene
UIScene *getCurrentScene();
#endif
// FOCUS
-
+
bool updateFocusState(bool allowedFocus = false);
public:
@@ -87,7 +87,7 @@ public:
void handleUnlockFullVersion();
UIScene *FindScene(EUIScene sceneType);
-
- void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
+
+ void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
};
diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp
index 061f9832..3f204414 100644
--- a/Minecraft.Client/Common/UI/UIScene.cpp
+++ b/Minecraft.Client/Common/UI/UIScene.cpp
@@ -329,11 +329,11 @@ void UIScene::loadMovie()
}
byteArray baFile = ui.getMovieData(moviePath.c_str());
- __int64 beforeLoad = ui.iggyAllocCount;
+ int64_t beforeLoad = ui.iggyAllocCount;
swf = IggyPlayerCreateFromMemory ( baFile.data , baFile.length, NULL);
- __int64 afterLoad = ui.iggyAllocCount;
+ int64_t afterLoad = ui.iggyAllocCount;
IggyPlayerInitializeAndTickRS ( swf );
- __int64 afterTick = ui.iggyAllocCount;
+ int64_t afterTick = ui.iggyAllocCount;
if(!swf)
{
@@ -362,8 +362,8 @@ void UIScene::loadMovie()
IggyMemoryUseInfo memoryInfo;
rrbool res;
int iteration = 0;
- __int64 totalStatic = 0;
- __int64 totalDynamic = 0;
+ int64_t totalStatic = 0;
+ int64_t totalDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf ,
NULL ,
0 ,
@@ -406,15 +406,15 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse
}
}
-void UIScene::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
+void UIScene::PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic)
{
if(!swf) return;
IggyMemoryUseInfo memoryInfo;
rrbool res;
int iteration = 0;
- __int64 sceneStatic = 0;
- __int64 sceneDynamic = 0;
+ int64_t sceneStatic = 0;
+ int64_t sceneDynamic = 0;
while(res = IggyDebugGetMemoryUseInfo ( swf ,
NULL ,
"" ,
diff --git a/Minecraft.Client/Common/UI/UIScene.h b/Minecraft.Client/Common/UI/UIScene.h
index 8fb4983b..e45ecdd1 100644
--- a/Minecraft.Client/Common/UI/UIScene.h
+++ b/Minecraft.Client/Common/UI/UIScene.h
@@ -45,7 +45,7 @@ class UILayer;
class UIScene
{
friend class UILayer;
-public:
+public:
IggyValuePath *m_rootPath;
private:
@@ -85,7 +85,7 @@ public:
protected:
ESceneResolution m_loadedResolution;
-
+
bool m_bIsReloading;
bool m_bFocussedOnce;
@@ -101,7 +101,7 @@ protected:
public:
virtual Iggy *getMovie() { return swf; }
-
+
void destroyMovie();
virtual void reloadMovie(bool force = false);
virtual bool needsReloaded();
@@ -134,7 +134,7 @@ private:
void getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUseInfo &memoryInfo);
public:
- void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
+ void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
public:
UIScene(int iPad, UILayer *parentLayer);
@@ -169,7 +169,7 @@ public:
void gainFocus();
void loseFocus();
-
+
virtual void updateTooltips();
virtual void updateComponents() {}
virtual void handleGainFocus(bool navBack);
@@ -213,7 +213,7 @@ public:
protected:
//void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, int iID, int iCount, int iAuxVal, float fAlpha, bool isFoil, bool bDecorations);
void customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations);
-
+
bool m_cacheSlotRenders;
bool m_needsCacheRendered;
int m_expectedCachedSlotCount;
@@ -289,7 +289,7 @@ public:
protected:
-#ifdef _DURANGO
+#ifdef _DURANGO
virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; }
#endif
diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
index a9cd9853..a77bbc39 100644
--- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp
@@ -58,11 +58,11 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
m_labelTexturePackDescription.init(L"");
WCHAR TempString[256];
- swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]));
m_sliderDifficulty.init(TempString,eControl_Difficulty,0,3,app.GetGameSettings(m_iPad,eGameSetting_Difficulty));
m_MoreOptionsParams.bGenerateOptions=TRUE;
- m_MoreOptionsParams.bStructures=TRUE;
+ m_MoreOptionsParams.bStructures=TRUE;
m_MoreOptionsParams.bFlatWorld=FALSE;
m_MoreOptionsParams.bBonusChest=FALSE;
m_MoreOptionsParams.bPVP = TRUE;
@@ -91,7 +91,7 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
m_MoreOptionsParams.bOnlineSettingChangedBySystem=false;
// 4J-PB - Removing this so that we can attempt to create an online game on PS3 when we are a restricted child account
- // It'll fail when we choose create, but this matches the behaviour of load game, and lets the player know why they can't play online,
+ // It'll fail when we choose create, but this matches the behaviour of load game, and lets the player know why they can't play online,
// instead of just greying out the online setting in the More Options
// #ifdef __PS3__
// if(ProfileManager.IsSignedInLive( m_iPad ))
@@ -124,9 +124,9 @@ UIScene_CreateWorldMenu::UIScene_CreateWorldMenu(int iPad, void *initData, UILay
{
// The profile settings say Online, but either the player is offline, or they are not allowed to play online
m_MoreOptionsParams.bOnlineSettingChangedBySystem=true;
- }
+ }
}
-
+
// Set up online game checkbox
bool bOnlineGame = m_MoreOptionsParams.bOnlineGame;
m_checkboxOnline.SetEnable(true);
@@ -342,7 +342,7 @@ int UIScene_CreateWorldMenu::ContinueOffline(void *pParam,int iPad,C4JStorage::E
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
// results switched for this dialog
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
pClass->m_MoreOptionsParams.bOnlineGame=false;
pClass->checkStateAndStartGame();
@@ -393,7 +393,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p
if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() )
{
UINT uiIDA[1] = { IDS_CONFIRM_OK };
- ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad);
+ ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad);
}
#endif
@@ -404,7 +404,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p
case ACTION_MENU_OTHER_STICK_UP:
case ACTION_MENU_OTHER_STICK_DOWN:
sendInputToMovie(key, repeat, pressed, released);
-
+
bool bOnlineGame = m_checkboxOnline.IsChecked();
if (m_MoreOptionsParams.bOnlineGame != bOnlineGame)
{
@@ -573,7 +573,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
if(m_MoreOptionsParams.dwTexturePack!=0)
{
// texture pack hasn't been set yet, so check what it will be
- TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
+ TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)pTexturePack;
m_pDLCPack=pDLCTexPack->getDLCInfoParentPack();
@@ -625,7 +625,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
- ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this);
+ ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this);
#endif
#if defined _XBOX_ONE || defined __ORBIS__
@@ -652,7 +652,7 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue)
m_sliderDifficulty.handleSliderMove(value);
app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value);
- swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[value]));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[value]));
m_sliderDifficulty.setLabel(TempString);
break;
}
@@ -699,7 +699,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
m_MoreOptionsParams.bInviteOnly = FALSE;
m_MoreOptionsParams.bAllowFriendsOfFriends = FALSE;
}
-
+
m_checkboxOnline.SetEnable(bMultiplayerAllowed);
m_checkboxOnline.setChecked(m_MoreOptionsParams.bOnlineGame);
@@ -733,7 +733,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
PBYTE pbImageData=NULL;
app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes );
- ListInfo.fEnabled = TRUE;
+ ListInfo.fEnabled = TRUE;
ListInfo.iData = m_iConfigA[i];
HRESULT hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&ListInfo.hXuiBrush);
app.DebugPrintf("Adding texturepack %d from TPD\n",m_iConfigA[i]);
@@ -791,7 +791,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
bool isOnlineGame = m_MoreOptionsParams.bOnlineGame;
int iPadNotSignedInLive = -1;
bool isLocalMultiplayerAvailable = app.IsLocalMultiplayerAvailable();
-
+
for(unsigned int i = 0; i < XUSER_MAX_COUNT; i++)
{
if (ProfileManager.IsSignedIn(i) && (i == primaryPad || isLocalMultiplayerAvailable))
@@ -843,7 +843,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
ui.RequestErrorMessage(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad());
}
else
- {
+ {
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
@@ -899,7 +899,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
- param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
+ param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -914,7 +914,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
#endif
if(m_bGameModeCreative == true || m_MoreOptionsParams.bHostPrivileges == TRUE)
- {
+ {
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@@ -987,7 +987,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
- param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
+ param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -1050,8 +1050,8 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
- param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
- param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
+ param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
+ param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -1124,14 +1124,14 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
// start the game
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
- __int64 seedValue = 0;
+ int64_t seedValue = 0;
NetworkGameInitData *param = new NetworkGameInitData();
param->levelName = wWorldName;
if (wSeed.length() != 0)
{
- __int64 value = 0;
+ int64_t value = 0;
unsigned int len = (unsigned int)wSeed.length();
//Check if the input string contains a numerical value
@@ -1150,7 +1150,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
//If the input string is a numerical value, convert it to a number
if( isNumber )
- value = _fromString<__int64>(wSeed);
+ value = _fromString<int64_t>(wSeed);
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
if( value != 0 )
@@ -1194,7 +1194,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
app.SetGameHostOption(eGameHostOption_HostCanFly,pClass->m_MoreOptionsParams.bHostPrivileges);
app.SetGameHostOption(eGameHostOption_HostCanChangeHunger,pClass->m_MoreOptionsParams.bHostPrivileges);
app.SetGameHostOption(eGameHostOption_HostCanBeInvisible,pClass->m_MoreOptionsParams.bHostPrivileges );
-
+
app.SetGameHostOption(eGameHostOption_MobGriefing, pClass->m_MoreOptionsParams.bMobGriefing);
app.SetGameHostOption(eGameHostOption_KeepInventory, pClass->m_MoreOptionsParams.bKeepInventory);
app.SetGameHostOption(eGameHostOption_DoMobSpawning, pClass->m_MoreOptionsParams.bDoMobSpawning);
@@ -1202,8 +1202,8 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD
app.SetGameHostOption(eGameHostOption_DoTileDrops, pClass->m_MoreOptionsParams.bDoTileDrops);
app.SetGameHostOption(eGameHostOption_NaturalRegeneration, pClass->m_MoreOptionsParams.bNaturalRegeneration);
app.SetGameHostOption(eGameHostOption_DoDaylightCycle, pClass->m_MoreOptionsParams.bDoDaylightCycle);
-
- app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false);
+
+ app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false);
#ifdef _LARGE_WORLDS
app.SetGameHostOption(eGameHostOption_WorldSize, pClass->m_MoreOptionsParams.worldSize+1 ); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN
pClass->m_MoreOptionsParams.currentWorldSize = (EGameHostOptionWorldSize)(pClass->m_MoreOptionsParams.worldSize+1);
@@ -1366,7 +1366,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
}
}
else
- {
+ {
pClass->m_bIgnoreInput = false;
}
return 0;
@@ -1377,7 +1377,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
{
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam;
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
@@ -1422,7 +1422,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
ui.RequestAlertMessage( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad());
}
else
- {
+ {
#if defined( __ORBIS__) || defined(__PSVITA__)
bool isOnlineGame = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
if(isOnlineGame)
@@ -1452,7 +1452,7 @@ int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStor
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu *)pParam;
pClass->m_bIgnoreInput = false;
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false, iPad);
}
@@ -1464,28 +1464,28 @@ int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStor
// {
// int32_t iResult;
// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam;
-//
+//
// // continue offline, or upsell PS Plus?
-// if(result==C4JStorage::EMessage_ResultDecline)
+// if(result==C4JStorage::EMessage_ResultDecline)
// {
// // upsell psplus
// int32_t iResult=sceNpCommerceDialogInitialize();
-//
+//
// SceNpCommerceDialogParam param;
// sceNpCommerceDialogParamInitialize(&param);
// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
-// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
+// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
-//
+//
// iResult=sceNpCommerceDialogOpen(&param);
// }
-// else if(result==C4JStorage::EMessage_ResultAccept)
+// else if(result==C4JStorage::EMessage_ResultAccept)
// {
// // continue offline
// pClass->m_MoreOptionsParams.bOnlineGame=false;
// pClass->checkStateAndStartGame();
// }
-//
+//
// pClass->m_bIgnoreInput=false;
// return 0;
// }
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.h b/Minecraft.Client/Common/UI/UIScene_LoadMenu.h
index 085cb67f..53d66d55 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.h
+++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.h
@@ -16,7 +16,7 @@ private:
};
static int m_iDifficultyTitleSettingA[4];
-
+
UIControl m_controlMainPanel;
UIControl_Label m_labelGameName, m_labelSeed, m_labelCreatedMode;
UIControl_Button m_buttonGamemode, m_buttonMoreOptions, m_buttonLoadWorld;
@@ -43,7 +43,7 @@ private:
LevelGenerationOptions *m_levelGen;
DLCPack * m_pDLCPack;
-
+
int m_iSaveGameInfoIndex;
int m_CurrentDifficulty;
bool m_bGameModeCreative;
@@ -58,7 +58,7 @@ private:
bool m_bRequestQuadrantSignin;
bool m_bIsCorrupt;
bool m_bThumbnailGetFailed;
- __int64 m_seed;
+ int64_t m_seed;
wstring m_levelName;
#ifdef __PS3__
@@ -73,7 +73,7 @@ private:
bool m_bRebuildTouchBoxes;
public:
UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLayer);
-
+
virtual void updateTooltips();
virtual void updateComponents();
@@ -107,7 +107,7 @@ private:
#ifdef _DURANGO
static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad);
#endif
-
+
static int ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
static void StartGameFromSave(UIScene_LoadMenu* pClass, DWORD dwLocalUsersMask);
static int LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bIsOwner);
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
index f8f9dcae..a2ab17a8 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LoadOrJoinMenu.cpp
@@ -2171,7 +2171,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
// Make our next save default to the name of the level
StorageManager.SetSaveTitle(saveFile->getName().c_str());
- __int64 fileSize = saveFile->length();
+ int64_t fileSize = saveFile->length();
FileInputStream fis(*saveFile);
byteArray ba(fileSize);
fis.read(ba);
@@ -2235,7 +2235,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
mbstowcs(wSaveName, app.getRemoteStorage()->getSaveNameUTF8(), strlen(app.getRemoteStorage()->getSaveNameUTF8())+1); // plus null
StorageManager.SetSaveTitle(wSaveName);
- __int64 fileSize = cloudFile.length();
+ int64_t fileSize = cloudFile.length();
FileInputStream fis(cloudFile);
byteArray ba(fileSize);
fis.read(ba);
@@ -3579,7 +3579,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
bool bHostOptionsRead = false;
unsigned int uiHostOptions = 0;
DWORD dwTexturePack;
- __int64 seedVal;
+ int64_t seedVal;
char szSeed[50];
ZeroMemory(szSeed,50);
diff --git a/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp b/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp
index b3608b06..b949aafa 100644
--- a/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp
+++ b/Minecraft.Client/Common/XUI/XUI_MultiGameCreate.cpp
@@ -55,7 +55,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
CreateWorldMenuInitData *params = (CreateWorldMenuInitData *)pInitData->pvInitData;
m_MoreOptionsParams.bGenerateOptions=TRUE;
- m_MoreOptionsParams.bStructures=TRUE;
+ m_MoreOptionsParams.bStructures=TRUE;
m_MoreOptionsParams.bFlatWorld=FALSE;
m_MoreOptionsParams.bBonusChest=FALSE;
m_MoreOptionsParams.bPVP = TRUE;
@@ -96,7 +96,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
{
// The profile settings say Online, but either the player is offline, or they are not allowed to play online
m_MoreOptionsParams.bOnlineSettingChangedBySystem=true;
- }
+ }
}
m_ButtonGameMode.SetText(app.GetString(IDS_GAMEMODE_SURVIVAL));
@@ -104,7 +104,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
m_CurrentDifficulty=app.GetGameSettings(m_iPad,eGameSetting_Difficulty);
m_SliderDifficulty.SetValue(m_CurrentDifficulty);
- swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[m_CurrentDifficulty]));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[m_CurrentDifficulty]));
m_SliderDifficulty.SetText(TempString);
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
@@ -135,7 +135,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
m_NewWorld.SetEnable(true);
m_EditWorldName.SetTextLimit(XCONTENT_MAX_DISPLAYNAME_LENGTH);
-
+
wstring wWorldName = m_EditWorldName.GetText();
// set the caret to the end of the default text
@@ -148,7 +148,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
XuiSetTimer(m_hObj,GAME_CREATE_ONLINE_TIMER_ID,GAME_CREATE_ONLINE_TIMER_TIME);
XuiSetTimer(m_hObj,CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID,CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME);
-
+
TelemetryManager->RecordMenuShown(m_iPad, eUIScene_CreateWorldMenu, 0);
// 4J-PB - Load up any texture pack data we have locally in the XZP
@@ -176,7 +176,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
m_pTexturePacksList->SetSelectionChangedHandle(m_hObj);
Minecraft *pMinecraft = Minecraft::GetInstance();
- int texturePacksCount = pMinecraft->skins->getTexturePackCount();
+ int texturePacksCount = pMinecraft->skins->getTexturePackCount();
CXuiCtrl4JList::LIST_ITEM_INFO ListInfo;
HRESULT hr;
for(unsigned int i = 0; i < texturePacksCount; ++i)
@@ -189,7 +189,7 @@ HRESULT CScene_MultiGameCreate::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
if(dwImageBytes > 0 && pbImageData)
{
- ListInfo.fEnabled = TRUE;
+ ListInfo.fEnabled = TRUE;
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tp;
if(pDLCTexPack)
{
@@ -297,7 +297,7 @@ HRESULT CScene_MultiGameCreate::OnDestroy()
app.RemoveMemoryTPDFile(app.TMSFileA[i].iConfig);
}
}
-
+
app.FreeLocalTMSFiles(eTMSFileType_TexturePack);
return S_OK;
@@ -338,7 +338,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
// DLC might have been corrupt
if(ullOfferID_Full!=0LL)
- {
+ {
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
@@ -374,7 +374,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
// if the profile data has been changed, then force a profile write (we save the online/invite/friends of friends settings)
// It seems we're allowed to break the 5 minute rule if it's the result of a user action
// check the checkboxes
-
+
// Only save the online setting if the user changed it - we may change it because we're offline, but don't want that saved
if(!m_MoreOptionsParams.bOnlineSettingChangedBySystem)
{
@@ -389,15 +389,15 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
if(m_MoreOptionsParams.dwTexturePack!=0)
{
// texture pack hasn't been set yet, so check what it will be
- TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
-
+ TexturePack *pTexturePack = pMinecraft->skins->getTexturePackById(m_MoreOptionsParams.dwTexturePack);
+
if(pTexturePack==NULL)
{
// corrupt DLC so set it to the default textures
m_MoreOptionsParams.dwTexturePack=0;
}
else
- {
+ {
m_pDLCPack=pTexturePack->getDLCPack();
// do we have a license?
if(m_pDLCPack && !m_pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
@@ -439,11 +439,11 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
return S_OK;
}
}
- }
+ }
}
if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges == TRUE)
- {
+ {
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@@ -478,7 +478,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
BOOL pccFriendsAllowed = TRUE;
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
-
+
if(isClientSide && noUGC )
{
m_bIgnoreInput = false;
@@ -495,7 +495,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
}
}
else if(hObjPressed==m_MoreOptions)
- {
+ {
app.NavigateToScene(pNotifyPressData->UserIndex,eUIScene_LaunchMoreOptionsMenu,&m_MoreOptionsParams);
}
else if(hObjPressed == m_ButtonGameMode)
@@ -527,7 +527,7 @@ int CScene_MultiGameCreate::UnlockTexturePackReturned(void *pParam,int iPad,C4JS
if(result==C4JStorage::EMessage_ResultAccept)
{
if(ProfileManager.IsSignedIn(iPad))
- {
+ {
ULONGLONG ullIndexA[1];
DLC_INFO *pDLCInfo = app.GetDLCInfoForTrialOfferID(pScene->m_pDLCPack->getPurchaseOfferId());
@@ -542,7 +542,7 @@ int CScene_MultiGameCreate::UnlockTexturePackReturned(void *pParam,int iPad,C4JS
StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
- // the license change coming in when the offer has been installed will cause this scene to refresh
+ // the license change coming in when the offer has been installed will cause this scene to refresh
}
}
else
@@ -629,12 +629,12 @@ HRESULT CScene_MultiGameCreate::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINot
// Enable the done button when we have all of the necessary information
wstring wWorldName = m_EditWorldName.GetText();
BOOL bHasWorldName = ( wWorldName.length()!=0);
- m_NewWorld.SetEnable(bHasWorldName);
+ m_NewWorld.SetEnable(bHasWorldName);
}
else if(hObjSource==m_SliderDifficulty.GetSlider() )
{
app.SetGameSettings(m_iPad,eGameSetting_Difficulty,pValueChangedData->nValue);
- swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[pValueChangedData->nValue]));
+ swprintf( (WCHAR *)TempString, 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[pValueChangedData->nValue]));
m_SliderDifficulty.SetText(TempString);
}
@@ -656,11 +656,11 @@ HRESULT CScene_MultiGameCreate::OnControlNavigate(XUIMessageControlNavigate *pCo
HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
{
- // 4J-PB - TODO - Don't think we can do this - if a 2nd player signs in here with an offline profile, the signed in LIVE player gets re-logged in, and bMultiplayerAllowed is false briefly
+ // 4J-PB - TODO - Don't think we can do this - if a 2nd player signs in here with an offline profile, the signed in LIVE player gets re-logged in, and bMultiplayerAllowed is false briefly
switch(pTimer->nId)
{
-
+
case GAME_CREATE_ONLINE_TIMER_ID:
{
bool bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
@@ -693,7 +693,7 @@ HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled
}
}
break;
-
+
case CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID:
{
// also check for any new texture packs info being available
@@ -718,7 +718,7 @@ HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled
PBYTE pbImageData=NULL;
app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes );
- ListInfo.fEnabled = TRUE;
+ ListInfo.fEnabled = TRUE;
ListInfo.iData = m_iConfigA[i];
HRESULT hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&ListInfo.hXuiBrush);
app.DebugPrintf("Adding texturepack %d from TPD\n",m_iConfigA[i]);
@@ -734,7 +734,7 @@ HRESULT CScene_MultiGameCreate::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled
bool bAllDone=true;
for(int i=0;i<m_iTexturePacksNotInstalled;i++)
{
- if(m_iConfigA[i]!=-1)
+ if(m_iConfigA[i]!=-1)
{
bAllDone = false;
}
@@ -756,7 +756,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
{
CScene_MultiGameCreate* pClass = (CScene_MultiGameCreate*)pParam;
- if(result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultAccept)
{
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
@@ -780,7 +780,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
BOOL pccFriendsAllowed = TRUE;
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
-
+
if(isClientSide && noUGC )
{
pClass->m_bIgnoreInput = false;
@@ -816,7 +816,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
if(ProfileManager.IsSignedIn(iPad))
{
DWORD dwLocalUsersMask = 0;
-
+
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
bool noPrivileges = false;
@@ -835,7 +835,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
BOOL pccFriendsAllowed = TRUE;
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
-
+
if(isClientSide && (noPrivileges || noUGC) )
{
if( noUGC )
@@ -863,7 +863,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
}
}
else
- {
+ {
pClass->m_bIgnoreInput = false;
pClass->SetShow( TRUE );
}
@@ -884,7 +884,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
// create the world and launch
wstring wWorldName = pClass->m_EditWorldName.GetText();
-
+
StorageManager.ResetSaveData();
// Make our next save default to the name of the level
StorageManager.SetSaveTitle((wchar_t *)wWorldName.c_str());
@@ -904,11 +904,11 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
// start the game
bool isFlat = (pClass->m_MoreOptionsParams.bFlatWorld==TRUE);
- __int64 seedValue = 0; //BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+ int64_t seedValue = 0; //BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
if (wSeed.length() != 0)
{
- __int64 value = 0;
+ int64_t value = 0;
unsigned int len = (unsigned int)wSeed.length();
//Check if the input string contains a numerical value
@@ -923,7 +923,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
//If the input string is a numerical value, convert it to a number
if( isNumber )
- value = _fromString<__int64>(wSeed);
+ value = _fromString<int64_t>(wSeed);
//If the value is not 0 use it, otherwise use the algorithm from the java String.hashCode() function to hash it
if( value != 0 )
@@ -948,7 +948,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
param->seed = seedValue;
param->saveData = NULL;
param->texturePackId = pClass->m_MoreOptionsParams.dwTexturePack;
-
+
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->skins->selectTexturePackById(pClass->m_MoreOptionsParams.dwTexturePack);
//pMinecraft->skins->updateUI();
@@ -956,7 +956,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
app.SetGameHostOption(eGameHostOption_Difficulty,Minecraft::GetInstance()->options->difficulty);
app.SetGameHostOption(eGameHostOption_FriendsOfFriends,pClass->m_MoreOptionsParams.bAllowFriendsOfFriends);
app.SetGameHostOption(eGameHostOption_Gamertags,app.GetGameSettings(pClass->m_iPad,eGameSetting_GamertagsVisible)?1:0);
-
+
app.SetGameHostOption(eGameHostOption_BedrockFog,app.GetGameSettings(pClass->m_iPad,eGameSetting_BedrockFog)?1:0);
// CXuiList listObject;
@@ -999,7 +999,7 @@ HRESULT CScene_MultiGameCreate::OnTransitionStart( XUIMessageTransition *pTransi
if(pTransition->dwTransAction==XUI_TRANSITION_ACTION_DESTROY ) return S_OK;
if(pTransition->dwTransType == XUI_TRANSITION_TO || pTransition->dwTransType == XUI_TRANSITION_BACKTO)
- {
+ {
m_SliderDifficulty.SetValueDisplay(FALSE);
}
@@ -1015,7 +1015,7 @@ HRESULT CScene_MultiGameCreate::OnTransitionEnd( XUIMessageTransition *pTransiti
{
}
else if(pTransition->dwTransType == XUI_TRANSITION_TO || pTransition->dwTransType == XUI_TRANSITION_BACKTO)
- {
+ {
if(m_bSetup && m_texturePackDescDisplayed)
{
XUITimeline *timeline;
@@ -1054,7 +1054,7 @@ HRESULT CScene_MultiGameCreate::OnNotifySelChanged( HXUIOBJ hObjSource, XUINotif
if(hObjSource == m_pTexturePacksList->m_hObj)
{
UpdateTexturePackDescription(pNotifySelChangedData->iItem);
-
+
// 4J-JEV: Removed expand description check, taken care of elsewhere.
}
@@ -1205,9 +1205,9 @@ void CScene_MultiGameCreate::UpdateCurrentTexturePack()
StorageManager.RequestMessageBox(IDS_DLC_TEXTUREPACK_NOT_PRESENT_TITLE, IDS_DLC_TEXTUREPACK_NOT_PRESENT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&CScene_MultiGameCreate::TexturePackDialogReturned,this,app.GetStringTable());
}
- // do set the texture pack id, and on the user pressing create world, check they have it
+ // do set the texture pack id, and on the user pressing create world, check they have it
m_MoreOptionsParams.dwTexturePack = ListItem.iData;
- return ;
+ return ;
}
else
{
@@ -1221,7 +1221,7 @@ int CScene_MultiGameCreate::TexturePackDialogReturned(void *pParam,int iPad,C4JS
pClass->m_currentTexturePackIndex = pClass->m_pTexturePacksList->GetCurSel();
// Exit with or without saving
// Decline means install full version of the texture pack in this dialog
- if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultAccept)
+ if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultAccept)
{
// we need to enable background downloading for the DLC
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -1248,7 +1248,7 @@ int CScene_MultiGameCreate::TexturePackDialogReturned(void *pParam,int iPad,C4JS
ullIndexA[0]=pDLCInfo->ullOfferID_Trial;
StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
}
- }
+ }
}
pClass->m_bIgnoreInput=false;
return 0;
@@ -1274,12 +1274,12 @@ HRESULT CScene_MultiGameCreate::OnCustomMessage_DLCInstalled()
}
HRESULT CScene_MultiGameCreate::OnCustomMessage_DLCMountingComplete()
-{
+{
// refill the texture pack list
m_pTexturePacksList->SetSelectionChangedHandle(m_hObj);
Minecraft *pMinecraft = Minecraft::GetInstance();
- int texturePacksCount = pMinecraft->skins->getTexturePackCount();
+ int texturePacksCount = pMinecraft->skins->getTexturePackCount();
CXuiCtrl4JList::LIST_ITEM_INFO ListInfo;
HRESULT hr;
for(unsigned int i = 0; i < texturePacksCount; ++i)
@@ -1292,7 +1292,7 @@ HRESULT CScene_MultiGameCreate::OnCustomMessage_DLCMountingComplete()
if(dwImageBytes > 0 && pbImageData)
{
- ListInfo.fEnabled = TRUE;
+ ListInfo.fEnabled = TRUE;
hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&ListInfo.hXuiBrush);
DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tp;
diff --git a/Minecraft.Client/Common/XUI/XUI_MultiGameJoinLoad.cpp b/Minecraft.Client/Common/XUI/XUI_MultiGameJoinLoad.cpp
index c5e2fe9a..5894519d 100644
--- a/Minecraft.Client/Common/XUI/XUI_MultiGameJoinLoad.cpp
+++ b/Minecraft.Client/Common/XUI/XUI_MultiGameJoinLoad.cpp
@@ -1945,7 +1945,7 @@ void CScene_MultiGameJoinLoad::LoadSaveFromDisk(File *saveFile)
// Make our next save default to the name of the level
StorageManager.SetSaveTitle(saveFile->getName().c_str());
- __int64 fileSize = saveFile->length();
+ int64_t fileSize = saveFile->length();
FileInputStream fis(*saveFile);
byteArray ba(fileSize);
fis.read(ba);
diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp
index 03782c79..1a679f58 100644
--- a/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp
+++ b/Minecraft.Client/Common/XUI/XUI_Scene_Base.cpp
@@ -36,7 +36,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
MapChildControls();
// Display the tooltips
- HRESULT hr = S_OK;
+ HRESULT hr = S_OK;
CXuiElement xuiElement = m_hObj;
HXUIOBJ hTemp;
@@ -169,7 +169,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
// make sure there's not a mount going on before using the textures
if(bCheckTexturePack && app.DLCInstallProcessCompleted() )
- {
+ {
TexturePack *tPack = pMinecraft->skins->getSelected();
if(tPack->getId()!=app.GetRequiredTexturePackID())
@@ -186,7 +186,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
pMinecraft->skins->selectTexturePackById(app.GetRequiredTexturePackID());
- // probably had background downloads enabled, so turn them off
+ // probably had background downloads enabled, so turn them off
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_AUTO);
}
else
@@ -223,7 +223,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
{
if(pMinecraft->localplayers[i] != NULL && pMinecraft->localplayers[i]->dimension == 1 && !ui.GetMenuDisplayed(i) && app.GetGameSettings(i,eGameSetting_DisplayHUD))
{
- int iGuiScale;
+ int iGuiScale;
if(pMinecraft->localplayers[i]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN)
{
@@ -234,7 +234,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
iGuiScale=app.GetGameSettings(i,eGameSetting_UISizeSplitscreen);
}
m_BossHealthGroup[i].SetShow(TRUE);
- m_BossHealthText[i].SetText( app.GetString( IDS_BOSS_ENDERDRAGON_HEALTH ) );
+ m_BossHealthText[i].SetText( app.GetString( IDS_BOSS_ENDERDRAGON_HEALTH ) );
if(pMinecraft->localplayers[i]->m_iScreenSection == C4JRender::VIEWPORT_TYPE_FULLSCREEN)
{
@@ -364,7 +364,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
break;
}
}
- }
+ }
m_pBossHealthProgress[i].SetRange(0, boss->getMaxHealth() );
m_pBossHealthProgress[i].SetValue( boss->getSynchedHealth() );
@@ -468,15 +468,15 @@ void CXuiSceneBase::_TickAllBaseScenes()
XUIMessage xuiMsg;
CustomMessage_TickScene( &xuiMsg );
XuiSendMessage( app.GetCurrentHUDScene(i), &xuiMsg );
-
+
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(i) && !(app.GetXuiAction(i)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(i,eGameSetting_DisplayHUD)!=0;
if(bDisplayGui && pMinecraft->localplayers[i] != NULL)
{
- XuiElementSetShow(app.GetCurrentHUDScene(i),TRUE);
+ XuiElementSetShow(app.GetCurrentHUDScene(i),TRUE);
}
else
{
- XuiElementSetShow(app.GetCurrentHUDScene(i),FALSE);
+ XuiElementSetShow(app.GetCurrentHUDScene(i),FALSE);
}
}
}
@@ -495,18 +495,18 @@ HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, BOOL bVal )
HRESULT CXuiSceneBase::_SetTooltipText( unsigned int iPad, unsigned int uiTooltip, int iTextID )
{
ASSERT( uiTooltip < BUTTONS_TOOLTIP_MAX );
-
+
XUIRect xuiRect, xuiRectSmall;
HRESULT hr=S_OK;
LPCWSTR pString=NULL;
float fWidth,fHeight;
-
+
// Want to be able to show just a button (for RB LB)
if(iTextID>=0)
{
pString=app.GetString(iTextID);
}
-
+
if(hTooltipText[iPad][uiTooltip]==NULL)
{
HXUIOBJ hObj=NULL;
@@ -514,7 +514,7 @@ HRESULT CXuiSceneBase::_SetTooltipText( unsigned int iPad, unsigned int uiToolti
hr=XuiElementGetChildById(hObj,L"text_ButtonText",&hTooltipText[iPad][uiTooltip]);
hr=XuiElementGetPosition(hTooltipText[iPad][uiTooltip],&m_vPosTextInTooltip[uiTooltip]);
}
-
+
if(hTooltipTextSmall[iPad][uiTooltip]==NULL)
{
HXUIOBJ hObj=NULL;
@@ -525,8 +525,8 @@ HRESULT CXuiSceneBase::_SetTooltipText( unsigned int iPad, unsigned int uiToolti
if(iTextID>=0)
{
- hr=XuiTextPresenterMeasureText(hTooltipText[iPad][uiTooltip], pString, &xuiRect);
-
+ hr=XuiTextPresenterMeasureText(hTooltipText[iPad][uiTooltip], pString, &xuiRect);
+
// Change the size of the whole button to be the width of the measured text, plus the position the text element starts in the visual (which is the offset by the size of the button graphic)
XuiElementGetBounds(m_Buttons[iPad][uiTooltip].m_hObj,&fWidth, &fHeight);
XuiElementSetBounds(m_Buttons[iPad][uiTooltip].m_hObj,xuiRect.right+1+m_vPosTextInTooltip[uiTooltip].x,fHeight);
@@ -537,7 +537,7 @@ HRESULT CXuiSceneBase::_SetTooltipText( unsigned int iPad, unsigned int uiToolti
hr=XuiTextPresenterMeasureText(hTooltipTextSmall[iPad][uiTooltip], pString, &xuiRectSmall);
-
+
// Change the size of the whole button to be the width of the measured text, plus the position the text element starts in the visual (which is the offset by the size of the button graphic)
XuiElementGetBounds(m_ButtonsSmall[iPad][uiTooltip].m_hObj,&fWidth, &fHeight);
XuiElementSetBounds(m_ButtonsSmall[iPad][uiTooltip].m_hObj,xuiRectSmall.right+1+m_vPosTextInTooltipSmall[uiTooltip].x,fHeight);
@@ -749,7 +749,7 @@ HRESULT CXuiSceneBase::_SetTooltipsEnabled( unsigned int iPad, bool bA, bool bB,
m_Buttons[iPad][BUTTON_TOOLTIP_LB].SetEnable( bLB );
m_Buttons[iPad][BUTTON_TOOLTIP_RB].SetEnable( bRB );
m_Buttons[iPad][BUTTON_TOOLTIP_LS].SetEnable( bLS );
-
+
m_ButtonsSmall[iPad][BUTTON_TOOLTIP_A].SetEnable( bA );
m_ButtonsSmall[iPad][BUTTON_TOOLTIP_B].SetEnable( bB );
m_ButtonsSmall[iPad][BUTTON_TOOLTIP_X].SetEnable( bX );
@@ -860,7 +860,7 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
if(bShow && pMinecraft->level!=NULL)
{
- __int64 i64TimeOfDay =0;
+ int64_t i64TimeOfDay =0;
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
if(pMinecraft->level->dimension->id==0)
{
@@ -945,11 +945,11 @@ HRESULT CXuiSceneBase::_ShowPressStart(unsigned int iPad)
int nStart, nEnd;
// XuiElementFindNamedFrame( m_hObj, L"StartFlash", &nStart );
// XuiElementFindNamedFrame( m_hObj, L"EndFlash", &nEnd );
-// XuiElementPlayTimeline( m_hObj, nStart, nStart, nEnd, TRUE, TRUE );
+// XuiElementPlayTimeline( m_hObj, nStart, nStart, nEnd, TRUE, TRUE );
XuiElementFindNamedFrame( hObj, L"StartFlash", &nStart );
XuiElementFindNamedFrame( hObj, L"EndFlash", &nEnd );
- XuiElementPlayTimeline( hObj, nStart, nStart, nEnd, TRUE, TRUE );
-
+ XuiElementPlayTimeline( hObj, nStart, nStart, nEnd, TRUE, TRUE );
+
return S_OK;
}
@@ -960,7 +960,7 @@ HRESULT CXuiSceneBase::_HidePressStart()
HRESULT CXuiSceneBase::_UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
{
- WCHAR wcAutosaveCountdown[100];
+ WCHAR wcAutosaveCountdown[100];
swprintf( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds);
m_TrialTimer.SetText(wcAutosaveCountdown);
return S_OK;
@@ -974,7 +974,7 @@ HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(BOOL bVal)
HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad)
{
- WCHAR wcTime[20];
+ WCHAR wcTime[20];
DWORD dwTimeTicks=(DWORD)app.getTrialTimer();
@@ -982,7 +982,7 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad)
{
dwTimeTicks=m_dwTrialTimerLimitSecs;
}
-
+
dwTimeTicks=m_dwTrialTimerLimitSecs-dwTimeTicks;
#ifndef _CONTENT_PACKAGE
@@ -1038,7 +1038,7 @@ bool CXuiSceneBase::_PressStartPlaying(unsigned int iPad)
HRESULT CXuiSceneBase::_SetPlayerBaseScenePosition( unsigned int iPad, EBaseScenePosition position )
{
// turn off the empty quadrant logo
- if(m_hEmptyQuadrantLogo!=NULL)
+ if(m_hEmptyQuadrantLogo!=NULL)
{
XuiElementSetShow(m_hEmptyQuadrantLogo,FALSE);
}
@@ -1086,12 +1086,12 @@ HRESULT CXuiSceneBase::_SetPlayerBaseScenePosition( unsigned int iPad, EBaseScen
XuiElementSetShow( m_TooltipGroupSmall[iPad].m_hObj, TRUE);
}
- if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
- {
+ if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
+ {
//640x480 ->1280x720
scale.x = 2.0f; scale.y = 1.5f; scale.z = 1.0f;
XuiElementSetScale(m_hObj, &scale);
-
+
return S_OK;
}
@@ -1127,7 +1127,7 @@ HRESULT CXuiSceneBase::_SetPlayerBaseScenePosition( unsigned int iPad, EBaseScen
// No position adjustment
case e_BaseScene_Fullscreen:
tooltipsPos.x=SAFEZONE_HALF_WIDTH;
- tooltipsPos.y=XUI_BASE_SCENE_HEIGHT-SAFEZONE_HALF_HEIGHT-fTooltipHeight;
+ tooltipsPos.y=XUI_BASE_SCENE_HEIGHT-SAFEZONE_HALF_HEIGHT-fTooltipHeight;
crouchIconPos.x=SAFEZONE_HALF_WIDTH;
crouchIconPos.y=SAFEZONE_HALF_HEIGHT;
fBackWidth=XUI_BASE_SCENE_WIDTH;
@@ -1303,7 +1303,7 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
// Only adjust if fullscreen for now, leaving code to move others if required, but it's too far up the screen when on the bottom quadrants
- if( (m_playerBaseScenePosition[iPad] == e_BaseScene_Fullscreen) &&
+ if( (m_playerBaseScenePosition[iPad] == e_BaseScene_Fullscreen) &&
(RenderManager.IsHiDef() || RenderManager.IsWidescreen()) )
{
D3DXVECTOR3 selectedItemPos;
@@ -1328,17 +1328,17 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
// The move applies to the whole scene, so we'll need to move tooltips back in some cases
- selectedItemPos.y=XUI_BASE_SCENE_HEIGHT-SAFEZONE_HALF_HEIGHT-fTooltipHeight - fSelectedItemHeight;
+ selectedItemPos.y=XUI_BASE_SCENE_HEIGHT-SAFEZONE_HALF_HEIGHT-fTooltipHeight - fSelectedItemHeight;
selectedItemPos.x = XUI_BASE_SCENE_WIDTH_HALF - (fSelectedItemWidth/2.0f);
// Adjust selectedItemPos based on what gui is displayed
- // 4J-PB - selected the gui scale based on the slider settings, and on whether we're in Creative or Survival
+ // 4J-PB - selected the gui scale based on the slider settings, and on whether we're in Creative or Survival
float fYOffset=0.0f;
unsigned char ucGuiScale=app.GetGameSettings(iPad,eGameSetting_UISize) + 2;
-
+
if(Minecraft::GetInstance() != NULL && Minecraft::GetInstance()->localgameModes[iPad] != NULL && Minecraft::GetInstance()->localgameModes[iPad]->canHurtPlayer())
{
// SURVIVAL MODE - Move up further because of hearts, shield and xp
@@ -1353,7 +1353,7 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
default: // 2
fYOffset = -94.0f;
break;
- }
+ }
}
else
{
@@ -1368,7 +1368,7 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
default: // 2
fYOffset = -58.0f;
break;
- }
+ }
}
@@ -1425,14 +1425,14 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
// 4J-PB - If it's in split screen vertical, adjust the position
// Adjust selectedItemPos based on what gui is displayed
if((m_playerBaseScenePosition[iPad]==e_BaseScene_Left) || (m_playerBaseScenePosition[iPad]==e_BaseScene_Right))
- {
+ {
float scale=0.5f;
selectedItemPos.y -= (scale * 88.0f);
if(Minecraft::GetInstance() != NULL && Minecraft::GetInstance()->localgameModes[iPad] != NULL && Minecraft::GetInstance()->localgameModes[iPad]->canHurtPlayer())
{
selectedItemPos.y -= (scale * 80.0f);
}
-
+
// 4J-PB - selected the gui scale based on the slider settings
unsigned char ucGuiScale;
float fYOffset=0.0f;
@@ -1455,7 +1455,7 @@ void CXuiSceneBase::_UpdateSelectedItemPos(unsigned int iPad)
default: // 2
fYOffset = 85.0f;
break;
- }
+ }
selectedItemPos.y+=fYOffset;
}
@@ -1606,7 +1606,7 @@ HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay )
{
// The host decides whether these are on or off
if(app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_DisplaySplitscreenGamertags)!=0)
- {
+ {
if(Minecraft::GetInstance() != NULL && Minecraft::GetInstance()->localplayers[iPad]!=NULL)
{
wstring wsGamertag = convStringToWstring( ProfileManager.GetGamertag(iPad));
@@ -1621,7 +1621,7 @@ HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay )
}
// The host decides whether these are on or off
if(app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_DisplaySplitscreenGamertags)!=0)
- {
+ {
XuiElementSetShow(m_hGamerTagA[iPad],bDisplay);
// set the opacity of the gamertag
@@ -1712,11 +1712,11 @@ void CXuiSceneBase::_HideAllGameUIElements()
m_uiSelectedItemOpacityCountDown[i] = 0;
m_selectedItemA[i].SetShow(FALSE);
m_selectedItemSmallA[i].SetShow(FALSE);
-
+
m_BossHealthGroup[i].SetShow(FALSE);
m_bossHealthVisible[i] = FALSE;
- XuiElementSetShow(app.GetCurrentHUDScene(i),FALSE);
+ XuiElementSetShow(app.GetCurrentHUDScene(i),FALSE);
_DisplayGamertag(i,FALSE);
}
@@ -1845,12 +1845,12 @@ void CXuiSceneBase::ReLayout( unsigned int iPad )
if( i>0 && lastVisible!=-1 )
{
float width, height;
- XuiElementGetBounds(m_Buttons[iPad][lastVisible].m_hObj, &width, &height);
+ XuiElementGetBounds(m_Buttons[iPad][lastVisible].m_hObj, &width, &height);
// 4J Stu - This is for horizontal layout, will need changed if we do vertical layout
lastPos.x += width + m_iTooltipSpacingGap;
- XuiElementGetBounds(m_ButtonsSmall[iPad][lastVisible].m_hObj, &width, &height);
+ XuiElementGetBounds(m_ButtonsSmall[iPad][lastVisible].m_hObj, &width, &height);
// 4J Stu - This is for horizontal layout, will need changed if we do vertical layout
lastPosSmall.x += width + m_iTooltipSpacingGapSmall;
}
@@ -1948,15 +1948,15 @@ HRESULT CXuiSceneBase::SetTooltips( unsigned int iPad, int iA, int iB, int iX, i
}
else
{
- // does the tooltip need to change?
+ // does the tooltip need to change?
if(CXuiSceneBase::Instance->m_iCurrentTooltipTextID[iPad][i]!=iTooptipsA[i] || forceUpdate)
{
CXuiSceneBase::Instance->SetTooltipText(iPad, i, iTooptipsA[i] );
- }
+ }
CXuiSceneBase::Instance->_ShowTooltip(iPad, i, true );
}
}
-
+
}
return S_OK;
}
@@ -2067,14 +2067,14 @@ HRESULT CXuiSceneBase::SetPlayerBasePositions(EBaseScenePosition pad0, EBaseScen
}
HRESULT CXuiSceneBase::UpdatePlayerBasePositions()
-{
+{
EBaseScenePosition padPositions[XUSER_MAX_COUNT];
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
padPositions[idx] = e_BaseScene_NotSet;
}
-
+
Minecraft *pMinecraft = Minecraft::GetInstance();
// If the game is not started (or is being held paused for a bit) then display all scenes fullscreen
@@ -2134,7 +2134,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions()
padPositions[idx] = e_BaseScene_Right;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
- padPositions[idx] = e_BaseScene_Top_Left;
+ padPositions[idx] = e_BaseScene_Top_Left;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_RIGHT:
padPositions[idx] = e_BaseScene_Top_Right;
@@ -2168,7 +2168,7 @@ void CXuiSceneBase::UpdateSelectedItemPos(int iPad)
CXuiSceneBase::Instance->_UpdateSelectedItemPos(iPad);
}
-HXUIOBJ CXuiSceneBase::GetPlayerBaseScene(int iPad)
+HXUIOBJ CXuiSceneBase::GetPlayerBaseScene(int iPad)
{
return CXuiSceneBase::Instance->_GetPlayerBaseScene(iPad);
}
diff --git a/Minecraft.Client/Common/zlib/zconf.h b/Minecraft.Client/Common/zlib/zconf.h
index 9987a775..8fd83696 100644
--- a/Minecraft.Client/Common/zlib/zconf.h
+++ b/Minecraft.Client/Common/zlib/zconf.h
@@ -485,7 +485,7 @@ typedef uLong FAR uLongf;
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
-# define z_off64_t __int64
+# define z_off64_t long long
# else
# define z_off64_t z_off_t
# endif
diff --git a/Minecraft.Client/CreateWorldScreen.cpp b/Minecraft.Client/CreateWorldScreen.cpp
index b9856c7e..1a897203 100644
--- a/Minecraft.Client/CreateWorldScreen.cpp
+++ b/Minecraft.Client/CreateWorldScreen.cpp
@@ -97,14 +97,14 @@ void CreateWorldScreen::buttonClicked(Button *button)
if (done) return;
done = true;
- __int64 seedValue = (new Random())->nextLong();
+ int64_t seedValue = (new Random())->nextLong();
wstring seedString = seedEdit->getValue();
if (seedString.length() != 0)
{
// try to convert it to a long first
// try { // 4J - removed try/catch
- __int64 value = _fromString<__int64>(seedString);
+ int64_t value = _fromString<int64_t>(seedString);
if (value != 0)
{
seedValue = value;
diff --git a/Minecraft.Client/DemoLevel.h b/Minecraft.Client/DemoLevel.h
index 8364d5b4..6464c32b 100644
--- a/Minecraft.Client/DemoLevel.h
+++ b/Minecraft.Client/DemoLevel.h
@@ -4,7 +4,7 @@
class DemoLevel : public Level
{
private:
- static const __int64 DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
+ static const int64_t DEMO_LEVEL_SEED = 0; // 4J - TODO - was "Don't Look Back".hashCode();
static const int DEMO_SPAWN_X = 796;
static const int DEMO_SPAWN_Y = 72;
static const int DEMO_SPAWN_Z = -731;
diff --git a/Minecraft.Client/DemoMode.cpp b/Minecraft.Client/DemoMode.cpp
index c52580c3..2a5664e4 100644
--- a/Minecraft.Client/DemoMode.cpp
+++ b/Minecraft.Client/DemoMode.cpp
@@ -13,8 +13,8 @@ void DemoMode::tick()
SurvivalMode::tick();
/* 4J - TODO - seems unlikely we need this demo mode anyway
- __int64 time = minecraft->level->getTime();
- __int64 day = (time / Level::TICKS_PER_DAY) + 1;
+ int64_t time = minecraft->level->getTime();
+ int64_t day = (time / Level::TICKS_PER_DAY) + 1;
demoHasEnded = (time > (500 + Level::TICKS_PER_DAY * DEMO_DAYS));
if (demoHasEnded)
diff --git a/Minecraft.Client/Durango/Durango_App.cpp b/Minecraft.Client/Durango/Durango_App.cpp
index 59ac8ba0..672d6435 100644
--- a/Minecraft.Client/Durango/Durango_App.cpp
+++ b/Minecraft.Client/Durango/Durango_App.cpp
@@ -50,7 +50,7 @@ void CConsoleMinecraftApp::HandleDLCLicenseChange()
// Clear the DLC installed flag so the scenes will pick up the new dlc (could be a full pack install)
app.ClearDLCInstalled();
app.DebugPrintf(">>> HandleDLCLicenseChange - Updating license for DLC [%ls]\n",xOffer.wszOfferName);
- pack->updateLicenseMask(1);
+ pack->updateLicenseMask(1);
}
else
{
@@ -100,7 +100,7 @@ void CConsoleMinecraftApp::ExitGame()
}
void CConsoleMinecraftApp::FatalLoadError()
{
- // 4J-PB -
+ // 4J-PB -
//for(int i=0;i<10;i++)
{
#ifndef _CONTENT_PACKAGE
@@ -204,7 +204,7 @@ int CConsoleMinecraftApp::LoadLocalDLCImage(WCHAR *wchName,PBYTE *ppbImageData,D
// load the local file
WCHAR wchFilename[64];
-
+
// 4J-PB - Read the file containing the product codes. This will be different for the SCEE/SCEA/SCEJ builds
swprintf(wchFilename,L"DLCImages/%s",wchName);
HANDLE hFile = CreateFile(wchFilename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
@@ -269,7 +269,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false;
- __int64 seedValue = BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+ int64_t seedValue = BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue;
@@ -308,7 +308,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
thread->Run();
}
-typedef struct
+typedef struct
{
eDLCContentType e_DLC_Type;
//WCHAR *wchDisplayName;
@@ -397,7 +397,7 @@ bool CConsoleMinecraftApp::UpdateProductId(XCONTENT_DATA &Data)
app.DebugPrintf("Couldn't find %ls\n",Data.wszDisplayName);
}
- return false;
+ return false;
}
void CConsoleMinecraftApp::Shutdown()
@@ -455,7 +455,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadBannedList(void *pParam,int iPad, in
{
app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPReadBannedList\n");
C4JStorage::PTMSPP_FILEDATA pFileData=(C4JStorage::PTMSPP_FILEDATA)lpvData;
-
+
CConsoleMinecraftApp* pClass = (CConsoleMinecraftApp*)pParam;
if(pFileData)
@@ -471,7 +471,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadBannedList(void *pParam,int iPad, in
// mark the level as not checked against banned levels - it'll be checked once the level starts
app.SetBanListCheck(iPad,false);
- // Xbox One will clear things within the DownloadBlob
+ // Xbox One will clear things within the DownloadBlob
#ifndef _XBOX_ONE
delete [] pFileData->pbData;
delete [] pFileData;
@@ -558,11 +558,11 @@ int CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList(void *pParam,int iPad,
CConsoleMinecraftApp* pClass = (CConsoleMinecraftApp*)pParam;
app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPRetrieveFileList\n");
if(lpvData!=NULL)
- {
+ {
vector<C4JStorage::PTMSPP_FILE_DETAILS> *pvTmsFileDetails=(vector<C4JStorage::PTMSPP_FILE_DETAILS> *)lpvData;
if(pvTmsFileDetails->size()>0)
- {
+ {
#ifdef _DEBUG
// dump out the file list
app.DebugPrintf("TMSPP filecount - %d\nFiles - \n",pvTmsFileDetails->size());
@@ -707,7 +707,7 @@ void CConsoleMinecraftApp::Callback_SaveGameIncomplete(void *pParam, C4JStorage:
{
CConsoleMinecraftApp* pClass = (CConsoleMinecraftApp*)pParam;
- if ( saveIncompleteType == C4JStorage::ESaveIncomplete_OutOfQuota
+ if ( saveIncompleteType == C4JStorage::ESaveIncomplete_OutOfQuota
|| saveIncompleteType == C4JStorage::ESaveIncomplete_OutOfLocalStorage )
{
StorageManager.SetSaveDisabled(true);
@@ -718,10 +718,10 @@ void CConsoleMinecraftApp::Callback_SaveGameIncomplete(void *pParam, C4JStorage:
else message = IDS_SAVE_INCOMPLETE_EXPLANATION_LOCAL_STORAGE;
UINT uiIDA[3] =
- {
- IDS_SAVE_INCOMPLETE_RETRY_SAVING,
- IDS_SAVE_INCOMPLETE_DISABLE_SAVING,
- IDS_SAVE_INCOMPLETE_DELETE_SAVES
+ {
+ IDS_SAVE_INCOMPLETE_RETRY_SAVING,
+ IDS_SAVE_INCOMPLETE_DISABLE_SAVING,
+ IDS_SAVE_INCOMPLETE_DELETE_SAVES
};
if ( ui.RequestMessageBox( IDS_SAVE_INCOMPLETE_TITLE, message, uiIDA,3,0,Callback_SaveGameIncompleteMessageBoxReturned,pClass, app.GetStringTable()) == C4JStorage::EMessage_Busy)
diff --git a/Minecraft.Client/Durango/Iggy/include/rrCore.h b/Minecraft.Client/Durango/Iggy/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/Durango/Iggy/include/rrCore.h
+++ b/Minecraft.Client/Durango/Iggy/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/Durango/Miles/include/mss.h b/Minecraft.Client/Durango/Miles/include/mss.h
index 531dcbc9..8fe0a74d 100644
--- a/Minecraft.Client/Durango/Miles/include/mss.h
+++ b/Minecraft.Client/Durango/Miles/include/mss.h
@@ -39,7 +39,7 @@
// doc system stuff
#ifndef EXPAPI
-#define EXPAPI
+#define EXPAPI
#endif
#ifndef EXPTYPE
#define EXPTYPE
@@ -69,10 +69,10 @@
// For docs
EXPGROUP(_NullGroup)
#define MilesVersion "9.3m" EXPMACRO
-#define MilesMajorVersion 9 EXPMACRO
+#define MilesMajorVersion 9 EXPMACRO
#define MilesMinorVersion 3 EXPMACRO
-#define MilesBuildNumber 11 EXPMACRO
-#define MilesCustomization 0 EXPMACRO
+#define MilesBuildNumber 11 EXPMACRO
+#define MilesCustomization 0 EXPMACRO
EXPGROUP(_RootGroup)
@@ -273,14 +273,14 @@ typedef void VOIDFUNC(void);
//================
EXPGROUP(Basic Types)
-#define AILCALL EXPTAG(AILCALL)
+#define AILCALL EXPTAG(AILCALL)
/*
Internal calling convention that all external Miles functions use.
Usually cdecl or stdcall on Windows.
*/
-#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
+#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
/*
Calling convention that user supplied callbacks <b>from</b> Miles use.
@@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+ typedef unsigned long long ULONG_PTR, *PULONG_PTR;
#else
#ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
@@ -348,13 +348,13 @@ RADDEFSTART
typedef struct HWAVEOUT__ *HWAVEOUT;
typedef HWAVEIN *LPHWAVEIN;
typedef HWAVEOUT *LPHWAVEOUT;
-
+
#ifndef WAVE_MAPPER
#define WAVE_MAPPER ((UINT)-1)
#endif
typedef struct waveformat_tag *LPWAVEFORMAT;
-
+
typedef struct HMIDIOUT__ *HMIDIOUT;
typedef HMIDIOUT *LPHMIDIOUT;
typedef struct HWND__ *HWND;
@@ -368,9 +368,9 @@ RADDEFSTART
// If compiling MSS DLL, use __declspec(dllexport) for both
// declarations and definitions
//
-
+
#ifdef IS_WIN32
-
+
#if !defined(FORNONWIN) && !defined(__RADNTBUILDLINUX__)
#define AILLIBCALLBACK __stdcall
#define AILCALL __stdcall
@@ -382,20 +382,20 @@ RADDEFSTART
#define AILCALLBACK __cdecl
#define AILEXPORT __cdecl
#endif
-
+
#ifdef __RADINDLL__
#define DXDEC __declspec(dllexport)
#define DXDEF __declspec(dllexport)
#else
-
+
#if defined( __BORLANDC__ ) || defined( MSS_SPU_PROCESS )
#define DXDEC extern
#else
#define DXDEC __declspec(dllimport)
#endif
-
+
#endif
-
+
#ifdef IS_WIN64
#define MSSDLLNAME "MSS64.DLL"
#define MSS_REDIST_DIR_NAME "redist64"
@@ -403,11 +403,11 @@ RADDEFSTART
#define MSSDLLNAME "MSS32.DLL"
#define MSS_REDIST_DIR_NAME "redist"
#endif
-
+
#define MSS_DIR_SEP "\\"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
-
+
#endif
typedef void * LPVOID;
@@ -420,7 +420,7 @@ RADDEFSTART
#define AILLIBCALLBACK
#define AILCALL
#define AILEXPORT
- #define AILCALLBACK
+ #define AILCALLBACK
#elif defined(__RADX86__)
#define AILLIBCALLBACK __attribute__((cdecl))
#define AILCALL __attribute__((cdecl))
@@ -437,7 +437,7 @@ RADDEFSTART
#define DXDEC extern
#define DXDEF
#endif
-
+
#ifdef __RADX64__
#define MSS_REDIST_DIR_NAME "redist/x64"
#elif defined(IS_X86)
@@ -447,7 +447,7 @@ RADDEFSTART
#else
#error "No Redist Dir Specified"
#endif
-
+
#define MSS_DIR_SEP "/"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
@@ -714,7 +714,7 @@ typedef enum
#ifndef FILE_ERRS
#define FILE_ERRS
-
+
#define AIL_NO_ERROR 0
#define AIL_IO_ERROR 1
#define AIL_OUT_OF_MEMORY 2
@@ -736,9 +736,9 @@ EXPTYPEBEGIN typedef SINTa HMSSENUM;
EXPTYPEEND
/*
specifies a type used to enumerate through a list of properties.
-
+
$:MSS_FIRST use this value to start the enumeration process.
-
+
The Miles enumeration functions all work similarly - you set a local variable of type HMSSENUM to MSS_FIRST and then call
the enumeration function until it returns 0.
@@ -751,7 +751,7 @@ the enumeration function until it returns 0.
// Preference names and default values
//
-#define AIL_MM_PERIOD 0
+#define AIL_MM_PERIOD 0
#define DEFAULT_AMP 1 // Default MM timer period = 5 msec.
#define AIL_TIMERS 1
@@ -1877,7 +1877,7 @@ typedef struct _S3DSTATE // Portion of HSAMPLE that deals with 3D posi
F32 lowpass_3D; // low pass cutoff computed by falloff graph. -1 if not affected.
F32 spread;
-
+
HSAMPLE owner; // May be NULL if used for temporary/internal calculations
AILFALLOFFCB falloff_function; // User function for min/max distance calculations, if desired
@@ -1915,7 +1915,7 @@ typedef struct _SAMPLE // Sample instance
S32 index; // Numeric index of this sample
SMPBUF buf[8]; // Source data buffers
-
+
U32 src_fract; // Fractional part of source address
U32 mix_delay; // ms until start mixing (decreased every buffer mix)
@@ -1924,7 +1924,7 @@ typedef struct _SAMPLE // Sample instance
U64 mix_bytes; // total number of bytes sent to the mixer for this sample.
S32 group_id; // ID for grouped operations.
-
+
// size of the next dynamic arrays
U32 chan_buf_alloced;
U32 chan_buf_used;
@@ -1946,10 +1946,10 @@ typedef struct _SAMPLE // Sample instance
// these are dynamic arrays
F32 *auto_3D_channel_levels; // Channel levels set by 3D positioner (always 1.0 if not 3D-positioned)
F32 *speaker_levels; // one level per speaker (multiplied after user or 3D)
-
+
S8 *speaker_enum_to_source_chan; // array[MSS_SPEAKER_xx] = -1 if not present, else channel #
// 99% of the time this is a 1:1 mapping and is zero.
-
+
S32 lp_any_on; // are any of the low pass filters on?
S32 user_channels_need_deinterlace; // do any of the user channels require a stereo sample to be deinterlaced?
@@ -1989,7 +1989,7 @@ typedef struct _SAMPLE // Sample instance
U32 low_pass_changed; // bit mask for what channels changed.
-
+
S32 bus; // Bus assignment for this sample.
S32 bus_comp_sends; // Which buses this bus routes compressor input to.
S32 bus_comp_installed; // Nonzero if we have a compressor installed.
@@ -2042,7 +2042,7 @@ typedef struct _SAMPLE // Sample instance
SPINFO pipeline[N_SAMPLE_STAGES];
S32 n_active_filters; // # of SP_FILTER_n stages active
-
+
//
// 3D-related state for all platforms (including Xbox)
//
@@ -2113,14 +2113,14 @@ DXDEC void AILCALL AIL_serve(void);
#ifdef IS_MAC
typedef void * LPSTR;
-
+
#define WHDR_DONE 0
-
+
typedef struct _WAVEIN
{
long temp;
} * HWAVEIN;
-
+
typedef struct _WAVEHDR
{
S32 dwFlags;
@@ -2133,7 +2133,7 @@ DXDEC void AILCALL AIL_serve(void);
S32 dwLoops;
void * lpNext;
U32 * reserved;
-
+
} WAVEHDR, * LPWAVEHDR;
#endif
@@ -2145,7 +2145,7 @@ typedef struct _DIG_INPUT_DRIVER *HDIGINPUT; // Handle to digital input driver
#ifdef IS_MAC
#define AIL_DIGITAL_INPUT_DEFAULT 0
-
+
typedef struct _DIG_INPUT_DRIVER // Handle to digital input driver
{
U32 tag; // HDIN
@@ -2478,7 +2478,7 @@ typedef struct _DIG_DRIVER // Handle to digital audio driver
U32 last_ds_play;
U32 last_ds_write;
U32 last_ds_move;
-
+
#endif
#ifdef IS_X86
@@ -2661,7 +2661,7 @@ typedef struct _SEQUENCE // XMIDI sequence state table
void const *EVNT;
U8 const *EVNT_ptr; // Current event pointer
-
+
U8 *ICA; // Indirect Controller Array
AILPREFIXCB prefix_callback; // XMIDI Callback Prefix handler
@@ -3121,13 +3121,13 @@ DXDEC S32 AILCALL AIL_timer_thread_handle(void* o_handle);
#elif defined(__RADANDROID__)
DXDEC void AILCALL AIL_set_asset_manager(void* asset_manager);
-
+
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_SLESInstallDriver(UINTa, UINTa);
#define AIL_open_digital_driver(frequency, bits, channel, flags) \
AIL_open_generic_digital_driver(frequency, bits, channel, flags, RADSS_SLESInstallDriver(0, 0))
-
+
#elif defined(IS_PSP2)
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_PSP2InstallDriver(UINTa, UINTa);
@@ -3221,7 +3221,7 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
{
Str255 version_name;
} MSS_VersionType;
-
+
#define AIL_MSS_version(str,len) \
{ \
long _res = HOpenResFile(0,0,"\p" MSSDLLNAME,fsRdPerm); \
@@ -3269,11 +3269,11 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
} \
} \
}
-
+
#endif
DXDEC S32 AILCALL AIL_digital_handle_release(HDIGDRIVER drvr);
-
+
DXDEC S32 AILCALL AIL_digital_handle_reacquire
(HDIGDRIVER drvr);
@@ -3339,18 +3339,18 @@ DXDEC EXPAPI void AILCALL AIL_push_system_state(HDIGDRIVER dig, U32 flags, S16 c
$* <b>MILES_PUSH_VOLUME</b> - When present, master volume will be affected in addition to sample state.
If MILES_PUSH_RESET is present, the master volume will be set to 1.0f, otherwise it will be retained and only
- affected when popped.
+ affected when popped.
$-
- If you want more control over whether a sample will be affected by a push or a pop operation,
+ If you want more control over whether a sample will be affected by a push or a pop operation,
see $AIL_set_sample_level_mask.
-
+
*/
DXDEC EXPAPI void AILCALL AIL_pop_system_state(HDIGDRIVER dig, S16 crossfade_ms);
/*
- Pops the current system state and returns the system to the way it
+ Pops the current system state and returns the system to the way it
was before the last push.
$:dig The driver to pop.
@@ -3374,7 +3374,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_level_mask(HSAMPLE S, U8 mask);
$:S The sample to set the mask for.
$:mask The bitmask of levels for which the sample will play.
- Under normal push/pop operations, a sample's mask is set when it is
+ Under normal push/pop operations, a sample's mask is set when it is
started to the level the system is at. If the system is pushed
without a reset, then the mask is adjusted to include the new level.
When a system is popped, if the sample is going to continue playing,
@@ -3435,7 +3435,7 @@ DXDEC EXPAPI HSAMPLE AILCALL AIL_allocate_bus(HDIGDRIVER dig);
$:return The HSAMPLE for the new bus.
A bus allows you to treat a group of samples as one sample. With the bus sample you can
- do almost all of the things you can do with a normal sample handle. The only exception
+ do almost all of the things you can do with a normal sample handle. The only exception
is you can't adjust the playback rate of the sample.
Use $AIL_bus_sample_handle to get the HSAMPLE associated with a bus.
@@ -3495,7 +3495,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sample_bus(HSAMPLE S);
DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_index, SAMPLESTAGE filter_stage, S32 input_bus_index);
/*
- Installs the Compressor filter on to a bus, using another bus as the input for
+ Installs the Compressor filter on to a bus, using another bus as the input for
compression/limiting.
$:dig The driver the busses exist on.
@@ -3508,7 +3508,7 @@ DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_inde
its signal strength to the filter, allowing it to attenuate the bus_index bus based
on another bus's contents.
- To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
+ To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
use $AIL_sample_stage_property exactly as you would any other filter. The filter's properties
are documented under $(Compressor Filter)
*/
@@ -4325,7 +4325,7 @@ typedef void (AILCALLBACK* AILSTREAMCB) (HSTREAM stream);
#define MSS_STREAM_CHUNKS 8
-typedef struct _STREAM
+typedef struct _STREAM
{
S32 block_oriented; // 1 if this is an ADPCM or ASI-compressed stream
S32 using_ASI; // 1 if using ASI decoder to uncompress stream data
@@ -4349,7 +4349,7 @@ typedef struct _STREAM
S32 read_IO_index; // index of buffer to be loaded into Miles next
S32 bufsize; // size of each buffer
-
+
U32 datarate; // datarate in bytes per second
S32 filerate; // original datarate of the file
S32 filetype; // file format type
@@ -4987,7 +4987,7 @@ typedef struct
OGG_INFO;
DXDEC void AILCALL AIL_inspect_Ogg (OGG_INFO *inspection_state,
- U8 *Ogg_file_image,
+ U8 *Ogg_file_image,
S32 Ogg_file_size);
DXDEC S32 AILCALL AIL_enumerate_Ogg_pages (OGG_INFO *inspection_state);
@@ -5102,10 +5102,10 @@ DXDEC HDIGDRIVER AILCALL AIL_primary_digital_driver (HDIGDRIVER new_primary);
// 3D-related calls
//
-DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
+DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
S32 bus_index);
-DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
+DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
S32 bus_index,
S32 room_type);
@@ -5180,7 +5180,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_lowpass_falloff(HSAMPLE S, MSS
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
+ This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
a sample has such a graph, $AIL_set_sample_low_pass_cut_off will be called constantly, and thus shouldn't be
called otherwise.
@@ -5195,8 +5195,8 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_exclusion_falloff(HSAMPLE S, M
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having an exclusion that varies as a function of distance to the listener. If
- a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
+ This marks a sample as having an exclusion that varies as a function of distance to the listener. If
+ a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
affects reverb wet level.
The graph is evaluated the same as $AIL_set_sample_3D_volume_falloff.
@@ -5230,7 +5230,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_position_segments(HSAMPLE S, MSSVECT
other computations (cones, falloffs, etc). Spatialization is done using all segments as a directional
source.
- If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
+ If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
when the listener is within min_distance to the closest point. See $AIL_set_sample_3D_spread_falloff
and $AIL_set_sample_3D_volume_falloff.
@@ -5243,7 +5243,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_spread(HSAMPLE S, F32 spread);
$:S Sample to affect.
$:spread The value to set the spread to.
- Spread is how much the directionality of a sample "spreads" to more speakers - emulating
+ Spread is how much the directionality of a sample "spreads" to more speakers - emulating
the effect a sound has when it occupies more than a point source. For instance, a sound
point source that sits directly to the left of the listener would have a very strong left
speaker signal, and a fairly weak right speaker signal. Via spread, the signal would be
@@ -5392,7 +5392,7 @@ EXPGROUP(Miles High Level Event System)
EXPTYPE typedef struct MSSSOUNDBANK {};
/*
Internal structure.
-
+
Use $HMSOUNDBANK instead.
*/
@@ -5401,7 +5401,7 @@ EXPTYPE typedef struct MSSSOUNDBANK {};
EXPTYPE typedef struct SoundBank *HMSOUNDBANK;
/*
Describes a handle to an open sound bank.
-
+
This handle typedef refers to an open soundbank which is usually obtained from the $AIL_add_soundbank function.
*/
@@ -5424,7 +5424,7 @@ DXDEC EXPAPI void AILCALL AIL_close_soundbank(HMSOUNDBANK bank);
Close a soundbank previously opened with $AIL_open_soundbank.
$:bank Soundbank to close.
-
+
Close a soundbank previously opened with $AIL_open_soundbank. Presets/events loaded from
this soundbank are no longer valid.
*/
@@ -5448,7 +5448,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
$:return A pointer to the name of the sound bank, or 0 if the bank is invalid.
- The name of the bank is the name used in asset names. This is distinct from the
+ The name of the bank is the name used in asset names. This is distinct from the
file name of the bank.
The return value should not be deleted.
@@ -5457,7 +5457,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
DXDEC EXPAPI S32 AILCALL AIL_get_soundbank_mem_usage(HMSOUNDBANK bank);
/*
Returns the amount of data used by the soundbank management structures.
-
+
$:bank Soundbank to query.
$:return Total memory allocated.
@@ -5476,7 +5476,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_presets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sound presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5503,7 +5503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_environment_presets(HMSOUNDBANK bank, HMS
$:return Returns 0 when enumeration is complete.
Enumerates the environment presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5530,7 +5530,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sounds available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* SoundName = 0;
@@ -5549,7 +5549,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
Note that name should NOT be deleted by the caller - this points at memory owned by
Miles.
*/
-
+
DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next, char const * list, char const ** name);
/*
Enumerate the events stored in a soundbank.
@@ -5561,7 +5561,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next,
$:return Returns 0 when enumeration is complete.
Enumerates the events available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* EventName = 0;
@@ -5624,7 +5624,7 @@ DXDEC EXPAPI S32 AILCALL AIL_apply_sound_preset(HSAMPLE sample, HMSOUNDBANK bank
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
This will alter the properties on a given sample, based on the given preset.
-*/
+*/
DXDEC EXPAPI S32 AILCALL AIL_unapply_raw_sound_preset(HSAMPLE sample, void* preset);
/*
@@ -5644,7 +5644,7 @@ DXDEC EXPAPI S32 AILCALL AIL_unapply_sound_preset(HSAMPLE sample, HMSOUNDBANK ba
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
Presets may or may not affect any given property. Only the properties affected by the specified
- preset will have their values restored to default.
+ preset will have their values restored to default.
*/
typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPOUT void* output, S32 isfloat);
@@ -5658,7 +5658,7 @@ typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPO
$:isfloat nonzero if the output needs to be a float.
The function callback should convert variable expressions in to an output value of the
- requested type.
+ requested type.
*/
DXDEC EXPAPI S32 AILCALL AIL_resolve_raw_sound_preset(void* preset, void* context, MilesResolveFunc eval);
@@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
$:name The name of the sound asset to find.
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
- $:return Returns the byte size of the buffer required for out_name.
+ $:return Returns the byte size of the buffer required for out_name.
This function must be called in order to resolve the sound asset name to
something that can be used by miles. To ensure safe buffer containment, call
@@ -5832,7 +5832,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
ReturnType = "HMSSEVENTCONSTRUCT", "An empty event to be passed to the various step addition functions, or 0 if out of memory."
- Discussion = "Primarily designed for offline use, this function is the first step in
+ Discussion = "Primarily designed for offline use, this function is the first step in
creating an event that can be consumed by the MilesEvent system. Usage is as follows:
HMSSEVENTCONSTRUCT hEvent = AIL_create_event();
@@ -5850,7 +5850,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
Note that if immediately passed to AIL_enqueue_event(), the memory must remain valid until the following
$AIL_complete_event_queue_processing.
-
+
Events are generally tailored to the MilesEvent system, even though there is nothing preventing you
from writing your own event system, or creation ui.
"
@@ -5906,7 +5906,7 @@ EXPTYPEEND
/*
Determines the usage of the sound names list in the $AIL_add_start_sound_event_step.
- $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
+ $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
sound to play twice in a row. This is the only selection type that doesn't require
a state variable.
$:MILES_START_STEP_NO_REPEATS Randomly select from the list, but prevent the last sound from being the same.
@@ -5926,10 +5926,10 @@ EXPTYPEEND
Name = "AIL_add_start_sound_event_step", "Adds a step to a given event to start a sound with the given specifications."
In = "HMSSEVENTCONSTRUCT", "i_Event", "The event to add the step to."
- In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
- If there are multiple names listed, the sound will be chosen at random based on the given weights. This
+ In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
+ If there are multiple names listed, the sound will be chosen at random based on the given weights. This
string is of the form 'BankName1/SoundName1:Weight1:BankName2/SoundName2:Weight2:' etc. The string must always
- terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
+ terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
an empty string as an entry."
In = "const char*", "i_PresetName", "[optional] The name of the preset, of the form 'PresetList/PresetName'"
@@ -5944,7 +5944,7 @@ EXPTYPEEND
In = "U8", "i_CanLoad", "If nonzero, the sound is allowed to hit the disk instead of only accessing cached sounds. If true, this might cause a hitch."
In = "U16", "i_Delay", "The minimum delay in ms to apply to the sound before start."
In = "U16", "i_DelayMax", "The maximum delay in ms to apply to the sound before start."
- In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
+ In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
with a priority strictly less than the given priority."
In = "U8", "i_LoopCount", "The loop count as per AIL_set_sample_loop_count."
In = "const char*", "i_StartOffset", "[optional] The name of the marker to use as the sound's initial offset."
@@ -5969,19 +5969,19 @@ DXDEC
S32
AILCALL
AIL_add_start_sound_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_SoundNames,
- const char* i_PresetName,
+ const char* i_PresetName,
U8 i_PresetIsDynamic,
const char* i_EventName,
const char* i_StartMarker, const char* i_EndMarker,
char const* i_StateVar, char const* i_VarInit,
- const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
+ const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
U16 i_Delay, U16 i_DelayMax, U8 i_Priority, U8 i_LoopCount,
const char* i_StartOffset,
F32 i_VolMin, F32 i_VolMax, F32 i_PitchMin, F32 i_PitchMax,
F32 i_FadeInTime,
- U8 i_EvictionType,
+ U8 i_EvictionType,
U8 i_SelectType
);
@@ -6004,7 +6004,7 @@ AIL_add_start_sound_event_step(
In order to release the data loaded by this event, AIL_add_uncache_sounds_event_step() needs to
be called with the same parameters.
-
+
If you are using MilesEvent, the data is refcounted so the sound will not be freed until all
samples using it complete."
}
@@ -6089,7 +6089,7 @@ DXDEC
S32
AILCALL
AIL_add_control_sounds_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_Labels, const char* i_MarkerStart, const char* i_MarkerEnd, const char* i_Position,
const char* i_PresetName,
U8 i_PresetApplyType,
@@ -6191,7 +6191,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Defines a named blend function to be referenced by a blended sound later.
$:i_Event The event to add the step to.
- $:i_Name The name of the blend. This is the name that will be
+ $:i_Name The name of the blend. This is the name that will be
referenced by the state variable in start sound, as well as the variable name
to set by the game to update the blend for an instance.
$:i_SoundCount The number of sounds this blend will affect. Max 10.
@@ -6226,7 +6226,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Miles max sample count."
}
*/
-DXDEC S32 AILCALL
+DXDEC S32 AILCALL
AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitName, const char* i_SoundLimits);
/*!
@@ -6257,8 +6257,8 @@ AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitNa
AIL_add_persist_preset_event_step(hEvent, 0, `"Underwater`", 0);"
}
*/
-DXDEC S32 AILCALL
-AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
+DXDEC S32 AILCALL
+AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
const char* i_Labels, U8 i_IsDynamic
);
@@ -6272,13 +6272,13 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_contents(HMSOUNDBANK bank, char const * n
thus shouldn't be checked via strlen, etc.
$:return Returns 0 on fail.
- Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
+ Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
rather than inspected directly.
*/
DXDEC EXPAPI S32 AILCALL AIL_add_clear_state_event_step(HMSSEVENTCONSTRUCT i_Event);
/*
- Clears all persistent state in the runtime.
+ Clears all persistent state in the runtime.
$:i_Event The event to add the step to.
@@ -6311,7 +6311,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_enable_limit_event_step(HMSSEVENTCONSTRUCT i_Ev
DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, char const* i_Base, char const* i_Amp, char const* i_Freq, S32 i_Invert, S32 i_Polarity, S32 i_Waveform, S32 i_DutyCycle, S32 i_IsLFO);
/*
Adds a step to define a variable that oscillates over time.
-
+
$:i_Event The event to add the step to.
$:i_Name The nane of the variable to oscillate.
$:i_Base The value to oscillate around, or a variable name to use as the base.
@@ -6327,15 +6327,15 @@ DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event,
DXDEC EXPAPI S32 AILCALL AIL_add_move_var_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, const F32 i_Times[2], const S32 i_InterpolationTypes[2], const F32 i_Values[3]);
/*
Adds a step to set and move a variable over time on a curve.
-
+
$:i_Event The event to add the step to.
$:i_Name The variable to move.
$:i_Times The midpoint and final times for the curves
$:i_InterpolationTypes The curve type for the two curves - Curve In (0), Curve Out (1), S-Curve (2), Linear (3)
$:i_Values The initial, midpoint, and final values for the variable.
-
+
The variable is locked to this curve over the timeperiod - no interpolation from a previous value is done.
-
+
If an existing move var exists when the new one is added, the old one is replaced.
*/
@@ -6450,7 +6450,7 @@ struct EVENT_STEP_INFO
U8 isdynamic;
} persist;
- struct
+ struct
{
MSSSTRINGC name;
MSSSTRINGC labels;
@@ -6522,7 +6522,7 @@ struct EVENT_STEP_INFO
the string location of the next event step in the buffer."
Discussion = "This function parses the event string in to a struct for usage by the user. This function should only be
- used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
+ used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
next step. In this manner it can be used in a loop:
// Create an event to stop all sounds.
@@ -6610,11 +6610,11 @@ EXPTYPE typedef void* HEVENTSYSTEM;
DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_startup_event_system(HDIGDRIVER dig, S32 command_buf_len, EXPOUT char* memory_buf, S32 memory_len);
/*
Initializes the Miles Event system and associates it with an open digital driver.
-
+
$:dig The digital sound driver that this event system should use.
$:command_buf_len An optional number of bytes to use for the command buffer. If you pass 0, a reasonable default will be used (currently 5K).
- $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
- Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
+ $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
+ Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
Use 0 to let Miles to allocate this buffer itself.
$:memory_len If memory_buf is non-null, then this parameter provides the length. If memory_buf is null, the Miles will
allocate this much memory for internal buffers. If both memory_buf and memory_len are null, the Miles will allocate reasonable default (currently 64K).
@@ -6633,8 +6633,8 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
$:return A handle to the event system to use in various high level functions.
Both systems will access the same set of loaded soundbanks, and are updated when $AIL_begin_event_queue_processing is called.
-
- To enqueue events to the new system, use $AIL_enqueue_event_system.
+
+ To enqueue events to the new system, use $AIL_enqueue_event_system.
To iterate the sounds for the new system, pass the $HEVENTSYSTEM as the first parameter to $AIL_enumerate_sound_instances.
@@ -6646,7 +6646,7 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
DXDEC EXPAPI void AILCALL AIL_shutdown_event_system( void );
/*
Shuts down the Miles event system.
-
+
This function will closes everything in the event system - it ignores reference counts. It will free
all event memory, sound banks, and samples used by the system.
*/
@@ -6660,10 +6660,10 @@ DXDEC EXPAPI HMSOUNDBANK AILCALL AIL_add_soundbank(char const * filename, char c
$:return The handle to the newly loaded soundbank (zero on failure).
This function opens the sound bank and makes it available to the event system. The filename
- is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
+ is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
You might, for example, be using a soundbank with a platform extension, like: 'gamebank_ps3.msscmp',
and while using the name 'gamebank' for authoring and auditioning.
-
+
Sound data is not loaded when this function is called - it is only loaded when the relevant Cache Sounds
is played, or a sound requiring it plays.
@@ -6685,7 +6685,7 @@ DXDEC EXPAPI S32 AILCALL AIL_release_soundbank(HMSOUNDBANK bank);
Any other data references still existing (queued events, persisted presets, etc) will report errors when used,
but will not crash.
-
+
Releasing a sound bank does not free any cached sounds loaded from the bank - any sounds from the bank should be freed
via a Purge Sounds event step. If this does not occur, the sound data will still be loaded, but the
sound metadata will be gone, so Start Sound events will not work. Purge Sounds will still work.
@@ -6698,24 +6698,24 @@ DXDEC U8 const * AILCALL AIL_find_event(HMSOUNDBANK bank,char const* event_name)
(EXPAPI removed to prevent release in docs)
Searches for an event by name in the event system.
-
+
$:bank The soundbank to search within, or 0 to search all open banks (which is the normal case).
$:event_name The name of the event to find. This name should be of the form "soundbank/event_list/event_name".
$:return A pointer to the event contents (or 0, if the event isn't found).
-
+
This function is normally used as the event parameter for $AIL_enqueue_event. It
searches one or all open soundbanks for a particular event name.
-
- <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
+
+ <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
MILESEVENT_ENQUEUE_BY_NAME.
-
+
Events that are not enqueued by name can not be tracked by the Auditioner.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_system(HEVENTSYSTEM system, U8 const * event, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to a specific system. Used only if you have multiple event systems running.
-
+
$:system The event system to attach the event to.
$:return See $AIL_enqueue_event for return description.
@@ -6728,10 +6728,10 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_by_name(char const* name);
$:name The full name of the event, eg "soundbank/path/to/event".
$:return See $AIL_enqueue_event for return description.
-
- This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
-
- For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
+
+ This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
+
+ For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
to calling $AIL_enqueue_event_end_named($AIL_enqueue_event_start(), name)
For introduction to the auditioning system, see $integrating_events.
@@ -6743,9 +6743,9 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
$:return A token used for passing to functions that add data to the event.
- This is used to pass more data to an event that will be executed. For instance, if
+ This is used to pass more data to an event that will be executed. For instance, if
an event is going to spatialize a sound, but there's no need to move the sound over the course of
- its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
+ its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
sound is started it will use that for its initial position, and there is no need to do any
game object <-> event id tracking.
@@ -6762,7 +6762,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
The enqueue process is still completely thread safe. No locks are used, however only 8
enqueues can be "assembling" at the same time - if more than that occur, the $AIL_enqueue_event_start
- will yield the thread until a slot is open.
+ will yield the thread until a slot is open.
The ONLY time that should happen is if events enqueues are started but never ended:
@@ -6838,7 +6838,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
user buffer contents, and then exposed during sound enumeration. This is equivalent in spirit to
the void* value that often accompanies callbacks. In this case, user_buffer_len is ignored, as
user_buffer is never dereferenced.
- $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
+ $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
carried with the event. During sound enumeration this buffer is made available, and you never have to
worry about memory management.
$-
@@ -6855,7 +6855,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data->game_stat = 1;
data->needed_info = 2;
- // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
+ // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
// completes and we're done using it in the enumeration loop.
S32 ptr_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&ptr_token, data, 0, 1);
@@ -6874,7 +6874,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data.game_stat = 1;
data.needed_info = 2;
- // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
+ // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
// a stack variable like this
S32 buf_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&buf_token, &data, sizeof(data), 0);
@@ -6895,7 +6895,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_variablef(S32* token, char const* nam
$:value The value of the variable to set.
$:return 0 if the enqueue buffer is full
- When a sound starts, the given variable will be set to the given value prior to any possible
+ When a sound starts, the given variable will be set to the given value prior to any possible
references being used by presets.
*/
@@ -6904,7 +6904,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_filter(S32* token, U64 apply_to_ID);
Limits the effects of the event to sounds started by the given ID.
$:token A token created with $AIL_enqueue_event_start
- $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
+ $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
event, it will apply to all sounds started by the event, and any events queued by that event.
$:return 0 if the enqueue buffer is full
@@ -6932,7 +6932,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_selection(S32* token, U32 selection);
$:selection The value to use for selecting the sound to play.
$:return 0 if the enqueue buffer is full
- The selection index is used to programatically select a sound from the
+ The selection index is used to programatically select a sound from the
loaded banks. The index passed in replaces any numeric value at the end
of the sound name existing in any start sound event step. For example, if
a start sound event plays "mybank/sound1", and the event is queued with
@@ -6969,52 +6969,52 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_end_named(S32 token, char const* even
As with all of the enqueue functions it is completely thread-safe.
Upon completion of this function, the enqueue slot is release and available for another
- $AIL_enqueue_event_start.
+ $AIL_enqueue_event_start.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event(U8 const * event_or_name, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to be processed by the next $AIL_begin_event_queue_processing function.
-
- $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
+
+ $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
If an event, the contents must be valid until the next call to $AIL_begin_event_queue_processing.
If a name, the string is copied internally and does not have any lifetime requirements, and MILES_ENQUEUE_BY_NAME must be present in enqueue_flags.
- $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
- This data is then accessible later, when enumerating the instances.
+ $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
+ This data is then accessible later, when enumerating the instances.
$:user_buffer_len Size of the buffer pointed to by user_buffer.
$:enqueue_flags Optional $MILESEVENTENQUEUEFLAGS logically OR'd together that control how to enqueue this event (default is 0).
$:apply_to_ID Optional value that is used for events that affect sound instances. Normally,
- when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
+ when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
you specify an apply_to_ID value, then event step will only run on sounds that matches this QueuedID,InstanceID,or EventID too. This is how you
- execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
+ execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
InstanceIDs and EventIDs are returned from $AIL_enumerate_sound_instances.
- $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
+ $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
program run (you can use this ID to uniquely identify sounds triggered from this event).
-
+
This function enqueues an event to be triggered - this is how you begin execution of an event. First, you
queue it, and then later (usually once a game frame), you call $AIL_begin_event_queue_processing to
execute an event.
-
- This function is very lightweight. It does nothing more than post the event and data to a
+
+ This function is very lightweight. It does nothing more than post the event and data to a
command buffer that gets executed via $AIL_begin_event_queue_processing.
The user_buffer parameter can be used in different ways. If no flags are passed in, then
Miles will copy the data from user_buffer (user_buffer_len bytes long) and store the data with
the queued sound - you can then free the user_buffer data completely! This lets Miles keep track
- of all your sound related memory directly and is the normal way to use the system (it is very
+ of all your sound related memory directly and is the normal way to use the system (it is very
convenient once you get used to it).
If you instead pass the MILESEVENT_ENQUEUE_BUFFER_PTR flag, then user_buffer pointer will
simply be associated with each sound that this event may start. In this case, user_buffer_len
is ignored.
-
- In both cases, when you later enumerate the sound instances, you can access your sound data
+
+ In both cases, when you later enumerate the sound instances, you can access your sound data
with the $(MILESEVENTSOUNDINFO::UserBuffer) field.
-
+
You can call this function from any number threads - it's designed to be called from anywhere in your game.
If you want events you queue to be captured by Miles Studio, then they have to be passed by name. This can be done
- by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
+ by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
passing the name in event_or_name. For introduction to the auditioning system, see $integrating_events.
*/
@@ -7044,23 +7044,23 @@ DXDEC EXPAPI S32 AILCALL AIL_begin_event_queue_processing( void );
/*
Begin execution of all of the enqueued events.
- $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
+ $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
(out of memory, bank file not found, bad data, etc). You can get the specific error by
calling $AIL_last_error.
-
+
This function executes all the events currently in the queue. This is where all major
processing takes place in the event system.
-
+
Once you execute this functions, then sound instances will be in one of three states:
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7082,7 +7082,7 @@ ${
MILESEVENTSOUNDINFO Info;
HMSSENUM SoundEnum = MSS_FIRST;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
{
game_type * game_data = (game_type*) Info.UserBuffer; // returns the game_data pointer from the enqueue
@@ -7098,13 +7098,13 @@ ${
}
}
- $AIL_complete_event_queue_processing( );
- $}
-
- Note that if any event step drastically fails, the rest of the command queue is
+ $AIL_complete_event_queue_processing( );
+ $}
+
+ Note that if any event step drastically fails, the rest of the command queue is
skipped, and this function returns 0! For this reason, you shouldn't assume
that a start sound event will always result in a completed sound later.
-
+
Therefore, you should allocate memory that you want associated with a sound instance
during the enumeration loop, rather than at enqueue time. Otherwise, you
need to detect that the sound didn't start and then free the memory (which can be complicated).
@@ -7120,7 +7120,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
HSTREAM Stream;
void* UserBuffer;
S32 UserBufferLen;
- S32 Status;
+ S32 Status;
U32 Flags;
S32 UsedDelay;
F32 UsedVolume;
@@ -7130,10 +7130,10 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
} MILESEVENTSOUNDINFO;
/*
Sound instance data that is associated with each active sound instance.
-
+
$:QueuedID A unique ID that identifies the queued event that started this sound. Returned from each call to $AIL_enqueue_event.
$:EventID A unique ID that identifies the actual event that started this sound. This is the same as QueuedID unless the sound
- was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
+ was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
$AIL_enqueue_event, and EventID represents the completion event.
$:InstanceID A unique ID that identified this specific sound instance (note that one QueuedID can trigger multiple InstanceIDs).
$:Sample The $HSAMPLE for this playing sound.
@@ -7148,7 +7148,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
$:UsedSound The name of the sound used as a result of randomization. This pointer should NOT be deleted
and is only valid for the until the next call in to Miles.
$:HasCompletionEvent Nonzero if the sound will fire an event upon completion.
-
+
This structure is returned by the $AIL_enumerate_sound_instances function. It
returns information about an active sound instance.
*/
@@ -7157,7 +7157,7 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7183,14 +7183,14 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
// A preset referencing "MyVar" for FirstSound will get 10. Any other sound will
// get 20.
$}
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_variable_float(UINTa context, char const* name, F32 value);
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7265,7 +7265,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sound_start_offset(HMSSENUM sound, S32 offset,
the sound starting. Generally you don't need to do this manually, since the sound designer should do
this, however if you need to restart a sound that stopped - for example a stream that went to error -
you will have to set the start position via code.
-
+
However, since there can be a delay between the time the sound is first seen in the sound iteration and
the time it gets set to the data, start positions set via the low level miles calls can get lost, so
use this.
@@ -7281,11 +7281,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$:statuses Or-ed list of status values to enumerate. Use 0 for all status types.
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:search_for_ID Match only instances that have a QueuedID,InstanceID,or EventID that matches this value. Use 0 to skip ID matching.
- $:info Returns the data for each sound instance.
+ $:info Returns the data for each sound instance.
$:return Returns 0 when enumeration is complete.
Enumerates the sound instances. This will generally be used between
- calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
+ calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
manage the sound instances.
The label_query is a list of labels to match, separated by commas. By default, comma-separated
@@ -7302,11 +7302,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7315,7 +7315,7 @@ ${
HMSSENUM SoundEnum = MSS_FIRST;
MILESEVENTSOUNDINFO Info;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
{
if ( Info.Status != MILESEVENT_SOUND_STATUS_COMPLETE )
{
@@ -7330,23 +7330,23 @@ $}
EXPTYPEBEGIN typedef S32 MILESEVENTSOUNDSTATUS;
#define MILESEVENT_SOUND_STATUS_PENDING 0x1
-#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
+#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
#define MILESEVENT_SOUND_STATUS_COMPLETE 0x4
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_STATUS_PENDING New sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$:MILESEVENT_SOUND_STATUS_PLAYING Sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$:MILESEVENT_SOUND_STATUS_COMPLETE Sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
-
+
These are the status values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them.
*/
@@ -7360,13 +7360,13 @@ EXPTYPEBEGIN typedef U32 MILESEVENTSOUNDFLAG;
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_FLAG_MISSING_SOUND The event system tried to look up the sound requested from a Start Sound event
and couldn't find anything in the loaded banks.
$:MILESEVENT_SOUND_FLAG_EVICTED The sound was evicted due to a sound instance limit being hit. Another sound was selected
as being higher priority, and this sound was stopped as a result. This can be the result of either a Label Sound Limit,
or a limit on the sound itself.
- $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
+ $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
The sound will start when sufficient data has been loaded to hopefully avoid a skip.
$:MILESEVENT_SONUD_FLAG_PENDING_ASYNC The sound has started playing, but the data still isn't completely loaded, and it's possible
that the sound playback will catch up to the read position under poor I/O conditions.
@@ -7375,7 +7375,7 @@ EXPTYPEEND
sound data is asynchronously loaded, or specify the sound in a Cache Sounds step prior to attempting to start it.
$:MILESEVENT_SOUND_FLAG_FAILED_ASYNC The sound tried to load and the asynchronous I/O operation failed - most likely either the media
was removed during load, or the file was not found.
-
+
These are the flag values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them. Instances
may have more than one flag, logically 'or'ed together.
*/
@@ -7383,16 +7383,16 @@ EXPTYPEEND
DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
/*
Completes the queue processing (which is started with $AIL_begin_event_queue_processing ).
-
+
$:return Returns 0 on failure.
- This function must be called as a pair with $AIL_begin_event_queue_processing.
-
- In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
- started playing yet. Old sound instances that have finished playing are still valid - they
- haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
+ This function must be called as a pair with $AIL_begin_event_queue_processing.
+
+ In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
+ started playing yet. Old sound instances that have finished playing are still valid - they
+ haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
and frees the completed ones - it's the 2nd half of the event processing.
-
+
Usually you call $AIL_enumerate_sound_instances before this function to manage all the sound
instances.
*/
@@ -7400,7 +7400,7 @@ DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a stop sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to stop only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7408,7 +7408,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
Enqueues an event to stop all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to stop the necessary sounds,
however, if a single sound (for example associated with an enemy that the player just killed) needs to be stopped,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7417,7 +7417,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a pause sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to pause only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7425,7 +7425,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
Enqueues an event to pause all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to pause the necessary sounds,
however, if a single sound (for example associated with an enemy that has been put in to stasis) needs to be paused,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7434,7 +7434,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a resume sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to resume only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7442,17 +7442,17 @@ DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U6
Enqueues an event to resume all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to resume the necessary sounds,
however, if a single sound (for example associated with an enemy that has been restored from stasis) needs to be resumed,
this function accomplishes that, and is captured by the auditioner for replay.
*/
-DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
+DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
S32 should_stream, char const * labels, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags );
/*
Allows the programmer to manually enqueue a start sound event into the event system.
-
+
$:bank The bank containing the sound to start.
$:sound The name of the sound file to start, including bank name, e.g. "BankName/SoundName"
$:loop_count The loop count to assign to the sound. 0 for infinite, 1 for play once, or just the number of times to loop.
@@ -7463,10 +7463,10 @@ DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const *
$:enqueue_flags See the enqueue_flags description in $AIL_enqueue_event.
$:return Returns a non-zero EnqueueID on success.
- Enqueues an event to start the specified sound asset.
-
+ Enqueues an event to start the specified sound asset.
+
Usually the programmer should trigger an event that the sound designer has specifically
- create to start the appropriate sounds, but this function gives the programmer
+ create to start the appropriate sounds, but this function gives the programmer
manual control, if necessary. <b>This function is not captured by the auditioner.</b>
*/
@@ -7488,7 +7488,7 @@ DXDEC EXPAPI S32 AILCALL AIL_set_sound_label_limits(HEVENTSYSTEM system, char co
Every time an event triggers a sound to be played, the sound limits are checked, and, if exceeded, a sound is dropped (based
on the settings in the event step).
-
+
Usually event limits are set by a sound designer via an event, but this lets the programmer override the limits at runtime.
Note that this replaces those events, it does not supplement.
*/
@@ -7503,7 +7503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
that this pointer can change frame to frame and should be immediately copied to a client-allocated
buffer if persistence is desired.
$:return Returns 0 when enumeration is complete.
-
+
This function lets you enumerate all the persisting presets that are currently active in the system. It
is mostly a debugging aid.
*/
@@ -7511,12 +7511,12 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
DXDEC EXPAPI char * AILCALL AIL_text_dump_event_system(void);
/*
Returns a big string describing the current state of the event system.
-
- $:return String description of current systems state.
+
+ $:return String description of current systems state.
This function is a debugging aid - it can be used to show all of the active allocations,
active sounds, etc.
-
+
You must delete the pointer returned from this function with $AIL_mem_free_lock.
*/
@@ -7535,7 +7535,7 @@ EXPTYPE typedef struct _MILESEVENTSTATE
} MILESEVENTSTATE;
/*
returns the current state of the Miles Event System.
-
+
$:CommandBufferSize The size of the command buffer in bytes. See also the $AIL_startup_event_system.
$:HeapSize The total size of memory used by the event system for management structures, and is allocated during startup. This does not include loaded file sizes.
$:HeapRemaining The number of bytes in HeapSize that is remaining.
@@ -7615,7 +7615,7 @@ EXPTYPE typedef struct _MILESBANKFUNCTIONS
} MILESBANKFUNCTIONS;
/*
specifies callbacks for each of the Miles event system.
-
+
$:FreeAll Callback that tells you to free all user-side bank memory.
$:GetPreset Callback to retrieve a sound preset.
$:GetEnvironment Callback to retrieve an environment preset.
@@ -7645,13 +7645,13 @@ DXDEC EXPAPI void AILCALL AIL_set_event_sample_functions(HSAMPLE (*CreateSampleC
In the callback, SoundName is the name of the asset in Miles Studio, and SoundFileName
is the value returned from Container_GetSound() (see also $AIL_set_event_bank_functions).
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_event_bank_functions(MILESBANKFUNCTIONS const * Functions);
/*
Allows you to override the internal bank file resource management..
-
+
$:Functions A pointer to a structure containing all the callback functions.
This function is used to completely override the high-level resource management system.
@@ -7856,7 +7856,7 @@ EXPTYPEEND
$:MILES_PLAT_IPHONE Apple iDevices
$:MILES_PLAT_LINUX Linux Flavors
$:MILES_PLAT_WII Nintendo Wii
- $:MILES_PLAT_PSP2 Sony NGP
+ $:MILES_PLAT_PSP2 Sony NGP
Values representing the various platforms the high level tool allows.
*/
@@ -7891,11 +7891,11 @@ EXPGROUP(Miles High Level Event System)
DXDEC EXPAPI void AILCALL AIL_event_system_state(HEVENTSYSTEM system, MILESEVENTSTATE* state);
/*
Returns an information structure about the current state of the Miles Event System.
-
+
$:system The system to retrieve information for, or zero for the default system.
$:state A pointer to a structure to receive the state information.
- This function is a debugging aid - it returns information for the event system.
+ This function is a debugging aid - it returns information for the event system.
*/
DXDEC EXPAPI U32 AILCALL AIL_event_system_command_queue_remaining();
@@ -7923,7 +7923,7 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_length(char const* i_EventName);
// Callback for the error handler.
EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_Resource);
/*
- The function prototype to use for a callback that will be made when the event system
+ The function prototype to use for a callback that will be made when the event system
encounters an unrecoverable error.
$:i_RelevantId The ID of the asset that encountered the error, as best known. EventID or SoundID.
@@ -7937,7 +7937,7 @@ EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_
EXPAPI typedef S32 AILCALLBACK MSS_USER_RAND( void );
/*
The function definition to use when defining your own random function.
-
+
You can define a function with this prototype and pass it to $AIL_register_random
if you want to tie the Miles random calls in with your game's (for logging and such).
*/
@@ -7953,7 +7953,7 @@ DXDEC EXPAPI void AILCALL AIL_set_event_error_callback(AILEVENTERRORCB * i_Error
can sometimes be somewhat invisible. This function allows you to see what went wrong,
when it went wrong.
- The basic usage is to have the callback check $AIL_last_error() for the overall category of
+ The basic usage is to have the callback check $AIL_last_error() for the overall category of
failure. The parameter passed to the callback might provide some context, but it can and will
be zero on occasion. Generally it will represent the resource string that is being worked on when the error
occurred.
@@ -8009,7 +8009,7 @@ typedef C8 * (AILCALL *FLT_ERROR)(void);
typedef HDRIVERSTATE (AILCALL *FLT_OPEN_DRIVER) (MSS_ALLOC_TYPE * palloc,
MSS_FREE_TYPE * pfree,
- UINTa user,
+ UINTa user,
HDIGDRIVER dig, void * memory);
typedef FLTRESULT (AILCALL *FLT_CLOSE_DRIVER) (HDRIVERSTATE state);
diff --git a/Minecraft.Client/Durango/Miles/include/rrCore.h b/Minecraft.Client/Durango/Miles/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/Durango/Miles/include/rrCore.h
+++ b/Minecraft.Client/Durango/Miles/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/Durango/Network/DQRNetworkManager.cpp b/Minecraft.Client/Durango/Network/DQRNetworkManager.cpp
index 8d502d23..39dc53a9 100644
--- a/Minecraft.Client/Durango/Network/DQRNetworkManager.cpp
+++ b/Minecraft.Client/Durango/Network/DQRNetworkManager.cpp
@@ -43,7 +43,7 @@ DQRNetworkManager::SessionInfo::SessionInfo()
}
// This maps internal to extern states, and needs to match element-by-element the eSQRNetworkManagerInternalState enumerated type
-const DQRNetworkManager::eDQRNetworkManagerState DQRNetworkManager::m_INTtoEXTStateMappings[DQRNetworkManager::DNM_INT_STATE_COUNT] =
+const DQRNetworkManager::eDQRNetworkManagerState DQRNetworkManager::m_INTtoEXTStateMappings[DQRNetworkManager::DNM_INT_STATE_COUNT] =
{
DNM_STATE_INITIALISING, // DNM_INT_STATE_INITIALISING
DNM_STATE_INITIALISE_FAILED, // DNM_INT_STATE_INITIALISE_FAILED
@@ -64,7 +64,7 @@ const DQRNetworkManager::eDQRNetworkManagerState DQRNetworkManager::m_INTtoEXTSt
DNM_STATE_PLAYING, // DNM_INT_STATE_PLAYING
DNM_STATE_LEAVING, // DNM_INT_STATE_LEAVING
DNM_STATE_LEAVING, // DNM_INT_STATE_LEAVING_FAILED
- DNM_STATE_ENDING, // DNM_INT_STATE_ENDING
+ DNM_STATE_ENDING, // DNM_INT_STATE_ENDING
};
DQRNetworkManager::DQRNetworkManager(IDQRNetworkManagerListener *listener)
@@ -146,7 +146,7 @@ void DQRNetworkManager::EnableDebugXBLContext(MXS::XboxLiveContext^ XBLContext)
// Show service calls from Xbox Services on the UI for easy debugging
XBLContext->Settings->EnableServiceCallRoutedEvents = true;
- XBLContext->Settings->ServiceCallRouted += ref new Windows::Foundation::EventHandler<Microsoft::Xbox::Services::XboxServiceCallRoutedEventArgs^>(
+ XBLContext->Settings->ServiceCallRouted += ref new Windows::Foundation::EventHandler<Microsoft::Xbox::Services::XboxServiceCallRoutedEventArgs^>(
[=]( Platform::Object^, Microsoft::Xbox::Services::XboxServiceCallRoutedEventArgs^ args )
{
//if( args->HttpStatus != 200 )
@@ -308,14 +308,14 @@ void DQRNetworkManager::JoinSession(int playerMask)
m_isHosting = false;
sockaddr_in6 localSocketAddressStorage;
-
+
ZeroMemory(&localSocketAddressStorage, sizeof(localSocketAddressStorage));
-
+
localSocketAddressStorage.sin6_family = AF_INET6;
localSocketAddressStorage.sin6_port = htons(m_associationTemplate->AcceptorSocketDescription->BoundPortRangeLower);
-
+
memcpy(&localSocketAddressStorage.sin6_addr, &in6addr_any, sizeof(in6addr_any));
-
+
m_localSocketAddress = Platform::ArrayReference<BYTE>(reinterpret_cast<BYTE*>(&localSocketAddressStorage), sizeof(localSocketAddressStorage));
m_joinCreateSessionAttempts = 0;
@@ -402,7 +402,7 @@ bool DQRNetworkManager::AddUsersToSession(int playerMask, MXSM::MultiplayerSessi
// We need to get a MultiplayerSession for each player that is joining
MXSM::MultiplayerSession^ session = nullptr;
-
+
WXS::User^ newUser = ProfileManager.GetUser(i);
if( newUser == nullptr )
{
@@ -451,12 +451,12 @@ bool DQRNetworkManager::AddLocalPlayerByUserIndex(int userIndex)
// We need to handle this differently for the host and other machines. As the procedure for adding a reserved slot for a local player whilst on the host doesn't seem to work
//
// On the host machine, we:
- //
+ //
// (1) Get a MPSD for the player that is being added
// (2) Call the join method
// (3) Write the MPSD
// (4) Update the player sync data, and broadcast out to all clients
-
+
// On remote machines, we:
//
// (1) join the party
@@ -473,10 +473,10 @@ bool DQRNetworkManager::AddLocalPlayerByUserIndex(int userIndex)
{
return false;
}
-
+
if( !m_isOfflineGame )
{
- // This is going to involve some async processing
+ // This is going to involve some async processing
MXS::XboxLiveContext^ newUserXBLContext = ref new MXS::XboxLiveContext(newUser);
if( newUserXBLContext == nullptr )
@@ -558,7 +558,7 @@ bool DQRNetworkManager::AddLocalPlayerByUserIndex(int userIndex)
SendRoomSyncInfo();
m_listener->HandlePlayerJoined(pPlayer); // This is for notifying of local players joining in an offline game
}
- else
+ else
{
// Can fail (notably if m_roomSyncData contains players who've left)
assert(0);
@@ -571,7 +571,7 @@ bool DQRNetworkManager::AddLocalPlayerByUserIndex(int userIndex)
{
// Check if there's any available slots before attempting to add the player to the party. We can still fail joining later if
// the host can't add a reserved slot for us for some reason but better checking on the client side before even attempting.
-
+
WXS::User^ newUser = ProfileManager.GetUser(userIndex);
MXS::XboxLiveContext^ newUserXBLContext = ref new MXS::XboxLiveContext(newUser);
@@ -622,16 +622,16 @@ bool DQRNetworkManager::AddLocalPlayerByUserIndex(int userIndex)
bool DQRNetworkManager::RemoveLocalPlayerByUserIndex(int userIndex)
{
- // We need to handle this differently for the host and other machines.
+ // We need to handle this differently for the host and other machines.
//
// On the host machine, we:
- //
+ //
// (1) Get a MPSD for the player that is being removed
// (2) Call the leave method
// (3) Write the MPSD
// (4) Leave the party
// (5) Update the player sync data, and broadcast out to all clients
-
+
// On remote machines, we:
//
// (1) Get a MPSD for the player that is being removed
@@ -651,7 +651,7 @@ bool DQRNetworkManager::RemoveLocalPlayerByUserIndex(int userIndex)
{
return false;
}
-
+
if( !m_isOfflineGame )
{
if( m_chat )
@@ -714,7 +714,7 @@ bool DQRNetworkManager::IsHost()
}
// Consider as "in session" from the moment that a game is created or joined, until the point where the game itself has been told via state change that we are now idle. The
-// game code requires IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
+// game code requires IsInSession to return true as soon as it has asked to do one of these things (even if the state system hasn't really caught up with this request yet), and
// it also requires that it is informed of the state changes leading up to not being in the session, before this should report false.
bool DQRNetworkManager::IsInSession()
{
@@ -788,7 +788,7 @@ wstring DQRNetworkManager::GetDisplayNameByGamertag(wstring gamertag)
{
return m_displayNames[gamertag];
}
- else
+ else
{
return gamertag;
}
@@ -902,14 +902,14 @@ void DQRNetworkManager::Tick_VoiceChat()
{
m_chat->AddLocalUser(user);
}
- }
+ }
}
m_vecChatPlayersJoined.clear();
LeaveCriticalSection(&m_csVecChatPlayers);
}
void DQRNetworkManager::Tick_Party()
-{
+{
// If the primary player has been flagged as having left the party, then we don't respond immediately as it is possible we are just transitioning from one party to another, and it would be much
// nicer to handle this kind of transition directly. If we do get a new party within this time period, then we'll handle by asking the user if they want to leave the game they are currently in etc.
if( m_playersLeftParty )
@@ -919,7 +919,7 @@ void DQRNetworkManager::Tick_Party()
// We've waited long enough. User must (hopefully) have just left the party
// Previously we'd switch to offline but that causes a world of pain with forced sign-outs
if( m_playersLeftParty & 1 )
- {
+ {
// Before we switch to an offline game, check to see if there is currently a new party. If this is the case and
// we're here, then its because we were added to a party, but didn't receive a gamesessionready event. So if we have
// a party here that we've joined, and the number of players in the party (including us) is more than MAX_PLAYERS_IN_TEMPLATE,
@@ -955,7 +955,7 @@ void DQRNetworkManager::Tick_Party()
m_playersLeftParty = 0;
}
}
-
+
// Forced sign out
if (m_handleForcedSignOut)
{
@@ -1064,7 +1064,7 @@ void DQRNetworkManager::Tick_ResolveGamertags()
HostGamertagResolveDetails *details = m_hostGamertagResolveResults.front();
details->m_pPlayer->SetName(details->m_name.c_str());
-
+
LogComment("Adding a player");
if( AddRoomSyncPlayer(details->m_pPlayer, details->m_sessionAddress, details->m_channel ) )
{
@@ -1154,7 +1154,7 @@ void DQRNetworkManager::Tick_StateMachine()
break;
case DNM_INT_STATE_JOINING_SENDING_UNRELIABLE:
{
- __int64 timeNow = System::currentTimeMillis();
+ int64_t timeNow = System::currentTimeMillis();
// m_firstUnreliableSendTime of 0 indicates that we haven't tried sending an unreliable packet yet so need to send one and initialise things
if( m_firstUnreliableSendTime == 0 )
{
@@ -1188,7 +1188,7 @@ void DQRNetworkManager::Tick_StateMachine()
{
// Timeout if we've been waiting for reserved slots for our joining players for too long. This is most likely because the host doesn't have room for all the slots we wanted, and we weren't able to determine this
// when we went to join the game (ie someone else was joining at the same time). At this point we need to remove any local players that did already join, from both the session and the party.
- __int64 timeNow = System::currentTimeMillis();
+ int64_t timeNow = System::currentTimeMillis();
if( ( timeNow - m_startedWaitingForReservationsTime ) > JOIN_RESERVATION_WAIT_TIME )
{
SetState(DNM_INT_STATE_JOINING_FAILED_TIDY_UP);
@@ -1332,7 +1332,7 @@ void DQRNetworkManager::HandleSessionChange(MXSM::MultiplayerSession^ multiplaye
{
((DurangoStats*)GenericStats::getInstance())->setMultiplayerCorrelationId( nullptr );
}
-
+
m_multiplayerSession = multiplayerSession;
}
@@ -1362,7 +1362,7 @@ MXSM::MultiplayerSession^ DQRNetworkManager::WriteSessionHelper( MXS::XboxLiveCo
})
.wait();
- if( outputMultiplayerSession != nullptr &&
+ if( outputMultiplayerSession != nullptr &&
outputMultiplayerSession->SessionReference != nullptr )
{
app.DebugPrintf( "Session written OK\n" );
@@ -1422,7 +1422,7 @@ WXM::MultiplayerSessionReference^ DQRNetworkManager::ConvertToWindowsXboxMultipl
{
return ref new WXM::MultiplayerSessionReference(
sessionRef->SessionName,
- sessionRef->ServiceConfigurationId,
+ sessionRef->ServiceConfigurationId,
sessionRef->SessionTemplateName
);
}
@@ -1458,7 +1458,7 @@ void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData)
// And when we are done, anything left in the temporary vector must be a player that left
for( int i = 0; i < pNewSyncData->playerCount; i++ )
{
- PlayerSyncData *pNewPlayer = &pNewSyncData->players[i];
+ PlayerSyncData *pNewPlayer = &pNewSyncData->players[i];
bool bAlreadyExisted = false;
for (auto it = tempPlayers.begin(); it != tempPlayers.end(); it++)
{
@@ -1491,7 +1491,7 @@ void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData)
}
LogCommentFormat(L"Adding new player, index %d - type %d, small Id %d, name %s, xuid %s\n",i,m_players[i]->m_type,pNewPlayer->m_smallId,pNewPlayer->m_name,pNewPlayer->m_XUID);
-
+
m_players[i]->SetSmallId(pNewPlayer->m_smallId);
m_players[i]->SetName(pNewPlayer->m_name);
m_players[i]->SetUID(PlayerUID(pNewPlayer->m_XUID));
@@ -1525,7 +1525,7 @@ void DQRNetworkManager::UpdateRoomSyncPlayers(RoomSyncData *pNewSyncData)
bool DQRNetworkManager::AddRoomSyncPlayer(DQRNetworkPlayer *pPlayer, unsigned int sessionAddress, int channel)
{
if( m_roomSyncData.playerCount == MAX_ONLINE_PLAYER_COUNT ) return false;
-
+
EnterCriticalSection(&m_csRoomSyncData);
// Find the first entry that isn't us, to decide what to sync before. Don't consider entry #0 as this is reserved to indicate the host.
int insertAtIdx = m_roomSyncData.playerCount;
@@ -1552,11 +1552,11 @@ bool DQRNetworkManager::AddRoomSyncPlayer(DQRNetworkPlayer *pPlayer, unsigned in
{
m_roomSyncData.players[i] = m_roomSyncData.players[i-1];
m_players[i] = m_players[i - 1];
- }
+ }
m_roomSyncData.players[insertAtIdx].m_channel = channel;
m_roomSyncData.players[insertAtIdx].m_sessionAddress = sessionAddress;
int xuidLength = pPlayer->GetUID().toString().length() + 1; // +1 for terminator
- m_roomSyncData.players[insertAtIdx].m_XUID = new wchar_t [xuidLength];
+ m_roomSyncData.players[insertAtIdx].m_XUID = new wchar_t [xuidLength];
wcsncpy(m_roomSyncData.players[insertAtIdx].m_XUID, pPlayer->GetUID().toString().c_str(), xuidLength);
m_roomSyncData.players[insertAtIdx].m_smallId = pPlayer->GetSmallId();
wcscpy_s(m_roomSyncData.players[insertAtIdx].m_name, pPlayer->GetName());
@@ -1587,7 +1587,7 @@ void DQRNetworkManager::RemoveRoomSyncPlayersWithSessionAddress(unsigned int ses
{
m_roomSyncData.players[iWriteIdx] = m_roomSyncData.players[i];
m_players[iWriteIdx] = m_players[i];
- iWriteIdx++;
+ iWriteIdx++;
}
}
m_roomSyncData.playerCount = iWriteIdx;
@@ -1618,7 +1618,7 @@ void DQRNetworkManager::RemoveRoomSyncPlayer(DQRNetworkPlayer *pPlayer)
{
m_roomSyncData.players[iWriteIdx] = m_roomSyncData.players[i];
m_players[iWriteIdx] = m_players[i];
- iWriteIdx++;
+ iWriteIdx++;
}
}
m_roomSyncData.playerCount = iWriteIdx;
@@ -1659,13 +1659,13 @@ void DQRNetworkManager::SendRoomSyncInfo()
uint32_t sizeHigh = internalBytes >> 8;
uint32_t sizeLow = internalBytes & 0xff;
- data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
+ data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
data[2] = DQR_INTERNAL_PLAYER_TABLE;
memcpy(data + 3, &xuidBytes, 4);
memcpy(data + 7, &m_roomSyncData, sizeof(RoomSyncData));
- unsigned char *pucCurr = data + 7 + sizeof(RoomSyncData);
+ unsigned char *pucCurr = data + 7 + sizeof(RoomSyncData);
for( int i = 0 ; i < m_roomSyncData.playerCount; i++ )
{
@@ -1701,12 +1701,12 @@ void DQRNetworkManager::SendAddPlayerFailed(Platform::String^ xuid)
uint32_t sizeHigh = internalBytes >> 8;
uint32_t sizeLow = internalBytes & 0xff;
- data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
+ data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
data[2] = DQR_INTERNAL_ADD_PLAYER_FAILED;
memcpy(data + 3, &xuidBytes, 4);
- memcpy(data + 7, xuid->Data(), xuidBytes);
+ memcpy(data + 7, xuid->Data(), xuidBytes);
SendBytesRaw(-1, data, totalBytes, true);
@@ -1927,7 +1927,7 @@ int DQRNetworkManager::HostGameThreadProc()
// Actually create the session (locally), using the primary player's context
try
{
- session = ref new MXSM::MultiplayerSession( primaryUserXBLContext,
+ session = ref new MXSM::MultiplayerSession( primaryUserXBLContext,
ref new MXSM::MultiplayerSessionReference( SERVICE_CONFIG_ID, MATCH_SESSION_TEMPLATE_NAME, sessionName ),
0, // this means that it will use the maxMembers specified in the session template.
false,
@@ -1972,7 +1972,7 @@ int DQRNetworkManager::HostGameThreadProc()
session->Join( GetNextSmallIdAsJsonString(), true );
session->SetCurrentUserStatus( MXSM::MultiplayerSessionMemberStatus::Active );
-
+
// Get device ID for current user & set in the session
Platform::String^ secureDeviceAddress = WXN::SecureDeviceAddress::GetLocal()->GetBase64String();
session->SetCurrentUserSecureDeviceAddressBase64( secureDeviceAddress );
@@ -1997,7 +1997,7 @@ int DQRNetworkManager::HostGameThreadProc()
return 0;
}
m_partyController->SetJoinability(m_listener->IsSessionJoinable());
-
+
// Add reservations for anyone in the party, who isn't the primary player. Just adding local players for now, but perhaps this should add
// other party members at this stage?
for ( WXM::PartyMember^ member : partyView->Members )
@@ -2029,8 +2029,8 @@ int DQRNetworkManager::HostGameThreadProc()
session->SetHostDeviceToken( hostMember->DeviceToken );
m_partyController->RegisterGamePlayersChangedEventHandler();
-
- // Update session on the server
+
+ // Update session on the server
HRESULT hr = S_OK;
session = WriteSessionHelper( primaryUserXBLContext, session, MXSM::MultiplayerSessionWriteMode::UpdateExisting, hr );
@@ -2086,14 +2086,14 @@ int DQRNetworkManager::HostGameThreadProc()
if( m_state == DNM_INT_STATE_HOSTING_FAILED) return 0;
sockaddr_in6 localSocketAddressStorage;
-
+
ZeroMemory(&localSocketAddressStorage, sizeof(localSocketAddressStorage));
-
+
localSocketAddressStorage.sin6_family = AF_INET6;
localSocketAddressStorage.sin6_port = htons(m_associationTemplate->AcceptorSocketDescription->BoundPortRangeLower);
-
+
memcpy(&localSocketAddressStorage.sin6_addr, &in6addr_any, sizeof(in6addr_any));
-
+
m_localSocketAddress = Platform::ArrayReference<BYTE>(reinterpret_cast<BYTE*>(&localSocketAddressStorage), sizeof(localSocketAddressStorage));
// This shouldn't ever happen, but seems worth checking that we don't have a pre-existing session in case there's any way to get here with one already running
@@ -2184,7 +2184,7 @@ int DQRNetworkManager::HostGameThreadProc()
if( m_currentUserMask & ( 1 << i ) && ProfileManager.IsSignedIn(i))
{
auto user = ProfileManager.GetUser(i);
- wstring displayName = ProfileManager.GetDisplayName(i);
+ wstring displayName = ProfileManager.GetDisplayName(i);
DQRNetworkPlayer* pPlayer = new DQRNetworkPlayer(this, ( ( smallId == m_hostSmallId ) ? DQRNetworkPlayer::DNP_TYPE_HOST : DQRNetworkPlayer::DNP_TYPE_LOCAL ), true, i, localSessionAddress);
pPlayer->SetSmallId(smallId);
@@ -2234,7 +2234,7 @@ int DQRNetworkManager::LeaveRoomThreadProc()
// Request RTS to be terminated
RTS_Terminate();
-
+
// Now leave the game session. We need to do this for each player in turn, writing each time
bool bError = false;
for( int i = 0; i < 4; i++ )
@@ -2339,7 +2339,7 @@ int DQRNetworkManager::TidyUpJoinThreadProc()
// We can fail to join at various points, and in at least one case (if it is down to RUDP unreliable packets timing out) then we don't have m_joinSessionUserMask bits set any more,
// but we Do have m_currentUserMask set. Any of these should be considered users we should be attempting to remove from the session.
- int removeSessionMask = m_joinSessionUserMask | m_currentUserMask;
+ int removeSessionMask = m_joinSessionUserMask | m_currentUserMask;
for( int i = 0; i < 4; i++ )
{
if( removeSessionMask & ( 1 << i ) )
@@ -2428,7 +2428,7 @@ int DQRNetworkManager::UpdateCustomSessionDataThreadProc()
{
LogComment(L"Starting thread to update custom data");
WXS::User^ primaryUser = ProfileManager.GetUser(0);
-
+
if( primaryUser == nullptr )
{
return 0;
@@ -2550,7 +2550,7 @@ void DQRNetworkManager::HandlePlayerRemovedFromParty(int playerMask)
{
// As a client, we don't have any messy changing to offline game or saving etc. to do, so we can respond immediately to leaving the party
if( playerMask & 1 )
- {
+ {
DQRNetworkManager::LogComment(L"Primary player on this system has left the party - leaving game\n");
app.SetDisconnectReason(DisconnectPacket::eDisconnect_ExitedGame);
LeaveRoom();
@@ -2725,7 +2725,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
m_joinSessionUserMask = playerMask;
m_isInSession = true;
m_isOfflineGame = false;
-
+
m_startedWaitingForReservationsTime = System::currentTimeMillis();
SetState(DNM_INT_STATE_JOINING_WAITING_FOR_RESERVATIONS);
@@ -2742,7 +2742,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
if( sessionRef != nullptr )
{
// Allow 2 seconds before we let the player cancel
- __int64 allowCancelTime = System::currentTimeMillis() + (1000 * 2);
+ int64_t allowCancelTime = System::currentTimeMillis() + (1000 * 2);
// Now leave the game session. We need to do this for each player in turn, writing each time. Consider that any of the joining
// members *may* have a slot (reserved or active) depending on how far progressed the joining got.
@@ -2814,7 +2814,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
break;
}
- __int64 currentTime = System::currentTimeMillis();
+ int64_t currentTime = System::currentTimeMillis();
if( currentTime > allowCancelTime)
{
shownCancelScreen = true;
@@ -2893,7 +2893,7 @@ bool DQRNetworkManager::JoinPartyFromSearchResult(SessionSearchResult *searchRes
SetState(DNM_INT_STATE_JOINING_FAILED);
}
});
-
+
while(!ccTask.is_done())
{
@@ -3013,7 +3013,7 @@ void DQRNetworkManager::RequestDisplayName(DQRNetworkPlayer *player)
{
if (player->IsLocal())
{
- // Player is local so we can just ask profile manager
+ // Player is local so we can just ask profile manager
SetDisplayName(player->GetUID(), ProfileManager.GetDisplayName(player->GetLocalPlayerIndex()));
}
else
diff --git a/Minecraft.Client/Durango/Network/DQRNetworkManager.h b/Minecraft.Client/Durango/Network/DQRNetworkManager.h
index 5f7b8d90..3c4a742c 100644
--- a/Minecraft.Client/Durango/Network/DQRNetworkManager.h
+++ b/Minecraft.Client/Durango/Network/DQRNetworkManager.h
@@ -131,7 +131,7 @@ public:
static const int MAX_ONLINE_PLAYER_COUNT = 8;
static const int MAX_ONLINE_PLAYER_NAME_LENGTH = 21;
- // This class stores everything about a player that must be synchronised between machines.
+ // This class stores everything about a player that must be synchronised between machines.
class PlayerSyncData
{
public:
@@ -210,7 +210,7 @@ public:
DNM_STATE_JOINING,
DNM_STATE_STARTING,
- DNM_STATE_PLAYING,
+ DNM_STATE_PLAYING,
DNM_STATE_LEAVING,
DNM_STATE_ENDING,
@@ -339,9 +339,9 @@ private:
static const eDQRNetworkManagerState m_INTtoEXTStateMappings[DNM_INT_STATE_COUNT];
eDQRNetworkManagerInternalState m_state;
eDQRNetworkManagerState m_stateExternal;
- __int64 m_lastUnreliableSendTime;
- __int64 m_firstUnreliableSendTime;
- __int64 m_startedWaitingForReservationsTime;
+ int64_t m_lastUnreliableSendTime;
+ int64_t m_firstUnreliableSendTime;
+ int64_t m_startedWaitingForReservationsTime;
unsigned char *m_customSessionData;
unsigned int m_customSessionDataSize;
int m_customDataDirtyUpdateTicks;
@@ -361,7 +361,7 @@ private:
CRITICAL_SECTION m_csRoomSyncData;
RoomSyncData m_roomSyncData;
- DQRNetworkPlayer *m_players[MAX_ONLINE_PLAYER_COUNT];
+ DQRNetworkPlayer *m_players[MAX_ONLINE_PLAYER_COUNT];
IDQRNetworkManagerListener *m_listener;
PartyController *m_partyController;
@@ -389,7 +389,7 @@ private:
int m_joinCreateSessionAttempts;
C4JThread *m_CreateSessionThread;
- C4JThread *m_LeaveRoomThread;
+ C4JThread *m_LeaveRoomThread;
C4JThread *m_TidyUpJoinThread;
C4JThread *m_UpdateCustomSessionDataThread;
C4JThread *m_RTS_DoWorkThread;
@@ -426,7 +426,7 @@ private:
int GetQueueSizeMessages();
void SendBytesRaw(int smallId, BYTE *bytes, int byteCount, bool reliableAndSequential);
void SendBytesChat(unsigned int address, BYTE *bytes, int byteCount, bool reliable, bool sequential, bool broadcast);
-
+
bool AddRoomSyncPlayer(DQRNetworkPlayer *pPlayer, unsigned int sessionAddress, int channel);
void RemoveRoomSyncPlayersWithSessionAddress(unsigned int sessionAddress);
void RemoveRoomSyncPlayer(DQRNetworkPlayer *pPlayer);
@@ -438,7 +438,7 @@ private:
int GetSessionIndexForSmallId(unsigned char smallId);
int GetSessionIndexAndSmallIdForHost(unsigned char *smallId);
- static void LogComment( Platform::String^ strText );
+ static void LogComment( Platform::String^ strText );
static void LogCommentFormat( LPCWSTR strMsg, ... );
static void LogCommentWithError( Platform::String^ strTest, HRESULT hr );
@@ -491,7 +491,7 @@ public:
void SetDisplayName(PlayerUID xuid, wstring displayName);
private:
- __int64 m_playersLeftPartyTime;
+ int64_t m_playersLeftPartyTime;
int m_playersLeftParty;
bool GetBestPartyUserIndex();
@@ -502,7 +502,7 @@ private:
bool GetGameSessionData(MXSM::MultiplayerSession^ session, void *gameSessionData);
public:
- static Platform::Collections::Vector<Platform::String^>^ GetFriends();
+ static Platform::Collections::Vector<Platform::String^>^ GetFriends();
private:
SessionSearchResult *m_sessionSearchResults;
@@ -551,7 +551,7 @@ private:
void Process_RTS_MESSAGE_STATUS_TERMINATED(RTS_Message &message);
// Outgoing messages - to be called from the RTS work thread, to process requests from the main thread
-
+
void ProcessRTSMessagesOutgoing();
void Process_RTS_MESSAGE_START_CLIENT(RTS_Message &message);
void Process_RTS_MESSAGE_START_HOST(RTS_Message &message);
diff --git a/Minecraft.Client/Durango/XML/ATGXmlParser.cpp b/Minecraft.Client/Durango/XML/ATGXmlParser.cpp
index fc5aed08..771ba268 100644
--- a/Minecraft.Client/Durango/XML/ATGXmlParser.cpp
+++ b/Minecraft.Client/Durango/XML/ATGXmlParser.cpp
@@ -1,13 +1,13 @@
-// 4J-PB -
-// The ATG Framework is a common set of C++ class libraries that is used by the samples in the XDK, and was developed by the Advanced Technology Group (ATG).
-// The ATG Framework offers a clean and consistent format for the samples. These classes define functions used by all the samples.
-// The ATG Framework together with the samples demonstrates best practices and innovative techniques for Xbox 360. There are many useful sections of code in the samples.
-// You are encouraged to incorporate this code into your titles.
+// 4J-PB -
+// The ATG Framework is a common set of C++ class libraries that is used by the samples in the XDK, and was developed by the Advanced Technology Group (ATG).
+// The ATG Framework offers a clean and consistent format for the samples. These classes define functions used by all the samples.
+// The ATG Framework together with the samples demonstrates best practices and innovative techniques for Xbox 360. There are many useful sections of code in the samples.
+// You are encouraged to incorporate this code into your titles.
//-------------------------------------------------------------------------------------
// AtgXmlParser.cpp
-//
+//
// Simple callback non-validating XML parser implementation.
//
// Xbox Advanced Technology Group.
@@ -35,7 +35,7 @@ XMLParser::XMLParser()
// Name: XMLParser::~XMLParser
//-------------------------------------------------------------------------------------
XMLParser::~XMLParser()
-{
+{
}
@@ -51,11 +51,11 @@ VOID XMLParser::FillBuffer()
if( m_hFile == NULL )
{
- if( m_uInXMLBufferCharsLeft > XML_READ_BUFFER_SIZE )
+ if( m_uInXMLBufferCharsLeft > XML_READ_BUFFER_SIZE )
NChars = XML_READ_BUFFER_SIZE;
else
NChars = m_uInXMLBufferCharsLeft;
-
+
CopyMemory( m_pReadBuf, m_pInXMLBuffer, NChars );
m_uInXMLBufferCharsLeft -= NChars;
m_pInXMLBuffer += NChars;
@@ -69,7 +69,7 @@ VOID XMLParser::FillBuffer()
}
m_dwCharsConsumed += NChars;
- __int64 iProgress = m_dwCharsTotal ? (( (__int64)m_dwCharsConsumed * 1000 ) / (__int64)m_dwCharsTotal) : 0;
+ int64_t iProgress = m_dwCharsTotal ? (( (int64_t)m_dwCharsConsumed * 1000 ) / (int64_t)m_dwCharsTotal) : 0;
m_pISAXCallback->SetParseProgress( (DWORD)iProgress );
m_pReadBuf[ NChars ] = '\0';
@@ -89,7 +89,7 @@ VOID XMLParser::SkipNextAdvance()
//-------------------------------------------------------------------------------------
// Name: XMLParser::ConsumeSpace
-// Desc: Skips spaces in the current stream
+// Desc: Skips spaces in the current stream
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ConsumeSpace()
{
@@ -104,29 +104,29 @@ HRESULT XMLParser::ConsumeSpace()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
- }
- SkipNextAdvance();
+ }
+ SkipNextAdvance();
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::ConvertEscape
-// Desc: Copies and converts an escape sequence into m_pWriteBuf
+// Desc: Copies and converts an escape sequence into m_pWriteBuf
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ConvertEscape()
-{
+{
HRESULT hr;
WCHAR wVal = 0;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
- // all escape sequences start with &, so ignore the first character
-
+ // all escape sequences start with &, so ignore the first character
+
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
if ( m_Ch == '#' ) // character as hex or decimal
{
if( FAILED( hr = AdvanceCharacter() ) )
@@ -135,9 +135,9 @@ HRESULT XMLParser::ConvertEscape()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
while ( m_Ch != ';' )
- {
+ {
wVal *= 16;
if ( ( m_Ch >= '0' ) && ( m_Ch <= '9' ) )
@@ -151,11 +151,11 @@ HRESULT XMLParser::ConvertEscape()
else if ( ( m_Ch >= 'A' ) && ( m_Ch <= 'F' ) )
{
wVal += m_Ch - 'A' + 10;
- }
+ }
else
{
- Error( E_INVALID_XML_SYNTAX, "Expected hex digit as part of &#x escape sequence" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Expected hex digit as part of &#x escape sequence" );
+ return E_INVALID_XML_SYNTAX;
}
if( FAILED( hr = AdvanceCharacter() ) )
@@ -165,7 +165,7 @@ HRESULT XMLParser::ConvertEscape()
else // decimal number
{
while ( m_Ch != ';' )
- {
+ {
wVal *= 10;
if ( ( m_Ch >= '0' ) && ( m_Ch <= '9' ) )
@@ -174,7 +174,7 @@ HRESULT XMLParser::ConvertEscape()
}
else
{
- Error( E_INVALID_XML_SYNTAX, "Expected decimal digit as part of &# escape sequence" );
+ Error( E_INVALID_XML_SYNTAX, "Expected decimal digit as part of &# escape sequence" );
return E_INVALID_XML_SYNTAX;
}
@@ -187,7 +187,7 @@ HRESULT XMLParser::ConvertEscape()
m_Ch = wVal;
return S_OK;
- }
+ }
// must be an entity reference
@@ -197,13 +197,13 @@ HRESULT XMLParser::ConvertEscape()
SkipNextAdvance();
if( FAILED( hr = AdvanceName() ) )
return hr;
-
+
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
m_pWritePtr = pEntityRefVal;
if ( EntityRefLen == 0 )
{
- Error( E_INVALID_XML_SYNTAX, "Expecting entity name after &" );
+ Error( E_INVALID_XML_SYNTAX, "Expecting entity name after &" );
return E_INVALID_XML_SYNTAX;
}
@@ -219,7 +219,7 @@ HRESULT XMLParser::ConvertEscape()
wVal = '"';
else
{
- Error( E_INVALID_XML_SYNTAX, "Unrecognized entity name after & - (should be lt, gt, amp, apos, or quot)" );
+ Error( E_INVALID_XML_SYNTAX, "Unrecognized entity name after & - (should be lt, gt, amp, apos, or quot)" );
return E_INVALID_XML_SYNTAX; // return false if unrecognized token sequence
}
@@ -228,10 +228,10 @@ HRESULT XMLParser::ConvertEscape()
if( m_Ch != ';' )
{
- Error( E_INVALID_XML_SYNTAX, "Expected terminating ; for entity reference" );
+ Error( E_INVALID_XML_SYNTAX, "Expected terminating ; for entity reference" );
return E_INVALID_XML_SYNTAX; // malformed reference - needs terminating ;
}
-
+
m_Ch = wVal;
return S_OK;
}
@@ -250,41 +250,41 @@ HRESULT XMLParser::AdvanceAttrVal()
return hr;
if( ( m_Ch != '"' ) && ( m_Ch != '\'' ) )
- {
- Error( E_INVALID_XML_SYNTAX, "Attribute values must be enclosed in quotes" );
+ {
+ Error( E_INVALID_XML_SYNTAX, "Attribute values must be enclosed in quotes" );
return E_INVALID_XML_SYNTAX;
}
wQuoteChar = m_Ch;
-
+
for( ;; )
{
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- else if( m_Ch == wQuoteChar )
- break;
+ return hr;
+ else if( m_Ch == wQuoteChar )
+ break;
else if( m_Ch == '&' )
{
SkipNextAdvance();
if( FAILED( hr = ConvertEscape() ) )
- return hr;
+ return hr;
}
- else if( m_Ch == '<' )
+ else if( m_Ch == '<' )
{
- Error( E_INVALID_XML_SYNTAX, "Illegal character '<' in element tag" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Illegal character '<' in element tag" );
+ return E_INVALID_XML_SYNTAX;
}
-
+
// copy character into the buffer
-
- if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
+
+ if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
- Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
+ return E_INVALID_XML_SYNTAX;
}
-
+
*m_pWritePtr = m_Ch;
- m_pWritePtr++;
+ m_pWritePtr++;
}
return S_OK;
}
@@ -296,18 +296,18 @@ HRESULT XMLParser::AdvanceAttrVal()
// Ignores leading whitespace. Currently does not support unicode names
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceName()
-{
+{
HRESULT hr;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( ( ( m_Ch < 'A' ) || ( m_Ch > 'Z' ) ) &&
( ( m_Ch < 'a' ) || ( m_Ch > 'z' ) ) &&
( m_Ch != '_' ) && ( m_Ch != ':' ) )
{
- Error( E_INVALID_XML_SYNTAX, "Names must start with an alphabetic character or _ or :" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Names must start with an alphabetic character or _ or :" );
+ return E_INVALID_XML_SYNTAX;
}
while( ( ( m_Ch >= 'A' ) && ( m_Ch <= 'Z' ) ) ||
@@ -319,17 +319,17 @@ HRESULT XMLParser::AdvanceName()
if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
- Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
+ Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
return E_INVALID_XML_SYNTAX;
- }
+ }
*m_pWritePtr = m_Ch;
m_pWritePtr++;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
}
-
+
SkipNextAdvance();
return S_OK;
}
@@ -343,7 +343,7 @@ HRESULT XMLParser::AdvanceName()
// Returns S_OK if there are more characters, E_ABORT for no characters to read
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
-{
+{
if( m_bSkipNextAdvance )
{
m_bSkipNextAdvance = FALSE;
@@ -351,20 +351,20 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
}
// If we hit EOF in the middle of a character,
- // it's ok-- we'll just have a corrupt last character
+ // it's ok-- we'll just have a corrupt last character
// (the buffer is padded with double NULLs )
if ( ( m_pReadPtr[0] == '\0' ) && ( m_pReadPtr[1] == '\0' ) )
{
// Read more from the file
- FillBuffer();
+ FillBuffer();
// We are at EOF if it is still NULL
if ( ( m_pReadPtr[0] == '\0' ) && ( m_pReadPtr[1] == '\0' ) )
{
if( !bOkToFail )
{
- Error( E_INVALID_XML_SYNTAX, "Unexpected EOF while parsing XML file" );
+ Error( E_INVALID_XML_SYNTAX, "Unexpected EOF while parsing XML file" );
return E_INVALID_XML_SYNTAX;
}
else
@@ -372,7 +372,7 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
return E_FAIL;
}
}
- }
+ }
if( m_bUnicode == FALSE )
{
@@ -382,13 +382,13 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
else // if( m_bUnicode == TRUE )
{
m_Ch = *((WCHAR *)m_pReadPtr);
-
+
if( m_bReverseBytes )
{
m_Ch = ( m_Ch << 8 ) + ( m_Ch >> 8 );
}
-
- m_pReadPtr += 2;
+
+ m_pReadPtr += 2;
}
if( m_Ch == '\n' )
@@ -398,114 +398,114 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
}
else if( m_Ch != '\r' )
m_pISAXCallback->m_LinePos++;
-
+
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::AdvanceElement
-// Desc: Builds <element> data, calls callback
+// Desc: Builds <element> data, calls callback
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceElement()
-{
+{
HRESULT hr;
// write ptr at the beginning of the buffer
m_pWritePtr = m_pWriteBuf;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ return hr;
+
// if first character wasn't '<', we wouldn't be here
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( m_Ch == '!' )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
if ( m_Ch == '-' )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != '-' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != '-' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '-' after '<!-'" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceComment() ) )
- return hr;
+ if( FAILED( hr = AdvanceComment() ) )
+ return hr;
return S_OK;
}
-
- if( m_Ch != '[' )
+
+ if( m_Ch != '[' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'C' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'C' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'D' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'D' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'A' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'A' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'T' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'T' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'A' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'A' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != '[' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != '[' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCDATA() ) )
+ if( FAILED( hr = AdvanceCDATA() ) )
return hr;
}
- else if( m_Ch == '/' )
+ else if( m_Ch == '/' )
{
WCHAR *pEntityRefVal = m_pWritePtr;
-
- if( FAILED( hr = AdvanceName() ) )
+
+ if( FAILED( hr = AdvanceName() ) )
return hr;
- if( FAILED( m_pISAXCallback->ElementEnd( pEntityRefVal,
+ if( FAILED( m_pISAXCallback->ElementEnd( pEntityRefVal,
(UINT) ( m_pWritePtr - pEntityRefVal ) ) ) )
return E_ABORT;
-
- if( FAILED( hr = ConsumeSpace() ) )
+
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
if( m_Ch != '>' )
{
@@ -513,42 +513,42 @@ HRESULT XMLParser::AdvanceElement()
return E_INVALID_XML_SYNTAX;
}
}
- else if( m_Ch == '?' )
+ else if( m_Ch == '?' )
{
// just skip any xml header tag since not really important after identifying character set
for( ;; )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+
if ( m_Ch == '>' )
return S_OK;
}
}
else
{
- XMLAttribute Attributes[ XML_MAX_ATTRIBUTES_PER_ELEMENT ];
+ XMLAttribute Attributes[ XML_MAX_ATTRIBUTES_PER_ELEMENT ];
UINT NumAttrs;
WCHAR *pEntityRefVal = m_pWritePtr;
UINT EntityRefLen;
NumAttrs = 0;
-
+
SkipNextAdvance();
// Entity tag
- if( FAILED( hr = AdvanceName() ) )
+ if( FAILED( hr = AdvanceName() ) )
return hr;
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
- if( FAILED( hr = ConsumeSpace() ) )
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ return hr;
+
// read attributes
while( ( m_Ch != '>' ) && ( m_Ch != '/' ) )
{
@@ -556,31 +556,31 @@ HRESULT XMLParser::AdvanceElement()
if ( NumAttrs >= XML_MAX_ATTRIBUTES_PER_ELEMENT )
{
- Error( E_INVALID_XML_SYNTAX, "Elements may not have more than %d attributes", XML_MAX_ATTRIBUTES_PER_ELEMENT );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Elements may not have more than %d attributes", XML_MAX_ATTRIBUTES_PER_ELEMENT );
+ return E_INVALID_XML_SYNTAX;
}
Attributes[ NumAttrs ].strName = m_pWritePtr;
-
+
// Attribute name
if( FAILED( hr = AdvanceName() ) )
return hr;
-
+
Attributes[ NumAttrs ].NameLen = (UINT)( m_pWritePtr - Attributes[ NumAttrs ].strName );
if( FAILED( hr = ConsumeSpace() ) )
return hr;
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
- if( m_Ch != '=' )
+ if( m_Ch != '=' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '=' character after attribute name" );
return E_INVALID_XML_SYNTAX;
}
-
- if( FAILED( hr = ConsumeSpace() ) )
+
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
Attributes[ NumAttrs ].strValue = m_pWritePtr;
@@ -588,29 +588,29 @@ HRESULT XMLParser::AdvanceElement()
if( FAILED( hr = AdvanceAttrVal() ) )
return hr;
- Attributes[ NumAttrs ].ValueLen = (UINT)( m_pWritePtr -
+ Attributes[ NumAttrs ].ValueLen = (UINT)( m_pWritePtr -
Attributes[ NumAttrs ].strValue );
++NumAttrs;
-
+
if( FAILED( hr = ConsumeSpace() ) )
- return hr;
+ return hr;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
}
if( m_Ch == '/' )
{
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( m_Ch != '>' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '>' after '/' in element tag" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
+ if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
Attributes, NumAttrs ) ) )
return E_ABORT;
@@ -619,7 +619,7 @@ HRESULT XMLParser::AdvanceElement()
}
else
{
- if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
+ if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
Attributes, NumAttrs ) ) )
return E_ABORT;
}
@@ -637,7 +637,7 @@ HRESULT XMLParser::AdvanceCDATA()
{
HRESULT hr;
WORD wStage = 0;
-
+
if( FAILED( m_pISAXCallback->CDATABegin() ) )
return E_ABORT;
@@ -645,10 +645,10 @@ HRESULT XMLParser::AdvanceCDATA()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
*m_pWritePtr = m_Ch;
m_pWritePtr++;
-
+
if( ( m_Ch == ']' ) && ( wStage == 0 ) )
wStage = 1;
else if( ( m_Ch == ']' ) && ( wStage == 1 ) )
@@ -666,9 +666,9 @@ HRESULT XMLParser::AdvanceCDATA()
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), TRUE ) ) )
return E_ABORT;
m_pWritePtr = m_pWriteBuf;
- }
+ }
}
-
+
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
return E_ABORT;
@@ -676,7 +676,7 @@ HRESULT XMLParser::AdvanceCDATA()
if( FAILED( m_pISAXCallback->CDATAEnd() ) )
return E_ABORT;
-
+
return S_OK;
}
@@ -694,24 +694,24 @@ HRESULT XMLParser::AdvanceComment()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
if (( m_Ch == '-' ) && ( wStage == 0 ))
wStage = 1;
else if (( m_Ch == '-' ) && ( wStage == 1 ))
wStage = 2;
- else if (( m_Ch == '>' ) && ( wStage == 2 ))
- break;
+ else if (( m_Ch == '>' ) && ( wStage == 2 ))
+ break;
else
- wStage = 0;
+ wStage = 0;
}
-
+
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::RegisterSAXCallbackInterface
-// Desc: Registers callback interface
+// Desc: Registers callback interface
//-------------------------------------------------------------------------------------
VOID XMLParser::RegisterSAXCallbackInterface( ISAXCallback *pISAXCallback )
{
@@ -721,7 +721,7 @@ VOID XMLParser::RegisterSAXCallbackInterface( ISAXCallback *pISAXCallback )
//-------------------------------------------------------------------------------------
// Name: XMLParser::GetSAXCallbackInterface
-// Desc: Returns current callback interface
+// Desc: Returns current callback interface
//-------------------------------------------------------------------------------------
ISAXCallback* XMLParser::GetSAXCallbackInterface()
{
@@ -740,7 +740,7 @@ HRESULT XMLParser::MainParseLoop()
if( FAILED( m_pISAXCallback->StartDocument() ) )
return E_ABORT;
-
+
m_pWritePtr = m_pWriteBuf;
FillBuffer();
@@ -751,57 +751,57 @@ HRESULT XMLParser::MainParseLoop()
m_bReverseBytes = FALSE;
m_pReadPtr += 2;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0xFFFE )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0xFFFE )
{
m_bUnicode = TRUE;
m_bReverseBytes = TRUE;
- m_pReadPtr += 2;
+ m_pReadPtr += 2;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0x003C )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0x003C )
{
- m_bUnicode = TRUE;
+ m_bUnicode = TRUE;
m_bReverseBytes = FALSE;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0x3C00 )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0x3C00 )
{
m_bUnicode = TRUE;
- m_bReverseBytes = TRUE;
+ m_bReverseBytes = TRUE;
}
else if ( m_pReadBuf[ 0 ] == 0x3C )
{
- m_bUnicode = FALSE;
- m_bReverseBytes = FALSE;
+ m_bUnicode = FALSE;
+ m_bReverseBytes = FALSE;
}
else
- {
+ {
Error( E_INVALID_XML_SYNTAX, "Unrecognized encoding (parser does not support UTF-8 language encodings)" );
- return E_INVALID_XML_SYNTAX;
+ return E_INVALID_XML_SYNTAX;
}
-
+
for( ;; )
{
if( FAILED( AdvanceCharacter( TRUE ) ) )
{
if ( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
- return E_ABORT;
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
+ return E_ABORT;
bWhiteSpaceOnly = TRUE;
}
-
+
if( FAILED( m_pISAXCallback->EndDocument() ) )
return E_ABORT;
-
- return S_OK;
+
+ return S_OK;
}
if( m_Ch == '<' )
{
if( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
- return E_ABORT;
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
+ return E_ABORT;
bWhiteSpaceOnly = TRUE;
}
@@ -810,45 +810,45 @@ HRESULT XMLParser::MainParseLoop()
m_pWritePtr = m_pWriteBuf;
- if( FAILED( hr = AdvanceElement() ) )
- return hr;
+ if( FAILED( hr = AdvanceElement() ) )
+ return hr;
m_pWritePtr = m_pWriteBuf;
}
- else
+ else
{
if( m_Ch == '&' )
{
SkipNextAdvance();
- if( FAILED( hr = ConvertEscape() ) )
- return hr;
+ if( FAILED( hr = ConvertEscape() ) )
+ return hr;
}
- if( bWhiteSpaceOnly && ( m_Ch != ' ' ) && ( m_Ch != '\n' ) && ( m_Ch != '\r' ) &&
- ( m_Ch != '\t' ) )
+ if( bWhiteSpaceOnly && ( m_Ch != ' ' ) && ( m_Ch != '\n' ) && ( m_Ch != '\r' ) &&
+ ( m_Ch != '\t' ) )
{
bWhiteSpaceOnly = FALSE;
}
*m_pWritePtr = m_Ch;
m_pWritePtr++;
-
+
if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
if( !bWhiteSpaceOnly )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf,
- ( UINT ) ( m_pWritePtr - m_pWriteBuf ),
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf,
+ ( UINT ) ( m_pWritePtr - m_pWriteBuf ),
TRUE ) ) )
{
- return E_ABORT;
+ return E_ABORT;
}
}
m_pWritePtr = m_pWriteBuf;
bWhiteSpaceOnly = TRUE;
}
- }
+ }
}
}
@@ -858,36 +858,36 @@ HRESULT XMLParser::MainParseLoop()
// Desc: Builds element data
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
-{
+{
HRESULT hr;
if( m_pISAXCallback == NULL )
return E_NOINTERFACE;
- m_pISAXCallback->m_LineNum = 1;
+ m_pISAXCallback->m_LineNum = 1;
m_pISAXCallback->m_LinePos = 0;
m_pISAXCallback->m_strFilename = strFilename; // save this off only while we parse the file
m_bSkipNextAdvance = FALSE;
- m_pReadPtr = m_pReadBuf;
-
+ m_pReadPtr = m_pReadBuf;
+
m_pReadBuf[ 0 ] = '\0';
- m_pReadBuf[ 1 ] = '\0';
-
+ m_pReadBuf[ 1 ] = '\0';
+
m_pInXMLBuffer = NULL;
m_uInXMLBufferCharsLeft = 0;
-
+
WCHAR wchFilename[ 64 ];
swprintf_s(wchFilename,64,L"%s",strFilename);
- m_hFile = CreateFile( wchFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL );
+ m_hFile = CreateFile( wchFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL );
if( m_hFile == INVALID_HANDLE_VALUE )
- {
+ {
Error( E_COULD_NOT_OPEN_FILE, "Error opening file" );
hr = E_COULD_NOT_OPEN_FILE;
-
+
}
else
{
@@ -897,14 +897,14 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
m_dwCharsConsumed = 0;
hr = MainParseLoop();
}
-
+
// Close the file
if( m_hFile != INVALID_HANDLE_VALUE )
CloseHandle( m_hFile );
m_hFile = INVALID_HANDLE_VALUE;
// we no longer own strFilename, so un-set it
- m_pISAXCallback->m_strFilename = NULL;
+ m_pISAXCallback->m_strFilename = NULL;
return hr;
}
@@ -914,38 +914,38 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
// Desc: Builds element data
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ParseXMLBuffer( CONST CHAR *strBuffer, UINT uBufferSize )
-{
+{
HRESULT hr;
-
+
if( m_pISAXCallback == NULL )
return E_NOINTERFACE;
- m_pISAXCallback->m_LineNum = 1;
+ m_pISAXCallback->m_LineNum = 1;
m_pISAXCallback->m_LinePos = 0;
m_pISAXCallback->m_strFilename = ""; // save this off only while we parse the file
m_bSkipNextAdvance = FALSE;
m_pReadPtr = m_pReadBuf;
-
+
m_pReadBuf[ 0 ] = '\0';
- m_pReadBuf[ 1 ] = '\0';
+ m_pReadBuf[ 1 ] = '\0';
m_hFile = NULL;
m_pInXMLBuffer = strBuffer;
m_uInXMLBufferCharsLeft = uBufferSize;
m_dwCharsTotal = uBufferSize;
m_dwCharsConsumed = 0;
-
+
hr = MainParseLoop();
// we no longer own strFilename, so un-set it
- m_pISAXCallback->m_strFilename = NULL;
+ m_pISAXCallback->m_strFilename = NULL;
return hr;
}
//-------------------------------------------------------------------------------------
-// XMLParser::Error()
+// XMLParser::Error()
// Logs an error through the callback interface
//-------------------------------------------------------------------------------------
#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation
@@ -960,7 +960,7 @@ VOID XMLParser::Error( HRESULT hErr, CONST CHAR* strFormat, ... )
va_start( pArglist, strFormat );
vsprintf( strBuffer, strFormat, pArglist );
-
+
m_pISAXCallback->Error( hErr, strBuffer );
va_end( pArglist );
}
diff --git a/Minecraft.Client/GameRenderer.cpp b/Minecraft.Client/GameRenderer.cpp
index 2030cfe5..f51a24d8 100644
--- a/Minecraft.Client/GameRenderer.cpp
+++ b/Minecraft.Client/GameRenderer.cpp
@@ -1350,7 +1350,7 @@ void GameRenderer::DisableUpdateThread()
#endif
}
-void GameRenderer::renderLevel(float a, __int64 until)
+void GameRenderer::renderLevel(float a, int64_t until)
{
// if (updateLightTexture) updateLightTexture(); // 4J - TODO - Java 1.0.1 has this line enabled, should check why - don't want to put it in now in case it breaks split-screen
@@ -1433,7 +1433,7 @@ void GameRenderer::renderLevel(float a, __int64 until)
if (until == 0) break;
- __int64 diff = until - System::nanoTime();
+ int64_t diff = until - System::nanoTime();
if (diff < 0) break;
if (diff > 1000000000) break;
} while (true);
diff --git a/Minecraft.Client/GameRenderer.h b/Minecraft.Client/GameRenderer.h
index 70fbe8b3..21cf8acb 100644
--- a/Minecraft.Client/GameRenderer.h
+++ b/Minecraft.Client/GameRenderer.h
@@ -115,8 +115,8 @@ public:
void setupCamera(float a, int eye);
private:
void renderItemInHand(float a, int eye);
- __int64 lastActiveTime;
- __int64 lastNsTime;
+ int64_t lastActiveTime;
+ int64_t lastNsTime;
// 4J - changes brought forward from 1.8.2
bool _updateLightTexture;
public:
@@ -133,7 +133,7 @@ private:
public:
void render(float a, bool bFirst); // 4J added bFirst
void renderLevel(float a);
- void renderLevel(float a, __int64 until);
+ void renderLevel(float a, int64_t until);
private:
Random *random;
int rainSoundTime;
diff --git a/Minecraft.Client/Gui.cpp b/Minecraft.Client/Gui.cpp
index 0a890d93..c59cb063 100644
--- a/Minecraft.Client/Gui.cpp
+++ b/Minecraft.Client/Gui.cpp
@@ -1448,7 +1448,7 @@ void Gui::displayClientMessage(int messageId, int iPad)
}
// 4J Added
-void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning)
+void Gui::renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning)
{
int height = minecraft->height;
// This causes us to cover xScale*dataLength pixels in the horizontal
@@ -1487,7 +1487,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
t->color(0xff000000 + cc * 256);
}
- __int64 aVal = dataA[i] / dataAScale;
+ int64_t aVal = dataA[i] / dataAScale;
t->vertex((float)(xScale*i + 0.5f), (float)( height - aVal + 0.5f), (float)( 0));
t->vertex((float)(xScale*i + 0.5f), (float)( height + 0.5f), (float)( 0));
@@ -1504,7 +1504,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
t->color(0xff808080 + cc/2 * 256);
}
- __int64 bVal = dataB[i] / dataBScale;
+ int64_t bVal = dataB[i] / dataBScale;
t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height - bVal + 0.5f), (float)( 0));
t->vertex((float)(xScale*i + (xScale - 1) + 0.5f), (float)( height + 0.5f), (float)( 0));
@@ -1515,7 +1515,7 @@ void Gui::renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataASc
glEnable(GL_TEXTURE_2D);
}
-void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) )
+void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, int64_t (*func)(unsigned int dataPos, unsigned int dataSource) )
{
int height = minecraft->height;
@@ -1532,8 +1532,8 @@ void Gui::renderStackedGraph(int dataPos, int dataLength, int dataSources, __int
Tesselator *t = Tesselator::getInstance();
t->begin(GL_LINES);
- __int64 thisVal = 0;
- __int64 topVal = 0;
+ int64_t thisVal = 0;
+ int64_t topVal = 0;
for (int i = 0; i < dataLength; i++)
{
thisVal = 0;
diff --git a/Minecraft.Client/Gui.h b/Minecraft.Client/Gui.h
index 9352308f..60ea8b7c 100644
--- a/Minecraft.Client/Gui.h
+++ b/Minecraft.Client/Gui.h
@@ -67,6 +67,6 @@ public:
float getJukeboxOpacity(int iPad);
// 4J Added
- void renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning);
- void renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) );
+ void renderGraph(int dataLength, int dataPos, int64_t *dataA, float dataAScale, int dataAWarning, int64_t *dataB, float dataBScale, int dataBWarning);
+ void renderStackedGraph(int dataPos, int dataLength, int dataSources, int64_t (*func)(unsigned int dataPos, unsigned int dataSource) );
};
diff --git a/Minecraft.Client/LevelRenderer.cpp b/Minecraft.Client/LevelRenderer.cpp
index 051ad892..d9510a53 100644
--- a/Minecraft.Client/LevelRenderer.cpp
+++ b/Minecraft.Client/LevelRenderer.cpp
@@ -2076,9 +2076,9 @@ bool LevelRenderer::updateDirtyChunks()
if( bAtomic || (index == 0) )
{
//PIXBeginNamedEvent(0,"Rebuilding near chunk %d %d %d",chunk->x, chunk->y, chunk->z);
- // static __int64 totalTime = 0;
- // static __int64 countTime = 0;
- // __int64 startTime = System::currentTimeMillis();
+ // static int64_t totalTime = 0;
+ // static int64_t countTime = 0;
+ // int64_t startTime = System::currentTimeMillis();
//app.DebugPrintf("Rebuilding permaChunk %d\n", index);
@@ -2087,7 +2087,7 @@ bool LevelRenderer::updateDirtyChunks()
if(index !=0)
s_rebuildCompleteEvents->Set(index-1); // MGH - this rebuild happening on the main thread instead, mark the thread it should have been running on as complete
- // __int64 endTime = System::currentTimeMillis();
+ // int64_t endTime = System::currentTimeMillis();
// totalTime += (endTime - startTime);
// countTime++;
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);
@@ -2126,11 +2126,11 @@ bool LevelRenderer::updateDirtyChunks()
static Chunk permaChunk;
permaChunk.makeCopyForRebuild(chunk);
LeaveCriticalSection(&m_csDirtyChunks);
- // static __int64 totalTime = 0;
- // static __int64 countTime = 0;
- // __int64 startTime = System::currentTimeMillis();
+ // static int64_t totalTime = 0;
+ // static int64_t countTime = 0;
+ // int64_t startTime = System::currentTimeMillis();
permaChunk.rebuild();
- // __int64 endTime = System::currentTimeMillis();
+ // int64_t endTime = System::currentTimeMillis();
// totalTime += (endTime - startTime);
// countTime++;
// printf("%d : %f\n", countTime, (float)totalTime / (float)countTime);
diff --git a/Minecraft.Client/LevelRenderer.h b/Minecraft.Client/LevelRenderer.h
index bb2c0d13..37e0b813 100644
--- a/Minecraft.Client/LevelRenderer.h
+++ b/Minecraft.Client/LevelRenderer.h
@@ -27,7 +27,7 @@ using namespace std;
// AP - this is a system that works out which chunks actually need to be grouped together via the deferral system when doing chunk::rebuild. Doing this will reduce the number
// of chunks built in a single group and reduce the chance of seeing through the landscape when digging near the edges/corners of a chunk.
-// I've added another chunk flag to mark a chunk critical so it swipes a bit from the reference count value (goes to 3 bits to 2). This works on Vita because it doesn't have
+// I've added another chunk flag to mark a chunk critical so it swipes a bit from the reference count value (goes to 3 bits to 2). This works on Vita because it doesn't have
// split screen reference counting.
#ifdef __PSVITA__
#define _CRITICAL_CHUNKS
@@ -61,7 +61,7 @@ public:
#elif defined __PS3__
static const int MAX_COMMANDBUFFER_ALLOCATIONS = 110 * 1024 * 1024; // 4J - added
#else
- static const int MAX_COMMANDBUFFER_ALLOCATIONS = 55 * 1024 * 1024; // 4J - added
+ static const int MAX_COMMANDBUFFER_ALLOCATIONS = 55 * 1024 * 1024; // 4J - added
#endif
public:
LevelRenderer(Minecraft *mc, Textures *textures);
@@ -216,7 +216,7 @@ public:
// 4J - added for new render list handling
// This defines the maximum size of renderable level, must be big enough to cope with actual size of level + view distance at each side
// so that we can render the "infinite" sea at the edges
- static const int MAX_LEVEL_RENDER_SIZE[3];
+ static const int MAX_LEVEL_RENDER_SIZE[3];
static const int DIMENSION_OFFSETS[3];
// This is the TOTAL area of columns of chunks to be allocated for render round the players. So for one player, it would be a region of
// sqrt(PLAYER_RENDER_AREA) x sqrt(PLAYER_RENDER_AREA)
@@ -271,7 +271,7 @@ public:
XLockFreeStack<int> dirtyChunksLockFreeStack;
bool dirtyChunkPresent;
- __int64 lastDirtyChunkFound;
+ int64_t lastDirtyChunkFound;
static const int FORCE_DIRTY_CHUNK_CHECK_PERIOD_MS = 125; // decreased from 250 to 125 - updated by detectiveren
#ifdef _LARGE_WORLDS
diff --git a/Minecraft.Client/LocalPlayer.h b/Minecraft.Client/LocalPlayer.h
index 0a5b14b2..2198c489 100644
--- a/Minecraft.Client/LocalPlayer.h
+++ b/Minecraft.Client/LocalPlayer.h
@@ -52,12 +52,12 @@ public:
virtual ~LocalPlayer();
int m_iScreenSection; // assuming 4player splitscreen for now, or -1 for single player
- __uint64 ullButtonsPressed; // Stores the button presses, since the inputmanager can be ticked faster than the minecraft
+ uint64_t ullButtonsPressed; // Stores the button presses, since the inputmanager can be ticked faster than the minecraft
// player tick, and a button press and release combo can be missed in the minecraft::tick
- __uint64 ullDpad_last;
- __uint64 ullDpad_this;
- __uint64 ullDpad_filtered;
+ uint64_t ullDpad_last;
+ uint64_t ullDpad_this;
+ uint64_t ullDpad_filtered;
// 4J-PB - moved these in from the minecraft structure, since they are per player things for splitscreen
//int ticks;
@@ -105,7 +105,7 @@ public:
virtual void readAdditionalSaveData(CompoundTag *entityTag);
virtual void closeContainer();
virtual void openTextEdit(shared_ptr<TileEntity> sign);
- virtual bool openContainer(shared_ptr<Container> container); // 4J added bool return
+ virtual bool openContainer(shared_ptr<Container> container); // 4J added bool return
virtual bool openHopper(shared_ptr<HopperTileEntity> container); // 4J added bool return
virtual bool openHopper(shared_ptr<MinecartHopper> container); // 4J added bool return
virtual bool openHorseInventory(shared_ptr<EntityHorse> horse, shared_ptr<Container> container); // 4J added bool return
diff --git a/Minecraft.Client/MinecartRenderer.cpp b/Minecraft.Client/MinecartRenderer.cpp
index fd907019..34205d33 100644
--- a/Minecraft.Client/MinecartRenderer.cpp
+++ b/Minecraft.Client/MinecartRenderer.cpp
@@ -23,7 +23,7 @@ void MinecartRenderer::render(shared_ptr<Entity> _cart, double x, double y, doub
bindTexture(cart);
- __int64 seed = cart->entityId * 493286711l;
+ int64_t seed = cart->entityId * 493286711l;
seed = seed * seed * 4392167121l + seed * 98761;
float xo = ((((seed >> 16) & 0x7) + 0.5f) / 8.0f - 0.5f) * 0.004f;
diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp
index 76c3b779..7577eacb 100644
--- a/Minecraft.Client/Minecraft.cpp
+++ b/Minecraft.Client/Minecraft.cpp
@@ -85,10 +85,10 @@
#define DISABLE_LEVELTICK_THREAD
Minecraft *Minecraft::m_instance = NULL;
-__int64 Minecraft::frameTimes[512];
-__int64 Minecraft::tickTimes[512];
+int64_t Minecraft::frameTimes[512];
+int64_t Minecraft::tickTimes[512];
int Minecraft::frameTimePos = 0;
-__int64 Minecraft::warezTime = 0;
+int64_t Minecraft::warezTime = 0;
File Minecraft::workDir = File(L"");
#ifdef __PSVITA__
@@ -635,7 +635,7 @@ void Minecraft::run()
return;
}
- __int64 lastTime = System::currentTimeMillis();
+ int64_t lastTime = System::currentTimeMillis();
int frames = 0;
while (running)
@@ -660,7 +660,7 @@ void Minecraft::run()
timer->advanceTime();
}
- __int64 beforeTickTime = System::nanoTime();
+ int64_t beforeTickTime = System::nanoTime();
for (int i = 0; i < timer->ticks; i++)
{
ticks++;
@@ -672,7 +672,7 @@ void Minecraft::run()
// setScreen(new LevelConflictScreen());
// }
}
- __int64 tickDuraction = System::nanoTime() - beforeTickTime;
+ int64_t tickDuraction = System::nanoTime() - beforeTickTime;
checkGlError(L"Pre render");
TileRenderer::fancy = options->fancyGraphics;
@@ -1240,7 +1240,7 @@ void Minecraft::applyFrameMouseLook()
void Minecraft::run_middle()
{
- static __int64 lastTime = 0;
+ static int64_t lastTime = 0;
static bool bFirstTimeIntoGame = true;
static bool bAutosaveTimerSet=false;
static unsigned int uiAutosaveTimer=0;
@@ -1804,7 +1804,7 @@ void Minecraft::run_middle()
timer->advanceTime();
}
- //__int64 beforeTickTime = System::nanoTime();
+ //int64_t beforeTickTime = System::nanoTime();
for (int i = 0; i < timer->ticks; i++)
{
bool bLastTimerTick = ( i == ( timer->ticks - 1 ) );
@@ -1890,7 +1890,7 @@ void Minecraft::run_middle()
// CompressedTileStorage::tick(); // 4J added
// SparseDataStorage::tick(); // 4J added
}
- //__int64 tickDuraction = System::nanoTime() - beforeTickTime;
+ //int64_t tickDuraction = System::nanoTime() - beforeTickTime;
MemSect(31);
checkGlError(L"Pre render");
MemSect(0);
@@ -2095,14 +2095,14 @@ void Minecraft::emergencySave()
setLevel(NULL);
}
-void Minecraft::renderFpsMeter(__int64 tickTime)
+void Minecraft::renderFpsMeter(int64_t tickTime)
{
int nsPer60Fps = 1000000000l / 60;
if (lastTimer == -1)
{
lastTimer = System::nanoTime();
}
- __int64 now = System::nanoTime();
+ int64_t now = System::nanoTime();
Minecraft::tickTimes[(Minecraft::frameTimePos) & (Minecraft::frameTimes_length - 1)] = tickTime;
Minecraft::frameTimes[(Minecraft::frameTimePos++) & (Minecraft::frameTimes_length - 1)] = now - lastTimer;
lastTimer = now;
@@ -2134,7 +2134,7 @@ void Minecraft::renderFpsMeter(__int64 tickTime)
t->vertex((float)(Minecraft::frameTimes_length), (float)( height - hh1 * 2), (float)( 0));
t->end();
- __int64 totalTime = 0;
+ int64_t totalTime = 0;
for (int i = 0; i < Minecraft::frameTimes_length; i++)
{
totalTime += Minecraft::frameTimes[i];
@@ -2164,8 +2164,8 @@ void Minecraft::renderFpsMeter(__int64 tickTime)
t->color(0xff000000 + cc * 256);
}
- __int64 time = Minecraft::frameTimes[i] / 200000;
- __int64 time2 = Minecraft::tickTimes[i] / 200000;
+ int64_t time = Minecraft::frameTimes[i] / 200000;
+ int64_t time2 = Minecraft::tickTimes[i] / 200000;
t->vertex((float)(i + 0.5f), (float)( height - time + 0.5f), (float)( 0));
t->vertex((float)(i + 0.5f), (float)( height + 0.5f), (float)( 0));
@@ -3759,7 +3759,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures)
player->drop();
}
- __uint64 ullButtonsPressed=player->ullButtonsPressed;
+ uint64_t ullButtonsPressed=player->ullButtonsPressed;
bool selected = false;
#ifdef __PSVITA__
@@ -4314,7 +4314,7 @@ void Minecraft::setLevel(MultiPlayerLevel *level, int message /*=-1*/, shared_pt
}
#endif
#ifdef _WINDOWS64
- // On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`.
+ // On Windows, the implementation has been changed to use a per-client pseudo XUID based on `uid.dat`.
// To maintain player data compatibility with existing worlds, the world host (the first player) will use the previous embedded pseudo XUID.
INetworkPlayer *localNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPrimaryPlayer);
if(localNetworkPlayer != NULL && localNetworkPlayer->IsHost())
@@ -4815,7 +4815,7 @@ void Minecraft::delayTextureReload()
reloadTextures = true;
}
-__int64 Minecraft::currentTimeMillis()
+int64_t Minecraft::currentTimeMillis()
{
return System::currentTimeMillis();//(Sys.getTime() * 1000) / Sys.getTimerResolution();
}
diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h
index cc1e5d18..91c20c14 100644
--- a/Minecraft.Client/Minecraft.h
+++ b/Minecraft.Client/Minecraft.h
@@ -75,7 +75,7 @@ private:
bool hasCrashed;
C4JThread::EventQueue* levelTickEventQueue;
-
+
static void levelTickUpdateFunc(void* pParam);
static void levelTickThreadInitFunc();
@@ -170,11 +170,11 @@ private:
LevelStorageSource *levelSource;
public:
static const int frameTimes_length = 512;
- static __int64 frameTimes[frameTimes_length];
+ static int64_t frameTimes[frameTimes_length];
static const int tickTimes_length = 512;
- static __int64 tickTimes[tickTimes_length];
+ static int64_t tickTimes[tickTimes_length];
static int frameTimePos;
- static __int64 warezTime;
+ static int64_t warezTime;
private:
int rightClickDelay;
public:
@@ -230,9 +230,9 @@ private:
// String grabHugeScreenshot(File workDir2, int width, int height, int ssWidth, int ssHeight); // 4J - removed
// 4J - per player thing?
- __int64 lastTimer;
+ int64_t lastTimer;
- void renderFpsMeter(__int64 tickTime);
+ void renderFpsMeter(int64_t tickTime);
public:
void stop();
// 4J removed
@@ -253,7 +253,7 @@ public:
//bool isRaining ;
// 4J - Moved to per player
- //__int64 lastTickTime;
+ //int64_t lastTickTime;
private:
// 4J- per player?
@@ -300,7 +300,7 @@ public:
static int maxSupportedTextureSize();
void delayTextureReload();
- static __int64 currentTimeMillis();
+ static int64_t currentTimeMillis();
#ifdef _DURANGO
static void inGameSignInCheckAllPrivilegesCallback(LPVOID lpParam, bool hasPrivileges, int iPad);
diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp
index 012ae19b..373a5e33 100644
--- a/Minecraft.Client/MinecraftServer.cpp
+++ b/Minecraft.Client/MinecraftServer.cpp
@@ -68,15 +68,15 @@
//4J Added
MinecraftServer *MinecraftServer::server = NULL;
bool MinecraftServer::setTimeAtEndOfTick = false;
-__int64 MinecraftServer::setTime = 0;
+int64_t MinecraftServer::setTime = 0;
bool MinecraftServer::setTimeOfDayAtEndOfTick = false;
-__int64 MinecraftServer::setTimeOfDay = 0;
+int64_t MinecraftServer::setTimeOfDay = 0;
bool MinecraftServer::m_bPrimaryPlayerSignedOut=false;
bool MinecraftServer::s_bServerHalted=false;
bool MinecraftServer::s_bSaveOnExitAnswered=false;
#ifdef _ACK_CHUNK_SEND_THROTTLING
bool MinecraftServer::s_hasSentEnoughPackets = false;
-__int64 MinecraftServer::s_tickStartTime = 0;
+int64_t MinecraftServer::s_tickStartTime = 0;
vector<INetworkPlayer *> MinecraftServer::s_sentTo;
#else
int MinecraftServer::s_slowQueuePlayerIndex = 0;
@@ -581,7 +581,7 @@ MinecraftServer::~MinecraftServer()
DeleteCriticalSection(&m_consoleInputCS);
}
-bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed)
+bool MinecraftServer::initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed)
{
// 4J - removed
#if 0
@@ -692,7 +692,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
// TODO: Stop loading, add error message.
}
- __int64 levelNanoTime = System::nanoTime();
+ int64_t levelNanoTime = System::nanoTime();
wstring levelName = (initData && !initData->levelName.empty()) ? initData->levelName : GetDedicatedServerString(settings, L"level-name", L"world");
wstring levelTypeString;
@@ -736,10 +736,10 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData *initData, DW
#if 0
wstring levelSeedString = settings->getString(L"level-seed", L"");
- __int64 levelSeed = (new Random())->nextLong();
+ int64_t levelSeed = (new Random())->nextLong();
if (levelSeedString.length() > 0)
{
- long newSeed = _fromString<__int64>(levelSeedString);
+ long newSeed = _fromString<int64_t>(levelSeedString);
if (newSeed != 0) {
levelSeed = newSeed;
}
@@ -866,7 +866,7 @@ void MinecraftServer::postProcessTerminate(ProgressRenderer *mcprogress)
DeleteCriticalSection(&m_postProcessCS);
}
-bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData)
+bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData)
{
// 4J - TODO - do with new save stuff
// if (storageSource->requiresConversion(name))
@@ -1016,7 +1016,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
m_postUpdateThread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL);
m_postUpdateThread->Run();
- __int64 startTime = System::currentTimeMillis();
+ int64_t startTime = System::currentTimeMillis();
// 4J Stu - Added this to temporarily make starting games on vita faster
#ifdef __PSVITA__
@@ -1046,7 +1046,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
csf->closeHandle(fe);
}
- __int64 lastTime = System::currentTimeMillis();
+ int64_t lastTime = System::currentTimeMillis();
#ifdef _LARGE_WORLDS
if(app.GetGameNewWorldSize() > levels[0]->getLevelData()->getXZSizeOld())
{
@@ -1074,7 +1074,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
}
#if 0
- __int64 lastStorageTickTime = System::currentTimeMillis();
+ int64_t lastStorageTickTime = System::currentTimeMillis();
// Test code to enable full creation of levels at start up
int halfsidelen = ( i == 0 ) ? 27 : 9;
@@ -1097,7 +1097,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
}
}
#else
- __int64 lastStorageTickTime = System::currentTimeMillis();
+ int64_t lastStorageTickTime = System::currentTimeMillis();
Pos *spawnPos = level->getSharedSpawnPos();
int twoRPlusOne = r*2 + 1;
@@ -1114,7 +1114,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource *storageSource, const wstring
return false;
}
// printf(">>>%d %d %d\n",i,x,z);
- // __int64 now = System::currentTimeMillis();
+ // int64_t now = System::currentTimeMillis();
// if (now < lastTime) lastTime = now;
// if (now > lastTime + 1000)
{
@@ -1679,7 +1679,7 @@ bool MinecraftServer::getForceGameType()
return forceGameType;
}
-__int64 MinecraftServer::getCurrentTimeMillis()
+int64_t MinecraftServer::getCurrentTimeMillis()
{
return System::currentTimeMillis();
}
@@ -1695,7 +1695,7 @@ void MinecraftServer::setPlayerIdleTimeout(int playerIdleTimeout)
}
extern int c0a, c0b, c1a, c1b, c1c, c2a, c2b;
-void MinecraftServer::run(__int64 seed, void *lpParameter)
+void MinecraftServer::run(int64_t seed, void *lpParameter)
{
NetworkGameInitData *initData = NULL;
DWORD initSettings = 0;
@@ -1728,18 +1728,18 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
}
}
- __int64 lastTime = getCurrentTimeMillis();
- __int64 unprocessedTime = 0;
+ int64_t lastTime = getCurrentTimeMillis();
+ int64_t unprocessedTime = 0;
while (running && !s_bServerHalted)
{
- __int64 now = getCurrentTimeMillis();
+ int64_t now = getCurrentTimeMillis();
// 4J Stu - When we pause the server, we don't want to count that as time passed
// 4J Stu - TU-1 hotifx - Remove this line. We want to make sure that we tick connections at the proper rate when paused
//Fix for #13191 - The host of a game can get a message informing them that the connection to the server has been lost
//if(m_isServerPaused) lastTime = now;
- __int64 passedTime = now - lastTime;
+ int64_t passedTime = now - lastTime;
if (passedTime > MS_PER_TICK * 40)
{
// logger.warning("Can't keep up! Did the system time change, or is the server overloaded?");
@@ -1765,19 +1765,19 @@ void MinecraftServer::run(__int64 seed, void *lpParameter)
else
{
// int tickcount = 0;
- // __int64 beforeall = System::currentTimeMillis();
+ // int64_t beforeall = System::currentTimeMillis();
while (unprocessedTime > MS_PER_TICK)
{
unprocessedTime -= MS_PER_TICK;
chunkPacketManagement_PreTick();
-// __int64 before = System::currentTimeMillis();
+// int64_t before = System::currentTimeMillis();
tick();
-// __int64 after = System::currentTimeMillis();
+// int64_t after = System::currentTimeMillis();
// PIXReportCounter(L"Server time",(float)(after-before));
chunkPacketManagement_PostTick();
}
-// __int64 afterall = System::currentTimeMillis();
+// int64_t afterall = System::currentTimeMillis();
// PIXReportCounter(L"Server time all",(float)(afterall-beforeall));
// PIXReportCounter(L"Server ticks",(float)tickcount);
}
@@ -2119,15 +2119,15 @@ void MinecraftServer::tick()
players->broadcastAll( shared_ptr<SetTimePacket>( new SetTimePacket(level->getGameTime(), level->getDayTime(), level->getGameRules()->getBoolean(GameRules::RULE_DAYLIGHT) ) ), level->dimension->id);
}
// #ifndef __PS3__
- static __int64 stc = 0;
- __int64 st0 = System::currentTimeMillis();
+ static int64_t stc = 0;
+ int64_t st0 = System::currentTimeMillis();
PIXBeginNamedEvent(0,"Level tick %d",i);
((Level *)level)->tick();
- __int64 st1 = System::currentTimeMillis();
+ int64_t st1 = System::currentTimeMillis();
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Update lights %d",i);
- __int64 st2 = System::currentTimeMillis();
+ int64_t st2 = System::currentTimeMillis();
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Entity tick %d",i);
// 4J added to stop ticking entities in levels when players are not in those levels.
@@ -2155,7 +2155,7 @@ void MinecraftServer::tick()
level->getTracker()->tick();
PIXEndNamedEvent();
- __int64 st3 = System::currentTimeMillis();
+ int64_t st3 = System::currentTimeMillis();
// printf(">>>>>>>>>>>>>>>>>>>>>> Tick %d %d %d : %d\n", st1 - st0, st2 - st1, st3 - st2, st0 - stc );
stc = st0;
// #endif// __PS3__
@@ -2206,7 +2206,7 @@ void MinecraftServer::handleConsoleInputs()
}
}
-void MinecraftServer::main(__int64 seed, void *lpParameter)
+void MinecraftServer::main(int64_t seed, void *lpParameter)
{
#if __PS3__
ShutdownManager::HasStarted(ShutdownManager::eServerThread );
@@ -2286,7 +2286,7 @@ bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer *player)
void MinecraftServer::chunkPacketManagement_DidSendTo(INetworkPlayer *player)
{
- __int64 currentTime = System::currentTimeMillis();
+ int64_t currentTime = System::currentTimeMillis();
if( ( currentTime - s_tickStartTime ) >= MAX_TICK_TIME_FOR_PACKET_SENDS )
{
diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h
index 7fa8c752..1b09e31d 100644
--- a/Minecraft.Client/MinecraftServer.h
+++ b/Minecraft.Client/MinecraftServer.h
@@ -27,14 +27,14 @@ class CommandDispatcher;
typedef struct _LoadSaveDataThreadParam
{
LPVOID data;
- __int64 fileSize;
+ int64_t fileSize;
const wstring saveName;
- _LoadSaveDataThreadParam(LPVOID data, __int64 filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {}
+ _LoadSaveDataThreadParam(LPVOID data, int64_t filesize, const wstring &saveName) : data( data ), fileSize( filesize ), saveName( saveName ) {}
} LoadSaveDataThreadParam;
typedef struct _NetworkGameInitData
{
- __int64 seed;
+ int64_t seed;
LoadSaveDataThreadParam *saveData;
DWORD settings;
LevelGenerationOptions *levelGen;
@@ -133,9 +133,9 @@ public:
~MinecraftServer();
private:
// 4J Added - LoadSaveDataThreadParam
- bool initServer(__int64 seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed);
+ bool initServer(int64_t seed, NetworkGameInitData *initData, DWORD initSettings, bool findSeed);
void postProcessTerminate(ProgressRenderer *mcprogress);
- bool loadLevel(LevelStorageSource *storageSource, const wstring& name, __int64 levelSeed, LevelType *pLevelType, NetworkGameInitData *initData);
+ bool loadLevel(LevelStorageSource *storageSource, const wstring& name, int64_t levelSeed, LevelType *pLevelType, NetworkGameInitData *initData);
void setProgress(const wstring& status, int progress);
void endProgress();
void saveAllChunks();
@@ -171,13 +171,13 @@ public:
bool isUnderSpawnProtection(Level *level, int x, int y, int z, shared_ptr<Player> player);
void setForceGameType(bool forceGameType);
bool getForceGameType();
- static __int64 getCurrentTimeMillis();
+ static int64_t getCurrentTimeMillis();
int getPlayerIdleTimeout();
void setPlayerIdleTimeout(int playerIdleTimeout);
public:
void halt();
- void run(__int64 seed, void *lpParameter);
+ void run(int64_t seed, void *lpParameter);
void broadcastStartSavingPacket();
void broadcastStopSavingPacket();
@@ -188,7 +188,7 @@ public:
void handleConsoleInput(const wstring& msg, ConsoleInputSource *source);
void handleConsoleInputs();
// void addTickable(Tickable tickable); // 4J removed
- static void main(__int64 seed, void *lpParameter);
+ static void main(int64_t seed, void *lpParameter);
static void HaltServer(bool bPrimaryPlayerSignedOut=false);
File *getFile(const wstring& name);
@@ -208,9 +208,9 @@ private:
static MinecraftServer *server;
static bool setTimeOfDayAtEndOfTick;
- static __int64 setTimeOfDay;
+ static int64_t setTimeOfDay;
static bool setTimeAtEndOfTick;
- static __int64 setTime;
+ static int64_t setTime;
static bool m_bPrimaryPlayerSignedOut; // 4J-PB added to tell the stopserver not to save the game - another player may have signed in in their place, so ProfileManager.IsSignedIn isn't enough
static bool s_bServerHalted; // 4J Stu Added so that we can halt the server even before it's been created properly
@@ -234,9 +234,9 @@ public:
public:
static PlayerList *getPlayerList() { if( server != NULL ) return server->players; else return NULL; }
- static void SetTimeOfDay(__int64 time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; }
- static void SetTime(__int64 time) { setTimeAtEndOfTick = true; setTime = time; }
-
+ static void SetTimeOfDay(int64_t time) { setTimeOfDayAtEndOfTick = true; setTimeOfDay = time; }
+ static void SetTime(int64_t time) { setTimeAtEndOfTick = true; setTime = time; }
+
C4JThread::Event* m_serverPausedEvent;
private:
// 4J Added
@@ -245,7 +245,7 @@ private:
// 4J Added - A static that stores the QNet index of the player that is next allowed to send a packet in the slow queue
#ifdef _ACK_CHUNK_SEND_THROTTLING
static bool s_hasSentEnoughPackets;
- static __int64 s_tickStartTime;
+ static int64_t s_tickStartTime;
static vector<INetworkPlayer *> s_sentTo;
static const int MAX_TICK_TIME_FOR_PACKET_SENDS = 35;
#else
@@ -267,7 +267,7 @@ public:
#ifndef _ACK_CHUNK_SEND_THROTTLING
static void cycleSlowQueueIndex();
#endif
-
+
void chunkPacketManagement_PreTick();
void chunkPacketManagement_PostTick();
@@ -275,5 +275,5 @@ public:
void Suspend();
bool IsSuspending();
- // 4J Stu - A load of functions were all added in 1.0.1 in the ServerInterface, but I don't think we need any of them
+ // 4J Stu - A load of functions were all added in 1.0.1 in the ServerInterface, but I don't think we need any of them
};
diff --git a/Minecraft.Client/MultiPlayerLevel.cpp b/Minecraft.Client/MultiPlayerLevel.cpp
index 86b2914f..29d88b8d 100644
--- a/Minecraft.Client/MultiPlayerLevel.cpp
+++ b/Minecraft.Client/MultiPlayerLevel.cpp
@@ -789,7 +789,7 @@ void MultiPlayerLevel::setScoreboard(Scoreboard *scoreboard)
this->scoreboard = scoreboard;
}
-void MultiPlayerLevel::setDayTime(__int64 newTime)
+void MultiPlayerLevel::setDayTime(int64_t newTime)
{
// 4J: We send daylight cycle rule with host options so don't need this
/*if (newTime < 0)
diff --git a/Minecraft.Client/MultiPlayerLevel.h b/Minecraft.Client/MultiPlayerLevel.h
index 6e5b0086..a552fc2b 100644
--- a/Minecraft.Client/MultiPlayerLevel.h
+++ b/Minecraft.Client/MultiPlayerLevel.h
@@ -94,7 +94,7 @@ public:
virtual void createFireworks(double x, double y, double z, double xd, double yd, double zd, CompoundTag *infoTag);
virtual void setScoreboard(Scoreboard *scoreboard);
- virtual void setDayTime(__int64 newTime);
+ virtual void setDayTime(int64_t newTime);
// 4J Stu - Added so we can have multiple local connections
void addClientConnection(ClientConnection *c) { connections.push_back( c ); }
diff --git a/Minecraft.Client/Orbis/Iggy/include/rrCore.h b/Minecraft.Client/Orbis/Iggy/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/Orbis/Iggy/include/rrCore.h
+++ b/Minecraft.Client/Orbis/Iggy/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/Orbis/Miles/include/mss.h b/Minecraft.Client/Orbis/Miles/include/mss.h
index 531dcbc9..8fe0a74d 100644
--- a/Minecraft.Client/Orbis/Miles/include/mss.h
+++ b/Minecraft.Client/Orbis/Miles/include/mss.h
@@ -39,7 +39,7 @@
// doc system stuff
#ifndef EXPAPI
-#define EXPAPI
+#define EXPAPI
#endif
#ifndef EXPTYPE
#define EXPTYPE
@@ -69,10 +69,10 @@
// For docs
EXPGROUP(_NullGroup)
#define MilesVersion "9.3m" EXPMACRO
-#define MilesMajorVersion 9 EXPMACRO
+#define MilesMajorVersion 9 EXPMACRO
#define MilesMinorVersion 3 EXPMACRO
-#define MilesBuildNumber 11 EXPMACRO
-#define MilesCustomization 0 EXPMACRO
+#define MilesBuildNumber 11 EXPMACRO
+#define MilesCustomization 0 EXPMACRO
EXPGROUP(_RootGroup)
@@ -273,14 +273,14 @@ typedef void VOIDFUNC(void);
//================
EXPGROUP(Basic Types)
-#define AILCALL EXPTAG(AILCALL)
+#define AILCALL EXPTAG(AILCALL)
/*
Internal calling convention that all external Miles functions use.
Usually cdecl or stdcall on Windows.
*/
-#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
+#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
/*
Calling convention that user supplied callbacks <b>from</b> Miles use.
@@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+ typedef unsigned long long ULONG_PTR, *PULONG_PTR;
#else
#ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
@@ -348,13 +348,13 @@ RADDEFSTART
typedef struct HWAVEOUT__ *HWAVEOUT;
typedef HWAVEIN *LPHWAVEIN;
typedef HWAVEOUT *LPHWAVEOUT;
-
+
#ifndef WAVE_MAPPER
#define WAVE_MAPPER ((UINT)-1)
#endif
typedef struct waveformat_tag *LPWAVEFORMAT;
-
+
typedef struct HMIDIOUT__ *HMIDIOUT;
typedef HMIDIOUT *LPHMIDIOUT;
typedef struct HWND__ *HWND;
@@ -368,9 +368,9 @@ RADDEFSTART
// If compiling MSS DLL, use __declspec(dllexport) for both
// declarations and definitions
//
-
+
#ifdef IS_WIN32
-
+
#if !defined(FORNONWIN) && !defined(__RADNTBUILDLINUX__)
#define AILLIBCALLBACK __stdcall
#define AILCALL __stdcall
@@ -382,20 +382,20 @@ RADDEFSTART
#define AILCALLBACK __cdecl
#define AILEXPORT __cdecl
#endif
-
+
#ifdef __RADINDLL__
#define DXDEC __declspec(dllexport)
#define DXDEF __declspec(dllexport)
#else
-
+
#if defined( __BORLANDC__ ) || defined( MSS_SPU_PROCESS )
#define DXDEC extern
#else
#define DXDEC __declspec(dllimport)
#endif
-
+
#endif
-
+
#ifdef IS_WIN64
#define MSSDLLNAME "MSS64.DLL"
#define MSS_REDIST_DIR_NAME "redist64"
@@ -403,11 +403,11 @@ RADDEFSTART
#define MSSDLLNAME "MSS32.DLL"
#define MSS_REDIST_DIR_NAME "redist"
#endif
-
+
#define MSS_DIR_SEP "\\"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
-
+
#endif
typedef void * LPVOID;
@@ -420,7 +420,7 @@ RADDEFSTART
#define AILLIBCALLBACK
#define AILCALL
#define AILEXPORT
- #define AILCALLBACK
+ #define AILCALLBACK
#elif defined(__RADX86__)
#define AILLIBCALLBACK __attribute__((cdecl))
#define AILCALL __attribute__((cdecl))
@@ -437,7 +437,7 @@ RADDEFSTART
#define DXDEC extern
#define DXDEF
#endif
-
+
#ifdef __RADX64__
#define MSS_REDIST_DIR_NAME "redist/x64"
#elif defined(IS_X86)
@@ -447,7 +447,7 @@ RADDEFSTART
#else
#error "No Redist Dir Specified"
#endif
-
+
#define MSS_DIR_SEP "/"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
@@ -714,7 +714,7 @@ typedef enum
#ifndef FILE_ERRS
#define FILE_ERRS
-
+
#define AIL_NO_ERROR 0
#define AIL_IO_ERROR 1
#define AIL_OUT_OF_MEMORY 2
@@ -736,9 +736,9 @@ EXPTYPEBEGIN typedef SINTa HMSSENUM;
EXPTYPEEND
/*
specifies a type used to enumerate through a list of properties.
-
+
$:MSS_FIRST use this value to start the enumeration process.
-
+
The Miles enumeration functions all work similarly - you set a local variable of type HMSSENUM to MSS_FIRST and then call
the enumeration function until it returns 0.
@@ -751,7 +751,7 @@ the enumeration function until it returns 0.
// Preference names and default values
//
-#define AIL_MM_PERIOD 0
+#define AIL_MM_PERIOD 0
#define DEFAULT_AMP 1 // Default MM timer period = 5 msec.
#define AIL_TIMERS 1
@@ -1877,7 +1877,7 @@ typedef struct _S3DSTATE // Portion of HSAMPLE that deals with 3D posi
F32 lowpass_3D; // low pass cutoff computed by falloff graph. -1 if not affected.
F32 spread;
-
+
HSAMPLE owner; // May be NULL if used for temporary/internal calculations
AILFALLOFFCB falloff_function; // User function for min/max distance calculations, if desired
@@ -1915,7 +1915,7 @@ typedef struct _SAMPLE // Sample instance
S32 index; // Numeric index of this sample
SMPBUF buf[8]; // Source data buffers
-
+
U32 src_fract; // Fractional part of source address
U32 mix_delay; // ms until start mixing (decreased every buffer mix)
@@ -1924,7 +1924,7 @@ typedef struct _SAMPLE // Sample instance
U64 mix_bytes; // total number of bytes sent to the mixer for this sample.
S32 group_id; // ID for grouped operations.
-
+
// size of the next dynamic arrays
U32 chan_buf_alloced;
U32 chan_buf_used;
@@ -1946,10 +1946,10 @@ typedef struct _SAMPLE // Sample instance
// these are dynamic arrays
F32 *auto_3D_channel_levels; // Channel levels set by 3D positioner (always 1.0 if not 3D-positioned)
F32 *speaker_levels; // one level per speaker (multiplied after user or 3D)
-
+
S8 *speaker_enum_to_source_chan; // array[MSS_SPEAKER_xx] = -1 if not present, else channel #
// 99% of the time this is a 1:1 mapping and is zero.
-
+
S32 lp_any_on; // are any of the low pass filters on?
S32 user_channels_need_deinterlace; // do any of the user channels require a stereo sample to be deinterlaced?
@@ -1989,7 +1989,7 @@ typedef struct _SAMPLE // Sample instance
U32 low_pass_changed; // bit mask for what channels changed.
-
+
S32 bus; // Bus assignment for this sample.
S32 bus_comp_sends; // Which buses this bus routes compressor input to.
S32 bus_comp_installed; // Nonzero if we have a compressor installed.
@@ -2042,7 +2042,7 @@ typedef struct _SAMPLE // Sample instance
SPINFO pipeline[N_SAMPLE_STAGES];
S32 n_active_filters; // # of SP_FILTER_n stages active
-
+
//
// 3D-related state for all platforms (including Xbox)
//
@@ -2113,14 +2113,14 @@ DXDEC void AILCALL AIL_serve(void);
#ifdef IS_MAC
typedef void * LPSTR;
-
+
#define WHDR_DONE 0
-
+
typedef struct _WAVEIN
{
long temp;
} * HWAVEIN;
-
+
typedef struct _WAVEHDR
{
S32 dwFlags;
@@ -2133,7 +2133,7 @@ DXDEC void AILCALL AIL_serve(void);
S32 dwLoops;
void * lpNext;
U32 * reserved;
-
+
} WAVEHDR, * LPWAVEHDR;
#endif
@@ -2145,7 +2145,7 @@ typedef struct _DIG_INPUT_DRIVER *HDIGINPUT; // Handle to digital input driver
#ifdef IS_MAC
#define AIL_DIGITAL_INPUT_DEFAULT 0
-
+
typedef struct _DIG_INPUT_DRIVER // Handle to digital input driver
{
U32 tag; // HDIN
@@ -2478,7 +2478,7 @@ typedef struct _DIG_DRIVER // Handle to digital audio driver
U32 last_ds_play;
U32 last_ds_write;
U32 last_ds_move;
-
+
#endif
#ifdef IS_X86
@@ -2661,7 +2661,7 @@ typedef struct _SEQUENCE // XMIDI sequence state table
void const *EVNT;
U8 const *EVNT_ptr; // Current event pointer
-
+
U8 *ICA; // Indirect Controller Array
AILPREFIXCB prefix_callback; // XMIDI Callback Prefix handler
@@ -3121,13 +3121,13 @@ DXDEC S32 AILCALL AIL_timer_thread_handle(void* o_handle);
#elif defined(__RADANDROID__)
DXDEC void AILCALL AIL_set_asset_manager(void* asset_manager);
-
+
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_SLESInstallDriver(UINTa, UINTa);
#define AIL_open_digital_driver(frequency, bits, channel, flags) \
AIL_open_generic_digital_driver(frequency, bits, channel, flags, RADSS_SLESInstallDriver(0, 0))
-
+
#elif defined(IS_PSP2)
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_PSP2InstallDriver(UINTa, UINTa);
@@ -3221,7 +3221,7 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
{
Str255 version_name;
} MSS_VersionType;
-
+
#define AIL_MSS_version(str,len) \
{ \
long _res = HOpenResFile(0,0,"\p" MSSDLLNAME,fsRdPerm); \
@@ -3269,11 +3269,11 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
} \
} \
}
-
+
#endif
DXDEC S32 AILCALL AIL_digital_handle_release(HDIGDRIVER drvr);
-
+
DXDEC S32 AILCALL AIL_digital_handle_reacquire
(HDIGDRIVER drvr);
@@ -3339,18 +3339,18 @@ DXDEC EXPAPI void AILCALL AIL_push_system_state(HDIGDRIVER dig, U32 flags, S16 c
$* <b>MILES_PUSH_VOLUME</b> - When present, master volume will be affected in addition to sample state.
If MILES_PUSH_RESET is present, the master volume will be set to 1.0f, otherwise it will be retained and only
- affected when popped.
+ affected when popped.
$-
- If you want more control over whether a sample will be affected by a push or a pop operation,
+ If you want more control over whether a sample will be affected by a push or a pop operation,
see $AIL_set_sample_level_mask.
-
+
*/
DXDEC EXPAPI void AILCALL AIL_pop_system_state(HDIGDRIVER dig, S16 crossfade_ms);
/*
- Pops the current system state and returns the system to the way it
+ Pops the current system state and returns the system to the way it
was before the last push.
$:dig The driver to pop.
@@ -3374,7 +3374,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_level_mask(HSAMPLE S, U8 mask);
$:S The sample to set the mask for.
$:mask The bitmask of levels for which the sample will play.
- Under normal push/pop operations, a sample's mask is set when it is
+ Under normal push/pop operations, a sample's mask is set when it is
started to the level the system is at. If the system is pushed
without a reset, then the mask is adjusted to include the new level.
When a system is popped, if the sample is going to continue playing,
@@ -3435,7 +3435,7 @@ DXDEC EXPAPI HSAMPLE AILCALL AIL_allocate_bus(HDIGDRIVER dig);
$:return The HSAMPLE for the new bus.
A bus allows you to treat a group of samples as one sample. With the bus sample you can
- do almost all of the things you can do with a normal sample handle. The only exception
+ do almost all of the things you can do with a normal sample handle. The only exception
is you can't adjust the playback rate of the sample.
Use $AIL_bus_sample_handle to get the HSAMPLE associated with a bus.
@@ -3495,7 +3495,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sample_bus(HSAMPLE S);
DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_index, SAMPLESTAGE filter_stage, S32 input_bus_index);
/*
- Installs the Compressor filter on to a bus, using another bus as the input for
+ Installs the Compressor filter on to a bus, using another bus as the input for
compression/limiting.
$:dig The driver the busses exist on.
@@ -3508,7 +3508,7 @@ DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_inde
its signal strength to the filter, allowing it to attenuate the bus_index bus based
on another bus's contents.
- To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
+ To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
use $AIL_sample_stage_property exactly as you would any other filter. The filter's properties
are documented under $(Compressor Filter)
*/
@@ -4325,7 +4325,7 @@ typedef void (AILCALLBACK* AILSTREAMCB) (HSTREAM stream);
#define MSS_STREAM_CHUNKS 8
-typedef struct _STREAM
+typedef struct _STREAM
{
S32 block_oriented; // 1 if this is an ADPCM or ASI-compressed stream
S32 using_ASI; // 1 if using ASI decoder to uncompress stream data
@@ -4349,7 +4349,7 @@ typedef struct _STREAM
S32 read_IO_index; // index of buffer to be loaded into Miles next
S32 bufsize; // size of each buffer
-
+
U32 datarate; // datarate in bytes per second
S32 filerate; // original datarate of the file
S32 filetype; // file format type
@@ -4987,7 +4987,7 @@ typedef struct
OGG_INFO;
DXDEC void AILCALL AIL_inspect_Ogg (OGG_INFO *inspection_state,
- U8 *Ogg_file_image,
+ U8 *Ogg_file_image,
S32 Ogg_file_size);
DXDEC S32 AILCALL AIL_enumerate_Ogg_pages (OGG_INFO *inspection_state);
@@ -5102,10 +5102,10 @@ DXDEC HDIGDRIVER AILCALL AIL_primary_digital_driver (HDIGDRIVER new_primary);
// 3D-related calls
//
-DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
+DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
S32 bus_index);
-DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
+DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
S32 bus_index,
S32 room_type);
@@ -5180,7 +5180,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_lowpass_falloff(HSAMPLE S, MSS
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
+ This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
a sample has such a graph, $AIL_set_sample_low_pass_cut_off will be called constantly, and thus shouldn't be
called otherwise.
@@ -5195,8 +5195,8 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_exclusion_falloff(HSAMPLE S, M
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having an exclusion that varies as a function of distance to the listener. If
- a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
+ This marks a sample as having an exclusion that varies as a function of distance to the listener. If
+ a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
affects reverb wet level.
The graph is evaluated the same as $AIL_set_sample_3D_volume_falloff.
@@ -5230,7 +5230,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_position_segments(HSAMPLE S, MSSVECT
other computations (cones, falloffs, etc). Spatialization is done using all segments as a directional
source.
- If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
+ If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
when the listener is within min_distance to the closest point. See $AIL_set_sample_3D_spread_falloff
and $AIL_set_sample_3D_volume_falloff.
@@ -5243,7 +5243,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_spread(HSAMPLE S, F32 spread);
$:S Sample to affect.
$:spread The value to set the spread to.
- Spread is how much the directionality of a sample "spreads" to more speakers - emulating
+ Spread is how much the directionality of a sample "spreads" to more speakers - emulating
the effect a sound has when it occupies more than a point source. For instance, a sound
point source that sits directly to the left of the listener would have a very strong left
speaker signal, and a fairly weak right speaker signal. Via spread, the signal would be
@@ -5392,7 +5392,7 @@ EXPGROUP(Miles High Level Event System)
EXPTYPE typedef struct MSSSOUNDBANK {};
/*
Internal structure.
-
+
Use $HMSOUNDBANK instead.
*/
@@ -5401,7 +5401,7 @@ EXPTYPE typedef struct MSSSOUNDBANK {};
EXPTYPE typedef struct SoundBank *HMSOUNDBANK;
/*
Describes a handle to an open sound bank.
-
+
This handle typedef refers to an open soundbank which is usually obtained from the $AIL_add_soundbank function.
*/
@@ -5424,7 +5424,7 @@ DXDEC EXPAPI void AILCALL AIL_close_soundbank(HMSOUNDBANK bank);
Close a soundbank previously opened with $AIL_open_soundbank.
$:bank Soundbank to close.
-
+
Close a soundbank previously opened with $AIL_open_soundbank. Presets/events loaded from
this soundbank are no longer valid.
*/
@@ -5448,7 +5448,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
$:return A pointer to the name of the sound bank, or 0 if the bank is invalid.
- The name of the bank is the name used in asset names. This is distinct from the
+ The name of the bank is the name used in asset names. This is distinct from the
file name of the bank.
The return value should not be deleted.
@@ -5457,7 +5457,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
DXDEC EXPAPI S32 AILCALL AIL_get_soundbank_mem_usage(HMSOUNDBANK bank);
/*
Returns the amount of data used by the soundbank management structures.
-
+
$:bank Soundbank to query.
$:return Total memory allocated.
@@ -5476,7 +5476,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_presets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sound presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5503,7 +5503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_environment_presets(HMSOUNDBANK bank, HMS
$:return Returns 0 when enumeration is complete.
Enumerates the environment presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5530,7 +5530,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sounds available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* SoundName = 0;
@@ -5549,7 +5549,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
Note that name should NOT be deleted by the caller - this points at memory owned by
Miles.
*/
-
+
DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next, char const * list, char const ** name);
/*
Enumerate the events stored in a soundbank.
@@ -5561,7 +5561,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next,
$:return Returns 0 when enumeration is complete.
Enumerates the events available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* EventName = 0;
@@ -5624,7 +5624,7 @@ DXDEC EXPAPI S32 AILCALL AIL_apply_sound_preset(HSAMPLE sample, HMSOUNDBANK bank
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
This will alter the properties on a given sample, based on the given preset.
-*/
+*/
DXDEC EXPAPI S32 AILCALL AIL_unapply_raw_sound_preset(HSAMPLE sample, void* preset);
/*
@@ -5644,7 +5644,7 @@ DXDEC EXPAPI S32 AILCALL AIL_unapply_sound_preset(HSAMPLE sample, HMSOUNDBANK ba
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
Presets may or may not affect any given property. Only the properties affected by the specified
- preset will have their values restored to default.
+ preset will have their values restored to default.
*/
typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPOUT void* output, S32 isfloat);
@@ -5658,7 +5658,7 @@ typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPO
$:isfloat nonzero if the output needs to be a float.
The function callback should convert variable expressions in to an output value of the
- requested type.
+ requested type.
*/
DXDEC EXPAPI S32 AILCALL AIL_resolve_raw_sound_preset(void* preset, void* context, MilesResolveFunc eval);
@@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
$:name The name of the sound asset to find.
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
- $:return Returns the byte size of the buffer required for out_name.
+ $:return Returns the byte size of the buffer required for out_name.
This function must be called in order to resolve the sound asset name to
something that can be used by miles. To ensure safe buffer containment, call
@@ -5832,7 +5832,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
ReturnType = "HMSSEVENTCONSTRUCT", "An empty event to be passed to the various step addition functions, or 0 if out of memory."
- Discussion = "Primarily designed for offline use, this function is the first step in
+ Discussion = "Primarily designed for offline use, this function is the first step in
creating an event that can be consumed by the MilesEvent system. Usage is as follows:
HMSSEVENTCONSTRUCT hEvent = AIL_create_event();
@@ -5850,7 +5850,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
Note that if immediately passed to AIL_enqueue_event(), the memory must remain valid until the following
$AIL_complete_event_queue_processing.
-
+
Events are generally tailored to the MilesEvent system, even though there is nothing preventing you
from writing your own event system, or creation ui.
"
@@ -5906,7 +5906,7 @@ EXPTYPEEND
/*
Determines the usage of the sound names list in the $AIL_add_start_sound_event_step.
- $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
+ $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
sound to play twice in a row. This is the only selection type that doesn't require
a state variable.
$:MILES_START_STEP_NO_REPEATS Randomly select from the list, but prevent the last sound from being the same.
@@ -5926,10 +5926,10 @@ EXPTYPEEND
Name = "AIL_add_start_sound_event_step", "Adds a step to a given event to start a sound with the given specifications."
In = "HMSSEVENTCONSTRUCT", "i_Event", "The event to add the step to."
- In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
- If there are multiple names listed, the sound will be chosen at random based on the given weights. This
+ In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
+ If there are multiple names listed, the sound will be chosen at random based on the given weights. This
string is of the form 'BankName1/SoundName1:Weight1:BankName2/SoundName2:Weight2:' etc. The string must always
- terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
+ terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
an empty string as an entry."
In = "const char*", "i_PresetName", "[optional] The name of the preset, of the form 'PresetList/PresetName'"
@@ -5944,7 +5944,7 @@ EXPTYPEEND
In = "U8", "i_CanLoad", "If nonzero, the sound is allowed to hit the disk instead of only accessing cached sounds. If true, this might cause a hitch."
In = "U16", "i_Delay", "The minimum delay in ms to apply to the sound before start."
In = "U16", "i_DelayMax", "The maximum delay in ms to apply to the sound before start."
- In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
+ In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
with a priority strictly less than the given priority."
In = "U8", "i_LoopCount", "The loop count as per AIL_set_sample_loop_count."
In = "const char*", "i_StartOffset", "[optional] The name of the marker to use as the sound's initial offset."
@@ -5969,19 +5969,19 @@ DXDEC
S32
AILCALL
AIL_add_start_sound_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_SoundNames,
- const char* i_PresetName,
+ const char* i_PresetName,
U8 i_PresetIsDynamic,
const char* i_EventName,
const char* i_StartMarker, const char* i_EndMarker,
char const* i_StateVar, char const* i_VarInit,
- const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
+ const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
U16 i_Delay, U16 i_DelayMax, U8 i_Priority, U8 i_LoopCount,
const char* i_StartOffset,
F32 i_VolMin, F32 i_VolMax, F32 i_PitchMin, F32 i_PitchMax,
F32 i_FadeInTime,
- U8 i_EvictionType,
+ U8 i_EvictionType,
U8 i_SelectType
);
@@ -6004,7 +6004,7 @@ AIL_add_start_sound_event_step(
In order to release the data loaded by this event, AIL_add_uncache_sounds_event_step() needs to
be called with the same parameters.
-
+
If you are using MilesEvent, the data is refcounted so the sound will not be freed until all
samples using it complete."
}
@@ -6089,7 +6089,7 @@ DXDEC
S32
AILCALL
AIL_add_control_sounds_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_Labels, const char* i_MarkerStart, const char* i_MarkerEnd, const char* i_Position,
const char* i_PresetName,
U8 i_PresetApplyType,
@@ -6191,7 +6191,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Defines a named blend function to be referenced by a blended sound later.
$:i_Event The event to add the step to.
- $:i_Name The name of the blend. This is the name that will be
+ $:i_Name The name of the blend. This is the name that will be
referenced by the state variable in start sound, as well as the variable name
to set by the game to update the blend for an instance.
$:i_SoundCount The number of sounds this blend will affect. Max 10.
@@ -6226,7 +6226,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Miles max sample count."
}
*/
-DXDEC S32 AILCALL
+DXDEC S32 AILCALL
AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitName, const char* i_SoundLimits);
/*!
@@ -6257,8 +6257,8 @@ AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitNa
AIL_add_persist_preset_event_step(hEvent, 0, `"Underwater`", 0);"
}
*/
-DXDEC S32 AILCALL
-AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
+DXDEC S32 AILCALL
+AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
const char* i_Labels, U8 i_IsDynamic
);
@@ -6272,13 +6272,13 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_contents(HMSOUNDBANK bank, char const * n
thus shouldn't be checked via strlen, etc.
$:return Returns 0 on fail.
- Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
+ Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
rather than inspected directly.
*/
DXDEC EXPAPI S32 AILCALL AIL_add_clear_state_event_step(HMSSEVENTCONSTRUCT i_Event);
/*
- Clears all persistent state in the runtime.
+ Clears all persistent state in the runtime.
$:i_Event The event to add the step to.
@@ -6311,7 +6311,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_enable_limit_event_step(HMSSEVENTCONSTRUCT i_Ev
DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, char const* i_Base, char const* i_Amp, char const* i_Freq, S32 i_Invert, S32 i_Polarity, S32 i_Waveform, S32 i_DutyCycle, S32 i_IsLFO);
/*
Adds a step to define a variable that oscillates over time.
-
+
$:i_Event The event to add the step to.
$:i_Name The nane of the variable to oscillate.
$:i_Base The value to oscillate around, or a variable name to use as the base.
@@ -6327,15 +6327,15 @@ DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event,
DXDEC EXPAPI S32 AILCALL AIL_add_move_var_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, const F32 i_Times[2], const S32 i_InterpolationTypes[2], const F32 i_Values[3]);
/*
Adds a step to set and move a variable over time on a curve.
-
+
$:i_Event The event to add the step to.
$:i_Name The variable to move.
$:i_Times The midpoint and final times for the curves
$:i_InterpolationTypes The curve type for the two curves - Curve In (0), Curve Out (1), S-Curve (2), Linear (3)
$:i_Values The initial, midpoint, and final values for the variable.
-
+
The variable is locked to this curve over the timeperiod - no interpolation from a previous value is done.
-
+
If an existing move var exists when the new one is added, the old one is replaced.
*/
@@ -6450,7 +6450,7 @@ struct EVENT_STEP_INFO
U8 isdynamic;
} persist;
- struct
+ struct
{
MSSSTRINGC name;
MSSSTRINGC labels;
@@ -6522,7 +6522,7 @@ struct EVENT_STEP_INFO
the string location of the next event step in the buffer."
Discussion = "This function parses the event string in to a struct for usage by the user. This function should only be
- used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
+ used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
next step. In this manner it can be used in a loop:
// Create an event to stop all sounds.
@@ -6610,11 +6610,11 @@ EXPTYPE typedef void* HEVENTSYSTEM;
DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_startup_event_system(HDIGDRIVER dig, S32 command_buf_len, EXPOUT char* memory_buf, S32 memory_len);
/*
Initializes the Miles Event system and associates it with an open digital driver.
-
+
$:dig The digital sound driver that this event system should use.
$:command_buf_len An optional number of bytes to use for the command buffer. If you pass 0, a reasonable default will be used (currently 5K).
- $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
- Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
+ $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
+ Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
Use 0 to let Miles to allocate this buffer itself.
$:memory_len If memory_buf is non-null, then this parameter provides the length. If memory_buf is null, the Miles will
allocate this much memory for internal buffers. If both memory_buf and memory_len are null, the Miles will allocate reasonable default (currently 64K).
@@ -6633,8 +6633,8 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
$:return A handle to the event system to use in various high level functions.
Both systems will access the same set of loaded soundbanks, and are updated when $AIL_begin_event_queue_processing is called.
-
- To enqueue events to the new system, use $AIL_enqueue_event_system.
+
+ To enqueue events to the new system, use $AIL_enqueue_event_system.
To iterate the sounds for the new system, pass the $HEVENTSYSTEM as the first parameter to $AIL_enumerate_sound_instances.
@@ -6646,7 +6646,7 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
DXDEC EXPAPI void AILCALL AIL_shutdown_event_system( void );
/*
Shuts down the Miles event system.
-
+
This function will closes everything in the event system - it ignores reference counts. It will free
all event memory, sound banks, and samples used by the system.
*/
@@ -6660,10 +6660,10 @@ DXDEC EXPAPI HMSOUNDBANK AILCALL AIL_add_soundbank(char const * filename, char c
$:return The handle to the newly loaded soundbank (zero on failure).
This function opens the sound bank and makes it available to the event system. The filename
- is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
+ is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
You might, for example, be using a soundbank with a platform extension, like: 'gamebank_ps3.msscmp',
and while using the name 'gamebank' for authoring and auditioning.
-
+
Sound data is not loaded when this function is called - it is only loaded when the relevant Cache Sounds
is played, or a sound requiring it plays.
@@ -6685,7 +6685,7 @@ DXDEC EXPAPI S32 AILCALL AIL_release_soundbank(HMSOUNDBANK bank);
Any other data references still existing (queued events, persisted presets, etc) will report errors when used,
but will not crash.
-
+
Releasing a sound bank does not free any cached sounds loaded from the bank - any sounds from the bank should be freed
via a Purge Sounds event step. If this does not occur, the sound data will still be loaded, but the
sound metadata will be gone, so Start Sound events will not work. Purge Sounds will still work.
@@ -6698,24 +6698,24 @@ DXDEC U8 const * AILCALL AIL_find_event(HMSOUNDBANK bank,char const* event_name)
(EXPAPI removed to prevent release in docs)
Searches for an event by name in the event system.
-
+
$:bank The soundbank to search within, or 0 to search all open banks (which is the normal case).
$:event_name The name of the event to find. This name should be of the form "soundbank/event_list/event_name".
$:return A pointer to the event contents (or 0, if the event isn't found).
-
+
This function is normally used as the event parameter for $AIL_enqueue_event. It
searches one or all open soundbanks for a particular event name.
-
- <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
+
+ <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
MILESEVENT_ENQUEUE_BY_NAME.
-
+
Events that are not enqueued by name can not be tracked by the Auditioner.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_system(HEVENTSYSTEM system, U8 const * event, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to a specific system. Used only if you have multiple event systems running.
-
+
$:system The event system to attach the event to.
$:return See $AIL_enqueue_event for return description.
@@ -6728,10 +6728,10 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_by_name(char const* name);
$:name The full name of the event, eg "soundbank/path/to/event".
$:return See $AIL_enqueue_event for return description.
-
- This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
-
- For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
+
+ This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
+
+ For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
to calling $AIL_enqueue_event_end_named($AIL_enqueue_event_start(), name)
For introduction to the auditioning system, see $integrating_events.
@@ -6743,9 +6743,9 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
$:return A token used for passing to functions that add data to the event.
- This is used to pass more data to an event that will be executed. For instance, if
+ This is used to pass more data to an event that will be executed. For instance, if
an event is going to spatialize a sound, but there's no need to move the sound over the course of
- its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
+ its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
sound is started it will use that for its initial position, and there is no need to do any
game object <-> event id tracking.
@@ -6762,7 +6762,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
The enqueue process is still completely thread safe. No locks are used, however only 8
enqueues can be "assembling" at the same time - if more than that occur, the $AIL_enqueue_event_start
- will yield the thread until a slot is open.
+ will yield the thread until a slot is open.
The ONLY time that should happen is if events enqueues are started but never ended:
@@ -6838,7 +6838,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
user buffer contents, and then exposed during sound enumeration. This is equivalent in spirit to
the void* value that often accompanies callbacks. In this case, user_buffer_len is ignored, as
user_buffer is never dereferenced.
- $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
+ $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
carried with the event. During sound enumeration this buffer is made available, and you never have to
worry about memory management.
$-
@@ -6855,7 +6855,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data->game_stat = 1;
data->needed_info = 2;
- // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
+ // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
// completes and we're done using it in the enumeration loop.
S32 ptr_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&ptr_token, data, 0, 1);
@@ -6874,7 +6874,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data.game_stat = 1;
data.needed_info = 2;
- // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
+ // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
// a stack variable like this
S32 buf_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&buf_token, &data, sizeof(data), 0);
@@ -6895,7 +6895,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_variablef(S32* token, char const* nam
$:value The value of the variable to set.
$:return 0 if the enqueue buffer is full
- When a sound starts, the given variable will be set to the given value prior to any possible
+ When a sound starts, the given variable will be set to the given value prior to any possible
references being used by presets.
*/
@@ -6904,7 +6904,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_filter(S32* token, U64 apply_to_ID);
Limits the effects of the event to sounds started by the given ID.
$:token A token created with $AIL_enqueue_event_start
- $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
+ $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
event, it will apply to all sounds started by the event, and any events queued by that event.
$:return 0 if the enqueue buffer is full
@@ -6932,7 +6932,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_selection(S32* token, U32 selection);
$:selection The value to use for selecting the sound to play.
$:return 0 if the enqueue buffer is full
- The selection index is used to programatically select a sound from the
+ The selection index is used to programatically select a sound from the
loaded banks. The index passed in replaces any numeric value at the end
of the sound name existing in any start sound event step. For example, if
a start sound event plays "mybank/sound1", and the event is queued with
@@ -6969,52 +6969,52 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_end_named(S32 token, char const* even
As with all of the enqueue functions it is completely thread-safe.
Upon completion of this function, the enqueue slot is release and available for another
- $AIL_enqueue_event_start.
+ $AIL_enqueue_event_start.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event(U8 const * event_or_name, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to be processed by the next $AIL_begin_event_queue_processing function.
-
- $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
+
+ $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
If an event, the contents must be valid until the next call to $AIL_begin_event_queue_processing.
If a name, the string is copied internally and does not have any lifetime requirements, and MILES_ENQUEUE_BY_NAME must be present in enqueue_flags.
- $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
- This data is then accessible later, when enumerating the instances.
+ $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
+ This data is then accessible later, when enumerating the instances.
$:user_buffer_len Size of the buffer pointed to by user_buffer.
$:enqueue_flags Optional $MILESEVENTENQUEUEFLAGS logically OR'd together that control how to enqueue this event (default is 0).
$:apply_to_ID Optional value that is used for events that affect sound instances. Normally,
- when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
+ when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
you specify an apply_to_ID value, then event step will only run on sounds that matches this QueuedID,InstanceID,or EventID too. This is how you
- execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
+ execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
InstanceIDs and EventIDs are returned from $AIL_enumerate_sound_instances.
- $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
+ $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
program run (you can use this ID to uniquely identify sounds triggered from this event).
-
+
This function enqueues an event to be triggered - this is how you begin execution of an event. First, you
queue it, and then later (usually once a game frame), you call $AIL_begin_event_queue_processing to
execute an event.
-
- This function is very lightweight. It does nothing more than post the event and data to a
+
+ This function is very lightweight. It does nothing more than post the event and data to a
command buffer that gets executed via $AIL_begin_event_queue_processing.
The user_buffer parameter can be used in different ways. If no flags are passed in, then
Miles will copy the data from user_buffer (user_buffer_len bytes long) and store the data with
the queued sound - you can then free the user_buffer data completely! This lets Miles keep track
- of all your sound related memory directly and is the normal way to use the system (it is very
+ of all your sound related memory directly and is the normal way to use the system (it is very
convenient once you get used to it).
If you instead pass the MILESEVENT_ENQUEUE_BUFFER_PTR flag, then user_buffer pointer will
simply be associated with each sound that this event may start. In this case, user_buffer_len
is ignored.
-
- In both cases, when you later enumerate the sound instances, you can access your sound data
+
+ In both cases, when you later enumerate the sound instances, you can access your sound data
with the $(MILESEVENTSOUNDINFO::UserBuffer) field.
-
+
You can call this function from any number threads - it's designed to be called from anywhere in your game.
If you want events you queue to be captured by Miles Studio, then they have to be passed by name. This can be done
- by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
+ by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
passing the name in event_or_name. For introduction to the auditioning system, see $integrating_events.
*/
@@ -7044,23 +7044,23 @@ DXDEC EXPAPI S32 AILCALL AIL_begin_event_queue_processing( void );
/*
Begin execution of all of the enqueued events.
- $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
+ $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
(out of memory, bank file not found, bad data, etc). You can get the specific error by
calling $AIL_last_error.
-
+
This function executes all the events currently in the queue. This is where all major
processing takes place in the event system.
-
+
Once you execute this functions, then sound instances will be in one of three states:
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7082,7 +7082,7 @@ ${
MILESEVENTSOUNDINFO Info;
HMSSENUM SoundEnum = MSS_FIRST;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
{
game_type * game_data = (game_type*) Info.UserBuffer; // returns the game_data pointer from the enqueue
@@ -7098,13 +7098,13 @@ ${
}
}
- $AIL_complete_event_queue_processing( );
- $}
-
- Note that if any event step drastically fails, the rest of the command queue is
+ $AIL_complete_event_queue_processing( );
+ $}
+
+ Note that if any event step drastically fails, the rest of the command queue is
skipped, and this function returns 0! For this reason, you shouldn't assume
that a start sound event will always result in a completed sound later.
-
+
Therefore, you should allocate memory that you want associated with a sound instance
during the enumeration loop, rather than at enqueue time. Otherwise, you
need to detect that the sound didn't start and then free the memory (which can be complicated).
@@ -7120,7 +7120,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
HSTREAM Stream;
void* UserBuffer;
S32 UserBufferLen;
- S32 Status;
+ S32 Status;
U32 Flags;
S32 UsedDelay;
F32 UsedVolume;
@@ -7130,10 +7130,10 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
} MILESEVENTSOUNDINFO;
/*
Sound instance data that is associated with each active sound instance.
-
+
$:QueuedID A unique ID that identifies the queued event that started this sound. Returned from each call to $AIL_enqueue_event.
$:EventID A unique ID that identifies the actual event that started this sound. This is the same as QueuedID unless the sound
- was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
+ was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
$AIL_enqueue_event, and EventID represents the completion event.
$:InstanceID A unique ID that identified this specific sound instance (note that one QueuedID can trigger multiple InstanceIDs).
$:Sample The $HSAMPLE for this playing sound.
@@ -7148,7 +7148,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
$:UsedSound The name of the sound used as a result of randomization. This pointer should NOT be deleted
and is only valid for the until the next call in to Miles.
$:HasCompletionEvent Nonzero if the sound will fire an event upon completion.
-
+
This structure is returned by the $AIL_enumerate_sound_instances function. It
returns information about an active sound instance.
*/
@@ -7157,7 +7157,7 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7183,14 +7183,14 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
// A preset referencing "MyVar" for FirstSound will get 10. Any other sound will
// get 20.
$}
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_variable_float(UINTa context, char const* name, F32 value);
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7265,7 +7265,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sound_start_offset(HMSSENUM sound, S32 offset,
the sound starting. Generally you don't need to do this manually, since the sound designer should do
this, however if you need to restart a sound that stopped - for example a stream that went to error -
you will have to set the start position via code.
-
+
However, since there can be a delay between the time the sound is first seen in the sound iteration and
the time it gets set to the data, start positions set via the low level miles calls can get lost, so
use this.
@@ -7281,11 +7281,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$:statuses Or-ed list of status values to enumerate. Use 0 for all status types.
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:search_for_ID Match only instances that have a QueuedID,InstanceID,or EventID that matches this value. Use 0 to skip ID matching.
- $:info Returns the data for each sound instance.
+ $:info Returns the data for each sound instance.
$:return Returns 0 when enumeration is complete.
Enumerates the sound instances. This will generally be used between
- calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
+ calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
manage the sound instances.
The label_query is a list of labels to match, separated by commas. By default, comma-separated
@@ -7302,11 +7302,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7315,7 +7315,7 @@ ${
HMSSENUM SoundEnum = MSS_FIRST;
MILESEVENTSOUNDINFO Info;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
{
if ( Info.Status != MILESEVENT_SOUND_STATUS_COMPLETE )
{
@@ -7330,23 +7330,23 @@ $}
EXPTYPEBEGIN typedef S32 MILESEVENTSOUNDSTATUS;
#define MILESEVENT_SOUND_STATUS_PENDING 0x1
-#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
+#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
#define MILESEVENT_SOUND_STATUS_COMPLETE 0x4
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_STATUS_PENDING New sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$:MILESEVENT_SOUND_STATUS_PLAYING Sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$:MILESEVENT_SOUND_STATUS_COMPLETE Sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
-
+
These are the status values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them.
*/
@@ -7360,13 +7360,13 @@ EXPTYPEBEGIN typedef U32 MILESEVENTSOUNDFLAG;
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_FLAG_MISSING_SOUND The event system tried to look up the sound requested from a Start Sound event
and couldn't find anything in the loaded banks.
$:MILESEVENT_SOUND_FLAG_EVICTED The sound was evicted due to a sound instance limit being hit. Another sound was selected
as being higher priority, and this sound was stopped as a result. This can be the result of either a Label Sound Limit,
or a limit on the sound itself.
- $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
+ $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
The sound will start when sufficient data has been loaded to hopefully avoid a skip.
$:MILESEVENT_SONUD_FLAG_PENDING_ASYNC The sound has started playing, but the data still isn't completely loaded, and it's possible
that the sound playback will catch up to the read position under poor I/O conditions.
@@ -7375,7 +7375,7 @@ EXPTYPEEND
sound data is asynchronously loaded, or specify the sound in a Cache Sounds step prior to attempting to start it.
$:MILESEVENT_SOUND_FLAG_FAILED_ASYNC The sound tried to load and the asynchronous I/O operation failed - most likely either the media
was removed during load, or the file was not found.
-
+
These are the flag values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them. Instances
may have more than one flag, logically 'or'ed together.
*/
@@ -7383,16 +7383,16 @@ EXPTYPEEND
DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
/*
Completes the queue processing (which is started with $AIL_begin_event_queue_processing ).
-
+
$:return Returns 0 on failure.
- This function must be called as a pair with $AIL_begin_event_queue_processing.
-
- In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
- started playing yet. Old sound instances that have finished playing are still valid - they
- haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
+ This function must be called as a pair with $AIL_begin_event_queue_processing.
+
+ In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
+ started playing yet. Old sound instances that have finished playing are still valid - they
+ haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
and frees the completed ones - it's the 2nd half of the event processing.
-
+
Usually you call $AIL_enumerate_sound_instances before this function to manage all the sound
instances.
*/
@@ -7400,7 +7400,7 @@ DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a stop sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to stop only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7408,7 +7408,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
Enqueues an event to stop all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to stop the necessary sounds,
however, if a single sound (for example associated with an enemy that the player just killed) needs to be stopped,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7417,7 +7417,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a pause sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to pause only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7425,7 +7425,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
Enqueues an event to pause all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to pause the necessary sounds,
however, if a single sound (for example associated with an enemy that has been put in to stasis) needs to be paused,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7434,7 +7434,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a resume sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to resume only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7442,17 +7442,17 @@ DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U6
Enqueues an event to resume all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to resume the necessary sounds,
however, if a single sound (for example associated with an enemy that has been restored from stasis) needs to be resumed,
this function accomplishes that, and is captured by the auditioner for replay.
*/
-DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
+DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
S32 should_stream, char const * labels, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags );
/*
Allows the programmer to manually enqueue a start sound event into the event system.
-
+
$:bank The bank containing the sound to start.
$:sound The name of the sound file to start, including bank name, e.g. "BankName/SoundName"
$:loop_count The loop count to assign to the sound. 0 for infinite, 1 for play once, or just the number of times to loop.
@@ -7463,10 +7463,10 @@ DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const *
$:enqueue_flags See the enqueue_flags description in $AIL_enqueue_event.
$:return Returns a non-zero EnqueueID on success.
- Enqueues an event to start the specified sound asset.
-
+ Enqueues an event to start the specified sound asset.
+
Usually the programmer should trigger an event that the sound designer has specifically
- create to start the appropriate sounds, but this function gives the programmer
+ create to start the appropriate sounds, but this function gives the programmer
manual control, if necessary. <b>This function is not captured by the auditioner.</b>
*/
@@ -7488,7 +7488,7 @@ DXDEC EXPAPI S32 AILCALL AIL_set_sound_label_limits(HEVENTSYSTEM system, char co
Every time an event triggers a sound to be played, the sound limits are checked, and, if exceeded, a sound is dropped (based
on the settings in the event step).
-
+
Usually event limits are set by a sound designer via an event, but this lets the programmer override the limits at runtime.
Note that this replaces those events, it does not supplement.
*/
@@ -7503,7 +7503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
that this pointer can change frame to frame and should be immediately copied to a client-allocated
buffer if persistence is desired.
$:return Returns 0 when enumeration is complete.
-
+
This function lets you enumerate all the persisting presets that are currently active in the system. It
is mostly a debugging aid.
*/
@@ -7511,12 +7511,12 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
DXDEC EXPAPI char * AILCALL AIL_text_dump_event_system(void);
/*
Returns a big string describing the current state of the event system.
-
- $:return String description of current systems state.
+
+ $:return String description of current systems state.
This function is a debugging aid - it can be used to show all of the active allocations,
active sounds, etc.
-
+
You must delete the pointer returned from this function with $AIL_mem_free_lock.
*/
@@ -7535,7 +7535,7 @@ EXPTYPE typedef struct _MILESEVENTSTATE
} MILESEVENTSTATE;
/*
returns the current state of the Miles Event System.
-
+
$:CommandBufferSize The size of the command buffer in bytes. See also the $AIL_startup_event_system.
$:HeapSize The total size of memory used by the event system for management structures, and is allocated during startup. This does not include loaded file sizes.
$:HeapRemaining The number of bytes in HeapSize that is remaining.
@@ -7615,7 +7615,7 @@ EXPTYPE typedef struct _MILESBANKFUNCTIONS
} MILESBANKFUNCTIONS;
/*
specifies callbacks for each of the Miles event system.
-
+
$:FreeAll Callback that tells you to free all user-side bank memory.
$:GetPreset Callback to retrieve a sound preset.
$:GetEnvironment Callback to retrieve an environment preset.
@@ -7645,13 +7645,13 @@ DXDEC EXPAPI void AILCALL AIL_set_event_sample_functions(HSAMPLE (*CreateSampleC
In the callback, SoundName is the name of the asset in Miles Studio, and SoundFileName
is the value returned from Container_GetSound() (see also $AIL_set_event_bank_functions).
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_event_bank_functions(MILESBANKFUNCTIONS const * Functions);
/*
Allows you to override the internal bank file resource management..
-
+
$:Functions A pointer to a structure containing all the callback functions.
This function is used to completely override the high-level resource management system.
@@ -7856,7 +7856,7 @@ EXPTYPEEND
$:MILES_PLAT_IPHONE Apple iDevices
$:MILES_PLAT_LINUX Linux Flavors
$:MILES_PLAT_WII Nintendo Wii
- $:MILES_PLAT_PSP2 Sony NGP
+ $:MILES_PLAT_PSP2 Sony NGP
Values representing the various platforms the high level tool allows.
*/
@@ -7891,11 +7891,11 @@ EXPGROUP(Miles High Level Event System)
DXDEC EXPAPI void AILCALL AIL_event_system_state(HEVENTSYSTEM system, MILESEVENTSTATE* state);
/*
Returns an information structure about the current state of the Miles Event System.
-
+
$:system The system to retrieve information for, or zero for the default system.
$:state A pointer to a structure to receive the state information.
- This function is a debugging aid - it returns information for the event system.
+ This function is a debugging aid - it returns information for the event system.
*/
DXDEC EXPAPI U32 AILCALL AIL_event_system_command_queue_remaining();
@@ -7923,7 +7923,7 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_length(char const* i_EventName);
// Callback for the error handler.
EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_Resource);
/*
- The function prototype to use for a callback that will be made when the event system
+ The function prototype to use for a callback that will be made when the event system
encounters an unrecoverable error.
$:i_RelevantId The ID of the asset that encountered the error, as best known. EventID or SoundID.
@@ -7937,7 +7937,7 @@ EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_
EXPAPI typedef S32 AILCALLBACK MSS_USER_RAND( void );
/*
The function definition to use when defining your own random function.
-
+
You can define a function with this prototype and pass it to $AIL_register_random
if you want to tie the Miles random calls in with your game's (for logging and such).
*/
@@ -7953,7 +7953,7 @@ DXDEC EXPAPI void AILCALL AIL_set_event_error_callback(AILEVENTERRORCB * i_Error
can sometimes be somewhat invisible. This function allows you to see what went wrong,
when it went wrong.
- The basic usage is to have the callback check $AIL_last_error() for the overall category of
+ The basic usage is to have the callback check $AIL_last_error() for the overall category of
failure. The parameter passed to the callback might provide some context, but it can and will
be zero on occasion. Generally it will represent the resource string that is being worked on when the error
occurred.
@@ -8009,7 +8009,7 @@ typedef C8 * (AILCALL *FLT_ERROR)(void);
typedef HDRIVERSTATE (AILCALL *FLT_OPEN_DRIVER) (MSS_ALLOC_TYPE * palloc,
MSS_FREE_TYPE * pfree,
- UINTa user,
+ UINTa user,
HDIGDRIVER dig, void * memory);
typedef FLTRESULT (AILCALL *FLT_CLOSE_DRIVER) (HDRIVERSTATE state);
diff --git a/Minecraft.Client/Orbis/Miles/include/rrCore.h b/Minecraft.Client/Orbis/Miles/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/Orbis/Miles/include/rrCore.h
+++ b/Minecraft.Client/Orbis/Miles/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.cpp b/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.cpp
index 650683b0..1b32bce2 100644
--- a/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.cpp
+++ b/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.cpp
@@ -21,8 +21,8 @@ int (* SQRNetworkManager_Orbis::s_SignInCompleteCallbackFn)(void *pParam, bool b
void * SQRNetworkManager_Orbis::s_SignInCompleteParam = NULL;
sce::Toolkit::NP::PresenceDetails SQRNetworkManager_Orbis::s_lastPresenceInfo;
-__int64 SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
-__int64 SQRNetworkManager_Orbis::s_resendPresenceTime = 0;
+int64_t SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
+int64_t SQRNetworkManager_Orbis::s_resendPresenceTime = 0;
bool SQRNetworkManager_Orbis::s_presenceStatusDirty = false;
bool SQRNetworkManager_Orbis::s_presenceDataDirty = false;
diff --git a/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.h b/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.h
index 5b19f63e..cb7cafa9 100644
--- a/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.h
+++ b/Minecraft.Client/Orbis/Network/SQRNetworkManager_Orbis.h
@@ -29,7 +29,7 @@ class SQRNetworkManager_Orbis : public SQRNetworkManager
public:
SQRNetworkManager_Orbis(ISQRNetworkManagerListener *listener);
- // General
+ // General
void Tick();
void Initialise();
void Terminate();
@@ -111,7 +111,7 @@ private:
bool m_offlineSQR;
int m_resendExternalRoomDataCountdown;
bool m_matching2initialised;
- PresenceSyncInfo m_inviteReceived[MAX_SIMULTANEOUS_INVITES];
+ PresenceSyncInfo m_inviteReceived[MAX_SIMULTANEOUS_INVITES];
int m_inviteIndex;
static PresenceSyncInfo *m_gameBootInvite;
static PresenceSyncInfo m_gameBootInvite_data;
@@ -222,9 +222,9 @@ private:
std::vector<FriendSearchResult> m_aFriendSearchResults;
// Rudp management and local players
- std::unordered_map<int,SQRNetworkPlayer *> m_RudpCtxToPlayerMap;
+ std::unordered_map<int,SQRNetworkPlayer *> m_RudpCtxToPlayerMap;
- std::unordered_map<SceNetInAddr_t, SQRVoiceConnection*> m_NetAddrToVoiceConnectionMap;
+ std::unordered_map<SceNetInAddr_t, SQRVoiceConnection*> m_NetAddrToVoiceConnectionMap;
bool CreateRudpConnections(SceNpMatching2RoomId roomId, SceNpMatching2RoomMemberId peerMemberId, int playerMask, SceNpMatching2RoomMemberId playersPeerMemberId);
bool CreateVoiceRudpConnections(SceNpMatching2RoomId roomId, SceNpMatching2RoomMemberId peerMemberId, int playerMask);
@@ -325,8 +325,8 @@ private:
static sce::Toolkit::NP::PresenceDetails s_lastPresenceInfo;
static const int MIN_PRESENCE_RESEND_TIME = 30 * 1000; // Minimum presence send rate - doesn't seem possible to find out what this actually should be
- static __int64 s_lastPresenceTime;
- static __int64 s_resendPresenceTime;
+ static int64_t s_lastPresenceTime;
+ static int64_t s_resendPresenceTime;
static bool s_presenceStatusDirty;
static bool s_presenceDataDirty;
@@ -337,7 +337,7 @@ private:
// Debug
static long long s_roomStartTime;
-
+
// Error dialog
static bool s_errorDialogRunning;
diff --git a/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.cpp b/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.cpp
index d3a21ac4..661a1528 100644
--- a/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.cpp
+++ b/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.cpp
@@ -24,9 +24,9 @@ int32_t hBGMAudio;
//static char sc_loadPath[] = {"/app0/"};
//const char* getConsoleHomePath() { return sc_loadPath; }
-char* getUsrDirPath()
-{
- return usrdirPath;
+char* getUsrDirPath()
+{
+ return usrdirPath;
}
@@ -34,7 +34,7 @@ int _wcsicmp( const wchar_t * dst, const wchar_t * src )
{
wchar_t f,l;
- // validation section
+ // validation section
// _VALIDATE_RETURN(dst != NULL, EINVAL, _NLSCMPERROR);
// _VALIDATE_RETURN(src != NULL, EINVAL, _NLSCMPERROR);
@@ -61,7 +61,7 @@ size_t wcsnlen(const wchar_t *wcs, size_t maxsize)
}
-VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
+VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
{
SceRtcDateTime dateTime;
int err = sceRtcGetCurrentClock(&dateTime, 0);
@@ -78,8 +78,8 @@ VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
}
BOOL FileTimeToSystemTime(CONST FILETIME *lpFileTime, LPSYSTEMTIME lpSystemTime) { ORBIS_STUBBED; return false; }
BOOL SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime) { ORBIS_STUBBED; return false; }
-VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
-{
+VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
+{
SceRtcDateTime dateTime;
int err = sceRtcGetCurrentClockLocalTime(&dateTime);
assert(err == SCE_OK );
@@ -95,21 +95,21 @@ VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
}
HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { ORBIS_STUBBED; return NULL; }
-VOID Sleep(DWORD dwMilliseconds)
-{
+VOID Sleep(DWORD dwMilliseconds)
+{
C4JThread::Sleep(dwMilliseconds);
}
BOOL SetThreadPriority(HANDLE hThread, int nPriority) { ORBIS_STUBBED; return FALSE; }
DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) { ORBIS_STUBBED; return false; }
-LONG InterlockedCompareExchangeRelease(LONG volatile *Destination, LONG Exchange,LONG Comperand )
-{
+LONG InterlockedCompareExchangeRelease(LONG volatile *Destination, LONG Exchange,LONG Comperand )
+{
return sceAtomicCompareAndSwap32((int32_t*)Destination, (int32_t)Comperand, (int32_t)Exchange);
}
-LONG64 InterlockedCompareExchangeRelease64(LONG64 volatile *Destination, LONG64 Exchange, LONG64 Comperand)
-{
+LONG64 InterlockedCompareExchangeRelease64(LONG64 volatile *Destination, LONG64 Exchange, LONG64 Comperand)
+{
return sceAtomicCompareAndSwap64((int64_t*)Destination, (int64_t)Comperand, (int64_t)Exchange);
}
@@ -135,10 +135,10 @@ VOID OrbisInit()
sceSysmoduleLoadModule(SCE_SYSMODULE_RUDP);
sceSysmoduleLoadModule(SCE_SYSMODULE_NP_MATCHING2);
sceSysmoduleLoadModule(SCE_SYSMODULE_INVITATION_DIALOG);
- sceSysmoduleLoadModule(SCE_SYSMODULE_NP_PARTY );
- sceSysmoduleLoadModule(SCE_SYSMODULE_GAME_CUSTOM_DATA_DIALOG );
- sceSysmoduleLoadModule(SCE_SYSMODULE_NP_SCORE_RANKING );
- sceSysmoduleLoadModule(SCE_SYSMODULE_NP_AUTH );
+ sceSysmoduleLoadModule(SCE_SYSMODULE_NP_PARTY );
+ sceSysmoduleLoadModule(SCE_SYSMODULE_GAME_CUSTOM_DATA_DIALOG );
+ sceSysmoduleLoadModule(SCE_SYSMODULE_NP_SCORE_RANKING );
+ sceSysmoduleLoadModule(SCE_SYSMODULE_NP_AUTH );
sceSysmoduleLoadModule(SCE_SYSMODULE_NP_COMMERCE);
sceSysmoduleLoadModule(SCE_SYSMODULE_REMOTE_PLAY);
sceSysmoduleLoadModule(SCE_SYSMODULE_ERROR_DIALOG);
@@ -173,7 +173,7 @@ VOID OrbisInit()
hBGMAudio=sceAudioOutOpen(
SCE_USER_SERVICE_USER_ID_SYSTEM,
SCE_AUDIO_OUT_PORT_TYPE_BGM,0,
- 256,
+ 256,
48000,
2);
@@ -195,7 +195,7 @@ int32_t GetAudioBGMHandle()
return hBGMAudio;
}
-VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
{
char name[1] = {0};
@@ -209,7 +209,7 @@ VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
}
-VOID InitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION CriticalSection, ULONG SpinCount)
+VOID InitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION CriticalSection, ULONG SpinCount)
{
InitializeCriticalSection(CriticalSection);
}
@@ -220,9 +220,9 @@ VOID DeleteCriticalSection(PCRITICAL_SECTION CriticalSection)
assert(err == SCE_OK);
}
-extern CRITICAL_SECTION g_singleThreadCS;
+extern CRITICAL_SECTION g_singleThreadCS;
-VOID EnterCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID EnterCriticalSection(PCRITICAL_SECTION CriticalSection)
{
int err = scePthreadMutexLock(&CriticalSection->mutex);
assert(err == SCE_OK || err == SCE_KERNEL_ERROR_EDEADLK );
@@ -240,7 +240,7 @@ VOID EnterCriticalSection(PCRITICAL_SECTION CriticalSection)
}
-VOID LeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID LeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
{
if(--CriticalSection->m_cLock == 0 )
{
@@ -255,7 +255,7 @@ VOID LeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
ULONG TryEnterCriticalSection(PCRITICAL_SECTION CriticalSection)
{
- int err = scePthreadMutexTrylock(&CriticalSection->mutex);
+ int err = scePthreadMutexTrylock(&CriticalSection->mutex);
if((err == SCE_OK || err == SCE_KERNEL_ERROR_EDEADLK ))
{
CriticalSection->m_cLock++;
@@ -266,20 +266,20 @@ ULONG TryEnterCriticalSection(PCRITICAL_SECTION CriticalSection)
DWORD WaitForMultipleObjects(DWORD nCount, CONST HANDLE *lpHandles,BOOL bWaitAll,DWORD dwMilliseconds) { ORBIS_STUBBED; return 0; }
-BOOL CloseHandle(HANDLE hObject)
-{
+BOOL CloseHandle(HANDLE hObject)
+{
sceFiosFHCloseSync(NULL,(SceFiosFH)((int64_t)hObject));
return true;
-// ORBIS_STUBBED;
-// return false;
+// ORBIS_STUBBED;
+// return false;
}
BOOL SetEvent(HANDLE hEvent) { ORBIS_STUBBED; return false; }
HMODULE GetModuleHandle(LPCSTR lpModuleName) { ORBIS_STUBBED; return 0; }
-DWORD GetCurrentThreadId(VOID)
-{
+DWORD GetCurrentThreadId(VOID)
+{
return 0; // TODO
}
DWORD WaitForMultipleObjectsEx(DWORD nCount,CONST HANDLE *lpHandles,BOOL bWaitAll,DWORD dwMilliseconds,BOOL bAlertable ) { ORBIS_STUBBED; return 0; }
@@ -302,10 +302,10 @@ public:
void* m_virtualAddr;
uint64_t m_size;
- PageInfo(off_t physAddr, void* virtualAddr, uint64_t size)
+ PageInfo(off_t physAddr, void* virtualAddr, uint64_t size)
: m_physAddr(physAddr)
, m_virtualAddr(virtualAddr)
- , m_size(size)
+ , m_size(size)
{}
};
void* m_virtualAddr;
@@ -313,7 +313,7 @@ public:
std::vector<PageInfo> m_pagesAllocated;
uint64_t m_allocatedSize;
- OrbisVAlloc(void* addr, uint64_t size)
+ OrbisVAlloc(void* addr, uint64_t size)
: m_virtualAddr(addr)
, m_virtualSize(size)
, m_allocatedSize(0)
@@ -331,7 +331,7 @@ public:
{
uint64_t sizeToAdd = size - m_allocatedSize; // the extra memory size that we have to add on
assert(sizeToAdd >= 0);
-
+
if(sizeToAdd == 0)
return m_virtualAddr; // nothing to add
@@ -393,8 +393,8 @@ public:
static std::vector<OrbisVAlloc*> s_orbisVAllocs;
-LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
-{
+LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
+{
if(lpAddress == NULL)
{
void *pAddr = (void*)SCE_KERNEL_APP_MAP_AREA_START_ADDR;
@@ -446,14 +446,14 @@ BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
else if(dwFreeType == MEM_RELEASE)
{
delete s_orbisVAllocs[idx];
- s_orbisVAllocs.erase(s_orbisVAllocs.begin()+idx);
+ s_orbisVAllocs.erase(s_orbisVAllocs.begin()+idx);
}
return TRUE;
}
-DWORD GetFileSize( HANDLE hFile, LPDWORD lpFileSizeHigh )
-{
+DWORD GetFileSize( HANDLE hFile, LPDWORD lpFileSizeHigh )
+{
SceFiosSize FileSize;
SceFiosFH fh = (SceFiosFH)((int64_t)hFile);
//DWORD FileSizeLow;
@@ -468,15 +468,15 @@ DWORD GetFileSize( HANDLE hFile, LPDWORD lpFileSizeHigh )
return (DWORD)FileSize;
}
-BOOL GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize )
-{
+BOOL GetFileSizeEx(HANDLE hFile, PLARGE_INTEGER lpFileSize )
+{
SceFiosSize FileSize;
SceFiosFH fh = (SceFiosFH)((int64_t)hFile);
FileSize=sceFiosFHGetSize(fh);
lpFileSize->QuadPart=FileSize;
- return true;
+ return true;
}
BOOL WriteFile(
HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPDWORD lpNumberOfBytesWritten, LPOVERLAPPED lpOverlapped )
@@ -496,7 +496,7 @@ BOOL WriteFile(
}
}
-BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped )
+BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped )
{
SceFiosFH fh = (SceFiosFH)((int64_t)hFile);
// sceFiosFHReadSync - Non-negative values are the number of bytes read, 0 <= result <= length. Negative values are error codes.
@@ -537,7 +537,7 @@ BOOL SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHi
}
-HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
+HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
char filePath[256];
std::string mountedPath = StorageManager.GetMountedPath(lpFileName);
@@ -549,7 +549,7 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
strcpy(filePath, lpFileName );
else
sprintf(filePath,"%s/%s",getUsrDirPath(), lpFileName );
-
+
#ifndef _CONTENT_PACKAGE
app.DebugPrintf("*** Opening %s\n",filePath);
#endif
@@ -557,9 +557,9 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
SceFiosFH fh;
SceFiosOpenParams openParams;
ZeroMemory(&openParams, sizeof(SceFiosOpenParams));
-
+
switch(dwDesiredAccess)
- {
+ {
case GENERIC_READ:
openParams.openFlags = SCE_FIOS_O_RDONLY; break;
case GENERIC_WRITE:
@@ -588,21 +588,21 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
return INVALID_HANDLE_VALUE;
}
//assert( err == SCE_FIOS_OK );
-
+
return (void*)fh;
}
BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes){ ORBIS_STUBBED; return false; }
BOOL DeleteFileA(LPCSTR lpFileName) { ORBIS_STUBBED; return false; }
-// BOOL XCloseHandle(HANDLE a)
+// BOOL XCloseHandle(HANDLE a)
// {
// sceFiosFHCloseSync(NULL,(SceFiosFH)((int64_t)a));
// return true;
// }
-DWORD GetFileAttributesA(LPCSTR lpFileName)
+DWORD GetFileAttributesA(LPCSTR lpFileName)
{
char filePath[256];
std::string mountedPath = StorageManager.GetMountedPath(lpFileName);
@@ -633,7 +633,7 @@ BOOL MoveFileA(LPCSTR lpExistingFileName, LPCSTR lpNewFileName) { ORBIS_STUBBED;
DWORD GetLastError(VOID) { ORBIS_STUBBED; return 0; }
-VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
+VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
{
SceLibcMallocManagedSize stat;
int err = malloc_stats(&stat);
@@ -647,20 +647,20 @@ VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
lpBuffer->dwAvailVirtual = stat.maxSystemSize - stat.currentInuseSize;
}
-DWORD GetTickCount()
+DWORD GetTickCount()
{
- // This function returns the current system time at this function is called.
+ // This function returns the current system time at this function is called.
// The system time is represented the time elapsed since the system starts up in microseconds.
uint64_t sysTime = sceKernelGetProcessTime();
- return (DWORD)(sysTime / 1000);
+ return (DWORD)(sysTime / 1000);
}
// we should really use libperf for this kind of thing, but this will do for now.
-BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
-{
+BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
+{
// microseconds
- lpFrequency->QuadPart = (1000 * 1000);
- return false;
+ lpFrequency->QuadPart = (1000 * 1000);
+ return false;
}
BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
{
@@ -671,24 +671,24 @@ BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
#ifndef _FINAL_BUILD
-VOID OutputDebugStringW(LPCWSTR lpOutputString)
-{
- wprintf(lpOutputString);
+VOID OutputDebugStringW(LPCWSTR lpOutputString)
+{
+ wprintf(lpOutputString);
}
-VOID OutputDebugStringA(LPCSTR lpOutputString)
-{
- printf(lpOutputString);
+VOID OutputDebugStringA(LPCSTR lpOutputString)
+{
+ printf(lpOutputString);
}
-VOID OutputDebugString(LPCSTR lpOutputString)
-{
- printf(lpOutputString);
+VOID OutputDebugString(LPCSTR lpOutputString)
+{
+ printf(lpOutputString);
}
#endif // _CONTENT_PACKAGE
BOOL GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation)
-{
+{
ORBIS_STUBBED;
return false;
}
@@ -696,15 +696,15 @@ HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) { ORB
BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) { ORBIS_STUBBED; return false;}
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%d",_Value); else if(_Radix==16) sprintf(_DstBuf,"%lx",_Value); else return -1; return 0; }
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
+errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
-DWORD XGetLanguage()
-{
+DWORD XGetLanguage()
+{
unsigned char ucLang = app.GetMinecraftLanguage(0);
int iLang;
// check if we should override the system language or not
- if(ucLang==MINECRAFT_LANGUAGE_DEFAULT)
+ if(ucLang==MINECRAFT_LANGUAGE_DEFAULT)
{
sceSystemServiceParamGetInt(SCE_SYSTEM_SERVICE_PARAM_ID_LANG,&iLang);
}
@@ -747,8 +747,8 @@ DWORD XGetLanguage()
}
}
-DWORD XGetLocale()
-{
+DWORD XGetLocale()
+{
int iLang;
sceSystemServiceParamGetInt(SCE_SYSTEM_SERVICE_PARAM_ID_LANG,&iLang);
switch(iLang)
@@ -784,7 +784,7 @@ DWORD XGetLocale()
}
}
-DWORD XEnableGuestSignin(BOOL fEnable)
-{
- return 0;
+DWORD XEnableGuestSignin(BOOL fEnable)
+{
+ return 0;
} \ No newline at end of file
diff --git a/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.h b/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.h
index da9f872f..390a0897 100644
--- a/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.h
+++ b/Minecraft.Client/Orbis/OrbisExtras/OrbisStubs.h
@@ -14,7 +14,7 @@ DWORD TlsAlloc(VOID);
LPVOID TlsGetValue(DWORD dwTlsIndex);
BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
-typedef struct _RECT
+typedef struct _RECT
{
LONG left;
LONG top;
@@ -37,16 +37,16 @@ typedef int errno_t;
// // The following field is used for blocking when there is contention for
// // the resource
// //
-//
+//
// union {
// ULONG_PTR RawEvent[4];
// } Synchronization;
-//
+//
// //
// // The following three fields control entering and exiting the critical
// // section for the resource
// //
-//
+//
// LONG LockCount;
// LONG RecursionCount;
// HANDLE OwningThread;
@@ -214,7 +214,7 @@ typedef struct _MEMORYSTATUS {
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
#define WAIT_TIMEOUT 258L
-#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
+#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define MAXUINT_PTR (~((UINT_PTR)0))
@@ -256,17 +256,17 @@ typedef struct _MEMORYSTATUS {
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)
-#define FILE_SHARE_READ 0x00000001
-#define FILE_SHARE_WRITE 0x00000002
-#define FILE_SHARE_DELETE 0x00000004
-#define FILE_ATTRIBUTE_READONLY 0x00000001
-#define FILE_ATTRIBUTE_HIDDEN 0x00000002
-#define FILE_ATTRIBUTE_SYSTEM 0x00000004
-#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
-#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-#define FILE_ATTRIBUTE_DEVICE 0x00000040
-#define FILE_ATTRIBUTE_NORMAL 0x00000080
-#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
+#define FILE_SHARE_READ 0x00000001
+#define FILE_SHARE_WRITE 0x00000002
+#define FILE_SHARE_DELETE 0x00000004
+#define FILE_ATTRIBUTE_READONLY 0x00000001
+#define FILE_ATTRIBUTE_HIDDEN 0x00000002
+#define FILE_ATTRIBUTE_SYSTEM 0x00000004
+#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
+#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
+#define FILE_ATTRIBUTE_DEVICE 0x00000040
+#define FILE_ATTRIBUTE_NORMAL 0x00000080
+#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000
@@ -286,38 +286,38 @@ typedef struct _MEMORYSTATUS {
#define OPEN_ALWAYS 4
#define TRUNCATE_EXISTING 5
-#define PAGE_NOACCESS 0x01
-#define PAGE_READONLY 0x02
-#define PAGE_READWRITE 0x04
-#define PAGE_WRITECOPY 0x08
-#define PAGE_EXECUTE 0x10
-#define PAGE_EXECUTE_READ 0x20
-#define PAGE_EXECUTE_READWRITE 0x40
-#define PAGE_EXECUTE_WRITECOPY 0x80
-#define PAGE_GUARD 0x100
-#define PAGE_NOCACHE 0x200
-#define PAGE_WRITECOMBINE 0x400
-#define PAGE_USER_READONLY 0x1000
-#define PAGE_USER_READWRITE 0x2000
-#define MEM_COMMIT 0x1000
-#define MEM_RESERVE 0x2000
-#define MEM_DECOMMIT 0x4000
-#define MEM_RELEASE 0x8000
-#define MEM_FREE 0x10000
-#define MEM_PRIVATE 0x20000
-#define MEM_RESET 0x80000
-#define MEM_TOP_DOWN 0x100000
-#define MEM_NOZERO 0x800000
-#define MEM_LARGE_PAGES 0x20000000
-#define MEM_HEAP 0x40000000
-#define MEM_16MB_PAGES 0x80000000
+#define PAGE_NOACCESS 0x01
+#define PAGE_READONLY 0x02
+#define PAGE_READWRITE 0x04
+#define PAGE_WRITECOPY 0x08
+#define PAGE_EXECUTE 0x10
+#define PAGE_EXECUTE_READ 0x20
+#define PAGE_EXECUTE_READWRITE 0x40
+#define PAGE_EXECUTE_WRITECOPY 0x80
+#define PAGE_GUARD 0x100
+#define PAGE_NOCACHE 0x200
+#define PAGE_WRITECOMBINE 0x400
+#define PAGE_USER_READONLY 0x1000
+#define PAGE_USER_READWRITE 0x2000
+#define MEM_COMMIT 0x1000
+#define MEM_RESERVE 0x2000
+#define MEM_DECOMMIT 0x4000
+#define MEM_RELEASE 0x8000
+#define MEM_FREE 0x10000
+#define MEM_PRIVATE 0x20000
+#define MEM_RESET 0x80000
+#define MEM_TOP_DOWN 0x100000
+#define MEM_NOZERO 0x800000
+#define MEM_LARGE_PAGES 0x20000000
+#define MEM_HEAP 0x40000000
+#define MEM_16MB_PAGES 0x80000000
#define IGNORE 0 // Ignore signal
#define INFINITE 0xFFFFFFFF // Infinite timeout
#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
-#define STATUS_WAIT_0 ((DWORD )0x00000000L)
+#define STATUS_WAIT_0 ((DWORD )0x00000000L)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
-#define STATUS_PENDING ((DWORD )0x00000103L)
+#define STATUS_PENDING ((DWORD )0x00000103L)
#define STILL_ACTIVE STATUS_PENDING
DWORD GetLastError(VOID);
@@ -356,9 +356,9 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
+errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix);
-#define __declspec(a)
+#define __declspec(a)
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
size_t wcsnlen(const wchar_t *wcs, size_t maxsize);
diff --git a/Minecraft.Client/Orbis/OrbisExtras/OrbisTypes.h b/Minecraft.Client/Orbis/OrbisExtras/OrbisTypes.h
index b91f3714..79fb10bf 100644
--- a/Minecraft.Client/Orbis/OrbisExtras/OrbisTypes.h
+++ b/Minecraft.Client/Orbis/OrbisExtras/OrbisTypes.h
@@ -1,6 +1,6 @@
#pragma once
-//#include "winerror.h"
+#include <cstdint>
typedef unsigned int DWORD;
typedef int BOOL;
@@ -34,8 +34,6 @@ typedef unsigned int *PUINT;
typedef unsigned char byte;
-typedef long __int64;
-typedef unsigned long __uint64;
typedef unsigned int DWORD;
typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
diff --git a/Minecraft.Client/Orbis/Orbis_App.cpp b/Minecraft.Client/Orbis/Orbis_App.cpp
index cd1ee215..fb40ff74 100644
--- a/Minecraft.Client/Orbis/Orbis_App.cpp
+++ b/Minecraft.Client/Orbis/Orbis_App.cpp
@@ -400,7 +400,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false;
- __int64 seedValue = BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+ int64_t seedValue = BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue;
diff --git a/Minecraft.Client/Orbis/user_malloc.cpp b/Minecraft.Client/Orbis/user_malloc.cpp
index 6a85e83b..1628abbe 100644
--- a/Minecraft.Client/Orbis/user_malloc.cpp
+++ b/Minecraft.Client/Orbis/user_malloc.cpp
@@ -38,7 +38,7 @@ int user_malloc_init(void)
int res;
void *addr;
uint64_t dmemSize = SCE_KERNEL_MAIN_DMEM_SIZE;
-
+
s_heapLength = ((size_t)4608) * 1024 * 1024; // Initial allocation for the application
s_heapLength -= ((size_t)4) * 1024 * 1024; // Allocated for TLS
s_heapLength -= ((size_t)2) * 1024 * 1024; // 64K (sometimes?) allocated for razor - rounding up to 2MB here to match our alignment
@@ -106,10 +106,10 @@ void *user_malloc(size_t size)
{
#if 0
static int throttle = 0;
- static __int64 lasttime = 0;
+ static int64_t lasttime = 0;
if( ( throttle % 100 ) == 0 )
{
- __int64 nowtime = System::currentTimeMillis();
+ int64_t nowtime = System::currentTimeMillis();
if( ( nowtime - lasttime ) > 20000 )
{
lasttime = nowtime;
diff --git a/Minecraft.Client/PS3/Iggy/include/rrCore.h b/Minecraft.Client/PS3/Iggy/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/PS3/Iggy/include/rrCore.h
+++ b/Minecraft.Client/PS3/Iggy/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/PS3/Miles/include/mss.h b/Minecraft.Client/PS3/Miles/include/mss.h
index 531dcbc9..8fe0a74d 100644
--- a/Minecraft.Client/PS3/Miles/include/mss.h
+++ b/Minecraft.Client/PS3/Miles/include/mss.h
@@ -39,7 +39,7 @@
// doc system stuff
#ifndef EXPAPI
-#define EXPAPI
+#define EXPAPI
#endif
#ifndef EXPTYPE
#define EXPTYPE
@@ -69,10 +69,10 @@
// For docs
EXPGROUP(_NullGroup)
#define MilesVersion "9.3m" EXPMACRO
-#define MilesMajorVersion 9 EXPMACRO
+#define MilesMajorVersion 9 EXPMACRO
#define MilesMinorVersion 3 EXPMACRO
-#define MilesBuildNumber 11 EXPMACRO
-#define MilesCustomization 0 EXPMACRO
+#define MilesBuildNumber 11 EXPMACRO
+#define MilesCustomization 0 EXPMACRO
EXPGROUP(_RootGroup)
@@ -273,14 +273,14 @@ typedef void VOIDFUNC(void);
//================
EXPGROUP(Basic Types)
-#define AILCALL EXPTAG(AILCALL)
+#define AILCALL EXPTAG(AILCALL)
/*
Internal calling convention that all external Miles functions use.
Usually cdecl or stdcall on Windows.
*/
-#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
+#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
/*
Calling convention that user supplied callbacks <b>from</b> Miles use.
@@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+ typedef unsigned long long ULONG_PTR, *PULONG_PTR;
#else
#ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
@@ -348,13 +348,13 @@ RADDEFSTART
typedef struct HWAVEOUT__ *HWAVEOUT;
typedef HWAVEIN *LPHWAVEIN;
typedef HWAVEOUT *LPHWAVEOUT;
-
+
#ifndef WAVE_MAPPER
#define WAVE_MAPPER ((UINT)-1)
#endif
typedef struct waveformat_tag *LPWAVEFORMAT;
-
+
typedef struct HMIDIOUT__ *HMIDIOUT;
typedef HMIDIOUT *LPHMIDIOUT;
typedef struct HWND__ *HWND;
@@ -368,9 +368,9 @@ RADDEFSTART
// If compiling MSS DLL, use __declspec(dllexport) for both
// declarations and definitions
//
-
+
#ifdef IS_WIN32
-
+
#if !defined(FORNONWIN) && !defined(__RADNTBUILDLINUX__)
#define AILLIBCALLBACK __stdcall
#define AILCALL __stdcall
@@ -382,20 +382,20 @@ RADDEFSTART
#define AILCALLBACK __cdecl
#define AILEXPORT __cdecl
#endif
-
+
#ifdef __RADINDLL__
#define DXDEC __declspec(dllexport)
#define DXDEF __declspec(dllexport)
#else
-
+
#if defined( __BORLANDC__ ) || defined( MSS_SPU_PROCESS )
#define DXDEC extern
#else
#define DXDEC __declspec(dllimport)
#endif
-
+
#endif
-
+
#ifdef IS_WIN64
#define MSSDLLNAME "MSS64.DLL"
#define MSS_REDIST_DIR_NAME "redist64"
@@ -403,11 +403,11 @@ RADDEFSTART
#define MSSDLLNAME "MSS32.DLL"
#define MSS_REDIST_DIR_NAME "redist"
#endif
-
+
#define MSS_DIR_SEP "\\"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
-
+
#endif
typedef void * LPVOID;
@@ -420,7 +420,7 @@ RADDEFSTART
#define AILLIBCALLBACK
#define AILCALL
#define AILEXPORT
- #define AILCALLBACK
+ #define AILCALLBACK
#elif defined(__RADX86__)
#define AILLIBCALLBACK __attribute__((cdecl))
#define AILCALL __attribute__((cdecl))
@@ -437,7 +437,7 @@ RADDEFSTART
#define DXDEC extern
#define DXDEF
#endif
-
+
#ifdef __RADX64__
#define MSS_REDIST_DIR_NAME "redist/x64"
#elif defined(IS_X86)
@@ -447,7 +447,7 @@ RADDEFSTART
#else
#error "No Redist Dir Specified"
#endif
-
+
#define MSS_DIR_SEP "/"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
@@ -714,7 +714,7 @@ typedef enum
#ifndef FILE_ERRS
#define FILE_ERRS
-
+
#define AIL_NO_ERROR 0
#define AIL_IO_ERROR 1
#define AIL_OUT_OF_MEMORY 2
@@ -736,9 +736,9 @@ EXPTYPEBEGIN typedef SINTa HMSSENUM;
EXPTYPEEND
/*
specifies a type used to enumerate through a list of properties.
-
+
$:MSS_FIRST use this value to start the enumeration process.
-
+
The Miles enumeration functions all work similarly - you set a local variable of type HMSSENUM to MSS_FIRST and then call
the enumeration function until it returns 0.
@@ -751,7 +751,7 @@ the enumeration function until it returns 0.
// Preference names and default values
//
-#define AIL_MM_PERIOD 0
+#define AIL_MM_PERIOD 0
#define DEFAULT_AMP 1 // Default MM timer period = 5 msec.
#define AIL_TIMERS 1
@@ -1877,7 +1877,7 @@ typedef struct _S3DSTATE // Portion of HSAMPLE that deals with 3D posi
F32 lowpass_3D; // low pass cutoff computed by falloff graph. -1 if not affected.
F32 spread;
-
+
HSAMPLE owner; // May be NULL if used for temporary/internal calculations
AILFALLOFFCB falloff_function; // User function for min/max distance calculations, if desired
@@ -1915,7 +1915,7 @@ typedef struct _SAMPLE // Sample instance
S32 index; // Numeric index of this sample
SMPBUF buf[8]; // Source data buffers
-
+
U32 src_fract; // Fractional part of source address
U32 mix_delay; // ms until start mixing (decreased every buffer mix)
@@ -1924,7 +1924,7 @@ typedef struct _SAMPLE // Sample instance
U64 mix_bytes; // total number of bytes sent to the mixer for this sample.
S32 group_id; // ID for grouped operations.
-
+
// size of the next dynamic arrays
U32 chan_buf_alloced;
U32 chan_buf_used;
@@ -1946,10 +1946,10 @@ typedef struct _SAMPLE // Sample instance
// these are dynamic arrays
F32 *auto_3D_channel_levels; // Channel levels set by 3D positioner (always 1.0 if not 3D-positioned)
F32 *speaker_levels; // one level per speaker (multiplied after user or 3D)
-
+
S8 *speaker_enum_to_source_chan; // array[MSS_SPEAKER_xx] = -1 if not present, else channel #
// 99% of the time this is a 1:1 mapping and is zero.
-
+
S32 lp_any_on; // are any of the low pass filters on?
S32 user_channels_need_deinterlace; // do any of the user channels require a stereo sample to be deinterlaced?
@@ -1989,7 +1989,7 @@ typedef struct _SAMPLE // Sample instance
U32 low_pass_changed; // bit mask for what channels changed.
-
+
S32 bus; // Bus assignment for this sample.
S32 bus_comp_sends; // Which buses this bus routes compressor input to.
S32 bus_comp_installed; // Nonzero if we have a compressor installed.
@@ -2042,7 +2042,7 @@ typedef struct _SAMPLE // Sample instance
SPINFO pipeline[N_SAMPLE_STAGES];
S32 n_active_filters; // # of SP_FILTER_n stages active
-
+
//
// 3D-related state for all platforms (including Xbox)
//
@@ -2113,14 +2113,14 @@ DXDEC void AILCALL AIL_serve(void);
#ifdef IS_MAC
typedef void * LPSTR;
-
+
#define WHDR_DONE 0
-
+
typedef struct _WAVEIN
{
long temp;
} * HWAVEIN;
-
+
typedef struct _WAVEHDR
{
S32 dwFlags;
@@ -2133,7 +2133,7 @@ DXDEC void AILCALL AIL_serve(void);
S32 dwLoops;
void * lpNext;
U32 * reserved;
-
+
} WAVEHDR, * LPWAVEHDR;
#endif
@@ -2145,7 +2145,7 @@ typedef struct _DIG_INPUT_DRIVER *HDIGINPUT; // Handle to digital input driver
#ifdef IS_MAC
#define AIL_DIGITAL_INPUT_DEFAULT 0
-
+
typedef struct _DIG_INPUT_DRIVER // Handle to digital input driver
{
U32 tag; // HDIN
@@ -2478,7 +2478,7 @@ typedef struct _DIG_DRIVER // Handle to digital audio driver
U32 last_ds_play;
U32 last_ds_write;
U32 last_ds_move;
-
+
#endif
#ifdef IS_X86
@@ -2661,7 +2661,7 @@ typedef struct _SEQUENCE // XMIDI sequence state table
void const *EVNT;
U8 const *EVNT_ptr; // Current event pointer
-
+
U8 *ICA; // Indirect Controller Array
AILPREFIXCB prefix_callback; // XMIDI Callback Prefix handler
@@ -3121,13 +3121,13 @@ DXDEC S32 AILCALL AIL_timer_thread_handle(void* o_handle);
#elif defined(__RADANDROID__)
DXDEC void AILCALL AIL_set_asset_manager(void* asset_manager);
-
+
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_SLESInstallDriver(UINTa, UINTa);
#define AIL_open_digital_driver(frequency, bits, channel, flags) \
AIL_open_generic_digital_driver(frequency, bits, channel, flags, RADSS_SLESInstallDriver(0, 0))
-
+
#elif defined(IS_PSP2)
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_PSP2InstallDriver(UINTa, UINTa);
@@ -3221,7 +3221,7 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
{
Str255 version_name;
} MSS_VersionType;
-
+
#define AIL_MSS_version(str,len) \
{ \
long _res = HOpenResFile(0,0,"\p" MSSDLLNAME,fsRdPerm); \
@@ -3269,11 +3269,11 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
} \
} \
}
-
+
#endif
DXDEC S32 AILCALL AIL_digital_handle_release(HDIGDRIVER drvr);
-
+
DXDEC S32 AILCALL AIL_digital_handle_reacquire
(HDIGDRIVER drvr);
@@ -3339,18 +3339,18 @@ DXDEC EXPAPI void AILCALL AIL_push_system_state(HDIGDRIVER dig, U32 flags, S16 c
$* <b>MILES_PUSH_VOLUME</b> - When present, master volume will be affected in addition to sample state.
If MILES_PUSH_RESET is present, the master volume will be set to 1.0f, otherwise it will be retained and only
- affected when popped.
+ affected when popped.
$-
- If you want more control over whether a sample will be affected by a push or a pop operation,
+ If you want more control over whether a sample will be affected by a push or a pop operation,
see $AIL_set_sample_level_mask.
-
+
*/
DXDEC EXPAPI void AILCALL AIL_pop_system_state(HDIGDRIVER dig, S16 crossfade_ms);
/*
- Pops the current system state and returns the system to the way it
+ Pops the current system state and returns the system to the way it
was before the last push.
$:dig The driver to pop.
@@ -3374,7 +3374,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_level_mask(HSAMPLE S, U8 mask);
$:S The sample to set the mask for.
$:mask The bitmask of levels for which the sample will play.
- Under normal push/pop operations, a sample's mask is set when it is
+ Under normal push/pop operations, a sample's mask is set when it is
started to the level the system is at. If the system is pushed
without a reset, then the mask is adjusted to include the new level.
When a system is popped, if the sample is going to continue playing,
@@ -3435,7 +3435,7 @@ DXDEC EXPAPI HSAMPLE AILCALL AIL_allocate_bus(HDIGDRIVER dig);
$:return The HSAMPLE for the new bus.
A bus allows you to treat a group of samples as one sample. With the bus sample you can
- do almost all of the things you can do with a normal sample handle. The only exception
+ do almost all of the things you can do with a normal sample handle. The only exception
is you can't adjust the playback rate of the sample.
Use $AIL_bus_sample_handle to get the HSAMPLE associated with a bus.
@@ -3495,7 +3495,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sample_bus(HSAMPLE S);
DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_index, SAMPLESTAGE filter_stage, S32 input_bus_index);
/*
- Installs the Compressor filter on to a bus, using another bus as the input for
+ Installs the Compressor filter on to a bus, using another bus as the input for
compression/limiting.
$:dig The driver the busses exist on.
@@ -3508,7 +3508,7 @@ DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_inde
its signal strength to the filter, allowing it to attenuate the bus_index bus based
on another bus's contents.
- To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
+ To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
use $AIL_sample_stage_property exactly as you would any other filter. The filter's properties
are documented under $(Compressor Filter)
*/
@@ -4325,7 +4325,7 @@ typedef void (AILCALLBACK* AILSTREAMCB) (HSTREAM stream);
#define MSS_STREAM_CHUNKS 8
-typedef struct _STREAM
+typedef struct _STREAM
{
S32 block_oriented; // 1 if this is an ADPCM or ASI-compressed stream
S32 using_ASI; // 1 if using ASI decoder to uncompress stream data
@@ -4349,7 +4349,7 @@ typedef struct _STREAM
S32 read_IO_index; // index of buffer to be loaded into Miles next
S32 bufsize; // size of each buffer
-
+
U32 datarate; // datarate in bytes per second
S32 filerate; // original datarate of the file
S32 filetype; // file format type
@@ -4987,7 +4987,7 @@ typedef struct
OGG_INFO;
DXDEC void AILCALL AIL_inspect_Ogg (OGG_INFO *inspection_state,
- U8 *Ogg_file_image,
+ U8 *Ogg_file_image,
S32 Ogg_file_size);
DXDEC S32 AILCALL AIL_enumerate_Ogg_pages (OGG_INFO *inspection_state);
@@ -5102,10 +5102,10 @@ DXDEC HDIGDRIVER AILCALL AIL_primary_digital_driver (HDIGDRIVER new_primary);
// 3D-related calls
//
-DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
+DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
S32 bus_index);
-DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
+DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
S32 bus_index,
S32 room_type);
@@ -5180,7 +5180,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_lowpass_falloff(HSAMPLE S, MSS
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
+ This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
a sample has such a graph, $AIL_set_sample_low_pass_cut_off will be called constantly, and thus shouldn't be
called otherwise.
@@ -5195,8 +5195,8 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_exclusion_falloff(HSAMPLE S, M
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having an exclusion that varies as a function of distance to the listener. If
- a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
+ This marks a sample as having an exclusion that varies as a function of distance to the listener. If
+ a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
affects reverb wet level.
The graph is evaluated the same as $AIL_set_sample_3D_volume_falloff.
@@ -5230,7 +5230,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_position_segments(HSAMPLE S, MSSVECT
other computations (cones, falloffs, etc). Spatialization is done using all segments as a directional
source.
- If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
+ If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
when the listener is within min_distance to the closest point. See $AIL_set_sample_3D_spread_falloff
and $AIL_set_sample_3D_volume_falloff.
@@ -5243,7 +5243,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_spread(HSAMPLE S, F32 spread);
$:S Sample to affect.
$:spread The value to set the spread to.
- Spread is how much the directionality of a sample "spreads" to more speakers - emulating
+ Spread is how much the directionality of a sample "spreads" to more speakers - emulating
the effect a sound has when it occupies more than a point source. For instance, a sound
point source that sits directly to the left of the listener would have a very strong left
speaker signal, and a fairly weak right speaker signal. Via spread, the signal would be
@@ -5392,7 +5392,7 @@ EXPGROUP(Miles High Level Event System)
EXPTYPE typedef struct MSSSOUNDBANK {};
/*
Internal structure.
-
+
Use $HMSOUNDBANK instead.
*/
@@ -5401,7 +5401,7 @@ EXPTYPE typedef struct MSSSOUNDBANK {};
EXPTYPE typedef struct SoundBank *HMSOUNDBANK;
/*
Describes a handle to an open sound bank.
-
+
This handle typedef refers to an open soundbank which is usually obtained from the $AIL_add_soundbank function.
*/
@@ -5424,7 +5424,7 @@ DXDEC EXPAPI void AILCALL AIL_close_soundbank(HMSOUNDBANK bank);
Close a soundbank previously opened with $AIL_open_soundbank.
$:bank Soundbank to close.
-
+
Close a soundbank previously opened with $AIL_open_soundbank. Presets/events loaded from
this soundbank are no longer valid.
*/
@@ -5448,7 +5448,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
$:return A pointer to the name of the sound bank, or 0 if the bank is invalid.
- The name of the bank is the name used in asset names. This is distinct from the
+ The name of the bank is the name used in asset names. This is distinct from the
file name of the bank.
The return value should not be deleted.
@@ -5457,7 +5457,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
DXDEC EXPAPI S32 AILCALL AIL_get_soundbank_mem_usage(HMSOUNDBANK bank);
/*
Returns the amount of data used by the soundbank management structures.
-
+
$:bank Soundbank to query.
$:return Total memory allocated.
@@ -5476,7 +5476,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_presets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sound presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5503,7 +5503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_environment_presets(HMSOUNDBANK bank, HMS
$:return Returns 0 when enumeration is complete.
Enumerates the environment presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5530,7 +5530,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sounds available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* SoundName = 0;
@@ -5549,7 +5549,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
Note that name should NOT be deleted by the caller - this points at memory owned by
Miles.
*/
-
+
DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next, char const * list, char const ** name);
/*
Enumerate the events stored in a soundbank.
@@ -5561,7 +5561,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next,
$:return Returns 0 when enumeration is complete.
Enumerates the events available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* EventName = 0;
@@ -5624,7 +5624,7 @@ DXDEC EXPAPI S32 AILCALL AIL_apply_sound_preset(HSAMPLE sample, HMSOUNDBANK bank
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
This will alter the properties on a given sample, based on the given preset.
-*/
+*/
DXDEC EXPAPI S32 AILCALL AIL_unapply_raw_sound_preset(HSAMPLE sample, void* preset);
/*
@@ -5644,7 +5644,7 @@ DXDEC EXPAPI S32 AILCALL AIL_unapply_sound_preset(HSAMPLE sample, HMSOUNDBANK ba
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
Presets may or may not affect any given property. Only the properties affected by the specified
- preset will have their values restored to default.
+ preset will have their values restored to default.
*/
typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPOUT void* output, S32 isfloat);
@@ -5658,7 +5658,7 @@ typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPO
$:isfloat nonzero if the output needs to be a float.
The function callback should convert variable expressions in to an output value of the
- requested type.
+ requested type.
*/
DXDEC EXPAPI S32 AILCALL AIL_resolve_raw_sound_preset(void* preset, void* context, MilesResolveFunc eval);
@@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
$:name The name of the sound asset to find.
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
- $:return Returns the byte size of the buffer required for out_name.
+ $:return Returns the byte size of the buffer required for out_name.
This function must be called in order to resolve the sound asset name to
something that can be used by miles. To ensure safe buffer containment, call
@@ -5832,7 +5832,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
ReturnType = "HMSSEVENTCONSTRUCT", "An empty event to be passed to the various step addition functions, or 0 if out of memory."
- Discussion = "Primarily designed for offline use, this function is the first step in
+ Discussion = "Primarily designed for offline use, this function is the first step in
creating an event that can be consumed by the MilesEvent system. Usage is as follows:
HMSSEVENTCONSTRUCT hEvent = AIL_create_event();
@@ -5850,7 +5850,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
Note that if immediately passed to AIL_enqueue_event(), the memory must remain valid until the following
$AIL_complete_event_queue_processing.
-
+
Events are generally tailored to the MilesEvent system, even though there is nothing preventing you
from writing your own event system, or creation ui.
"
@@ -5906,7 +5906,7 @@ EXPTYPEEND
/*
Determines the usage of the sound names list in the $AIL_add_start_sound_event_step.
- $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
+ $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
sound to play twice in a row. This is the only selection type that doesn't require
a state variable.
$:MILES_START_STEP_NO_REPEATS Randomly select from the list, but prevent the last sound from being the same.
@@ -5926,10 +5926,10 @@ EXPTYPEEND
Name = "AIL_add_start_sound_event_step", "Adds a step to a given event to start a sound with the given specifications."
In = "HMSSEVENTCONSTRUCT", "i_Event", "The event to add the step to."
- In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
- If there are multiple names listed, the sound will be chosen at random based on the given weights. This
+ In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
+ If there are multiple names listed, the sound will be chosen at random based on the given weights. This
string is of the form 'BankName1/SoundName1:Weight1:BankName2/SoundName2:Weight2:' etc. The string must always
- terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
+ terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
an empty string as an entry."
In = "const char*", "i_PresetName", "[optional] The name of the preset, of the form 'PresetList/PresetName'"
@@ -5944,7 +5944,7 @@ EXPTYPEEND
In = "U8", "i_CanLoad", "If nonzero, the sound is allowed to hit the disk instead of only accessing cached sounds. If true, this might cause a hitch."
In = "U16", "i_Delay", "The minimum delay in ms to apply to the sound before start."
In = "U16", "i_DelayMax", "The maximum delay in ms to apply to the sound before start."
- In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
+ In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
with a priority strictly less than the given priority."
In = "U8", "i_LoopCount", "The loop count as per AIL_set_sample_loop_count."
In = "const char*", "i_StartOffset", "[optional] The name of the marker to use as the sound's initial offset."
@@ -5969,19 +5969,19 @@ DXDEC
S32
AILCALL
AIL_add_start_sound_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_SoundNames,
- const char* i_PresetName,
+ const char* i_PresetName,
U8 i_PresetIsDynamic,
const char* i_EventName,
const char* i_StartMarker, const char* i_EndMarker,
char const* i_StateVar, char const* i_VarInit,
- const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
+ const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
U16 i_Delay, U16 i_DelayMax, U8 i_Priority, U8 i_LoopCount,
const char* i_StartOffset,
F32 i_VolMin, F32 i_VolMax, F32 i_PitchMin, F32 i_PitchMax,
F32 i_FadeInTime,
- U8 i_EvictionType,
+ U8 i_EvictionType,
U8 i_SelectType
);
@@ -6004,7 +6004,7 @@ AIL_add_start_sound_event_step(
In order to release the data loaded by this event, AIL_add_uncache_sounds_event_step() needs to
be called with the same parameters.
-
+
If you are using MilesEvent, the data is refcounted so the sound will not be freed until all
samples using it complete."
}
@@ -6089,7 +6089,7 @@ DXDEC
S32
AILCALL
AIL_add_control_sounds_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_Labels, const char* i_MarkerStart, const char* i_MarkerEnd, const char* i_Position,
const char* i_PresetName,
U8 i_PresetApplyType,
@@ -6191,7 +6191,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Defines a named blend function to be referenced by a blended sound later.
$:i_Event The event to add the step to.
- $:i_Name The name of the blend. This is the name that will be
+ $:i_Name The name of the blend. This is the name that will be
referenced by the state variable in start sound, as well as the variable name
to set by the game to update the blend for an instance.
$:i_SoundCount The number of sounds this blend will affect. Max 10.
@@ -6226,7 +6226,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Miles max sample count."
}
*/
-DXDEC S32 AILCALL
+DXDEC S32 AILCALL
AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitName, const char* i_SoundLimits);
/*!
@@ -6257,8 +6257,8 @@ AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitNa
AIL_add_persist_preset_event_step(hEvent, 0, `"Underwater`", 0);"
}
*/
-DXDEC S32 AILCALL
-AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
+DXDEC S32 AILCALL
+AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
const char* i_Labels, U8 i_IsDynamic
);
@@ -6272,13 +6272,13 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_contents(HMSOUNDBANK bank, char const * n
thus shouldn't be checked via strlen, etc.
$:return Returns 0 on fail.
- Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
+ Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
rather than inspected directly.
*/
DXDEC EXPAPI S32 AILCALL AIL_add_clear_state_event_step(HMSSEVENTCONSTRUCT i_Event);
/*
- Clears all persistent state in the runtime.
+ Clears all persistent state in the runtime.
$:i_Event The event to add the step to.
@@ -6311,7 +6311,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_enable_limit_event_step(HMSSEVENTCONSTRUCT i_Ev
DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, char const* i_Base, char const* i_Amp, char const* i_Freq, S32 i_Invert, S32 i_Polarity, S32 i_Waveform, S32 i_DutyCycle, S32 i_IsLFO);
/*
Adds a step to define a variable that oscillates over time.
-
+
$:i_Event The event to add the step to.
$:i_Name The nane of the variable to oscillate.
$:i_Base The value to oscillate around, or a variable name to use as the base.
@@ -6327,15 +6327,15 @@ DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event,
DXDEC EXPAPI S32 AILCALL AIL_add_move_var_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, const F32 i_Times[2], const S32 i_InterpolationTypes[2], const F32 i_Values[3]);
/*
Adds a step to set and move a variable over time on a curve.
-
+
$:i_Event The event to add the step to.
$:i_Name The variable to move.
$:i_Times The midpoint and final times for the curves
$:i_InterpolationTypes The curve type for the two curves - Curve In (0), Curve Out (1), S-Curve (2), Linear (3)
$:i_Values The initial, midpoint, and final values for the variable.
-
+
The variable is locked to this curve over the timeperiod - no interpolation from a previous value is done.
-
+
If an existing move var exists when the new one is added, the old one is replaced.
*/
@@ -6450,7 +6450,7 @@ struct EVENT_STEP_INFO
U8 isdynamic;
} persist;
- struct
+ struct
{
MSSSTRINGC name;
MSSSTRINGC labels;
@@ -6522,7 +6522,7 @@ struct EVENT_STEP_INFO
the string location of the next event step in the buffer."
Discussion = "This function parses the event string in to a struct for usage by the user. This function should only be
- used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
+ used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
next step. In this manner it can be used in a loop:
// Create an event to stop all sounds.
@@ -6610,11 +6610,11 @@ EXPTYPE typedef void* HEVENTSYSTEM;
DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_startup_event_system(HDIGDRIVER dig, S32 command_buf_len, EXPOUT char* memory_buf, S32 memory_len);
/*
Initializes the Miles Event system and associates it with an open digital driver.
-
+
$:dig The digital sound driver that this event system should use.
$:command_buf_len An optional number of bytes to use for the command buffer. If you pass 0, a reasonable default will be used (currently 5K).
- $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
- Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
+ $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
+ Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
Use 0 to let Miles to allocate this buffer itself.
$:memory_len If memory_buf is non-null, then this parameter provides the length. If memory_buf is null, the Miles will
allocate this much memory for internal buffers. If both memory_buf and memory_len are null, the Miles will allocate reasonable default (currently 64K).
@@ -6633,8 +6633,8 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
$:return A handle to the event system to use in various high level functions.
Both systems will access the same set of loaded soundbanks, and are updated when $AIL_begin_event_queue_processing is called.
-
- To enqueue events to the new system, use $AIL_enqueue_event_system.
+
+ To enqueue events to the new system, use $AIL_enqueue_event_system.
To iterate the sounds for the new system, pass the $HEVENTSYSTEM as the first parameter to $AIL_enumerate_sound_instances.
@@ -6646,7 +6646,7 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
DXDEC EXPAPI void AILCALL AIL_shutdown_event_system( void );
/*
Shuts down the Miles event system.
-
+
This function will closes everything in the event system - it ignores reference counts. It will free
all event memory, sound banks, and samples used by the system.
*/
@@ -6660,10 +6660,10 @@ DXDEC EXPAPI HMSOUNDBANK AILCALL AIL_add_soundbank(char const * filename, char c
$:return The handle to the newly loaded soundbank (zero on failure).
This function opens the sound bank and makes it available to the event system. The filename
- is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
+ is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
You might, for example, be using a soundbank with a platform extension, like: 'gamebank_ps3.msscmp',
and while using the name 'gamebank' for authoring and auditioning.
-
+
Sound data is not loaded when this function is called - it is only loaded when the relevant Cache Sounds
is played, or a sound requiring it plays.
@@ -6685,7 +6685,7 @@ DXDEC EXPAPI S32 AILCALL AIL_release_soundbank(HMSOUNDBANK bank);
Any other data references still existing (queued events, persisted presets, etc) will report errors when used,
but will not crash.
-
+
Releasing a sound bank does not free any cached sounds loaded from the bank - any sounds from the bank should be freed
via a Purge Sounds event step. If this does not occur, the sound data will still be loaded, but the
sound metadata will be gone, so Start Sound events will not work. Purge Sounds will still work.
@@ -6698,24 +6698,24 @@ DXDEC U8 const * AILCALL AIL_find_event(HMSOUNDBANK bank,char const* event_name)
(EXPAPI removed to prevent release in docs)
Searches for an event by name in the event system.
-
+
$:bank The soundbank to search within, or 0 to search all open banks (which is the normal case).
$:event_name The name of the event to find. This name should be of the form "soundbank/event_list/event_name".
$:return A pointer to the event contents (or 0, if the event isn't found).
-
+
This function is normally used as the event parameter for $AIL_enqueue_event. It
searches one or all open soundbanks for a particular event name.
-
- <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
+
+ <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
MILESEVENT_ENQUEUE_BY_NAME.
-
+
Events that are not enqueued by name can not be tracked by the Auditioner.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_system(HEVENTSYSTEM system, U8 const * event, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to a specific system. Used only if you have multiple event systems running.
-
+
$:system The event system to attach the event to.
$:return See $AIL_enqueue_event for return description.
@@ -6728,10 +6728,10 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_by_name(char const* name);
$:name The full name of the event, eg "soundbank/path/to/event".
$:return See $AIL_enqueue_event for return description.
-
- This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
-
- For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
+
+ This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
+
+ For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
to calling $AIL_enqueue_event_end_named($AIL_enqueue_event_start(), name)
For introduction to the auditioning system, see $integrating_events.
@@ -6743,9 +6743,9 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
$:return A token used for passing to functions that add data to the event.
- This is used to pass more data to an event that will be executed. For instance, if
+ This is used to pass more data to an event that will be executed. For instance, if
an event is going to spatialize a sound, but there's no need to move the sound over the course of
- its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
+ its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
sound is started it will use that for its initial position, and there is no need to do any
game object <-> event id tracking.
@@ -6762,7 +6762,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
The enqueue process is still completely thread safe. No locks are used, however only 8
enqueues can be "assembling" at the same time - if more than that occur, the $AIL_enqueue_event_start
- will yield the thread until a slot is open.
+ will yield the thread until a slot is open.
The ONLY time that should happen is if events enqueues are started but never ended:
@@ -6838,7 +6838,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
user buffer contents, and then exposed during sound enumeration. This is equivalent in spirit to
the void* value that often accompanies callbacks. In this case, user_buffer_len is ignored, as
user_buffer is never dereferenced.
- $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
+ $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
carried with the event. During sound enumeration this buffer is made available, and you never have to
worry about memory management.
$-
@@ -6855,7 +6855,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data->game_stat = 1;
data->needed_info = 2;
- // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
+ // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
// completes and we're done using it in the enumeration loop.
S32 ptr_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&ptr_token, data, 0, 1);
@@ -6874,7 +6874,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data.game_stat = 1;
data.needed_info = 2;
- // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
+ // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
// a stack variable like this
S32 buf_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&buf_token, &data, sizeof(data), 0);
@@ -6895,7 +6895,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_variablef(S32* token, char const* nam
$:value The value of the variable to set.
$:return 0 if the enqueue buffer is full
- When a sound starts, the given variable will be set to the given value prior to any possible
+ When a sound starts, the given variable will be set to the given value prior to any possible
references being used by presets.
*/
@@ -6904,7 +6904,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_filter(S32* token, U64 apply_to_ID);
Limits the effects of the event to sounds started by the given ID.
$:token A token created with $AIL_enqueue_event_start
- $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
+ $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
event, it will apply to all sounds started by the event, and any events queued by that event.
$:return 0 if the enqueue buffer is full
@@ -6932,7 +6932,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_selection(S32* token, U32 selection);
$:selection The value to use for selecting the sound to play.
$:return 0 if the enqueue buffer is full
- The selection index is used to programatically select a sound from the
+ The selection index is used to programatically select a sound from the
loaded banks. The index passed in replaces any numeric value at the end
of the sound name existing in any start sound event step. For example, if
a start sound event plays "mybank/sound1", and the event is queued with
@@ -6969,52 +6969,52 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_end_named(S32 token, char const* even
As with all of the enqueue functions it is completely thread-safe.
Upon completion of this function, the enqueue slot is release and available for another
- $AIL_enqueue_event_start.
+ $AIL_enqueue_event_start.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event(U8 const * event_or_name, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to be processed by the next $AIL_begin_event_queue_processing function.
-
- $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
+
+ $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
If an event, the contents must be valid until the next call to $AIL_begin_event_queue_processing.
If a name, the string is copied internally and does not have any lifetime requirements, and MILES_ENQUEUE_BY_NAME must be present in enqueue_flags.
- $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
- This data is then accessible later, when enumerating the instances.
+ $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
+ This data is then accessible later, when enumerating the instances.
$:user_buffer_len Size of the buffer pointed to by user_buffer.
$:enqueue_flags Optional $MILESEVENTENQUEUEFLAGS logically OR'd together that control how to enqueue this event (default is 0).
$:apply_to_ID Optional value that is used for events that affect sound instances. Normally,
- when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
+ when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
you specify an apply_to_ID value, then event step will only run on sounds that matches this QueuedID,InstanceID,or EventID too. This is how you
- execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
+ execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
InstanceIDs and EventIDs are returned from $AIL_enumerate_sound_instances.
- $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
+ $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
program run (you can use this ID to uniquely identify sounds triggered from this event).
-
+
This function enqueues an event to be triggered - this is how you begin execution of an event. First, you
queue it, and then later (usually once a game frame), you call $AIL_begin_event_queue_processing to
execute an event.
-
- This function is very lightweight. It does nothing more than post the event and data to a
+
+ This function is very lightweight. It does nothing more than post the event and data to a
command buffer that gets executed via $AIL_begin_event_queue_processing.
The user_buffer parameter can be used in different ways. If no flags are passed in, then
Miles will copy the data from user_buffer (user_buffer_len bytes long) and store the data with
the queued sound - you can then free the user_buffer data completely! This lets Miles keep track
- of all your sound related memory directly and is the normal way to use the system (it is very
+ of all your sound related memory directly and is the normal way to use the system (it is very
convenient once you get used to it).
If you instead pass the MILESEVENT_ENQUEUE_BUFFER_PTR flag, then user_buffer pointer will
simply be associated with each sound that this event may start. In this case, user_buffer_len
is ignored.
-
- In both cases, when you later enumerate the sound instances, you can access your sound data
+
+ In both cases, when you later enumerate the sound instances, you can access your sound data
with the $(MILESEVENTSOUNDINFO::UserBuffer) field.
-
+
You can call this function from any number threads - it's designed to be called from anywhere in your game.
If you want events you queue to be captured by Miles Studio, then they have to be passed by name. This can be done
- by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
+ by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
passing the name in event_or_name. For introduction to the auditioning system, see $integrating_events.
*/
@@ -7044,23 +7044,23 @@ DXDEC EXPAPI S32 AILCALL AIL_begin_event_queue_processing( void );
/*
Begin execution of all of the enqueued events.
- $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
+ $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
(out of memory, bank file not found, bad data, etc). You can get the specific error by
calling $AIL_last_error.
-
+
This function executes all the events currently in the queue. This is where all major
processing takes place in the event system.
-
+
Once you execute this functions, then sound instances will be in one of three states:
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7082,7 +7082,7 @@ ${
MILESEVENTSOUNDINFO Info;
HMSSENUM SoundEnum = MSS_FIRST;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
{
game_type * game_data = (game_type*) Info.UserBuffer; // returns the game_data pointer from the enqueue
@@ -7098,13 +7098,13 @@ ${
}
}
- $AIL_complete_event_queue_processing( );
- $}
-
- Note that if any event step drastically fails, the rest of the command queue is
+ $AIL_complete_event_queue_processing( );
+ $}
+
+ Note that if any event step drastically fails, the rest of the command queue is
skipped, and this function returns 0! For this reason, you shouldn't assume
that a start sound event will always result in a completed sound later.
-
+
Therefore, you should allocate memory that you want associated with a sound instance
during the enumeration loop, rather than at enqueue time. Otherwise, you
need to detect that the sound didn't start and then free the memory (which can be complicated).
@@ -7120,7 +7120,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
HSTREAM Stream;
void* UserBuffer;
S32 UserBufferLen;
- S32 Status;
+ S32 Status;
U32 Flags;
S32 UsedDelay;
F32 UsedVolume;
@@ -7130,10 +7130,10 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
} MILESEVENTSOUNDINFO;
/*
Sound instance data that is associated with each active sound instance.
-
+
$:QueuedID A unique ID that identifies the queued event that started this sound. Returned from each call to $AIL_enqueue_event.
$:EventID A unique ID that identifies the actual event that started this sound. This is the same as QueuedID unless the sound
- was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
+ was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
$AIL_enqueue_event, and EventID represents the completion event.
$:InstanceID A unique ID that identified this specific sound instance (note that one QueuedID can trigger multiple InstanceIDs).
$:Sample The $HSAMPLE for this playing sound.
@@ -7148,7 +7148,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
$:UsedSound The name of the sound used as a result of randomization. This pointer should NOT be deleted
and is only valid for the until the next call in to Miles.
$:HasCompletionEvent Nonzero if the sound will fire an event upon completion.
-
+
This structure is returned by the $AIL_enumerate_sound_instances function. It
returns information about an active sound instance.
*/
@@ -7157,7 +7157,7 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7183,14 +7183,14 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
// A preset referencing "MyVar" for FirstSound will get 10. Any other sound will
// get 20.
$}
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_variable_float(UINTa context, char const* name, F32 value);
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7265,7 +7265,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sound_start_offset(HMSSENUM sound, S32 offset,
the sound starting. Generally you don't need to do this manually, since the sound designer should do
this, however if you need to restart a sound that stopped - for example a stream that went to error -
you will have to set the start position via code.
-
+
However, since there can be a delay between the time the sound is first seen in the sound iteration and
the time it gets set to the data, start positions set via the low level miles calls can get lost, so
use this.
@@ -7281,11 +7281,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$:statuses Or-ed list of status values to enumerate. Use 0 for all status types.
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:search_for_ID Match only instances that have a QueuedID,InstanceID,or EventID that matches this value. Use 0 to skip ID matching.
- $:info Returns the data for each sound instance.
+ $:info Returns the data for each sound instance.
$:return Returns 0 when enumeration is complete.
Enumerates the sound instances. This will generally be used between
- calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
+ calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
manage the sound instances.
The label_query is a list of labels to match, separated by commas. By default, comma-separated
@@ -7302,11 +7302,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7315,7 +7315,7 @@ ${
HMSSENUM SoundEnum = MSS_FIRST;
MILESEVENTSOUNDINFO Info;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
{
if ( Info.Status != MILESEVENT_SOUND_STATUS_COMPLETE )
{
@@ -7330,23 +7330,23 @@ $}
EXPTYPEBEGIN typedef S32 MILESEVENTSOUNDSTATUS;
#define MILESEVENT_SOUND_STATUS_PENDING 0x1
-#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
+#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
#define MILESEVENT_SOUND_STATUS_COMPLETE 0x4
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_STATUS_PENDING New sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$:MILESEVENT_SOUND_STATUS_PLAYING Sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$:MILESEVENT_SOUND_STATUS_COMPLETE Sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
-
+
These are the status values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them.
*/
@@ -7360,13 +7360,13 @@ EXPTYPEBEGIN typedef U32 MILESEVENTSOUNDFLAG;
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_FLAG_MISSING_SOUND The event system tried to look up the sound requested from a Start Sound event
and couldn't find anything in the loaded banks.
$:MILESEVENT_SOUND_FLAG_EVICTED The sound was evicted due to a sound instance limit being hit. Another sound was selected
as being higher priority, and this sound was stopped as a result. This can be the result of either a Label Sound Limit,
or a limit on the sound itself.
- $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
+ $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
The sound will start when sufficient data has been loaded to hopefully avoid a skip.
$:MILESEVENT_SONUD_FLAG_PENDING_ASYNC The sound has started playing, but the data still isn't completely loaded, and it's possible
that the sound playback will catch up to the read position under poor I/O conditions.
@@ -7375,7 +7375,7 @@ EXPTYPEEND
sound data is asynchronously loaded, or specify the sound in a Cache Sounds step prior to attempting to start it.
$:MILESEVENT_SOUND_FLAG_FAILED_ASYNC The sound tried to load and the asynchronous I/O operation failed - most likely either the media
was removed during load, or the file was not found.
-
+
These are the flag values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them. Instances
may have more than one flag, logically 'or'ed together.
*/
@@ -7383,16 +7383,16 @@ EXPTYPEEND
DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
/*
Completes the queue processing (which is started with $AIL_begin_event_queue_processing ).
-
+
$:return Returns 0 on failure.
- This function must be called as a pair with $AIL_begin_event_queue_processing.
-
- In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
- started playing yet. Old sound instances that have finished playing are still valid - they
- haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
+ This function must be called as a pair with $AIL_begin_event_queue_processing.
+
+ In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
+ started playing yet. Old sound instances that have finished playing are still valid - they
+ haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
and frees the completed ones - it's the 2nd half of the event processing.
-
+
Usually you call $AIL_enumerate_sound_instances before this function to manage all the sound
instances.
*/
@@ -7400,7 +7400,7 @@ DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a stop sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to stop only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7408,7 +7408,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
Enqueues an event to stop all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to stop the necessary sounds,
however, if a single sound (for example associated with an enemy that the player just killed) needs to be stopped,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7417,7 +7417,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a pause sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to pause only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7425,7 +7425,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
Enqueues an event to pause all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to pause the necessary sounds,
however, if a single sound (for example associated with an enemy that has been put in to stasis) needs to be paused,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7434,7 +7434,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a resume sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to resume only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7442,17 +7442,17 @@ DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U6
Enqueues an event to resume all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to resume the necessary sounds,
however, if a single sound (for example associated with an enemy that has been restored from stasis) needs to be resumed,
this function accomplishes that, and is captured by the auditioner for replay.
*/
-DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
+DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
S32 should_stream, char const * labels, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags );
/*
Allows the programmer to manually enqueue a start sound event into the event system.
-
+
$:bank The bank containing the sound to start.
$:sound The name of the sound file to start, including bank name, e.g. "BankName/SoundName"
$:loop_count The loop count to assign to the sound. 0 for infinite, 1 for play once, or just the number of times to loop.
@@ -7463,10 +7463,10 @@ DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const *
$:enqueue_flags See the enqueue_flags description in $AIL_enqueue_event.
$:return Returns a non-zero EnqueueID on success.
- Enqueues an event to start the specified sound asset.
-
+ Enqueues an event to start the specified sound asset.
+
Usually the programmer should trigger an event that the sound designer has specifically
- create to start the appropriate sounds, but this function gives the programmer
+ create to start the appropriate sounds, but this function gives the programmer
manual control, if necessary. <b>This function is not captured by the auditioner.</b>
*/
@@ -7488,7 +7488,7 @@ DXDEC EXPAPI S32 AILCALL AIL_set_sound_label_limits(HEVENTSYSTEM system, char co
Every time an event triggers a sound to be played, the sound limits are checked, and, if exceeded, a sound is dropped (based
on the settings in the event step).
-
+
Usually event limits are set by a sound designer via an event, but this lets the programmer override the limits at runtime.
Note that this replaces those events, it does not supplement.
*/
@@ -7503,7 +7503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
that this pointer can change frame to frame and should be immediately copied to a client-allocated
buffer if persistence is desired.
$:return Returns 0 when enumeration is complete.
-
+
This function lets you enumerate all the persisting presets that are currently active in the system. It
is mostly a debugging aid.
*/
@@ -7511,12 +7511,12 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
DXDEC EXPAPI char * AILCALL AIL_text_dump_event_system(void);
/*
Returns a big string describing the current state of the event system.
-
- $:return String description of current systems state.
+
+ $:return String description of current systems state.
This function is a debugging aid - it can be used to show all of the active allocations,
active sounds, etc.
-
+
You must delete the pointer returned from this function with $AIL_mem_free_lock.
*/
@@ -7535,7 +7535,7 @@ EXPTYPE typedef struct _MILESEVENTSTATE
} MILESEVENTSTATE;
/*
returns the current state of the Miles Event System.
-
+
$:CommandBufferSize The size of the command buffer in bytes. See also the $AIL_startup_event_system.
$:HeapSize The total size of memory used by the event system for management structures, and is allocated during startup. This does not include loaded file sizes.
$:HeapRemaining The number of bytes in HeapSize that is remaining.
@@ -7615,7 +7615,7 @@ EXPTYPE typedef struct _MILESBANKFUNCTIONS
} MILESBANKFUNCTIONS;
/*
specifies callbacks for each of the Miles event system.
-
+
$:FreeAll Callback that tells you to free all user-side bank memory.
$:GetPreset Callback to retrieve a sound preset.
$:GetEnvironment Callback to retrieve an environment preset.
@@ -7645,13 +7645,13 @@ DXDEC EXPAPI void AILCALL AIL_set_event_sample_functions(HSAMPLE (*CreateSampleC
In the callback, SoundName is the name of the asset in Miles Studio, and SoundFileName
is the value returned from Container_GetSound() (see also $AIL_set_event_bank_functions).
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_event_bank_functions(MILESBANKFUNCTIONS const * Functions);
/*
Allows you to override the internal bank file resource management..
-
+
$:Functions A pointer to a structure containing all the callback functions.
This function is used to completely override the high-level resource management system.
@@ -7856,7 +7856,7 @@ EXPTYPEEND
$:MILES_PLAT_IPHONE Apple iDevices
$:MILES_PLAT_LINUX Linux Flavors
$:MILES_PLAT_WII Nintendo Wii
- $:MILES_PLAT_PSP2 Sony NGP
+ $:MILES_PLAT_PSP2 Sony NGP
Values representing the various platforms the high level tool allows.
*/
@@ -7891,11 +7891,11 @@ EXPGROUP(Miles High Level Event System)
DXDEC EXPAPI void AILCALL AIL_event_system_state(HEVENTSYSTEM system, MILESEVENTSTATE* state);
/*
Returns an information structure about the current state of the Miles Event System.
-
+
$:system The system to retrieve information for, or zero for the default system.
$:state A pointer to a structure to receive the state information.
- This function is a debugging aid - it returns information for the event system.
+ This function is a debugging aid - it returns information for the event system.
*/
DXDEC EXPAPI U32 AILCALL AIL_event_system_command_queue_remaining();
@@ -7923,7 +7923,7 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_length(char const* i_EventName);
// Callback for the error handler.
EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_Resource);
/*
- The function prototype to use for a callback that will be made when the event system
+ The function prototype to use for a callback that will be made when the event system
encounters an unrecoverable error.
$:i_RelevantId The ID of the asset that encountered the error, as best known. EventID or SoundID.
@@ -7937,7 +7937,7 @@ EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_
EXPAPI typedef S32 AILCALLBACK MSS_USER_RAND( void );
/*
The function definition to use when defining your own random function.
-
+
You can define a function with this prototype and pass it to $AIL_register_random
if you want to tie the Miles random calls in with your game's (for logging and such).
*/
@@ -7953,7 +7953,7 @@ DXDEC EXPAPI void AILCALL AIL_set_event_error_callback(AILEVENTERRORCB * i_Error
can sometimes be somewhat invisible. This function allows you to see what went wrong,
when it went wrong.
- The basic usage is to have the callback check $AIL_last_error() for the overall category of
+ The basic usage is to have the callback check $AIL_last_error() for the overall category of
failure. The parameter passed to the callback might provide some context, but it can and will
be zero on occasion. Generally it will represent the resource string that is being worked on when the error
occurred.
@@ -8009,7 +8009,7 @@ typedef C8 * (AILCALL *FLT_ERROR)(void);
typedef HDRIVERSTATE (AILCALL *FLT_OPEN_DRIVER) (MSS_ALLOC_TYPE * palloc,
MSS_FREE_TYPE * pfree,
- UINTa user,
+ UINTa user,
HDIGDRIVER dig, void * memory);
typedef FLTRESULT (AILCALL *FLT_CLOSE_DRIVER) (HDRIVERSTATE state);
diff --git a/Minecraft.Client/PS3/Miles/include/rrCore.h b/Minecraft.Client/PS3/Miles/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/PS3/Miles/include/rrCore.h
+++ b/Minecraft.Client/PS3/Miles/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/PS3/Network/SonyRemoteStorage_PS3.cpp b/Minecraft.Client/PS3/Network/SonyRemoteStorage_PS3.cpp
index bdd58e17..e1d8dffa 100644
--- a/Minecraft.Client/PS3/Network/SonyRemoteStorage_PS3.cpp
+++ b/Minecraft.Client/PS3/Network/SonyRemoteStorage_PS3.cpp
@@ -27,21 +27,21 @@
void SonyRemoteStorage_PS3::npauthhandler(int event, int result, void *arg)
{
#ifdef __PS3__
- if (event != SCE_NP_MANAGER_EVENT_GOT_TICKET || result <= 0)
+ if (event != SCE_NP_MANAGER_EVENT_GOT_TICKET || result <= 0)
{
app.DebugPrintf("Could not retrieve ticket: 0x%x\n", result);
- }
- else
+ }
+ else
{
psnTicketSize = result;
psnTicket = malloc(psnTicketSize);
- if (psnTicket == NULL)
+ if (psnTicket == NULL)
{
app.DebugPrintf("Failed to allocate for ticket\n");
}
int ret = sceNpManagerGetTicket(psnTicket, &psnTicketSize);
- if (ret < 0)
+ if (ret < 0)
{
app.DebugPrintf("Could not retrieve ticket: 0x%x\n", ret);
free(psnTicket);
@@ -60,7 +60,7 @@ int SonyRemoteStorage_PS3::initPreconditions()
SceNpId npId;
ret = sceNpManagerGetNpId(&npId);
- if(ret < 0)
+ if(ret < 0)
{
return ret;
}
@@ -68,12 +68,12 @@ int SonyRemoteStorage_PS3::initPreconditions()
ticketVersion.major = 3;
ticketVersion.minor = 0;
ret = sceNpManagerRequestTicket2(&npId, &ticketVersion, TICKETING_SERVICE_ID, NULL, 0, NULL, 0);
- if(ret < 0)
+ if(ret < 0)
{
return ret;
}
m_waitingForTicket = true;
- while(m_waitingForTicket)
+ while(m_waitingForTicket)
{
cellSysutilCheckCallback();
sys_timer_usleep(50000); //50 milliseconds.
@@ -104,12 +104,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case GET_DATA_RESULT:
- if(retCode >= 0)
+ if(retCode >= 0)
{
app.DebugPrintf("Get Data success \n");
m_status = e_getDataSucceeded;
- }
- else
+ }
+ else
{
app.DebugPrintf("An error occurred while Get Data was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -126,12 +126,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case GET_STATUS_RESULT:
- if(retCode >= 0)
+ if(retCode >= 0)
{
app.DebugPrintf("Get Status success \n");
app.DebugPrintf("Remaining Syncs for this user: %llu\n", outputGetStatus->remainingSyncs);
app.DebugPrintf("Number of files on the cloud: %d\n", outputGetStatus->numFiles);
- for(int i = 0; i < outputGetStatus->numFiles; i++)
+ for(int i = 0; i < outputGetStatus->numFiles; i++)
{
app.DebugPrintf("\n*** File %d information: ***\n", (i + 1));
app.DebugPrintf("File name: %s \n", outputGetStatus->data[i].fileName);
@@ -142,8 +142,8 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
app.DebugPrintf("Visibility: \"%s\" \n", (outputGetStatus->data[i].visibility == 0)?"Private":((outputGetStatus->data[i].visibility == 1)?"Public read only":"Public read and write"));
}
m_status = e_getStatusSucceeded;
- }
- else
+ }
+ else
{
app.DebugPrintf("An error occurred while Get Status was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -158,12 +158,12 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
break;
case SET_DATA_RESULT:
- if(retCode >= 0)
+ if(retCode >= 0)
{
app.DebugPrintf("Set Data success \n");
m_status = e_setDataSucceeded;
- }
- else
+ }
+ else
{
app.DebugPrintf("An error occurred while Set Data was being processed. retCode: 0x%x \n", retCode);
m_status = e_error;
@@ -230,7 +230,7 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
params.callback = staticInternalCallback;
params.userData = this;
params.thread.threadAffinity = 0; //Not used in PS3
- params.thread.threadPriority = 1000; //Must be between [0-3071], being 0 the highest.
+ params.thread.threadPriority = 1000; //Must be between [0-3071], being 0 the highest.
params.psnTicket = psnTicket;
params.psnTicketSize = psnTicketSize;
strcpy(params.clientId, CLIENT_ID);
@@ -246,20 +246,20 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
// SceRemoteStorageAbortReqParams abortParams;
ret = sceRemoteStorageInit(params);
- if(ret >= 0 || ret == SCE_REMOTE_STORAGE_ERROR_ALREADY_INITIALISED)
+ if(ret >= 0 || ret == SCE_REMOTE_STORAGE_ERROR_ALREADY_INITIALISED)
{
// abortParams.requestId = ret;
//ret = sceRemoteStorageAbort(abortParams);
app.DebugPrintf("Session will be created \n");
- //if(ret >= 0)
+ //if(ret >= 0)
//{
// printf("Session aborted \n");
- //} else
+ //} else
//{
// printf("Error aborting session: 0x%x \n", ret);
//}
- }
- else
+ }
+ else
{
app.DebugPrintf("Error creating session: 0x%x \n", ret);
return false;
@@ -279,12 +279,12 @@ bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, Cal
reqId = sceRemoteStorageGetStatus(params, outputGetStatus);
m_status = e_getStatusInProgress;
- if(reqId >= 0)
+ if(reqId >= 0)
{
app.DebugPrintf("Get Status request sent \n");
return true;
- }
- else
+ }
+ else
{
app.DebugPrintf("Error sending Get Status request: 0x%x \n", reqId);
return false;
@@ -303,11 +303,11 @@ void SonyRemoteStorage_PS3::abort()
params.requestId = reqId;
int ret = sceRemoteStorageAbort(params);
- if(ret >= 0)
+ if(ret >= 0)
{
app.DebugPrintf("Abort request done \n");
- }
- else
+ }
+ else
{
app.DebugPrintf("Error in Abort request: 0x%x \n", ret);
}
@@ -345,7 +345,7 @@ bool SonyRemoteStorage_PS3::setDataInternal()
char seed[22];
app.GetImageTextData(m_thumbnailData, m_thumbnailDataSize,(unsigned char *)seed, uiHostOptions, bHostOptionsRead, uiTexturePack);
- __int64 iSeed = strtoll(seed,NULL,10);
+ int64_t iSeed = strtoll(seed,NULL,10);
char seedHex[17];
sprintf(seedHex,"%016llx",iSeed);
memcpy(descData.m_seed,seedHex,16); // Don't copy null
@@ -377,14 +377,14 @@ bool SonyRemoteStorage_PS3::setDataInternal()
reqId = sceRemoteStorageSetData(params);
app.DebugPrintf("\n*******************************\n");
- if(reqId >= 0)
+ if(reqId >= 0)
{
app.DebugPrintf("Set Data request sent \n");
m_bTransferStarted = true;
m_status = e_setDataInProgress;
return true;
- }
- else
+ }
+ else
{
app.DebugPrintf("Error sending Set Data request: 0x%x \n", reqId);
return false;
@@ -406,12 +406,12 @@ bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPa
reqId = sceRemoteStorageGetData(params, &outputGetData);
app.DebugPrintf("\n*******************************\n");
- if(reqId >= 0)
+ if(reqId >= 0)
{
app.DebugPrintf("Get Data request sent \n");
m_bTransferStarted = true;
m_status = e_getDataInProgress;
- } else
+ } else
{
app.DebugPrintf("Error sending Get Data request: 0x%x \n", reqId);
}
diff --git a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h
index 134059db..4582b206 100644
--- a/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h
+++ b/Minecraft.Client/PS3/PS3Extras/HeapInspector/Server/HeapInspectorServerTypes.h
@@ -16,8 +16,8 @@ typedef unsigned int uint32;
typedef unsigned long long uint64;
typedef long long int64;
#else
- typedef unsigned __int64 uint64;
- typedef __int64 int64;
+ typedef unsigned long long uint64;
+ typedef long long int64;
#endif
typedef char int8;
diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
index 2177739a..4143c555 100644
--- a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
+++ b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.cpp
@@ -671,7 +671,7 @@ HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData) { PS3
BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData) { PS3_STUBBED; return false;}
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%d",_Value); else if(_Radix==16) sprintf(_DstBuf,"%lx",_Value); else return -1; return 0; }
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
+errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
int _wtoi(const wchar_t *_Str)
{
diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.h b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.h
index f24a3b92..8f1b489d 100644
--- a/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.h
+++ b/Minecraft.Client/PS3/PS3Extras/Ps3Stubs.h
@@ -29,7 +29,7 @@ LPVOID TlsGetValue(DWORD dwTlsIndex);
BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
-typedef struct _RECT
+typedef struct _RECT
{
LONG left;
LONG top;
@@ -53,16 +53,16 @@ typedef int errno_t;
// // The following field is used for blocking when there is contention for
// // the resource
// //
-//
+//
// union {
// ULONG_PTR RawEvent[4];
// } Synchronization;
-//
+//
// //
// // The following three fields control entering and exiting the critical
// // section for the resource
// //
-//
+//
// LONG LockCount;
// LONG RecursionCount;
// HANDLE OwningThread;
@@ -219,7 +219,7 @@ typedef struct _MEMORYSTATUS {
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
#define WAIT_TIMEOUT 258L
-#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
+#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define MAXUINT_PTR (~((UINT_PTR)0))
@@ -261,17 +261,17 @@ typedef struct _MEMORYSTATUS {
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)
-#define FILE_SHARE_READ 0x00000001
-#define FILE_SHARE_WRITE 0x00000002
-#define FILE_SHARE_DELETE 0x00000004
-#define FILE_ATTRIBUTE_READONLY 0x00000001
-#define FILE_ATTRIBUTE_HIDDEN 0x00000002
-#define FILE_ATTRIBUTE_SYSTEM 0x00000004
-#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
-#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-#define FILE_ATTRIBUTE_DEVICE 0x00000040
-#define FILE_ATTRIBUTE_NORMAL 0x00000080
-#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
+#define FILE_SHARE_READ 0x00000001
+#define FILE_SHARE_WRITE 0x00000002
+#define FILE_SHARE_DELETE 0x00000004
+#define FILE_ATTRIBUTE_READONLY 0x00000001
+#define FILE_ATTRIBUTE_HIDDEN 0x00000002
+#define FILE_ATTRIBUTE_SYSTEM 0x00000004
+#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
+#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
+#define FILE_ATTRIBUTE_DEVICE 0x00000040
+#define FILE_ATTRIBUTE_NORMAL 0x00000080
+#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000
@@ -291,38 +291,38 @@ typedef struct _MEMORYSTATUS {
#define OPEN_ALWAYS 4
#define TRUNCATE_EXISTING 5
-#define PAGE_NOACCESS 0x01
-#define PAGE_READONLY 0x02
-#define PAGE_READWRITE 0x04
-#define PAGE_WRITECOPY 0x08
-#define PAGE_EXECUTE 0x10
-#define PAGE_EXECUTE_READ 0x20
-#define PAGE_EXECUTE_READWRITE 0x40
-#define PAGE_EXECUTE_WRITECOPY 0x80
-#define PAGE_GUARD 0x100
-#define PAGE_NOCACHE 0x200
-#define PAGE_WRITECOMBINE 0x400
-#define PAGE_USER_READONLY 0x1000
-#define PAGE_USER_READWRITE 0x2000
-#define MEM_COMMIT 0x1000
-#define MEM_RESERVE 0x2000
-#define MEM_DECOMMIT 0x4000
-#define MEM_RELEASE 0x8000
-#define MEM_FREE 0x10000
-#define MEM_PRIVATE 0x20000
-#define MEM_RESET 0x80000
-#define MEM_TOP_DOWN 0x100000
-#define MEM_NOZERO 0x800000
-#define MEM_LARGE_PAGES 0x20000000
-#define MEM_HEAP 0x40000000
-#define MEM_16MB_PAGES 0x80000000
+#define PAGE_NOACCESS 0x01
+#define PAGE_READONLY 0x02
+#define PAGE_READWRITE 0x04
+#define PAGE_WRITECOPY 0x08
+#define PAGE_EXECUTE 0x10
+#define PAGE_EXECUTE_READ 0x20
+#define PAGE_EXECUTE_READWRITE 0x40
+#define PAGE_EXECUTE_WRITECOPY 0x80
+#define PAGE_GUARD 0x100
+#define PAGE_NOCACHE 0x200
+#define PAGE_WRITECOMBINE 0x400
+#define PAGE_USER_READONLY 0x1000
+#define PAGE_USER_READWRITE 0x2000
+#define MEM_COMMIT 0x1000
+#define MEM_RESERVE 0x2000
+#define MEM_DECOMMIT 0x4000
+#define MEM_RELEASE 0x8000
+#define MEM_FREE 0x10000
+#define MEM_PRIVATE 0x20000
+#define MEM_RESET 0x80000
+#define MEM_TOP_DOWN 0x100000
+#define MEM_NOZERO 0x800000
+#define MEM_LARGE_PAGES 0x20000000
+#define MEM_HEAP 0x40000000
+#define MEM_16MB_PAGES 0x80000000
#define IGNORE 0 // Ignore signal
#define INFINITE 0xFFFFFFFF // Infinite timeout
#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
-#define STATUS_WAIT_0 ((DWORD )0x00000000L)
+#define STATUS_WAIT_0 ((DWORD )0x00000000L)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
-#define STATUS_PENDING ((DWORD )0x00000103L)
+#define STATUS_PENDING ((DWORD )0x00000103L)
#define STILL_ACTIVE STATUS_PENDING
DWORD GetLastError(VOID);
@@ -364,11 +364,11 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
+errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix);
int _wtoi(const wchar_t *_Str);
-#define __declspec(a)
+#define __declspec(a)
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
size_t wcsnlen(const wchar_t *wcs, size_t maxsize);
diff --git a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h
index d3d8cc6a..fe003c4a 100644
--- a/Minecraft.Client/PS3/PS3Extras/Ps3Types.h
+++ b/Minecraft.Client/PS3/PS3Extras/Ps3Types.h
@@ -7,7 +7,8 @@
#define BOOST_ENABLE_ASSERT_HANDLER
#include <typeinfo>
-#include <stddef.h>
+#include <cstdint>
+#include <cstddef>
#include <boost/typeof/typeof.hpp>
#include <boost/tr1/memory.hpp>
#include "boost/tr1/unordered_map.hpp"
@@ -110,21 +111,19 @@ typedef unsigned int *PUINT;
typedef unsigned char byte;
-typedef long long __int64;
-typedef unsigned long long __uint64;
typedef unsigned long DWORD;
typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
typedef ULONG_PTR SIZE_T, *PSIZE_T;
-typedef __int64 LONG64, *PLONG64;
+typedef long long LONG64, *PLONG64;
#define VOID void
typedef char CHAR;
typedef short SHORT;
typedef long LONG;
-typedef __int64 LONGLONG;
-typedef __uint64 ULONGLONG;
+typedef int64_t LONGLONG;
+typedef uint64_t ULONGLONG;
#define CONST const
diff --git a/Minecraft.Client/PS3/PS3_App.cpp b/Minecraft.Client/PS3/PS3_App.cpp
index e5e23933..780ab03c 100644
--- a/Minecraft.Client/PS3/PS3_App.cpp
+++ b/Minecraft.Client/PS3/PS3_App.cpp
@@ -469,7 +469,7 @@ void CConsoleMinecraftApp::FreeLocalTMSFiles(eTMSFileType eType)
LoadSaveDataThreadParam* LoadSaveFromDisk(const wstring& pathName)
{
File saveFile(pathName);
- __int64 fileSize = saveFile.length();
+ int64_t fileSize = saveFile.length();
FileInputStream fis(saveFile);
byteArray ba(fileSize);
fis.read(ba);
@@ -507,8 +507,8 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false;
- __int64 seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
-// __int64 seedValue = 0xfd97203ebdbf5c6f;
+ int64_t seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+// int64_t seedValue = 0xfd97203ebdbf5c6f;
unsigned int seedLow = (unsigned int )(seedValue & 0xffffffff);
unsigned int seedHigh = (unsigned int )(seedValue>>32);
#ifndef _CONTENT_PACKAGE
diff --git a/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseDataStorage_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseDataStorage_SPU.h
index 30266d7f..3b7ae2c8 100644
--- a/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseDataStorage_SPU.h
+++ b/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseDataStorage_SPU.h
@@ -17,9 +17,9 @@
// To meet these requirements, this class is now implemented using a lock-free system, implemented using a read-copy-update (RCU) type algorithm. Some details...
-// (1) The storage details for the class are now packed into a single __int64, which contains both a pointer to the data that is required and a count of how many planes worth
+// (1) The storage details for the class are now packed into a single int64_t, which contains both a pointer to the data that is required and a count of how many planes worth
// of storage are allocated. This allows the full storage to be updated atomically using compare and exchange operations (implemented with InterlockedCompareExchangeRelease64).
-// (2) The data pointer referenced in this __int64 points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
+// (2) The data pointer referenced in this int64_t points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// the rest of the data is variable in size to accomodate however many planes are required to be stored
// (3) The RCU bit of the algorithm means that any read operations don't need to do any checks or locks at all. When the data needs to be updated, a copy of it is made and updated,
// then an attempt is made to swap the new data in - if this succeeds then the old data pointer is deleted later at some point where we know nothing will be reading from it anymore.
@@ -33,7 +33,7 @@ class SparseDataStorage_SPU
{
private:
// unsigned char planeIndices[128];
- unsigned char* m_pData;
+ unsigned char* m_pData;
// unsigned char *data;
// unsigned int allocatedPlaneCount;
diff --git a/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseLightStorage_SPU.h b/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseLightStorage_SPU.h
index 01b2aa6e..728d1fe5 100644
--- a/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseLightStorage_SPU.h
+++ b/Minecraft.Client/PS3/SPU_Tasks/CompressedTile/SparseLightStorage_SPU.h
@@ -20,9 +20,9 @@
// To meet these requirements, this class is now implemented using a lock-free system, implemented using a read-copy-update (RCU) type algorithm. Some details...
-// (1) The storage details for the class are now packed into a single __int64, which contains both a pointer to the data that is required and a count of how many planes worth
+// (1) The storage details for the class are now packed into a single int64_t, which contains both a pointer to the data that is required and a count of how many planes worth
// of storage are allocated. This allows the full storage to be updated atomically using compare and exchange operations (implemented with InterlockedCompareExchangeRelease64).
-// (2) The data pointer referenced in this __int64 points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
+// (2) The data pointer referenced in this int64_t points to an area of memory which is 128 + 128 * plane_count bytes long, where the first 128 bytes stoere the plane indices, and
// the rest of the data is variable in size to accomodate however many planes are required to be stored
// (3) The RCU bit of the algorithm means that any read operations don't need to do any checks or locks at all. When the data needs to be updated, a copy of it is made and updated,
// then an attempt is made to swap the new data in - if this succeeds then the old data pointer is deleted later at some point where we know nothing will be reading from it anymore.
@@ -36,7 +36,7 @@ class SparseLightStorage_SPU
{
private:
// unsigned char planeIndices[128];
- unsigned char* m_pData;
+ unsigned char* m_pData;
// unsigned char *data;
// unsigned int allocatedPlaneCount;
diff --git a/Minecraft.Client/PSVita/Iggy/include/rrCore.h b/Minecraft.Client/PSVita/Iggy/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/PSVita/Iggy/include/rrCore.h
+++ b/Minecraft.Client/PSVita/Iggy/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/PSVita/Miles/include/mss.h b/Minecraft.Client/PSVita/Miles/include/mss.h
index 531dcbc9..8fe0a74d 100644
--- a/Minecraft.Client/PSVita/Miles/include/mss.h
+++ b/Minecraft.Client/PSVita/Miles/include/mss.h
@@ -39,7 +39,7 @@
// doc system stuff
#ifndef EXPAPI
-#define EXPAPI
+#define EXPAPI
#endif
#ifndef EXPTYPE
#define EXPTYPE
@@ -69,10 +69,10 @@
// For docs
EXPGROUP(_NullGroup)
#define MilesVersion "9.3m" EXPMACRO
-#define MilesMajorVersion 9 EXPMACRO
+#define MilesMajorVersion 9 EXPMACRO
#define MilesMinorVersion 3 EXPMACRO
-#define MilesBuildNumber 11 EXPMACRO
-#define MilesCustomization 0 EXPMACRO
+#define MilesBuildNumber 11 EXPMACRO
+#define MilesCustomization 0 EXPMACRO
EXPGROUP(_RootGroup)
@@ -273,14 +273,14 @@ typedef void VOIDFUNC(void);
//================
EXPGROUP(Basic Types)
-#define AILCALL EXPTAG(AILCALL)
+#define AILCALL EXPTAG(AILCALL)
/*
Internal calling convention that all external Miles functions use.
Usually cdecl or stdcall on Windows.
*/
-#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
+#define AILCALLBACK EXPTAG(AILCALLBACK docproto)
/*
Calling convention that user supplied callbacks <b>from</b> Miles use.
@@ -326,7 +326,7 @@ RADDEFSTART
typedef CHAR *LPSTR, *PSTR;
#ifdef IS_WIN64
- typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
+ typedef unsigned long long ULONG_PTR, *PULONG_PTR;
#else
#ifdef _Wp64
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
@@ -348,13 +348,13 @@ RADDEFSTART
typedef struct HWAVEOUT__ *HWAVEOUT;
typedef HWAVEIN *LPHWAVEIN;
typedef HWAVEOUT *LPHWAVEOUT;
-
+
#ifndef WAVE_MAPPER
#define WAVE_MAPPER ((UINT)-1)
#endif
typedef struct waveformat_tag *LPWAVEFORMAT;
-
+
typedef struct HMIDIOUT__ *HMIDIOUT;
typedef HMIDIOUT *LPHMIDIOUT;
typedef struct HWND__ *HWND;
@@ -368,9 +368,9 @@ RADDEFSTART
// If compiling MSS DLL, use __declspec(dllexport) for both
// declarations and definitions
//
-
+
#ifdef IS_WIN32
-
+
#if !defined(FORNONWIN) && !defined(__RADNTBUILDLINUX__)
#define AILLIBCALLBACK __stdcall
#define AILCALL __stdcall
@@ -382,20 +382,20 @@ RADDEFSTART
#define AILCALLBACK __cdecl
#define AILEXPORT __cdecl
#endif
-
+
#ifdef __RADINDLL__
#define DXDEC __declspec(dllexport)
#define DXDEF __declspec(dllexport)
#else
-
+
#if defined( __BORLANDC__ ) || defined( MSS_SPU_PROCESS )
#define DXDEC extern
#else
#define DXDEC __declspec(dllimport)
#endif
-
+
#endif
-
+
#ifdef IS_WIN64
#define MSSDLLNAME "MSS64.DLL"
#define MSS_REDIST_DIR_NAME "redist64"
@@ -403,11 +403,11 @@ RADDEFSTART
#define MSSDLLNAME "MSS32.DLL"
#define MSS_REDIST_DIR_NAME "redist"
#endif
-
+
#define MSS_DIR_SEP "\\"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
-
+
#endif
typedef void * LPVOID;
@@ -420,7 +420,7 @@ RADDEFSTART
#define AILLIBCALLBACK
#define AILCALL
#define AILEXPORT
- #define AILCALLBACK
+ #define AILCALLBACK
#elif defined(__RADX86__)
#define AILLIBCALLBACK __attribute__((cdecl))
#define AILCALL __attribute__((cdecl))
@@ -437,7 +437,7 @@ RADDEFSTART
#define DXDEC extern
#define DXDEF
#endif
-
+
#ifdef __RADX64__
#define MSS_REDIST_DIR_NAME "redist/x64"
#elif defined(IS_X86)
@@ -447,7 +447,7 @@ RADDEFSTART
#else
#error "No Redist Dir Specified"
#endif
-
+
#define MSS_DIR_SEP "/"
#define MSS_DIR_UP ".." MSS_DIR_SEP
#define MSS_DIR_UP_TWO MSS_DIR_UP MSS_DIR_UP
@@ -714,7 +714,7 @@ typedef enum
#ifndef FILE_ERRS
#define FILE_ERRS
-
+
#define AIL_NO_ERROR 0
#define AIL_IO_ERROR 1
#define AIL_OUT_OF_MEMORY 2
@@ -736,9 +736,9 @@ EXPTYPEBEGIN typedef SINTa HMSSENUM;
EXPTYPEEND
/*
specifies a type used to enumerate through a list of properties.
-
+
$:MSS_FIRST use this value to start the enumeration process.
-
+
The Miles enumeration functions all work similarly - you set a local variable of type HMSSENUM to MSS_FIRST and then call
the enumeration function until it returns 0.
@@ -751,7 +751,7 @@ the enumeration function until it returns 0.
// Preference names and default values
//
-#define AIL_MM_PERIOD 0
+#define AIL_MM_PERIOD 0
#define DEFAULT_AMP 1 // Default MM timer period = 5 msec.
#define AIL_TIMERS 1
@@ -1877,7 +1877,7 @@ typedef struct _S3DSTATE // Portion of HSAMPLE that deals with 3D posi
F32 lowpass_3D; // low pass cutoff computed by falloff graph. -1 if not affected.
F32 spread;
-
+
HSAMPLE owner; // May be NULL if used for temporary/internal calculations
AILFALLOFFCB falloff_function; // User function for min/max distance calculations, if desired
@@ -1915,7 +1915,7 @@ typedef struct _SAMPLE // Sample instance
S32 index; // Numeric index of this sample
SMPBUF buf[8]; // Source data buffers
-
+
U32 src_fract; // Fractional part of source address
U32 mix_delay; // ms until start mixing (decreased every buffer mix)
@@ -1924,7 +1924,7 @@ typedef struct _SAMPLE // Sample instance
U64 mix_bytes; // total number of bytes sent to the mixer for this sample.
S32 group_id; // ID for grouped operations.
-
+
// size of the next dynamic arrays
U32 chan_buf_alloced;
U32 chan_buf_used;
@@ -1946,10 +1946,10 @@ typedef struct _SAMPLE // Sample instance
// these are dynamic arrays
F32 *auto_3D_channel_levels; // Channel levels set by 3D positioner (always 1.0 if not 3D-positioned)
F32 *speaker_levels; // one level per speaker (multiplied after user or 3D)
-
+
S8 *speaker_enum_to_source_chan; // array[MSS_SPEAKER_xx] = -1 if not present, else channel #
// 99% of the time this is a 1:1 mapping and is zero.
-
+
S32 lp_any_on; // are any of the low pass filters on?
S32 user_channels_need_deinterlace; // do any of the user channels require a stereo sample to be deinterlaced?
@@ -1989,7 +1989,7 @@ typedef struct _SAMPLE // Sample instance
U32 low_pass_changed; // bit mask for what channels changed.
-
+
S32 bus; // Bus assignment for this sample.
S32 bus_comp_sends; // Which buses this bus routes compressor input to.
S32 bus_comp_installed; // Nonzero if we have a compressor installed.
@@ -2042,7 +2042,7 @@ typedef struct _SAMPLE // Sample instance
SPINFO pipeline[N_SAMPLE_STAGES];
S32 n_active_filters; // # of SP_FILTER_n stages active
-
+
//
// 3D-related state for all platforms (including Xbox)
//
@@ -2113,14 +2113,14 @@ DXDEC void AILCALL AIL_serve(void);
#ifdef IS_MAC
typedef void * LPSTR;
-
+
#define WHDR_DONE 0
-
+
typedef struct _WAVEIN
{
long temp;
} * HWAVEIN;
-
+
typedef struct _WAVEHDR
{
S32 dwFlags;
@@ -2133,7 +2133,7 @@ DXDEC void AILCALL AIL_serve(void);
S32 dwLoops;
void * lpNext;
U32 * reserved;
-
+
} WAVEHDR, * LPWAVEHDR;
#endif
@@ -2145,7 +2145,7 @@ typedef struct _DIG_INPUT_DRIVER *HDIGINPUT; // Handle to digital input driver
#ifdef IS_MAC
#define AIL_DIGITAL_INPUT_DEFAULT 0
-
+
typedef struct _DIG_INPUT_DRIVER // Handle to digital input driver
{
U32 tag; // HDIN
@@ -2478,7 +2478,7 @@ typedef struct _DIG_DRIVER // Handle to digital audio driver
U32 last_ds_play;
U32 last_ds_write;
U32 last_ds_move;
-
+
#endif
#ifdef IS_X86
@@ -2661,7 +2661,7 @@ typedef struct _SEQUENCE // XMIDI sequence state table
void const *EVNT;
U8 const *EVNT_ptr; // Current event pointer
-
+
U8 *ICA; // Indirect Controller Array
AILPREFIXCB prefix_callback; // XMIDI Callback Prefix handler
@@ -3121,13 +3121,13 @@ DXDEC S32 AILCALL AIL_timer_thread_handle(void* o_handle);
#elif defined(__RADANDROID__)
DXDEC void AILCALL AIL_set_asset_manager(void* asset_manager);
-
+
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_SLESInstallDriver(UINTa, UINTa);
#define AIL_open_digital_driver(frequency, bits, channel, flags) \
AIL_open_generic_digital_driver(frequency, bits, channel, flags, RADSS_SLESInstallDriver(0, 0))
-
+
#elif defined(IS_PSP2)
DXDEC RADSS_OPEN_FUNC AILCALL RADSS_PSP2InstallDriver(UINTa, UINTa);
@@ -3221,7 +3221,7 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
{
Str255 version_name;
} MSS_VersionType;
-
+
#define AIL_MSS_version(str,len) \
{ \
long _res = HOpenResFile(0,0,"\p" MSSDLLNAME,fsRdPerm); \
@@ -3269,11 +3269,11 @@ DXDEC S32 AILCALL AIL_digital_handle_reacquire
} \
} \
}
-
+
#endif
DXDEC S32 AILCALL AIL_digital_handle_release(HDIGDRIVER drvr);
-
+
DXDEC S32 AILCALL AIL_digital_handle_reacquire
(HDIGDRIVER drvr);
@@ -3339,18 +3339,18 @@ DXDEC EXPAPI void AILCALL AIL_push_system_state(HDIGDRIVER dig, U32 flags, S16 c
$* <b>MILES_PUSH_VOLUME</b> - When present, master volume will be affected in addition to sample state.
If MILES_PUSH_RESET is present, the master volume will be set to 1.0f, otherwise it will be retained and only
- affected when popped.
+ affected when popped.
$-
- If you want more control over whether a sample will be affected by a push or a pop operation,
+ If you want more control over whether a sample will be affected by a push or a pop operation,
see $AIL_set_sample_level_mask.
-
+
*/
DXDEC EXPAPI void AILCALL AIL_pop_system_state(HDIGDRIVER dig, S16 crossfade_ms);
/*
- Pops the current system state and returns the system to the way it
+ Pops the current system state and returns the system to the way it
was before the last push.
$:dig The driver to pop.
@@ -3374,7 +3374,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_level_mask(HSAMPLE S, U8 mask);
$:S The sample to set the mask for.
$:mask The bitmask of levels for which the sample will play.
- Under normal push/pop operations, a sample's mask is set when it is
+ Under normal push/pop operations, a sample's mask is set when it is
started to the level the system is at. If the system is pushed
without a reset, then the mask is adjusted to include the new level.
When a system is popped, if the sample is going to continue playing,
@@ -3435,7 +3435,7 @@ DXDEC EXPAPI HSAMPLE AILCALL AIL_allocate_bus(HDIGDRIVER dig);
$:return The HSAMPLE for the new bus.
A bus allows you to treat a group of samples as one sample. With the bus sample you can
- do almost all of the things you can do with a normal sample handle. The only exception
+ do almost all of the things you can do with a normal sample handle. The only exception
is you can't adjust the playback rate of the sample.
Use $AIL_bus_sample_handle to get the HSAMPLE associated with a bus.
@@ -3495,7 +3495,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sample_bus(HSAMPLE S);
DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_index, SAMPLESTAGE filter_stage, S32 input_bus_index);
/*
- Installs the Compressor filter on to a bus, using another bus as the input for
+ Installs the Compressor filter on to a bus, using another bus as the input for
compression/limiting.
$:dig The driver the busses exist on.
@@ -3508,7 +3508,7 @@ DXDEC EXPAPI S32 AILCALL AIL_install_bus_compressor(HDIGDRIVER dig, S32 bus_inde
its signal strength to the filter, allowing it to attenuate the bus_index bus based
on another bus's contents.
- To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
+ To control the compressor parameters, access the bus's HSAMPLE via $AIL_bus_sample_handle and
use $AIL_sample_stage_property exactly as you would any other filter. The filter's properties
are documented under $(Compressor Filter)
*/
@@ -4325,7 +4325,7 @@ typedef void (AILCALLBACK* AILSTREAMCB) (HSTREAM stream);
#define MSS_STREAM_CHUNKS 8
-typedef struct _STREAM
+typedef struct _STREAM
{
S32 block_oriented; // 1 if this is an ADPCM or ASI-compressed stream
S32 using_ASI; // 1 if using ASI decoder to uncompress stream data
@@ -4349,7 +4349,7 @@ typedef struct _STREAM
S32 read_IO_index; // index of buffer to be loaded into Miles next
S32 bufsize; // size of each buffer
-
+
U32 datarate; // datarate in bytes per second
S32 filerate; // original datarate of the file
S32 filetype; // file format type
@@ -4987,7 +4987,7 @@ typedef struct
OGG_INFO;
DXDEC void AILCALL AIL_inspect_Ogg (OGG_INFO *inspection_state,
- U8 *Ogg_file_image,
+ U8 *Ogg_file_image,
S32 Ogg_file_size);
DXDEC S32 AILCALL AIL_enumerate_Ogg_pages (OGG_INFO *inspection_state);
@@ -5102,10 +5102,10 @@ DXDEC HDIGDRIVER AILCALL AIL_primary_digital_driver (HDIGDRIVER new_primary);
// 3D-related calls
//
-DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
+DXDEC S32 AILCALL AIL_room_type (HDIGDRIVER dig,
S32 bus_index);
-DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
+DXDEC void AILCALL AIL_set_room_type (HDIGDRIVER dig,
S32 bus_index,
S32 room_type);
@@ -5180,7 +5180,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_lowpass_falloff(HSAMPLE S, MSS
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
+ This marks a sample as having a low pass cutoff that varies as a function of distance to the listener. If
a sample has such a graph, $AIL_set_sample_low_pass_cut_off will be called constantly, and thus shouldn't be
called otherwise.
@@ -5195,8 +5195,8 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_exclusion_falloff(HSAMPLE S, M
$:graph The array of points to use as the graph.
$:pointcount The number of points passed in. Must be less than or equal to MILES_MAX_FALLOFF_GRAPH_POINTS. Passing 0 removes the graph.
- This marks a sample as having an exclusion that varies as a function of distance to the listener. If
- a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
+ This marks a sample as having an exclusion that varies as a function of distance to the listener. If
+ a sample has such a graph, auto_3D_wet_atten will be disabled to prevent double affects, as exclusion
affects reverb wet level.
The graph is evaluated the same as $AIL_set_sample_3D_volume_falloff.
@@ -5230,7 +5230,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_position_segments(HSAMPLE S, MSSVECT
other computations (cones, falloffs, etc). Spatialization is done using all segments as a directional
source.
- If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
+ If there is neither spread falloff nor volume falloff specified, spread will be automatically applied
when the listener is within min_distance to the closest point. See $AIL_set_sample_3D_spread_falloff
and $AIL_set_sample_3D_volume_falloff.
@@ -5243,7 +5243,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sample_3D_spread(HSAMPLE S, F32 spread);
$:S Sample to affect.
$:spread The value to set the spread to.
- Spread is how much the directionality of a sample "spreads" to more speakers - emulating
+ Spread is how much the directionality of a sample "spreads" to more speakers - emulating
the effect a sound has when it occupies more than a point source. For instance, a sound
point source that sits directly to the left of the listener would have a very strong left
speaker signal, and a fairly weak right speaker signal. Via spread, the signal would be
@@ -5392,7 +5392,7 @@ EXPGROUP(Miles High Level Event System)
EXPTYPE typedef struct MSSSOUNDBANK {};
/*
Internal structure.
-
+
Use $HMSOUNDBANK instead.
*/
@@ -5401,7 +5401,7 @@ EXPTYPE typedef struct MSSSOUNDBANK {};
EXPTYPE typedef struct SoundBank *HMSOUNDBANK;
/*
Describes a handle to an open sound bank.
-
+
This handle typedef refers to an open soundbank which is usually obtained from the $AIL_add_soundbank function.
*/
@@ -5424,7 +5424,7 @@ DXDEC EXPAPI void AILCALL AIL_close_soundbank(HMSOUNDBANK bank);
Close a soundbank previously opened with $AIL_open_soundbank.
$:bank Soundbank to close.
-
+
Close a soundbank previously opened with $AIL_open_soundbank. Presets/events loaded from
this soundbank are no longer valid.
*/
@@ -5448,7 +5448,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
$:return A pointer to the name of the sound bank, or 0 if the bank is invalid.
- The name of the bank is the name used in asset names. This is distinct from the
+ The name of the bank is the name used in asset names. This is distinct from the
file name of the bank.
The return value should not be deleted.
@@ -5457,7 +5457,7 @@ DXDEC EXPAPI char const * AILCALL AIL_get_soundbank_name(HMSOUNDBANK bank);
DXDEC EXPAPI S32 AILCALL AIL_get_soundbank_mem_usage(HMSOUNDBANK bank);
/*
Returns the amount of data used by the soundbank management structures.
-
+
$:bank Soundbank to query.
$:return Total memory allocated.
@@ -5476,7 +5476,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_presets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sound presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5503,7 +5503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_environment_presets(HMSOUNDBANK bank, HMS
$:return Returns 0 when enumeration is complete.
Enumerates the environment presets available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* PresetName = 0;
@@ -5530,7 +5530,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
$:return Returns 0 when enumeration is complete.
Enumerates the sounds available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* SoundName = 0;
@@ -5549,7 +5549,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_assets(HMSOUNDBANK bank, HMSSENUM*
Note that name should NOT be deleted by the caller - this points at memory owned by
Miles.
*/
-
+
DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next, char const * list, char const ** name);
/*
Enumerate the events stored in a soundbank.
@@ -5561,7 +5561,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_events(HMSOUNDBANK bank, HMSSENUM* next,
$:return Returns 0 when enumeration is complete.
Enumerates the events available inside of a bank file. Example usage:
-
+
${
HMSSENUM Token = MSS_FIRST;
const char* EventName = 0;
@@ -5624,7 +5624,7 @@ DXDEC EXPAPI S32 AILCALL AIL_apply_sound_preset(HSAMPLE sample, HMSOUNDBANK bank
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
This will alter the properties on a given sample, based on the given preset.
-*/
+*/
DXDEC EXPAPI S32 AILCALL AIL_unapply_raw_sound_preset(HSAMPLE sample, void* preset);
/*
@@ -5644,7 +5644,7 @@ DXDEC EXPAPI S32 AILCALL AIL_unapply_sound_preset(HSAMPLE sample, HMSOUNDBANK ba
$:return Returns 0 on fail - check for sample/bank validity, and that the preset is in the correct bank.
Presets may or may not affect any given property. Only the properties affected by the specified
- preset will have their values restored to default.
+ preset will have their values restored to default.
*/
typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPOUT void* output, S32 isfloat);
@@ -5658,7 +5658,7 @@ typedef S32 (*MilesResolveFunc)(void* context, char const* exp, S32 explen, EXPO
$:isfloat nonzero if the output needs to be a float.
The function callback should convert variable expressions in to an output value of the
- requested type.
+ requested type.
*/
DXDEC EXPAPI S32 AILCALL AIL_resolve_raw_sound_preset(void* preset, void* context, MilesResolveFunc eval);
@@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
$:name The name of the sound asset to find.
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
- $:return Returns the byte size of the buffer required for out_name.
+ $:return Returns the byte size of the buffer required for out_name.
This function must be called in order to resolve the sound asset name to
something that can be used by miles. To ensure safe buffer containment, call
@@ -5832,7 +5832,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
ReturnType = "HMSSEVENTCONSTRUCT", "An empty event to be passed to the various step addition functions, or 0 if out of memory."
- Discussion = "Primarily designed for offline use, this function is the first step in
+ Discussion = "Primarily designed for offline use, this function is the first step in
creating an event that can be consumed by the MilesEvent system. Usage is as follows:
HMSSEVENTCONSTRUCT hEvent = AIL_create_event();
@@ -5850,7 +5850,7 @@ typedef struct _MEMDUMP* HMEMDUMP;
Note that if immediately passed to AIL_enqueue_event(), the memory must remain valid until the following
$AIL_complete_event_queue_processing.
-
+
Events are generally tailored to the MilesEvent system, even though there is nothing preventing you
from writing your own event system, or creation ui.
"
@@ -5906,7 +5906,7 @@ EXPTYPEEND
/*
Determines the usage of the sound names list in the $AIL_add_start_sound_event_step.
- $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
+ $:MILES_START_STEP_RANDOM Randomly select from the list, and allow the same
sound to play twice in a row. This is the only selection type that doesn't require
a state variable.
$:MILES_START_STEP_NO_REPEATS Randomly select from the list, but prevent the last sound from being the same.
@@ -5926,10 +5926,10 @@ EXPTYPEEND
Name = "AIL_add_start_sound_event_step", "Adds a step to a given event to start a sound with the given specifications."
In = "HMSSEVENTCONSTRUCT", "i_Event", "The event to add the step to."
- In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
- If there are multiple names listed, the sound will be chosen at random based on the given weights. This
+ In = "const char*", "i_SoundNames", "The names and associated weights for the event step to choose from.
+ If there are multiple names listed, the sound will be chosen at random based on the given weights. This
string is of the form 'BankName1/SoundName1:Weight1:BankName2/SoundName2:Weight2:' etc. The string must always
- terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
+ terminate in a ':'. Weight must be between 0 and 200. To provide a null sound to randomly choose to not play anything, use
an empty string as an entry."
In = "const char*", "i_PresetName", "[optional] The name of the preset, of the form 'PresetList/PresetName'"
@@ -5944,7 +5944,7 @@ EXPTYPEEND
In = "U8", "i_CanLoad", "If nonzero, the sound is allowed to hit the disk instead of only accessing cached sounds. If true, this might cause a hitch."
In = "U16", "i_Delay", "The minimum delay in ms to apply to the sound before start."
In = "U16", "i_DelayMax", "The maximum delay in ms to apply to the sound before start."
- In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
+ In = "U8", "i_Priority", "The priority to assign to the sound. If a sound encounters a limit based on its labels, it will evict any sound
with a priority strictly less than the given priority."
In = "U8", "i_LoopCount", "The loop count as per AIL_set_sample_loop_count."
In = "const char*", "i_StartOffset", "[optional] The name of the marker to use as the sound's initial offset."
@@ -5969,19 +5969,19 @@ DXDEC
S32
AILCALL
AIL_add_start_sound_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_SoundNames,
- const char* i_PresetName,
+ const char* i_PresetName,
U8 i_PresetIsDynamic,
const char* i_EventName,
const char* i_StartMarker, const char* i_EndMarker,
char const* i_StateVar, char const* i_VarInit,
- const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
+ const char* i_Labels, U32 i_Streaming, U8 i_CanLoad,
U16 i_Delay, U16 i_DelayMax, U8 i_Priority, U8 i_LoopCount,
const char* i_StartOffset,
F32 i_VolMin, F32 i_VolMax, F32 i_PitchMin, F32 i_PitchMax,
F32 i_FadeInTime,
- U8 i_EvictionType,
+ U8 i_EvictionType,
U8 i_SelectType
);
@@ -6004,7 +6004,7 @@ AIL_add_start_sound_event_step(
In order to release the data loaded by this event, AIL_add_uncache_sounds_event_step() needs to
be called with the same parameters.
-
+
If you are using MilesEvent, the data is refcounted so the sound will not be freed until all
samples using it complete."
}
@@ -6089,7 +6089,7 @@ DXDEC
S32
AILCALL
AIL_add_control_sounds_event_step(
- HMSSEVENTCONSTRUCT i_Event,
+ HMSSEVENTCONSTRUCT i_Event,
const char* i_Labels, const char* i_MarkerStart, const char* i_MarkerEnd, const char* i_Position,
const char* i_PresetName,
U8 i_PresetApplyType,
@@ -6191,7 +6191,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Defines a named blend function to be referenced by a blended sound later.
$:i_Event The event to add the step to.
- $:i_Name The name of the blend. This is the name that will be
+ $:i_Name The name of the blend. This is the name that will be
referenced by the state variable in start sound, as well as the variable name
to set by the game to update the blend for an instance.
$:i_SoundCount The number of sounds this blend will affect. Max 10.
@@ -6226,7 +6226,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_setblend_event_step(HMSSEVENTCONSTRUCT i_Event,
Miles max sample count."
}
*/
-DXDEC S32 AILCALL
+DXDEC S32 AILCALL
AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitName, const char* i_SoundLimits);
/*!
@@ -6257,8 +6257,8 @@ AIL_add_sound_limit_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_LimitNa
AIL_add_persist_preset_event_step(hEvent, 0, `"Underwater`", 0);"
}
*/
-DXDEC S32 AILCALL
-AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
+DXDEC S32 AILCALL
+AIL_add_persist_preset_event_step(HMSSEVENTCONSTRUCT i_Event, const char* i_PresetName, const char* i_PersistName,
const char* i_Labels, U8 i_IsDynamic
);
@@ -6272,13 +6272,13 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_contents(HMSOUNDBANK bank, char const * n
thus shouldn't be checked via strlen, etc.
$:return Returns 0 on fail.
- Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
+ Normally, event contents are meant to be handled by the Miles high-level system via $AIL_enqueue_event,
rather than inspected directly.
*/
DXDEC EXPAPI S32 AILCALL AIL_add_clear_state_event_step(HMSSEVENTCONSTRUCT i_Event);
/*
- Clears all persistent state in the runtime.
+ Clears all persistent state in the runtime.
$:i_Event The event to add the step to.
@@ -6311,7 +6311,7 @@ DXDEC EXPAPI S32 AILCALL AIL_add_enable_limit_event_step(HMSSEVENTCONSTRUCT i_Ev
DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, char const* i_Base, char const* i_Amp, char const* i_Freq, S32 i_Invert, S32 i_Polarity, S32 i_Waveform, S32 i_DutyCycle, S32 i_IsLFO);
/*
Adds a step to define a variable that oscillates over time.
-
+
$:i_Event The event to add the step to.
$:i_Name The nane of the variable to oscillate.
$:i_Base The value to oscillate around, or a variable name to use as the base.
@@ -6327,15 +6327,15 @@ DXDEC EXPAPI S32 AILCALL AIL_add_set_lfo_event_step(HMSSEVENTCONSTRUCT i_Event,
DXDEC EXPAPI S32 AILCALL AIL_add_move_var_event_step(HMSSEVENTCONSTRUCT i_Event, char const* i_Name, const F32 i_Times[2], const S32 i_InterpolationTypes[2], const F32 i_Values[3]);
/*
Adds a step to set and move a variable over time on a curve.
-
+
$:i_Event The event to add the step to.
$:i_Name The variable to move.
$:i_Times The midpoint and final times for the curves
$:i_InterpolationTypes The curve type for the two curves - Curve In (0), Curve Out (1), S-Curve (2), Linear (3)
$:i_Values The initial, midpoint, and final values for the variable.
-
+
The variable is locked to this curve over the timeperiod - no interpolation from a previous value is done.
-
+
If an existing move var exists when the new one is added, the old one is replaced.
*/
@@ -6450,7 +6450,7 @@ struct EVENT_STEP_INFO
U8 isdynamic;
} persist;
- struct
+ struct
{
MSSSTRINGC name;
MSSSTRINGC labels;
@@ -6522,7 +6522,7 @@ struct EVENT_STEP_INFO
the string location of the next event step in the buffer."
Discussion = "This function parses the event string in to a struct for usage by the user. This function should only be
- used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
+ used by the MilesEvent system. It returns the pointer to the next step to be passed to this function to get the
next step. In this manner it can be used in a loop:
// Create an event to stop all sounds.
@@ -6610,11 +6610,11 @@ EXPTYPE typedef void* HEVENTSYSTEM;
DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_startup_event_system(HDIGDRIVER dig, S32 command_buf_len, EXPOUT char* memory_buf, S32 memory_len);
/*
Initializes the Miles Event system and associates it with an open digital driver.
-
+
$:dig The digital sound driver that this event system should use.
$:command_buf_len An optional number of bytes to use for the command buffer. If you pass 0, a reasonable default will be used (currently 5K).
- $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
- Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
+ $:memory_buf An optional pointer to a memory buffer buffer that the event system will use for all event allocations.
+ Note that the sound data itself is not stored in this buffer - it is only for internal buffers, the command buffer, and instance data.
Use 0 to let Miles to allocate this buffer itself.
$:memory_len If memory_buf is non-null, then this parameter provides the length. If memory_buf is null, the Miles will
allocate this much memory for internal buffers. If both memory_buf and memory_len are null, the Miles will allocate reasonable default (currently 64K).
@@ -6633,8 +6633,8 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
$:return A handle to the event system to use in various high level functions.
Both systems will access the same set of loaded soundbanks, and are updated when $AIL_begin_event_queue_processing is called.
-
- To enqueue events to the new system, use $AIL_enqueue_event_system.
+
+ To enqueue events to the new system, use $AIL_enqueue_event_system.
To iterate the sounds for the new system, pass the $HEVENTSYSTEM as the first parameter to $AIL_enumerate_sound_instances.
@@ -6646,7 +6646,7 @@ DXDEC EXPAPI HEVENTSYSTEM AILCALL AIL_add_event_system(HDIGDRIVER dig);
DXDEC EXPAPI void AILCALL AIL_shutdown_event_system( void );
/*
Shuts down the Miles event system.
-
+
This function will closes everything in the event system - it ignores reference counts. It will free
all event memory, sound banks, and samples used by the system.
*/
@@ -6660,10 +6660,10 @@ DXDEC EXPAPI HMSOUNDBANK AILCALL AIL_add_soundbank(char const * filename, char c
$:return The handle to the newly loaded soundbank (zero on failure).
This function opens the sound bank and makes it available to the event system. The filename
- is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
+ is the name on the media, and the name is the symbolic name you used in the Miles Sound Studio.
You might, for example, be using a soundbank with a platform extension, like: 'gamebank_ps3.msscmp',
and while using the name 'gamebank' for authoring and auditioning.
-
+
Sound data is not loaded when this function is called - it is only loaded when the relevant Cache Sounds
is played, or a sound requiring it plays.
@@ -6685,7 +6685,7 @@ DXDEC EXPAPI S32 AILCALL AIL_release_soundbank(HMSOUNDBANK bank);
Any other data references still existing (queued events, persisted presets, etc) will report errors when used,
but will not crash.
-
+
Releasing a sound bank does not free any cached sounds loaded from the bank - any sounds from the bank should be freed
via a Purge Sounds event step. If this does not occur, the sound data will still be loaded, but the
sound metadata will be gone, so Start Sound events will not work. Purge Sounds will still work.
@@ -6698,24 +6698,24 @@ DXDEC U8 const * AILCALL AIL_find_event(HMSOUNDBANK bank,char const* event_name)
(EXPAPI removed to prevent release in docs)
Searches for an event by name in the event system.
-
+
$:bank The soundbank to search within, or 0 to search all open banks (which is the normal case).
$:event_name The name of the event to find. This name should be of the form "soundbank/event_list/event_name".
$:return A pointer to the event contents (or 0, if the event isn't found).
-
+
This function is normally used as the event parameter for $AIL_enqueue_event. It
searches one or all open soundbanks for a particular event name.
-
- <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
+
+ <b>This is deprecated</b>. If you know the event name, you should use $AIL_enqueue_event_by_name, or $AIL_enqueue_event with
MILESEVENT_ENQUEUE_BY_NAME.
-
+
Events that are not enqueued by name can not be tracked by the Auditioner.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_system(HEVENTSYSTEM system, U8 const * event, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to a specific system. Used only if you have multiple event systems running.
-
+
$:system The event system to attach the event to.
$:return See $AIL_enqueue_event for return description.
@@ -6728,10 +6728,10 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_by_name(char const* name);
$:name The full name of the event, eg "soundbank/path/to/event".
$:return See $AIL_enqueue_event for return description.
-
- This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
-
- For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
+
+ This is the most basic way to enqueue an event. It enqueues an event by name, and as a result the event will be tracked by the auditioner.
+
+ For when you need more control over the event, but still want it to be tracked by the auditioner, it is equivalent
to calling $AIL_enqueue_event_end_named($AIL_enqueue_event_start(), name)
For introduction to the auditioning system, see $integrating_events.
@@ -6743,9 +6743,9 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
$:return A token used for passing to functions that add data to the event.
- This is used to pass more data to an event that will be executed. For instance, if
+ This is used to pass more data to an event that will be executed. For instance, if
an event is going to spatialize a sound, but there's no need to move the sound over the course of
- its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
+ its lifetime, you can add positional data to the event via $AIL_enqueue_event_position. When a
sound is started it will use that for its initial position, and there is no need to do any
game object <-> event id tracking.
@@ -6762,7 +6762,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_start();
The enqueue process is still completely thread safe. No locks are used, however only 8
enqueues can be "assembling" at the same time - if more than that occur, the $AIL_enqueue_event_start
- will yield the thread until a slot is open.
+ will yield the thread until a slot is open.
The ONLY time that should happen is if events enqueues are started but never ended:
@@ -6838,7 +6838,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
user buffer contents, and then exposed during sound enumeration. This is equivalent in spirit to
the void* value that often accompanies callbacks. In this case, user_buffer_len is ignored, as
user_buffer is never dereferenced.
- $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
+ $* <b>Buffer</b> If user_buffer_is_ptr is 0, then user_buffer_len bytes are copied from user_buffer and
carried with the event. During sound enumeration this buffer is made available, and you never have to
worry about memory management.
$-
@@ -6855,7 +6855,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data->game_stat = 1;
data->needed_info = 2;
- // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
+ // Pointer - the "data" pointer will be copied directly, so we can't free() "data" until after the sound
// completes and we're done using it in the enumeration loop.
S32 ptr_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&ptr_token, data, 0, 1);
@@ -6874,7 +6874,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_buffer(S32* token, void* user_buffer,
data.game_stat = 1;
data.needed_info = 2;
- // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
+ // Buffer - the "data" structure will be copied internally, so we can free() the data - or just use
// a stack variable like this
S32 buf_token = AIL_enqueue_event_start();
AIL_enqueue_event_buffer(&buf_token, &data, sizeof(data), 0);
@@ -6895,7 +6895,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_variablef(S32* token, char const* nam
$:value The value of the variable to set.
$:return 0 if the enqueue buffer is full
- When a sound starts, the given variable will be set to the given value prior to any possible
+ When a sound starts, the given variable will be set to the given value prior to any possible
references being used by presets.
*/
@@ -6904,7 +6904,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_filter(S32* token, U64 apply_to_ID);
Limits the effects of the event to sounds started by the given ID.
$:token A token created with $AIL_enqueue_event_start
- $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
+ $:apply_to_ID The ID to use for filtering. This can be either a sound or event ID. For an
event, it will apply to all sounds started by the event, and any events queued by that event.
$:return 0 if the enqueue buffer is full
@@ -6932,7 +6932,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enqueue_event_selection(S32* token, U32 selection);
$:selection The value to use for selecting the sound to play.
$:return 0 if the enqueue buffer is full
- The selection index is used to programatically select a sound from the
+ The selection index is used to programatically select a sound from the
loaded banks. The index passed in replaces any numeric value at the end
of the sound name existing in any start sound event step. For example, if
a start sound event plays "mybank/sound1", and the event is queued with
@@ -6969,52 +6969,52 @@ DXDEC EXPAPI U64 AILCALL AIL_enqueue_event_end_named(S32 token, char const* even
As with all of the enqueue functions it is completely thread-safe.
Upon completion of this function, the enqueue slot is release and available for another
- $AIL_enqueue_event_start.
+ $AIL_enqueue_event_start.
*/
DXDEC EXPAPI U64 AILCALL AIL_enqueue_event(U8 const * event_or_name, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags, U64 apply_to_ID );
/*
Enqueue an event to be processed by the next $AIL_begin_event_queue_processing function.
-
- $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
+
+ $:event_or_name Pointer to the event contents to queue, or the name of the event to find and queue.
If an event, the contents must be valid until the next call to $AIL_begin_event_queue_processing.
If a name, the string is copied internally and does not have any lifetime requirements, and MILES_ENQUEUE_BY_NAME must be present in enqueue_flags.
- $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
- This data is then accessible later, when enumerating the instances.
+ $:user_buffer Pointer to a user buffer. Depending on $(AIL_enqueue_event::enqueue_flags), this pointer can be saved directly, or its contents copied into the sound instance.
+ This data is then accessible later, when enumerating the instances.
$:user_buffer_len Size of the buffer pointed to by user_buffer.
$:enqueue_flags Optional $MILESEVENTENQUEUEFLAGS logically OR'd together that control how to enqueue this event (default is 0).
$:apply_to_ID Optional value that is used for events that affect sound instances. Normally,
- when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
+ when Miles triggers one of these event steps, it matches the name and labels stored with the event step. However, if
you specify an apply_to_ID value, then event step will only run on sounds that matches this QueuedID,InstanceID,or EventID too. This is how you
- execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
+ execute events only specific sound instances. QueuedIDs are returned from each call $AIL_enqueue_event.
InstanceIDs and EventIDs are returned from $AIL_enumerate_sound_instances.
- $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
+ $:return On success, returns QueuedID value that is unique to this queued event for the rest of this
program run (you can use this ID to uniquely identify sounds triggered from this event).
-
+
This function enqueues an event to be triggered - this is how you begin execution of an event. First, you
queue it, and then later (usually once a game frame), you call $AIL_begin_event_queue_processing to
execute an event.
-
- This function is very lightweight. It does nothing more than post the event and data to a
+
+ This function is very lightweight. It does nothing more than post the event and data to a
command buffer that gets executed via $AIL_begin_event_queue_processing.
The user_buffer parameter can be used in different ways. If no flags are passed in, then
Miles will copy the data from user_buffer (user_buffer_len bytes long) and store the data with
the queued sound - you can then free the user_buffer data completely! This lets Miles keep track
- of all your sound related memory directly and is the normal way to use the system (it is very
+ of all your sound related memory directly and is the normal way to use the system (it is very
convenient once you get used to it).
If you instead pass the MILESEVENT_ENQUEUE_BUFFER_PTR flag, then user_buffer pointer will
simply be associated with each sound that this event may start. In this case, user_buffer_len
is ignored.
-
- In both cases, when you later enumerate the sound instances, you can access your sound data
+
+ In both cases, when you later enumerate the sound instances, you can access your sound data
with the $(MILESEVENTSOUNDINFO::UserBuffer) field.
-
+
You can call this function from any number threads - it's designed to be called from anywhere in your game.
If you want events you queue to be captured by Miles Studio, then they have to be passed by name. This can be done
- by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
+ by either using the convenience function $AIL_enqueue_event_by_name, or by using the MILESEVENT_ENQUEUE_BY_NAME flag and
passing the name in event_or_name. For introduction to the auditioning system, see $integrating_events.
*/
@@ -7044,23 +7044,23 @@ DXDEC EXPAPI S32 AILCALL AIL_begin_event_queue_processing( void );
/*
Begin execution of all of the enqueued events.
- $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
+ $:return Return 0 on failure. The only failures are unrecoverable errors in the queued events
(out of memory, bank file not found, bad data, etc). You can get the specific error by
calling $AIL_last_error.
-
+
This function executes all the events currently in the queue. This is where all major
processing takes place in the event system.
-
+
Once you execute this functions, then sound instances will be in one of three states:
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7082,7 +7082,7 @@ ${
MILESEVENTSOUNDINFO Info;
HMSSENUM SoundEnum = MSS_FIRST;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, MILESEVENT_SOUND_STATUS_PENDING | MILESEVENT_SOUND_STATUS_COMPLETE, 0, &Info ) )
{
game_type * game_data = (game_type*) Info.UserBuffer; // returns the game_data pointer from the enqueue
@@ -7098,13 +7098,13 @@ ${
}
}
- $AIL_complete_event_queue_processing( );
- $}
-
- Note that if any event step drastically fails, the rest of the command queue is
+ $AIL_complete_event_queue_processing( );
+ $}
+
+ Note that if any event step drastically fails, the rest of the command queue is
skipped, and this function returns 0! For this reason, you shouldn't assume
that a start sound event will always result in a completed sound later.
-
+
Therefore, you should allocate memory that you want associated with a sound instance
during the enumeration loop, rather than at enqueue time. Otherwise, you
need to detect that the sound didn't start and then free the memory (which can be complicated).
@@ -7120,7 +7120,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
HSTREAM Stream;
void* UserBuffer;
S32 UserBufferLen;
- S32 Status;
+ S32 Status;
U32 Flags;
S32 UsedDelay;
F32 UsedVolume;
@@ -7130,10 +7130,10 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
} MILESEVENTSOUNDINFO;
/*
Sound instance data that is associated with each active sound instance.
-
+
$:QueuedID A unique ID that identifies the queued event that started this sound. Returned from each call to $AIL_enqueue_event.
$:EventID A unique ID that identifies the actual event that started this sound. This is the same as QueuedID unless the sound
- was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
+ was started by a completion event or a event exec step. In that case, the QueuedID represents the ID returned from
$AIL_enqueue_event, and EventID represents the completion event.
$:InstanceID A unique ID that identified this specific sound instance (note that one QueuedID can trigger multiple InstanceIDs).
$:Sample The $HSAMPLE for this playing sound.
@@ -7148,7 +7148,7 @@ EXPTYPE typedef struct _MILESEVENTSOUNDINFO
$:UsedSound The name of the sound used as a result of randomization. This pointer should NOT be deleted
and is only valid for the until the next call in to Miles.
$:HasCompletionEvent Nonzero if the sound will fire an event upon completion.
-
+
This structure is returned by the $AIL_enumerate_sound_instances function. It
returns information about an active sound instance.
*/
@@ -7157,7 +7157,7 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7183,14 +7183,14 @@ DXDEC EXPAPI void AILCALL AIL_set_variable_int(UINTa context, char const* name,
// A preset referencing "MyVar" for FirstSound will get 10. Any other sound will
// get 20.
$}
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_variable_float(UINTa context, char const* name, F32 value);
/*
Sets a named variable that the designer can reference in the tool.
- $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
+ $:context The context the variable is set for. Can be either a $HEVENTSYSTEM
to set a global variable for a specific system, 0 to set a global variable
for the default system, or an $HMSSENUM from $AIL_enumerate_sound_instances.
$:name The name of the variable to set.
@@ -7265,7 +7265,7 @@ DXDEC EXPAPI void AILCALL AIL_set_sound_start_offset(HMSSENUM sound, S32 offset,
the sound starting. Generally you don't need to do this manually, since the sound designer should do
this, however if you need to restart a sound that stopped - for example a stream that went to error -
you will have to set the start position via code.
-
+
However, since there can be a delay between the time the sound is first seen in the sound iteration and
the time it gets set to the data, start positions set via the low level miles calls can get lost, so
use this.
@@ -7281,11 +7281,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$:statuses Or-ed list of status values to enumerate. Use 0 for all status types.
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:search_for_ID Match only instances that have a QueuedID,InstanceID,or EventID that matches this value. Use 0 to skip ID matching.
- $:info Returns the data for each sound instance.
+ $:info Returns the data for each sound instance.
$:return Returns 0 when enumeration is complete.
Enumerates the sound instances. This will generally be used between
- calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
+ calls to $AIL_begin_event_queue_processing and $AIL_complete_event_queue_processing to
manage the sound instances.
The label_query is a list of labels to match, separated by commas. By default, comma-separated
@@ -7302,11 +7302,11 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_sound_instances(HEVENTSYSTEM system, HMSS
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PENDING)[MILESEVENT_SOUND_STATUS_PENDING] - these are new sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_PLAYING)[MILESEVENT_SOUND_STATUS_PLAYING] - these are sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$(MILESEVENTSOUNDSTATUS::MILESEVENT_SOUND_STATUS_COMPLETE)[MILESEVENT_SOUND_STATUS_COMPLETE] - these are sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
@@ -7315,7 +7315,7 @@ ${
HMSSENUM SoundEnum = MSS_FIRST;
MILESEVENTSOUNDINFO Info;
- while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
+ while ( $AIL_enumerate_sound_instances( &SoundEnum, 0, 0, &Info ) )
{
if ( Info.Status != MILESEVENT_SOUND_STATUS_COMPLETE )
{
@@ -7330,23 +7330,23 @@ $}
EXPTYPEBEGIN typedef S32 MILESEVENTSOUNDSTATUS;
#define MILESEVENT_SOUND_STATUS_PENDING 0x1
-#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
+#define MILESEVENT_SOUND_STATUS_PLAYING 0x2
#define MILESEVENT_SOUND_STATUS_COMPLETE 0x4
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_STATUS_PENDING New sound instances that were
created by events that had a "Start Sound Step". Note that these instances aren't audible yet,
so that you have a chance to modify game driven properties (like the 3D position)
- on the sound before Miles begins to play it.
-
+ on the sound before Miles begins to play it.
+
$:MILESEVENT_SOUND_STATUS_PLAYING Sound instances that were previously
started and are continuing to play (you might update the 3D position for these, for example).
-
+
$:MILESEVENT_SOUND_STATUS_COMPLETE Sound instances that finished playing
since the last this frame (you might use this status to free any game related memory, for example).
-
+
These are the status values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them.
*/
@@ -7360,13 +7360,13 @@ EXPTYPEBEGIN typedef U32 MILESEVENTSOUNDFLAG;
EXPTYPEEND
/*
Specifies the status of a sound instance.
-
+
$:MILESEVENT_SOUND_FLAG_MISSING_SOUND The event system tried to look up the sound requested from a Start Sound event
and couldn't find anything in the loaded banks.
$:MILESEVENT_SOUND_FLAG_EVICTED The sound was evicted due to a sound instance limit being hit. Another sound was selected
as being higher priority, and this sound was stopped as a result. This can be the result of either a Label Sound Limit,
or a limit on the sound itself.
- $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
+ $:MILESEVENT_SOUND_FLAG_WAITING_ASYNC The sound is pending because the data for it is currently being loaded.
The sound will start when sufficient data has been loaded to hopefully avoid a skip.
$:MILESEVENT_SONUD_FLAG_PENDING_ASYNC The sound has started playing, but the data still isn't completely loaded, and it's possible
that the sound playback will catch up to the read position under poor I/O conditions.
@@ -7375,7 +7375,7 @@ EXPTYPEEND
sound data is asynchronously loaded, or specify the sound in a Cache Sounds step prior to attempting to start it.
$:MILESEVENT_SOUND_FLAG_FAILED_ASYNC The sound tried to load and the asynchronous I/O operation failed - most likely either the media
was removed during load, or the file was not found.
-
+
These are the flag values that each sound instance can have. Use $AIL_enumerate_sound_instances to retrieve them. Instances
may have more than one flag, logically 'or'ed together.
*/
@@ -7383,16 +7383,16 @@ EXPTYPEEND
DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
/*
Completes the queue processing (which is started with $AIL_begin_event_queue_processing ).
-
+
$:return Returns 0 on failure.
- This function must be called as a pair with $AIL_begin_event_queue_processing.
-
- In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
- started playing yet. Old sound instances that have finished playing are still valid - they
- haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
+ This function must be called as a pair with $AIL_begin_event_queue_processing.
+
+ In $AIL_begin_event_queue_processing, all the new sound instances are queued up, but they haven't
+ started playing yet. Old sound instances that have finished playing are still valid - they
+ haven't been freed yet. $AIL_complete_event_queue_processing actually starts the sound instances
and frees the completed ones - it's the 2nd half of the event processing.
-
+
Usually you call $AIL_enumerate_sound_instances before this function to manage all the sound
instances.
*/
@@ -7400,7 +7400,7 @@ DXDEC EXPAPI S32 AILCALL AIL_complete_event_queue_processing( void );
DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a stop sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to stop only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7408,7 +7408,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
Enqueues an event to stop all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to stop the necessary sounds,
however, if a single sound (for example associated with an enemy that the player just killed) needs to be stopped,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7417,7 +7417,7 @@ DXDEC EXPAPI U64 AILCALL AIL_stop_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a pause sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to pause only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7425,7 +7425,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
Enqueues an event to pause all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to pause the necessary sounds,
however, if a single sound (for example associated with an enemy that has been put in to stasis) needs to be paused,
this function accomplishes that, and is captured by the auditioner for replay.
@@ -7434,7 +7434,7 @@ DXDEC EXPAPI U64 AILCALL AIL_pause_sound_instances(char const * label_query, U64
DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U64 apply_to_ID);
/*
Allows the programmer to manually enqueue a resume sound event into the event system.
-
+
$:label_query A query to match sound instance labels against. Use 0 to skip label matching.
$:apply_to_ID An optional value returned from a previous $AIL_enqueue_event or $AIL_enumerate_sound_instances that
tells Miles to resume only those instances who's QueuedID,InstanceID,or EventID matches this value.
@@ -7442,17 +7442,17 @@ DXDEC EXPAPI U64 AILCALL AIL_resume_sound_instances(char const * label_query, U6
Enqueues an event to resume all sounds matching the specified label query (see $AIL_enumerate_sound_instances
for a description of the label_query format).
-
+
Usually the programmer should trigger a named event that the sound designed can fill out to resume the necessary sounds,
however, if a single sound (for example associated with an enemy that has been restored from stasis) needs to be resumed,
this function accomplishes that, and is captured by the auditioner for replay.
*/
-DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
+DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const * sound, U8 loop_count,
S32 should_stream, char const * labels, void* user_buffer, S32 user_buffer_len, S32 enqueue_flags );
/*
Allows the programmer to manually enqueue a start sound event into the event system.
-
+
$:bank The bank containing the sound to start.
$:sound The name of the sound file to start, including bank name, e.g. "BankName/SoundName"
$:loop_count The loop count to assign to the sound. 0 for infinite, 1 for play once, or just the number of times to loop.
@@ -7463,10 +7463,10 @@ DXDEC EXPAPI U64 AILCALL AIL_start_sound_instance(HMSOUNDBANK bank, char const *
$:enqueue_flags See the enqueue_flags description in $AIL_enqueue_event.
$:return Returns a non-zero EnqueueID on success.
- Enqueues an event to start the specified sound asset.
-
+ Enqueues an event to start the specified sound asset.
+
Usually the programmer should trigger an event that the sound designer has specifically
- create to start the appropriate sounds, but this function gives the programmer
+ create to start the appropriate sounds, but this function gives the programmer
manual control, if necessary. <b>This function is not captured by the auditioner.</b>
*/
@@ -7488,7 +7488,7 @@ DXDEC EXPAPI S32 AILCALL AIL_set_sound_label_limits(HEVENTSYSTEM system, char co
Every time an event triggers a sound to be played, the sound limits are checked, and, if exceeded, a sound is dropped (based
on the settings in the event step).
-
+
Usually event limits are set by a sound designer via an event, but this lets the programmer override the limits at runtime.
Note that this replaces those events, it does not supplement.
*/
@@ -7503,7 +7503,7 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
that this pointer can change frame to frame and should be immediately copied to a client-allocated
buffer if persistence is desired.
$:return Returns 0 when enumeration is complete.
-
+
This function lets you enumerate all the persisting presets that are currently active in the system. It
is mostly a debugging aid.
*/
@@ -7511,12 +7511,12 @@ DXDEC EXPAPI S32 AILCALL AIL_enumerate_preset_persists(HEVENTSYSTEM system, HMSS
DXDEC EXPAPI char * AILCALL AIL_text_dump_event_system(void);
/*
Returns a big string describing the current state of the event system.
-
- $:return String description of current systems state.
+
+ $:return String description of current systems state.
This function is a debugging aid - it can be used to show all of the active allocations,
active sounds, etc.
-
+
You must delete the pointer returned from this function with $AIL_mem_free_lock.
*/
@@ -7535,7 +7535,7 @@ EXPTYPE typedef struct _MILESEVENTSTATE
} MILESEVENTSTATE;
/*
returns the current state of the Miles Event System.
-
+
$:CommandBufferSize The size of the command buffer in bytes. See also the $AIL_startup_event_system.
$:HeapSize The total size of memory used by the event system for management structures, and is allocated during startup. This does not include loaded file sizes.
$:HeapRemaining The number of bytes in HeapSize that is remaining.
@@ -7615,7 +7615,7 @@ EXPTYPE typedef struct _MILESBANKFUNCTIONS
} MILESBANKFUNCTIONS;
/*
specifies callbacks for each of the Miles event system.
-
+
$:FreeAll Callback that tells you to free all user-side bank memory.
$:GetPreset Callback to retrieve a sound preset.
$:GetEnvironment Callback to retrieve an environment preset.
@@ -7645,13 +7645,13 @@ DXDEC EXPAPI void AILCALL AIL_set_event_sample_functions(HSAMPLE (*CreateSampleC
In the callback, SoundName is the name of the asset in Miles Studio, and SoundFileName
is the value returned from Container_GetSound() (see also $AIL_set_event_bank_functions).
-
+
*/
DXDEC EXPAPI void AILCALL AIL_set_event_bank_functions(MILESBANKFUNCTIONS const * Functions);
/*
Allows you to override the internal bank file resource management..
-
+
$:Functions A pointer to a structure containing all the callback functions.
This function is used to completely override the high-level resource management system.
@@ -7856,7 +7856,7 @@ EXPTYPEEND
$:MILES_PLAT_IPHONE Apple iDevices
$:MILES_PLAT_LINUX Linux Flavors
$:MILES_PLAT_WII Nintendo Wii
- $:MILES_PLAT_PSP2 Sony NGP
+ $:MILES_PLAT_PSP2 Sony NGP
Values representing the various platforms the high level tool allows.
*/
@@ -7891,11 +7891,11 @@ EXPGROUP(Miles High Level Event System)
DXDEC EXPAPI void AILCALL AIL_event_system_state(HEVENTSYSTEM system, MILESEVENTSTATE* state);
/*
Returns an information structure about the current state of the Miles Event System.
-
+
$:system The system to retrieve information for, or zero for the default system.
$:state A pointer to a structure to receive the state information.
- This function is a debugging aid - it returns information for the event system.
+ This function is a debugging aid - it returns information for the event system.
*/
DXDEC EXPAPI U32 AILCALL AIL_event_system_command_queue_remaining();
@@ -7923,7 +7923,7 @@ DXDEC EXPAPI S32 AILCALL AIL_get_event_length(char const* i_EventName);
// Callback for the error handler.
EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_Resource);
/*
- The function prototype to use for a callback that will be made when the event system
+ The function prototype to use for a callback that will be made when the event system
encounters an unrecoverable error.
$:i_RelevantId The ID of the asset that encountered the error, as best known. EventID or SoundID.
@@ -7937,7 +7937,7 @@ EXPAPI typedef void AILCALLBACK AILEVENTERRORCB(S64 i_RelevantId, char const* i_
EXPAPI typedef S32 AILCALLBACK MSS_USER_RAND( void );
/*
The function definition to use when defining your own random function.
-
+
You can define a function with this prototype and pass it to $AIL_register_random
if you want to tie the Miles random calls in with your game's (for logging and such).
*/
@@ -7953,7 +7953,7 @@ DXDEC EXPAPI void AILCALL AIL_set_event_error_callback(AILEVENTERRORCB * i_Error
can sometimes be somewhat invisible. This function allows you to see what went wrong,
when it went wrong.
- The basic usage is to have the callback check $AIL_last_error() for the overall category of
+ The basic usage is to have the callback check $AIL_last_error() for the overall category of
failure. The parameter passed to the callback might provide some context, but it can and will
be zero on occasion. Generally it will represent the resource string that is being worked on when the error
occurred.
@@ -8009,7 +8009,7 @@ typedef C8 * (AILCALL *FLT_ERROR)(void);
typedef HDRIVERSTATE (AILCALL *FLT_OPEN_DRIVER) (MSS_ALLOC_TYPE * palloc,
MSS_FREE_TYPE * pfree,
- UINTa user,
+ UINTa user,
HDIGDRIVER dig, void * memory);
typedef FLTRESULT (AILCALL *FLT_CLOSE_DRIVER) (HDRIVERSTATE state);
diff --git a/Minecraft.Client/PSVita/Miles/include/rrCore.h b/Minecraft.Client/PSVita/Miles/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/PSVita/Miles/include/rrCore.h
+++ b/Minecraft.Client/PSVita/Miles/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/PSVita/PSVitaExtras/PSVitaStubs.h b/Minecraft.Client/PSVita/PSVitaExtras/PSVitaStubs.h
index 180ebbbc..de405e26 100644
--- a/Minecraft.Client/PSVita/PSVitaExtras/PSVitaStubs.h
+++ b/Minecraft.Client/PSVita/PSVitaExtras/PSVitaStubs.h
@@ -26,7 +26,7 @@ DWORD TlsAlloc(VOID);
LPVOID TlsGetValue(DWORD dwTlsIndex);
BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue);
-typedef struct _RECT
+typedef struct _RECT
{
LONG left;
LONG top;
@@ -34,13 +34,13 @@ typedef struct _RECT
LONG bottom;
} RECT, *PRECT;
-typedef struct _TOUCHSCREENRECT
+typedef struct _TOUCHSCREENRECT
{
SceInt16 left;
SceInt16 top;
SceInt16 right;
SceInt16 bottom;
-}
+}
TOUCHSCREENRECT, *PTOUCHSCREENRECT;
typedef void ID3D11Device;
@@ -58,16 +58,16 @@ typedef int errno_t;
// // The following field is used for blocking when there is contention for
// // the resource
// //
-//
+//
// union {
// ULONG_PTR RawEvent[4];
// } Synchronization;
-//
+//
// //
// // The following three fields control entering and exiting the critical
// // section for the resource
// //
-//
+//
// LONG LockCount;
// LONG RecursionCount;
// HANDLE OwningThread;
@@ -261,7 +261,7 @@ typedef struct _MEMORYSTATUS {
#define THREAD_PRIORITY_IDLE THREAD_BASE_PRIORITY_IDLE
#define WAIT_TIMEOUT 258L
-#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
+#define STATUS_ABANDONED_WAIT_0 ((DWORD )0x00000080L)
#define WAIT_ABANDONED ((STATUS_ABANDONED_WAIT_0 ) + 0 )
#define MAXUINT_PTR (~((UINT_PTR)0))
@@ -303,17 +303,17 @@ typedef struct _MEMORYSTATUS {
#define GENERIC_EXECUTE (0x20000000L)
#define GENERIC_ALL (0x10000000L)
-#define FILE_SHARE_READ 0x00000001
-#define FILE_SHARE_WRITE 0x00000002
-#define FILE_SHARE_DELETE 0x00000004
-#define FILE_ATTRIBUTE_READONLY 0x00000001
-#define FILE_ATTRIBUTE_HIDDEN 0x00000002
-#define FILE_ATTRIBUTE_SYSTEM 0x00000004
-#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
-#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
-#define FILE_ATTRIBUTE_DEVICE 0x00000040
-#define FILE_ATTRIBUTE_NORMAL 0x00000080
-#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
+#define FILE_SHARE_READ 0x00000001
+#define FILE_SHARE_WRITE 0x00000002
+#define FILE_SHARE_DELETE 0x00000004
+#define FILE_ATTRIBUTE_READONLY 0x00000001
+#define FILE_ATTRIBUTE_HIDDEN 0x00000002
+#define FILE_ATTRIBUTE_SYSTEM 0x00000004
+#define FILE_ATTRIBUTE_DIRECTORY 0x00000010
+#define FILE_ATTRIBUTE_ARCHIVE 0x00000020
+#define FILE_ATTRIBUTE_DEVICE 0x00000040
+#define FILE_ATTRIBUTE_NORMAL 0x00000080
+#define FILE_ATTRIBUTE_TEMPORARY 0x00000100
#define FILE_FLAG_WRITE_THROUGH 0x80000000
#define FILE_FLAG_OVERLAPPED 0x40000000
@@ -333,38 +333,38 @@ typedef struct _MEMORYSTATUS {
#define OPEN_ALWAYS 4
#define TRUNCATE_EXISTING 5
-#define PAGE_NOACCESS 0x01
-#define PAGE_READONLY 0x02
-#define PAGE_READWRITE 0x04
-#define PAGE_WRITECOPY 0x08
-#define PAGE_EXECUTE 0x10
-#define PAGE_EXECUTE_READ 0x20
-#define PAGE_EXECUTE_READWRITE 0x40
-#define PAGE_EXECUTE_WRITECOPY 0x80
-#define PAGE_GUARD 0x100
-#define PAGE_NOCACHE 0x200
-#define PAGE_WRITECOMBINE 0x400
-#define PAGE_USER_READONLY 0x1000
-#define PAGE_USER_READWRITE 0x2000
-#define MEM_COMMIT 0x1000
-#define MEM_RESERVE 0x2000
-#define MEM_DECOMMIT 0x4000
-#define MEM_RELEASE 0x8000
-#define MEM_FREE 0x10000
-#define MEM_PRIVATE 0x20000
-#define MEM_RESET 0x80000
-#define MEM_TOP_DOWN 0x100000
-#define MEM_NOZERO 0x800000
-#define MEM_LARGE_PAGES 0x20000000
-#define MEM_HEAP 0x40000000
-#define MEM_16MB_PAGES 0x80000000
+#define PAGE_NOACCESS 0x01
+#define PAGE_READONLY 0x02
+#define PAGE_READWRITE 0x04
+#define PAGE_WRITECOPY 0x08
+#define PAGE_EXECUTE 0x10
+#define PAGE_EXECUTE_READ 0x20
+#define PAGE_EXECUTE_READWRITE 0x40
+#define PAGE_EXECUTE_WRITECOPY 0x80
+#define PAGE_GUARD 0x100
+#define PAGE_NOCACHE 0x200
+#define PAGE_WRITECOMBINE 0x400
+#define PAGE_USER_READONLY 0x1000
+#define PAGE_USER_READWRITE 0x2000
+#define MEM_COMMIT 0x1000
+#define MEM_RESERVE 0x2000
+#define MEM_DECOMMIT 0x4000
+#define MEM_RELEASE 0x8000
+#define MEM_FREE 0x10000
+#define MEM_PRIVATE 0x20000
+#define MEM_RESET 0x80000
+#define MEM_TOP_DOWN 0x100000
+#define MEM_NOZERO 0x800000
+#define MEM_LARGE_PAGES 0x20000000
+#define MEM_HEAP 0x40000000
+#define MEM_16MB_PAGES 0x80000000
#define IGNORE 0 // Ignore signal
#define INFINITE 0xFFFFFFFF // Infinite timeout
#define WAIT_FAILED ((DWORD)0xFFFFFFFF)
-#define STATUS_WAIT_0 ((DWORD )0x00000000L)
+#define STATUS_WAIT_0 ((DWORD )0x00000000L)
#define WAIT_OBJECT_0 ((STATUS_WAIT_0 ) + 0 )
-#define STATUS_PENDING ((DWORD )0x00000103L)
+#define STATUS_PENDING ((DWORD )0x00000103L)
#define STILL_ACTIVE STATUS_PENDING
DWORD GetLastError(VOID);
@@ -403,9 +403,9 @@ VOID OutputDebugString(LPCSTR lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString);
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix);
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix);
+errno_t _i64toa_s(long long _Val, char * _DstBuf, size_t _Size, int _Radix);
-#define __declspec(a)
+#define __declspec(a)
extern "C" int _wcsicmp (const wchar_t * dst, const wchar_t * src);
size_t wcsnlen(const wchar_t *wcs, size_t maxsize);
diff --git a/Minecraft.Client/PSVita/PSVitaExtras/PSVitaTypes.h b/Minecraft.Client/PSVita/PSVitaExtras/PSVitaTypes.h
index bb3d3503..ee5666eb 100644
--- a/Minecraft.Client/PSVita/PSVitaExtras/PSVitaTypes.h
+++ b/Minecraft.Client/PSVita/PSVitaExtras/PSVitaTypes.h
@@ -1,6 +1,6 @@
#pragma once
-//#include "winerror.h"
+#include <cstdint>
typedef unsigned int DWORD;
typedef int BOOL;
@@ -34,14 +34,12 @@ typedef unsigned int *PUINT;
typedef unsigned char byte;
-typedef long long __int64;
-typedef unsigned long long __uint64;
typedef unsigned int DWORD;
typedef int INT;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
typedef ULONG_PTR SIZE_T, *PSIZE_T;
-typedef __int64 LONG64, *PLONG64;
+typedef long long LONG64, *PLONG64;
#define VOID void
typedef char CHAR;
diff --git a/Minecraft.Client/PSVita/PSVitaExtras/PsVitaStubs.cpp b/Minecraft.Client/PSVita/PSVitaExtras/PsVitaStubs.cpp
index b9668250..2f5e4d84 100644
--- a/Minecraft.Client/PSVita/PSVitaExtras/PsVitaStubs.cpp
+++ b/Minecraft.Client/PSVita/PSVitaExtras/PsVitaStubs.cpp
@@ -56,42 +56,42 @@ void PSVitaInit()
int err = sceFiosInitialize(&params);
assert(err == SCE_FIOS_OK);
}
-char* getConsoleHomePath()
-{
- return contentInfoPath;
+char* getConsoleHomePath()
+{
+ return contentInfoPath;
}
-char* getUsrDirRoot()
-{
- return driveRoot;
+char* getUsrDirRoot()
+{
+ return driveRoot;
}
-char* getUsrDirPath()
-{
- return usrdirPath;
+char* getUsrDirPath()
+{
+ return usrdirPath;
}
-char* getConsoleHomePathBDPatch()
-{
- return contentInfoPathBDPatch;
+char* getConsoleHomePathBDPatch()
+{
+ return contentInfoPathBDPatch;
}
-char* getUsrDirPathBDPatch()
-{
- return usrdirPathBDPatch;
+char* getUsrDirPathBDPatch()
+{
+ return usrdirPathBDPatch;
}
-char* getDirName()
-{
- return dirName;
+char* getDirName()
+{
+ return dirName;
}
int _wcsicmp( const wchar_t * dst, const wchar_t * src )
{
wchar_t f,l;
- // validation section
+ // validation section
// _VALIDATE_RETURN(dst != NULL, EINVAL, _NLSCMPERROR);
// _VALIDATE_RETURN(src != NULL, EINVAL, _NLSCMPERROR);
@@ -117,7 +117,7 @@ size_t wcsnlen(const wchar_t *wcs, size_t maxsize)
return n;
}
-VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
+VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
{
SceDateTime dateTime;
int err = sceRtcGetCurrentClock(&dateTime, 0);
@@ -133,8 +133,8 @@ VOID GetSystemTime( LPSYSTEMTIME lpSystemTime)
lpSystemTime->wMilliseconds = sceRtcGetMicrosecond(&dateTime)/1000;
}
BOOL FileTimeToSystemTime(CONST FILETIME *lpFileTime, LPSYSTEMTIME lpSystemTime) { PSVITA_STUBBED; return false; }
-BOOL SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime)
-{
+BOOL SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime)
+{
SceUInt64 diffHundredNanos;
SceDateTime dateTime;
int err = sceRtcGetCurrentClock(&dateTime, 0);
@@ -143,11 +143,11 @@ BOOL SystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime)
lpFileTime->dwHighDateTime = diffHundredNanos >> 32;
lpFileTime->dwLowDateTime = diffHundredNanos & 0xffffffff;
- return true;
+ return true;
}
-VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
-{
+VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
+{
SceDateTime dateTime;
int err = sceRtcGetCurrentClockLocalTime(&dateTime);
assert(err == SCE_OK);
@@ -163,26 +163,26 @@ VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
}
HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { PSVITA_STUBBED; return NULL; }
-VOID Sleep(DWORD dwMilliseconds)
-{
+VOID Sleep(DWORD dwMilliseconds)
+{
C4JThread::Sleep(dwMilliseconds);
}
BOOL SetThreadPriority(HANDLE hThread, int nPriority) { PSVITA_STUBBED; return FALSE; }
DWORD WaitForSingleObject(HANDLE hHandle, DWORD dwMilliseconds) { PSVITA_STUBBED; return false; }
-LONG InterlockedCompareExchangeRelease(LONG volatile *Destination, LONG Exchange,LONG Comperand )
-{
+LONG InterlockedCompareExchangeRelease(LONG volatile *Destination, LONG Exchange,LONG Comperand )
+{
return sceAtomicCompareAndSwap32((int32_t*)Destination, (int32_t)Comperand, (int32_t)Exchange);
}
-LONG64 InterlockedCompareExchangeRelease64(LONG64 volatile *Destination, LONG64 Exchange, LONG64 Comperand)
-{
+LONG64 InterlockedCompareExchangeRelease64(LONG64 volatile *Destination, LONG64 Exchange, LONG64 Comperand)
+{
return sceAtomicCompareAndSwap64((int64_t*)Destination, (int64_t)Comperand, (int64_t)Exchange);
}
-VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
{
char name[1] = {0};
@@ -191,7 +191,7 @@ VOID InitializeCriticalSection(PCRITICAL_SECTION CriticalSection)
}
-VOID InitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION CriticalSection, ULONG SpinCount)
+VOID InitializeCriticalSectionAndSpinCount(PCRITICAL_SECTION CriticalSection, ULONG SpinCount)
{
// no spin count on PSVita
InitializeCriticalSection(CriticalSection);
@@ -203,16 +203,16 @@ VOID DeleteCriticalSection(PCRITICAL_SECTION CriticalSection)
PSVITA_ASSERT_SCE_ERROR(err);
}
-extern CRITICAL_SECTION g_singleThreadCS;
+extern CRITICAL_SECTION g_singleThreadCS;
-VOID EnterCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID EnterCriticalSection(PCRITICAL_SECTION CriticalSection)
{
int err = sceKernelLockLwMutex ((SceKernelLwMutexWork *)(&CriticalSection->mutex), 1, NULL);
PSVITA_ASSERT_SCE_ERROR(err);
}
-VOID LeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
+VOID LeaveCriticalSection(PCRITICAL_SECTION CriticalSection)
{
int err = sceKernelUnlockLwMutex ((SceKernelLwMutexWork *)(&CriticalSection->mutex), 1);
PSVITA_ASSERT_SCE_ERROR(err);
@@ -272,8 +272,8 @@ VOID LeaveCriticalRWSection(PCRITICAL_RW_SECTION CriticalSection, bool Write)
-BOOL CloseHandle(HANDLE hObject)
-{
+BOOL CloseHandle(HANDLE hObject)
+{
sceFiosFHCloseSync(NULL,(SceFiosFH)((int32_t)hObject));
return true;
}
@@ -292,8 +292,8 @@ BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) { return PSVitaTLSStorage:
static void* VirtualAllocs[1000]; // a list of 1MB allocations
static int VirtualNumAllocs = 0; // how many 1MB chunks have been allocated
-LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
-{
+LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
+{
if( flAllocationType == MEM_COMMIT )
{
// how many pages do we need
@@ -319,7 +319,7 @@ LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWO
return (void*) VIRTUAL_OFFSET;
}
-BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
+BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
{
while( VirtualNumAllocs )
{
@@ -333,7 +333,7 @@ BOOL VirtualFree(LPVOID lpAddress, SIZE_T dwSize, DWORD dwFreeType)
// memset a section of the virtual chunks
-VOID VirtualMemset(LPVOID lpDestOffset, int val, SIZE_T dwSize)
+VOID VirtualMemset(LPVOID lpDestOffset, int val, SIZE_T dwSize)
{
int DestOffset = ((int)(lpDestOffset) - VIRTUAL_OFFSET); // convert the pointer back into a virtual offset
int StartPage = DestOffset / VIRTUAL_PAGE_SIZE; // which 1MB page do we start on
@@ -371,7 +371,7 @@ VOID VirtualMemset(LPVOID lpDestOffset, int val, SIZE_T dwSize)
// copy a block of memory to the virtual chunks
-VOID VirtualCopyTo(LPVOID lpDestOffset, LPVOID lpSrc, SIZE_T dwSize)
+VOID VirtualCopyTo(LPVOID lpDestOffset, LPVOID lpSrc, SIZE_T dwSize)
{
int DestOffset = ((int)(lpDestOffset) - VIRTUAL_OFFSET); // convert the pointer back into a virtual offset
int StartPage = DestOffset / VIRTUAL_PAGE_SIZE; // which 1MB page do we start on
@@ -410,7 +410,7 @@ VOID VirtualCopyTo(LPVOID lpDestOffset, LPVOID lpSrc, SIZE_T dwSize)
}
// copy a block of memory from the virtual chunks
-VOID VirtualCopyFrom(LPVOID lpDest, LPVOID lpSrcOffset, SIZE_T dwSize)
+VOID VirtualCopyFrom(LPVOID lpDest, LPVOID lpSrcOffset, SIZE_T dwSize)
{
int SrcOffset = ((int)(lpSrcOffset) - VIRTUAL_OFFSET); // convert the pointer back into a virtual offset
int StartPage = SrcOffset / VIRTUAL_PAGE_SIZE; // which 1MB page do we start on
@@ -449,7 +449,7 @@ VOID VirtualCopyFrom(LPVOID lpDest, LPVOID lpSrcOffset, SIZE_T dwSize)
}
// copy a block of memory between the virtual chunks
-VOID VirtualMove(LPVOID lpDestOffset, LPVOID lpSrcOffset, SIZE_T dwSize)
+VOID VirtualMove(LPVOID lpDestOffset, LPVOID lpSrcOffset, SIZE_T dwSize)
{
int DestOffset = ((int)(lpDestOffset) - VIRTUAL_OFFSET); // convert the pointer back into a virtual offset
int DestChunkOffset = DestOffset % VIRTUAL_PAGE_SIZE; // what is the byte offset within the current 1MB page
@@ -652,7 +652,7 @@ DWORD GetFileSize( HANDLE hFile, LPDWORD lpFileSizeHigh )
{
SceFiosFH fh = (SceFiosFH)(hFile);
- // 4J Stu - sceFiosFHGetSize didn't seem to work...so doing this for now
+ // 4J Stu - sceFiosFHGetSize didn't seem to work...so doing this for now
//SceFiosSize FileSize;
//FileSize=sceFiosFHGetSize(fh);
SceFiosStat statData;
@@ -694,7 +694,7 @@ BOOL WriteFile( HANDLE hFile, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite, LPD
return FALSE;
}
-BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped )
+BOOL ReadFile(HANDLE hFile, LPVOID lpBuffer, DWORD nNumberOfBytesToRead, LPDWORD lpNumberOfBytesRead, LPOVERLAPPED lpOverlapped )
{
SceFiosFH fh = (SceFiosFH)((int64_t)hFile);
// sceFiosFHReadSync - Non-negative values are the number of bytes read, 0 <= result <= length. Negative values are error codes.
@@ -743,7 +743,7 @@ void replaceBackslashes(char* szFilename)
}
}
-HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
+HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
{
char filePath[256];
std::string mountedPath = StorageManager.GetMountedPath(lpFileName);
@@ -768,7 +768,7 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
#ifndef _CONTENT_PACKAGE
printf("*** Opening %s\n",filePath);
#endif
-
+
SceFiosFH fh;
int err = sceFiosFHOpenSync(NULL, &fh, filePath, NULL);
assert( err == SCE_FIOS_OK );
@@ -776,8 +776,8 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
return (void*)fh;
}
-BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
-{
+BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
+{
#ifndef _CONTENT_PACKAGE
char filePath[256];
sprintf(filePath,"%s/%s",usrdirPath, lpPathName );
@@ -794,12 +794,12 @@ BOOL CreateDirectoryA(LPCSTR lpPathName, LPSECURITY_ATTRIBUTES lpSecurityAttribu
BOOL DeleteFileA(LPCSTR lpFileName) { PSVITA_STUBBED; return false; }
-// BOOL XCloseHandle(HANDLE a)
-// {
-// cellFsClose(int(a));
+// BOOL XCloseHandle(HANDLE a)
+// {
+// cellFsClose(int(a));
// }
-DWORD GetFileAttributesA(LPCSTR lpFileName)
+DWORD GetFileAttributesA(LPCSTR lpFileName)
{
char filePath[256];
std::string mountedPath = StorageManager.GetMountedPath(lpFileName);
@@ -835,7 +835,7 @@ VOID DebugBreak(VOID) { SCE_BREAK(); }
DWORD GetLastError(VOID) { PSVITA_STUBBED; return 0; }
-VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
+VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
{
PSVITA_STUBBED;
/* malloc_managed_size stat;
@@ -850,9 +850,9 @@ VOID GlobalMemoryStatus(LPMEMORYSTATUS lpBuffer)
lpBuffer->dwAvailVirtual = stat.max_system_size - stat.current_inuse_size;*/
}
-DWORD GetTickCount()
+DWORD GetTickCount()
{
- // This function returns the current system time at this function is called.
+ // This function returns the current system time at this function is called.
// The system time is represented the time elapsed since the system starts up in microseconds.
uint64_t sysTime = sceKernelGetProcessTimeWide();
@@ -861,11 +861,11 @@ DWORD GetTickCount()
}
// we should really use libperf for this kind of thing, but this will do for now.
-BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
-{
+BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
+{
// microseconds
- lpFrequency->QuadPart = (1000 * 1000);
- return false;
+ lpFrequency->QuadPart = (1000 * 1000);
+ return false;
}
BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
{
@@ -875,24 +875,24 @@ BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
}
#ifndef _FINAL_BUILD
-VOID OutputDebugStringW(LPCWSTR lpOutputString)
-{
- wprintf(lpOutputString);
+VOID OutputDebugStringW(LPCWSTR lpOutputString)
+{
+ wprintf(lpOutputString);
}
-VOID OutputDebugString(LPCSTR lpOutputString)
-{
- printf(lpOutputString);
+VOID OutputDebugString(LPCSTR lpOutputString)
+{
+ printf(lpOutputString);
}
-VOID OutputDebugStringA(LPCSTR lpOutputString)
-{
- printf(lpOutputString);
+VOID OutputDebugStringA(LPCSTR lpOutputString)
+{
+ printf(lpOutputString);
}
#endif // _CONTENT_PACKAGE
BOOL GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,LPVOID lpFileInformation)
-{
+{
WIN32_FILE_ATTRIBUTE_DATA *fileInfoBuffer = (WIN32_FILE_ATTRIBUTE_DATA*) lpFileInformation;
char filePath[256];
@@ -921,27 +921,27 @@ BOOL GetFileAttributesExA(LPCSTR lpFileName,GET_FILEEX_INFO_LEVELS fInfoLevelId,
}
HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATA lpFindFileData)
-{
- PSVITA_STUBBED;
+{
+ PSVITA_STUBBED;
return 0;
}
-BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData)
-{
+BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData)
+{
PSVITA_STUBBED;
return false;
}
errno_t _itoa_s(int _Value, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%d",_Value); else if(_Radix==16) sprintf(_DstBuf,"%lx",_Value); else return -1; return 0; }
-errno_t _i64toa_s(__int64 _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
+errno_t _i64toa_s(long long _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_Radix==10) sprintf(_DstBuf,"%lld",_Val); else return -1; return 0; }
int _wtoi(const wchar_t *_Str)
{
return wcstol(_Str, NULL, 10);
}
-DWORD XGetLanguage()
-{
+DWORD XGetLanguage()
+{
// check if we should override the system language or not
unsigned char ucLang = app.GetMinecraftLanguage(0);
if (ucLang != MINECRAFT_LANGUAGE_DEFAULT) return ucLang;
@@ -979,8 +979,8 @@ DWORD XGetLanguage()
}
}
-DWORD XGetLocale()
-{
+DWORD XGetLocale()
+{
// check if we should override the system locale or not
unsigned char ucLocale = app.GetMinecraftLocale(0);
if (ucLocale != MINECRAFT_LANGUAGE_DEFAULT) return ucLocale;
@@ -993,7 +993,7 @@ DWORD XGetLocale()
case SCE_SYSTEM_PARAM_LANG_ENGLISH_US : return XC_LOCALE_UNITED_STATES;
case SCE_SYSTEM_PARAM_LANG_FRENCH : return XC_LOCALE_FRANCE;
- case SCE_SYSTEM_PARAM_LANG_SPANISH :
+ case SCE_SYSTEM_PARAM_LANG_SPANISH :
if(app.IsAmericanSKU())
{
return XC_LOCALE_LATIN_AMERICA;
@@ -1027,7 +1027,7 @@ DWORD XGetLocale()
}
}
-DWORD XEnableGuestSignin(BOOL fEnable)
-{
- return 0;
+DWORD XEnableGuestSignin(BOOL fEnable)
+{
+ return 0;
}
diff --git a/Minecraft.Client/PSVita/PSVitaExtras/libdivide.h b/Minecraft.Client/PSVita/PSVitaExtras/libdivide.h
index 20103018..007a8416 100644
--- a/Minecraft.Client/PSVita/PSVitaExtras/libdivide.h
+++ b/Minecraft.Client/PSVita/PSVitaExtras/libdivide.h
@@ -29,8 +29,8 @@
#if ! LIBDIVIDE_HAS_STDINT_TYPES
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
-typedef __int64 int64_t;
-typedef unsigned __int64 uint64_t;
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
#endif
@@ -83,7 +83,7 @@ u32: [0-4] shift value
[5] ignored
[6] add indicator
[7] shift path
-
+
s32: [0-4] shift value
[5] shift path
[6] add indicator
@@ -106,7 +106,7 @@ enum {
LIBDIVIDE_U32_SHIFT_PATH = 0x80,
LIBDIVIDE_U64_SHIFT_PATH = 0x80,
LIBDIVIDE_S32_SHIFT_PATH = 0x20,
- LIBDIVIDE_NEGATIVE_DIVISOR = 0x80
+ LIBDIVIDE_NEGATIVE_DIVISOR = 0x80
};
@@ -123,7 +123,7 @@ struct libdivide_s32_t {
struct libdivide_u64_t {
uint64_t magic;
uint8_t more;
-};
+};
struct libdivide_s64_t {
int64_t magic;
@@ -146,7 +146,7 @@ LIBDIVIDE_API struct libdivide_s32_t libdivide_s32_gen(int32_t y);
LIBDIVIDE_API struct libdivide_u32_t libdivide_u32_gen(uint32_t y);
LIBDIVIDE_API struct libdivide_s64_t libdivide_s64_gen(int64_t y);
LIBDIVIDE_API struct libdivide_u64_t libdivide_u64_gen(uint64_t y);
-
+
LIBDIVIDE_API int32_t libdivide_s32_do(int32_t numer, const struct libdivide_s32_t *denom);
LIBDIVIDE_API uint32_t libdivide_u32_do(uint32_t numer, const struct libdivide_u32_t *denom);
LIBDIVIDE_API int64_t libdivide_s64_do(int64_t numer, const struct libdivide_s64_t *denom);
@@ -156,19 +156,19 @@ LIBDIVIDE_API int libdivide_u32_get_algorithm(const struct libdivide_u32_t *deno
LIBDIVIDE_API uint32_t libdivide_u32_do_alg0(uint32_t numer, const struct libdivide_u32_t *denom);
LIBDIVIDE_API uint32_t libdivide_u32_do_alg1(uint32_t numer, const struct libdivide_u32_t *denom);
LIBDIVIDE_API uint32_t libdivide_u32_do_alg2(uint32_t numer, const struct libdivide_u32_t *denom);
-
+
LIBDIVIDE_API int libdivide_u64_get_algorithm(const struct libdivide_u64_t *denom);
LIBDIVIDE_API uint64_t libdivide_u64_do_alg0(uint64_t numer, const struct libdivide_u64_t *denom);
LIBDIVIDE_API uint64_t libdivide_u64_do_alg1(uint64_t numer, const struct libdivide_u64_t *denom);
LIBDIVIDE_API uint64_t libdivide_u64_do_alg2(uint64_t numer, const struct libdivide_u64_t *denom);
-
+
LIBDIVIDE_API int libdivide_s32_get_algorithm(const struct libdivide_s32_t *denom);
LIBDIVIDE_API int32_t libdivide_s32_do_alg0(int32_t numer, const struct libdivide_s32_t *denom);
LIBDIVIDE_API int32_t libdivide_s32_do_alg1(int32_t numer, const struct libdivide_s32_t *denom);
LIBDIVIDE_API int32_t libdivide_s32_do_alg2(int32_t numer, const struct libdivide_s32_t *denom);
LIBDIVIDE_API int32_t libdivide_s32_do_alg3(int32_t numer, const struct libdivide_s32_t *denom);
LIBDIVIDE_API int32_t libdivide_s32_do_alg4(int32_t numer, const struct libdivide_s32_t *denom);
-
+
LIBDIVIDE_API int libdivide_s64_get_algorithm(const struct libdivide_s64_t *denom);
LIBDIVIDE_API int64_t libdivide_s64_do_alg0(int64_t numer, const struct libdivide_s64_t *denom);
LIBDIVIDE_API int64_t libdivide_s64_do_alg1(int64_t numer, const struct libdivide_s64_t *denom);
@@ -202,17 +202,17 @@ LIBDIVIDE_API __m128i libdivide_s64_do_vector_alg2(__m128i numers, const struct
LIBDIVIDE_API __m128i libdivide_s64_do_vector_alg3(__m128i numers, const struct libdivide_s64_t * denom);
LIBDIVIDE_API __m128i libdivide_s64_do_vector_alg4(__m128i numers, const struct libdivide_s64_t * denom);
#endif
-
-
-
+
+
+
//////// Internal Utility Functions
-
+
static inline uint32_t libdivide__mullhi_u32(uint32_t x, uint32_t y) {
uint64_t xl = x, yl = y;
uint64_t rl = xl * yl;
return (uint32_t)(rl >> 32);
}
-
+
static uint64_t libdivide__mullhi_u64(uint64_t x, uint64_t y) {
#if HAS_INT128_T
__uint128_t xl = x, yl = y;
@@ -227,18 +227,18 @@ static uint64_t libdivide__mullhi_u64(uint64_t x, uint64_t y) {
const uint64_t x0y1 = x0 * (uint64_t)y1;
const uint64_t x1y0 = x1 * (uint64_t)y0;
const uint64_t x1y1 = x1 * (uint64_t)y1;
-
+
uint64_t temp = x1y0 + x0y0_hi;
uint64_t temp_lo = temp & mask, temp_hi = temp >> 32;
return x1y1 + temp_hi + ((temp_lo + x0y1) >> 32);
#endif
}
-
+
static inline int64_t libdivide__mullhi_s64(int64_t x, int64_t y) {
#if HAS_INT128_T
__int128_t xl = x, yl = y;
__int128_t rl = xl * yl;
- return (int64_t)(rl >> 64);
+ return (int64_t)(rl >> 64);
#else
//full 128 bits are x0 * y0 + (x0 * y1 << 32) + (x1 * y0 << 32) + (x1 * y1 << 64)
const uint32_t mask = 0xFFFFFFFF;
@@ -250,7 +250,7 @@ static inline int64_t libdivide__mullhi_s64(int64_t x, int64_t y) {
return x1*(int64_t)y1 + (t >> 32) + (w1 >> 32);
#endif
}
-
+
#if LIBDIVIDE_USE_SSE2
static inline __m128i libdivide__u64_to_m128(uint64_t x) {
@@ -275,7 +275,7 @@ static inline __m128i libdivide_get_FFFFFFFF00000000(void) {
__m128i result = _mm_set1_epi8(-1); //optimizes to pcmpeqd on OS X
return _mm_slli_epi64(result, 32);
}
-
+
static inline __m128i libdivide_get_00000000FFFFFFFF(void) {
//returns the same as _mm_set1_epi64(0x00000000FFFFFFFFULL) without touching memory
__m128i result = _mm_set1_epi8(-1); //optimizes to pcmpeqd on OS X
@@ -288,7 +288,7 @@ static inline __m128i libdivide_get_0000FFFF(void) {
__m128i result; //we don't care what its contents are
result = _mm_cmpeq_epi8(result, result); //all 1s
result = _mm_srli_epi32(result, 16);
- return result;
+ return result;
}
static inline __m128i libdivide_s64_signbits(__m128i v) {
@@ -302,7 +302,7 @@ static inline __m128i libdivide_s64_signbits(__m128i v) {
static inline __m128i libdivide_u32_to_m128i(uint32_t amt) {
return _mm_set_epi32(0, 0, 0, amt);
}
-
+
static inline __m128i libdivide_s64_shift_right_vector(__m128i v, int amt) {
//implementation of _mm_sra_epi64. Here we have two 64 bit values which are shifted right to logically become (64 - amt) values, and are then sign extended from a (64 - amt) bit number.
const int b = 64 - amt;
@@ -320,7 +320,7 @@ static inline __m128i libdivide__mullhi_u32_flat_vector(__m128i a, __m128i b) {
return _mm_or_si128(hi_product_0Z2Z, hi_product_Z1Z3); // = hi_product_0123
}
-
+
/* Here, y is assumed to contain one 64 bit value repeated twice. */
static inline __m128i libdivide_mullhi_u64_flat_vector(__m128i x, __m128i y) {
//full 128 bits are x0 * y0 + (x0 * y1 << 32) + (x1 * y0 << 32) + (x1 * y1 << 64)
@@ -331,12 +331,12 @@ static inline __m128i libdivide_mullhi_u64_flat_vector(__m128i x, __m128i y) {
const __m128i x0y1 = _mm_mul_epu32(x0, y1);
const __m128i x1y0 = _mm_mul_epu32(x1, y0);
const __m128i x1y1 = _mm_mul_epu32(x1, y1);
-
+
const __m128i temp = _mm_add_epi64(x1y0, x0y0_hi);
__m128i temp_lo = _mm_and_si128(temp, mask), temp_hi = _mm_srli_epi64(temp, 32);
temp_lo = _mm_srli_epi64(_mm_add_epi64(temp_lo, x0y1), 32);
temp_hi = _mm_add_epi64(x1y1, temp_hi);
-
+
return _mm_add_epi64(temp_lo, temp_hi);
}
@@ -349,9 +349,9 @@ static inline __m128i libdivide_mullhi_s64_flat_vector(__m128i x, __m128i y) {
p = _mm_sub_epi64(p, t2);
return p;
}
-
+
#ifdef LIBDIVIDE_USE_SSE4_1
-
+
/* b is one 32 bit value repeated four times. */
static inline __m128i libdivide_mullhi_s32_flat_vector(__m128i a, __m128i b) {
__m128i hi_product_0Z2Z = _mm_srli_epi64(_mm_mul_epi32(a, b), 32);
@@ -359,7 +359,7 @@ static inline __m128i libdivide_mullhi_s32_flat_vector(__m128i a, __m128i b) {
__m128i hi_product_Z1Z3 = _mm_and_si128(_mm_mul_epi32(a1X3X, b), libdivide_get_FFFFFFFF00000000());
return _mm_or_si128(hi_product_0Z2Z, hi_product_Z1Z3); // = hi_product_0123
}
-
+
#else
/* SSE2 does not have a signed multiplication instruction, but we can convert unsigned to signed pretty efficiently. Again, b is just a 32 bit value repeated four times. */
@@ -373,7 +373,7 @@ static inline __m128i libdivide_mullhi_s32_flat_vector(__m128i a, __m128i b) {
}
#endif
#endif
-
+
static inline int32_t libdivide__count_trailing_zeros32(uint32_t val) {
#if __GNUC__ || __has_builtin(__builtin_ctz)
/* Fast way to count trailing zeros */
@@ -389,7 +389,7 @@ static inline int32_t libdivide__count_trailing_zeros32(uint32_t val) {
return result;
#endif
}
-
+
static inline int32_t libdivide__count_trailing_zeros64(uint64_t val) {
#if __LP64__ && (__GNUC__ || __has_builtin(__builtin_ctzll))
/* Fast way to count trailing zeros. Note that we disable this in 32 bit because gcc does something horrible - it calls through to a dynamically bound function. */
@@ -401,11 +401,11 @@ static inline int32_t libdivide__count_trailing_zeros64(uint64_t val) {
return 32 + libdivide__count_trailing_zeros32((uint32_t)(val >> 32));
#endif
}
-
+
static inline int32_t libdivide__count_leading_zeros32(uint32_t val) {
#if __GNUC__ || __has_builtin(__builtin_clzll)
/* Fast way to count leading zeros */
- return __builtin_clz(val);
+ return __builtin_clz(val);
#else
/* Dorky way to count leading zeros. Note that this hangs for val = 0! */
int32_t result = 0;
@@ -413,10 +413,10 @@ static inline int32_t libdivide__count_leading_zeros32(uint32_t val) {
val <<= 1;
result++;
}
- return result;
+ return result;
#endif
}
-
+
static inline int32_t libdivide__count_leading_zeros64(uint64_t val) {
#if __GNUC__ || __has_builtin(__builtin_clzll)
/* Fast way to count leading zeros */
@@ -450,7 +450,7 @@ static uint32_t libdivide_64_div_32_to_32(uint32_t u1, uint32_t u0, uint32_t v,
return result;
}
#endif
-
+
#if LIBDIVIDE_IS_X86_64 && LIBDIVIDE_GCC_STYLE_ASM
static uint64_t libdivide_128_div_64_to_64(uint64_t u1, uint64_t u0, uint64_t v, uint64_t *r) {
//u0 -> rax
@@ -465,10 +465,10 @@ static uint64_t libdivide_128_div_64_to_64(uint64_t u1, uint64_t u0, uint64_t v,
}
#else
-
+
/* Code taken from Hacker's Delight, http://www.hackersdelight.org/HDcode/divlu.c . License permits inclusion here per http://www.hackersdelight.org/permissions.htm
*/
-static uint64_t libdivide_128_div_64_to_64(uint64_t u1, uint64_t u0, uint64_t v, uint64_t *r) {
+static uint64_t libdivide_128_div_64_to_64(uint64_t u1, uint64_t u0, uint64_t v, uint64_t *r) {
const uint64_t b = (1ULL << 32); // Number base (16 bits).
uint64_t un1, un0, // Norm. dividend LSD's.
vn1, vn0, // Norm. divisor digits.
@@ -476,25 +476,25 @@ static uint64_t libdivide_128_div_64_to_64(uint64_t u1, uint64_t u0, uint64_t v,
un64, un21, un10,// Dividend digit pairs.
rhat; // A remainder.
int s; // Shift amount for norm.
-
+
if (u1 >= v) { // If overflow, set rem.
if (r != NULL) // to an impossible value,
*r = (uint64_t)(-1); // and return the largest
return (uint64_t)(-1);} // possible quotient.
-
+
/* count leading zeros */
s = libdivide__count_leading_zeros64(v); // 0 <= s <= 63.
-
+
v = v << s; // Normalize divisor.
vn1 = v >> 32; // Break divisor up into
vn0 = v & 0xFFFFFFFF; // two 32-bit digits.
-
+
un64 = (u1 << s) | ((u0 >> (64 - s)) & (-s >> 31));
un10 = u0 << s; // Shift dividend left.
-
+
un1 = un10 >> 32; // Break right half of
un0 = un10 & 0xFFFFFFFF; // dividend into two digits.
-
+
q1 = un64/vn1; // Compute the first
rhat = un64 - q1*vn1; // quotient digit, q1.
again1:
@@ -502,9 +502,9 @@ again1:
q1 = q1 - 1;
rhat = rhat + vn1;
if (rhat < b) goto again1;}
-
+
un21 = un64*b + un1 - q1*v; // Multiply and subtract.
-
+
q0 = un21/vn1; // Compute the second
rhat = un21 - q0*vn1; // quotient digit, q0.
again2:
@@ -512,21 +512,21 @@ again2:
q0 = q0 - 1;
rhat = rhat + vn1;
if (rhat < b) goto again2;}
-
+
if (r != NULL) // If remainder is wanted,
*r = (un21*b + un0 - q0*v) >> s; // return it.
return q1*b + q0;
}
#endif
-
+
#if LIBDIVIDE_ASSERTIONS_ON
#define LIBDIVIDE_ASSERT(x) do { if (! (x)) { fprintf(stderr, "Assertion failure on line %ld: %s\n", (long)__LINE__, #x); exit(-1); } } while (0)
#else
-#define LIBDIVIDE_ASSERT(x)
+#define LIBDIVIDE_ASSERT(x)
#endif
-
+
#ifndef LIBDIVIDE_HEADER_ONLY
-
+
////////// UINT32
struct libdivide_u32_t libdivide_u32_gen(uint32_t d) {
@@ -537,14 +537,14 @@ struct libdivide_u32_t libdivide_u32_gen(uint32_t d) {
}
else {
const uint32_t floor_log_2_d = 31 - libdivide__count_leading_zeros32(d);
-
+
uint8_t more;
uint32_t rem, proposed_m;
proposed_m = libdivide_64_div_32_to_32(1U << floor_log_2_d, 0, d, &rem);
LIBDIVIDE_ASSERT(rem > 0 && rem < d);
const uint32_t e = d - rem;
-
+
/* This power works if e < 2**floor_log_2_d. */
if (e < (1U << floor_log_2_d)) {
/* This power works */
@@ -560,7 +560,7 @@ struct libdivide_u32_t libdivide_u32_gen(uint32_t d) {
result.magic = 1 + proposed_m;
result.more = more;
//result.more's shift should in general be ceil_log_2_d. But if we used the smaller power, we subtract one from the shift because we're using the smaller power. If we're using the larger power, we subtract one from the shift because it's taken care of by the add indicator. So floor_log_2_d happens to be correct in both cases.
-
+
}
return result;
}
@@ -582,23 +582,23 @@ uint32_t libdivide_u32_do(uint32_t numer, const struct libdivide_u32_t *denom) {
}
}
-
+
int libdivide_u32_get_algorithm(const struct libdivide_u32_t *denom) {
uint8_t more = denom->more;
if (more & LIBDIVIDE_U32_SHIFT_PATH) return 0;
else if (! (more & LIBDIVIDE_ADD_MARKER)) return 1;
else return 2;
}
-
+
uint32_t libdivide_u32_do_alg0(uint32_t numer, const struct libdivide_u32_t *denom) {
return numer >> (denom->more & LIBDIVIDE_32_SHIFT_MASK);
}
-
+
uint32_t libdivide_u32_do_alg1(uint32_t numer, const struct libdivide_u32_t *denom) {
uint32_t q = libdivide__mullhi_u32(denom->magic, numer);
return q >> denom->more;
-}
-
+}
+
uint32_t libdivide_u32_do_alg2(uint32_t numer, const struct libdivide_u32_t *denom) {
// denom->add != 0
uint32_t q = libdivide__mullhi_u32(denom->magic, numer);
@@ -608,8 +608,8 @@ uint32_t libdivide_u32_do_alg2(uint32_t numer, const struct libdivide_u32_t *den
-
-#if LIBDIVIDE_USE_SSE2
+
+#if LIBDIVIDE_USE_SSE2
__m128i libdivide_u32_do_vector(__m128i numers, const struct libdivide_u32_t *denom) {
uint8_t more = denom->more;
if (more & LIBDIVIDE_U32_SHIFT_PATH) {
@@ -622,7 +622,7 @@ __m128i libdivide_u32_do_vector(__m128i numers, const struct libdivide_u32_t *de
//return t >> denom->shift;
__m128i t = _mm_add_epi32(_mm_srli_epi32(_mm_sub_epi32(numers, q), 1), q);
return _mm_srl_epi32(t, libdivide_u32_to_m128i(more & LIBDIVIDE_32_SHIFT_MASK));
-
+
}
else {
//q >> denom->shift
@@ -647,7 +647,7 @@ __m128i libdivide_u32_do_vector_alg2(__m128i numers, const struct libdivide_u32_
}
#endif
-
+
/////////// UINT64
struct libdivide_u64_t libdivide_u64_gen(uint64_t d) {
@@ -658,14 +658,14 @@ struct libdivide_u64_t libdivide_u64_gen(uint64_t d) {
}
else {
const uint32_t floor_log_2_d = 63 - libdivide__count_leading_zeros64(d);
-
+
uint64_t proposed_m, rem;
uint8_t more;
proposed_m = libdivide_128_div_64_to_64(1ULL << floor_log_2_d, 0, d, &rem); //== (1 << (64 + floor_log_2_d)) / d
LIBDIVIDE_ASSERT(rem > 0 && rem < d);
const uint64_t e = d - rem;
-
+
/* This power works if e < 2**floor_log_2_d. */
if (e < (1ULL << floor_log_2_d)) {
/* This power works */
@@ -702,30 +702,30 @@ uint64_t libdivide_u64_do(uint64_t numer, const struct libdivide_u64_t *denom) {
}
}
-
+
int libdivide_u64_get_algorithm(const struct libdivide_u64_t *denom) {
uint8_t more = denom->more;
if (more & LIBDIVIDE_U64_SHIFT_PATH) return 0;
else if (! (more & LIBDIVIDE_ADD_MARKER)) return 1;
else return 2;
}
-
+
uint64_t libdivide_u64_do_alg0(uint64_t numer, const struct libdivide_u64_t *denom) {
- return numer >> (denom->more & LIBDIVIDE_64_SHIFT_MASK);
+ return numer >> (denom->more & LIBDIVIDE_64_SHIFT_MASK);
}
-
+
uint64_t libdivide_u64_do_alg1(uint64_t numer, const struct libdivide_u64_t *denom) {
uint64_t q = libdivide__mullhi_u64(denom->magic, numer);
return q >> denom->more;
}
-
+
uint64_t libdivide_u64_do_alg2(uint64_t numer, const struct libdivide_u64_t *denom) {
uint64_t q = libdivide__mullhi_u64(denom->magic, numer);
uint64_t t = ((numer - q) >> 1) + q;
return t >> (denom->more & LIBDIVIDE_64_SHIFT_MASK);
}
-
-#if LIBDIVIDE_USE_SSE2
+
+#if LIBDIVIDE_USE_SSE2
__m128i libdivide_u64_do_vector(__m128i numers, const struct libdivide_u64_t * denom) {
uint8_t more = denom->more;
if (more & LIBDIVIDE_U64_SHIFT_PATH) {
@@ -761,11 +761,11 @@ __m128i libdivide_u64_do_vector_alg2(__m128i numers, const struct libdivide_u64_
return _mm_srl_epi64(t, libdivide_u32_to_m128i(denom->more & LIBDIVIDE_64_SHIFT_MASK));
}
-
+
#endif
-
+
/////////// SINT32
-
+
static inline int32_t libdivide__mullhi_s32(int32_t x, int32_t y) {
int64_t xl = x, yl = y;
@@ -775,7 +775,7 @@ static inline int32_t libdivide__mullhi_s32(int32_t x, int32_t y) {
struct libdivide_s32_t libdivide_s32_gen(int32_t d) {
struct libdivide_s32_t result;
-
+
/* If d is a power of 2, or negative a power of 2, we have to use a shift. This is especially important because the magic algorithm fails for -1. To check if d is a power of 2 or its inverse, it suffices to check whether its absolute value has exactly one bit set. This works even for INT_MIN, because abs(INT_MIN) == INT_MIN, and INT_MIN has one bit set and is a power of 2. */
uint32_t absD = (uint32_t)(d < 0 ? -d : d); //gcc optimizes this to the fast abs trick
if ((absD & (absD - 1)) == 0) { //check if exactly one bit is set, don't care if absD is 0 since that's divide by zero
@@ -784,14 +784,14 @@ struct libdivide_s32_t libdivide_s32_gen(int32_t d) {
}
else {
const uint32_t floor_log_2_d = 31 - libdivide__count_leading_zeros32(absD);
- LIBDIVIDE_ASSERT(floor_log_2_d >= 1);
-
+ LIBDIVIDE_ASSERT(floor_log_2_d >= 1);
+
uint8_t more;
//the dividend here is 2**(floor_log_2_d + 31), so the low 32 bit word is 0 and the high word is floor_log_2_d - 1
uint32_t rem, proposed_m;
proposed_m = libdivide_64_div_32_to_32(1U << (floor_log_2_d - 1), 0, absD, &rem);
const uint32_t e = absD - rem;
-
+
/* We are going to start with a power of floor_log_2_d - 1. This works if works if e < 2**floor_log_2_d. */
if (e < (1U << floor_log_2_d)) {
/* This power works */
@@ -807,7 +807,7 @@ struct libdivide_s32_t libdivide_s32_gen(int32_t d) {
proposed_m += 1;
result.magic = (d < 0 ? -(int32_t)proposed_m : (int32_t)proposed_m);
result.more = more;
-
+
}
return result;
}
@@ -832,57 +832,57 @@ int32_t libdivide_s32_do(int32_t numer, const struct libdivide_s32_t *denom) {
q += (q < 0);
return q;
}
-}
-
+}
+
int libdivide_s32_get_algorithm(const struct libdivide_s32_t *denom) {
uint8_t more = denom->more;
int positiveDivisor = ! (more & LIBDIVIDE_NEGATIVE_DIVISOR);
if (more & LIBDIVIDE_S32_SHIFT_PATH) return (positiveDivisor ? 0 : 1);
- else if (more & LIBDIVIDE_ADD_MARKER) return (positiveDivisor ? 2 : 3);
+ else if (more & LIBDIVIDE_ADD_MARKER) return (positiveDivisor ? 2 : 3);
else return 4;
}
-
+
int32_t libdivide_s32_do_alg0(int32_t numer, const struct libdivide_s32_t *denom) {
uint8_t shifter = denom->more & LIBDIVIDE_32_SHIFT_MASK;
int32_t q = numer + ((numer >> 31) & ((1 << shifter) - 1));
return q >> shifter;
}
-
+
int32_t libdivide_s32_do_alg1(int32_t numer, const struct libdivide_s32_t *denom) {
uint8_t shifter = denom->more & LIBDIVIDE_32_SHIFT_MASK;
int32_t q = numer + ((numer >> 31) & ((1 << shifter) - 1));
return - (q >> shifter);
}
-
+
int32_t libdivide_s32_do_alg2(int32_t numer, const struct libdivide_s32_t *denom) {
int32_t q = libdivide__mullhi_s32(denom->magic, numer);
q += numer;
q >>= denom->more & LIBDIVIDE_32_SHIFT_MASK;
- q += (q < 0);
+ q += (q < 0);
return q;
}
-
+
int32_t libdivide_s32_do_alg3(int32_t numer, const struct libdivide_s32_t *denom) {
int32_t q = libdivide__mullhi_s32(denom->magic, numer);
q -= numer;
q >>= denom->more & LIBDIVIDE_32_SHIFT_MASK;
- q += (q < 0);
+ q += (q < 0);
return q;
}
-
+
int32_t libdivide_s32_do_alg4(int32_t numer, const struct libdivide_s32_t *denom) {
int32_t q = libdivide__mullhi_s32(denom->magic, numer);
q >>= denom->more & LIBDIVIDE_32_SHIFT_MASK;
- q += (q < 0);
+ q += (q < 0);
return q;
}
-#if LIBDIVIDE_USE_SSE2
+#if LIBDIVIDE_USE_SSE2
__m128i libdivide_s32_do_vector(__m128i numers, const struct libdivide_s32_t * denom) {
uint8_t more = denom->more;
if (more & LIBDIVIDE_S32_SHIFT_PATH) {
uint32_t shifter = more & LIBDIVIDE_32_SHIFT_MASK;
- __m128i roundToZeroTweak = _mm_set1_epi32((1 << shifter) - 1); //could use _mm_srli_epi32 with an all -1 register
+ __m128i roundToZeroTweak = _mm_set1_epi32((1 << shifter) - 1); //could use _mm_srli_epi32 with an all -1 register
__m128i q = _mm_add_epi32(numers, _mm_and_si128(_mm_srai_epi32(numers, 31), roundToZeroTweak)); //q = numer + ((numer >> 31) & roundToZeroTweak);
q = _mm_sra_epi32(q, libdivide_u32_to_m128i(shifter)); // q = q >> shifter
__m128i shiftMask = _mm_set1_epi32((int32_t)((int8_t)more >> 7)); //set all bits of shift mask = to the sign bit of more
@@ -893,7 +893,7 @@ __m128i libdivide_s32_do_vector(__m128i numers, const struct libdivide_s32_t * d
__m128i q = libdivide_mullhi_s32_flat_vector(numers, _mm_set1_epi32(denom->magic));
if (more & LIBDIVIDE_ADD_MARKER) {
__m128i sign = _mm_set1_epi32((int32_t)(int8_t)more >> 7); //must be arithmetic shift
- q = _mm_add_epi32(q, _mm_sub_epi32(_mm_xor_si128(numers, sign), sign)); // q += ((numer ^ sign) - sign);
+ q = _mm_add_epi32(q, _mm_sub_epi32(_mm_xor_si128(numers, sign), sign)); // q += ((numer ^ sign) - sign);
}
q = _mm_sra_epi32(q, libdivide_u32_to_m128i(more & LIBDIVIDE_32_SHIFT_MASK)); //q >>= shift
q = _mm_add_epi32(q, _mm_srli_epi32(q, 31)); // q += (q < 0)
@@ -919,7 +919,7 @@ __m128i libdivide_s32_do_vector_alg2(__m128i numers, const struct libdivide_s32_
__m128i q = libdivide_mullhi_s32_flat_vector(numers, _mm_set1_epi32(denom->magic));
q = _mm_add_epi32(q, numers);
q = _mm_sra_epi32(q, libdivide_u32_to_m128i(denom->more & LIBDIVIDE_32_SHIFT_MASK));
- q = _mm_add_epi32(q, _mm_srli_epi32(q, 31));
+ q = _mm_add_epi32(q, _mm_srli_epi32(q, 31));
return q;
}
@@ -927,7 +927,7 @@ __m128i libdivide_s32_do_vector_alg3(__m128i numers, const struct libdivide_s32_
__m128i q = libdivide_mullhi_s32_flat_vector(numers, _mm_set1_epi32(denom->magic));
q = _mm_sub_epi32(q, numers);
q = _mm_sra_epi32(q, libdivide_u32_to_m128i(denom->more & LIBDIVIDE_32_SHIFT_MASK));
- q = _mm_add_epi32(q, _mm_srli_epi32(q, 31));
+ q = _mm_add_epi32(q, _mm_srli_epi32(q, 31));
return q;
}
@@ -935,16 +935,16 @@ __m128i libdivide_s32_do_vector_alg4(__m128i numers, const struct libdivide_s32_
__m128i q = libdivide_mullhi_s32_flat_vector(numers, _mm_set1_epi32(denom->magic));
q = _mm_sra_epi32(q, libdivide_u32_to_m128i(denom->more)); //q >>= shift
q = _mm_add_epi32(q, _mm_srli_epi32(q, 31)); // q += (q < 0)
- return q;
+ return q;
}
#endif
-
+
///////////// SINT64
-
+
struct libdivide_s64_t libdivide_s64_gen(int64_t d) {
struct libdivide_s64_t result;
-
+
/* If d is a power of 2, or negative a power of 2, we have to use a shift. This is especially important because the magic algorithm fails for -1. To check if d is a power of 2 or its inverse, it suffices to check whether its absolute value has exactly one bit set. This works even for INT_MIN, because abs(INT_MIN) == INT_MIN, and INT_MIN has one bit set and is a power of 2. */
const uint64_t absD = (uint64_t)(d < 0 ? -d : d); //gcc optimizes this to the fast abs trick
if ((absD & (absD - 1)) == 0) { //check if exactly one bit is set, don't care if absD is 0 since that's divide by zero
@@ -952,14 +952,14 @@ struct libdivide_s64_t libdivide_s64_gen(int64_t d) {
result.magic = 0;
}
else {
- const uint32_t floor_log_2_d = 63 - libdivide__count_leading_zeros64(absD);
-
+ const uint32_t floor_log_2_d = 63 - libdivide__count_leading_zeros64(absD);
+
//the dividend here is 2**(floor_log_2_d + 63), so the low 64 bit word is 0 and the high word is floor_log_2_d - 1
uint8_t more;
uint64_t rem, proposed_m;
proposed_m = libdivide_128_div_64_to_64(1ULL << (floor_log_2_d - 1), 0, absD, &rem);
const uint64_t e = absD - rem;
-
+
/* We are going to start with a power of floor_log_2_d - 1. This works if works if e < 2**floor_log_2_d. */
if (e < (1ULL << floor_log_2_d)) {
/* This power works */
@@ -1000,9 +1000,9 @@ int64_t libdivide_s64_do(int64_t numer, const struct libdivide_s64_t *denom) {
q += (q < 0);
return q;
}
-}
-
-
+}
+
+
int libdivide_s64_get_algorithm(const struct libdivide_s64_t *denom) {
uint8_t more = denom->more;
int positiveDivisor = ! (more & LIBDIVIDE_NEGATIVE_DIVISOR);
@@ -1010,20 +1010,20 @@ int libdivide_s64_get_algorithm(const struct libdivide_s64_t *denom) {
else if (more & LIBDIVIDE_ADD_MARKER) return (positiveDivisor ? 2 : 3);
else return 4;
}
-
+
int64_t libdivide_s64_do_alg0(int64_t numer, const struct libdivide_s64_t *denom) {
uint32_t shifter = denom->more & LIBDIVIDE_64_SHIFT_MASK;
int64_t q = numer + ((numer >> 63) & ((1LL << shifter) - 1));
- return q >> shifter;
+ return q >> shifter;
}
-
+
int64_t libdivide_s64_do_alg1(int64_t numer, const struct libdivide_s64_t *denom) {
//denom->shifter != -1 && demo->shiftMask != 0
uint32_t shifter = denom->more & LIBDIVIDE_64_SHIFT_MASK;
int64_t q = numer + ((numer >> 63) & ((1LL << shifter) - 1));
return - (q >> shifter);
}
-
+
int64_t libdivide_s64_do_alg2(int64_t numer, const struct libdivide_s64_t *denom) {
int64_t q = libdivide__mullhi_s64(denom->magic, numer);
q += numer;
@@ -1031,20 +1031,20 @@ int64_t libdivide_s64_do_alg2(int64_t numer, const struct libdivide_s64_t *denom
q += (q < 0);
return q;
}
-
+
int64_t libdivide_s64_do_alg3(int64_t numer, const struct libdivide_s64_t *denom) {
int64_t q = libdivide__mullhi_s64(denom->magic, numer);
q -= numer;
q >>= denom->more & LIBDIVIDE_64_SHIFT_MASK;
- q += (q < 0);
+ q += (q < 0);
return q;
}
-
+
int64_t libdivide_s64_do_alg4(int64_t numer, const struct libdivide_s64_t *denom) {
int64_t q = libdivide__mullhi_s64(denom->magic, numer);
q >>= denom->more;
q += (q < 0);
- return q;
+ return q;
}
@@ -1065,7 +1065,7 @@ __m128i libdivide_s64_do_vector(__m128i numers, const struct libdivide_s64_t * d
__m128i q = libdivide_mullhi_s64_flat_vector(numers, libdivide__u64_to_m128(magic));
if (more & LIBDIVIDE_ADD_MARKER) {
__m128i sign = _mm_set1_epi32((int32_t)((int8_t)more >> 7)); //must be arithmetic shift
- q = _mm_add_epi64(q, _mm_sub_epi64(_mm_xor_si128(numers, sign), sign)); // q += ((numer ^ sign) - sign);
+ q = _mm_add_epi64(q, _mm_sub_epi64(_mm_xor_si128(numers, sign), sign)); // q += ((numer ^ sign) - sign);
}
q = libdivide_s64_shift_right_vector(q, more & LIBDIVIDE_64_SHIFT_MASK); //q >>= denom->mult_path.shift
q = _mm_add_epi64(q, _mm_srli_epi64(q, 63)); // q += (q < 0)
@@ -1102,20 +1102,20 @@ __m128i libdivide_s64_do_vector_alg3(__m128i numers, const struct libdivide_s64_
q = _mm_sub_epi64(q, numers);
q = libdivide_s64_shift_right_vector(q, denom->more & LIBDIVIDE_64_SHIFT_MASK);
q = _mm_add_epi64(q, _mm_srli_epi64(q, 63)); // q += (q < 0)
- return q;
+ return q;
}
__m128i libdivide_s64_do_vector_alg4(__m128i numers, const struct libdivide_s64_t *denom) {
__m128i q = libdivide_mullhi_s64_flat_vector(numers, libdivide__u64_to_m128(denom->magic));
q = libdivide_s64_shift_right_vector(q, denom->more);
q = _mm_add_epi64(q, _mm_srli_epi64(q, 63));
- return q;
+ return q;
}
#endif
-
+
/////////// C++ stuff
-
+
#ifdef __cplusplus
/* The C++ template design here is a total mess. This needs to be fixed by someone better at templates than I. The current design is:
@@ -1131,7 +1131,7 @@ __m128i libdivide_s64_do_vector_alg4(__m128i numers, const struct libdivide_s64_
*/
namespace libdivide_internal {
-
+
#if LIBDIVIDE_USE_SSE2
#define MAYBE_VECTOR(x) x
#define MAYBE_VECTOR_PARAM __m128i vector_func(__m128i, const DenomType *)
@@ -1149,12 +1149,12 @@ namespace libdivide_internal {
#endif
template<typename IntType, typename DenomType, DenomType gen_func(IntType), int get_algo(const DenomType *), IntType do_func(IntType, const DenomType *), MAYBE_VECTOR_PARAM>
- class divider_base {
+ class divider_base {
public:
DenomType denom;
divider_base(IntType d) : denom(gen_func(d)) { }
divider_base(const DenomType & d) : denom(d) { }
-
+
IntType perform_divide(IntType val) const { return do_func(val, &denom); }
#if LIBDIVIDE_USE_SSE2
__m128i perform_divide_vector(__m128i val) const { return vector_func(val, &denom); }
@@ -1162,37 +1162,37 @@ namespace libdivide_internal {
int get_algorithm() const { return get_algo(&denom); }
};
-
-
+
+
template<class T> struct divider_mid { };
-
+
template<> struct divider_mid<uint32_t> {
typedef uint32_t IntType;
typedef struct libdivide_u32_t DenomType;
template<IntType do_func(IntType, const DenomType *), MAYBE_VECTOR_PARAM> struct denom {
typedef divider_base<IntType, DenomType, libdivide_u32_gen, libdivide_u32_get_algorithm, do_func, vector_func> divider;
};
-
+
template<int ALGO, int J = 0> struct algo { };
template<int J> struct algo<-1, J> { typedef denom<libdivide_u32_do, MAYBE_VECTOR(libdivide_u32_do_vector)>::divider divider; };
template<int J> struct algo<0, J> { typedef denom<libdivide_u32_do_alg0, MAYBE_VECTOR(libdivide_u32_do_vector_alg0)>::divider divider; };
template<int J> struct algo<1, J> { typedef denom<libdivide_u32_do_alg1, MAYBE_VECTOR(libdivide_u32_do_vector_alg1)>::divider divider; };
template<int J> struct algo<2, J> { typedef denom<libdivide_u32_do_alg2, MAYBE_VECTOR(libdivide_u32_do_vector_alg2)>::divider divider; };
-
- /* Define two more bogus ones so that the same (templated, presumably) code can handle both signed and unsigned */
+
+ /* Define two more bogus ones so that the same (templated, presumably) code can handle both signed and unsigned */
template<int J> struct algo<3, J> { typedef denom<crash_u32, MAYBE_VECTOR(crash_u32_vector)>::divider divider; };
template<int J> struct algo<4, J> { typedef denom<crash_u32, MAYBE_VECTOR(crash_u32_vector)>::divider divider; };
};
-
+
template<> struct divider_mid<int32_t> {
typedef int32_t IntType;
typedef struct libdivide_s32_t DenomType;
template<IntType do_func(IntType, const DenomType *), MAYBE_VECTOR_PARAM> struct denom {
typedef divider_base<IntType, DenomType, libdivide_s32_gen, libdivide_s32_get_algorithm, do_func, vector_func> divider;
};
-
-
+
+
template<int ALGO, int J = 0> struct algo { };
template<int J> struct algo<-1, J> { typedef denom<libdivide_s32_do, MAYBE_VECTOR(libdivide_s32_do_vector)>::divider divider; };
template<int J> struct algo<0, J> { typedef denom<libdivide_s32_do_alg0, MAYBE_VECTOR(libdivide_s32_do_vector_alg0)>::divider divider; };
@@ -1200,36 +1200,36 @@ namespace libdivide_internal {
template<int J> struct algo<2, J> { typedef denom<libdivide_s32_do_alg2, MAYBE_VECTOR(libdivide_s32_do_vector_alg2)>::divider divider; };
template<int J> struct algo<3, J> { typedef denom<libdivide_s32_do_alg3, MAYBE_VECTOR(libdivide_s32_do_vector_alg3)>::divider divider; };
template<int J> struct algo<4, J> { typedef denom<libdivide_s32_do_alg4, MAYBE_VECTOR(libdivide_s32_do_vector_alg4)>::divider divider; };
-
+
};
-
+
template<> struct divider_mid<uint64_t> {
typedef uint64_t IntType;
typedef struct libdivide_u64_t DenomType;
template<IntType do_func(IntType, const DenomType *), MAYBE_VECTOR_PARAM> struct denom {
typedef divider_base<IntType, DenomType, libdivide_u64_gen, libdivide_u64_get_algorithm, do_func, vector_func> divider;
};
-
+
template<int ALGO, int J = 0> struct algo { };
template<int J> struct algo<-1, J> { typedef denom<libdivide_u64_do, MAYBE_VECTOR(libdivide_u64_do_vector)>::divider divider; };
template<int J> struct algo<0, J> { typedef denom<libdivide_u64_do_alg0, MAYBE_VECTOR(libdivide_u64_do_vector_alg0)>::divider divider; };
template<int J> struct algo<1, J> { typedef denom<libdivide_u64_do_alg1, MAYBE_VECTOR(libdivide_u64_do_vector_alg1)>::divider divider; };
template<int J> struct algo<2, J> { typedef denom<libdivide_u64_do_alg2, MAYBE_VECTOR(libdivide_u64_do_vector_alg2)>::divider divider; };
-
+
/* Define two more bogus ones so that the same (templated, presumably) code can handle both signed and unsigned */
template<int J> struct algo<3, J> { typedef denom<crash_u64, MAYBE_VECTOR(crash_u64_vector)>::divider divider; };
template<int J> struct algo<4, J> { typedef denom<crash_u64, MAYBE_VECTOR(crash_u64_vector)>::divider divider; };
};
-
+
template<> struct divider_mid<int64_t> {
typedef int64_t IntType;
typedef struct libdivide_s64_t DenomType;
template<IntType do_func(IntType, const DenomType *), MAYBE_VECTOR_PARAM> struct denom {
typedef divider_base<IntType, DenomType, libdivide_s64_gen, libdivide_s64_get_algorithm, do_func, vector_func> divider;
};
-
+
template<int ALGO, int J = 0> struct algo { };
template<int J> struct algo<-1, J> { typedef denom<libdivide_s64_do, MAYBE_VECTOR(libdivide_s64_do_vector)>::divider divider; };
template<int J> struct algo<0, J> { typedef denom<libdivide_s64_do_alg0, MAYBE_VECTOR(libdivide_s64_do_vector_alg0)>::divider divider; };
@@ -1248,29 +1248,29 @@ class divider
typename libdivide_internal::divider_mid<T>::template algo<ALGO>::divider sub;
template<int NEW_ALGO, typename S> friend divider<S, NEW_ALGO> unswitch(const divider<S, -1> & d);
divider(const typename libdivide_internal::divider_mid<T>::DenomType & denom) : sub(denom) { }
-
+
public:
-
+
/* Ordinary constructor, that takes the divisor as a parameter. */
divider(T n) : sub(n) { }
-
+
/* Default constructor, that divides by 1 */
divider() : sub(1) { }
-
+
/* Divides the parameter by the divisor, returning the quotient */
T perform_divide(T val) const { return sub.perform_divide(val); }
-
+
#if LIBDIVIDE_USE_SSE2
/* Treats the vector as either two or four packed values (depending on the size), and divides each of them by the divisor, returning the packed quotients. */
- __m128i perform_divide_vector(__m128i val) const { return sub.perform_divide_vector(val); }
+ __m128i perform_divide_vector(__m128i val) const { return sub.perform_divide_vector(val); }
#endif
/* Returns the index of algorithm, for use in the unswitch function */
int get_algorithm() const { return sub.get_algorithm(); } // returns the algorithm for unswitching
-
+
/* operator== */
bool operator==(const divider<T, ALGO> & him) const { return sub.denom.magic == him.sub.denom.magic && sub.denom.more == him.sub.denom.more; }
-
+
bool operator!=(const divider<T, ALGO> & him) const { return ! (*this == him); }
};
@@ -1291,10 +1291,10 @@ __m128i operator/(__m128i numer, const divider<int_type, ALGO> & denom) {
return denom.perform_divide_vector(numer);
}
#endif
-
-
+
+
#endif //__cplusplus
-
+
#endif //LIBDIVIDE_HEADER_ONLY
#ifdef __cplusplus
} //close namespace libdivide
diff --git a/Minecraft.Client/PSVita/PSVitaExtras/zconf.h b/Minecraft.Client/PSVita/PSVitaExtras/zconf.h
index 48405ca0..c1efa7d6 100644
--- a/Minecraft.Client/PSVita/PSVitaExtras/zconf.h
+++ b/Minecraft.Client/PSVita/PSVitaExtras/zconf.h
@@ -485,7 +485,7 @@ typedef uLong FAR uLongf;
# define z_off64_t off64_t
#else
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
-# define z_off64_t __int64
+# define z_off64_t long long
# else
# define z_off64_t z_off_t
# endif
diff --git a/Minecraft.Client/PSVita/PSVita_App.cpp b/Minecraft.Client/PSVita/PSVita_App.cpp
index 956e10b6..542102d2 100644
--- a/Minecraft.Client/PSVita/PSVita_App.cpp
+++ b/Minecraft.Client/PSVita/PSVita_App.cpp
@@ -318,7 +318,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
wstring wWorldName = L"TestWorld";
bool isFlat = false;
- __int64 seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+ int64_t seedValue = 0;//BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue;
diff --git a/Minecraft.Client/PlayerChunkMap.cpp b/Minecraft.Client/PlayerChunkMap.cpp
index ae81bd69..20898ce0 100644
--- a/Minecraft.Client/PlayerChunkMap.cpp
+++ b/Minecraft.Client/PlayerChunkMap.cpp
@@ -102,7 +102,7 @@ void PlayerChunkMap::PlayerChunk::remove(shared_ptr<ServerPlayer> player)
auto it = find(parent->knownChunks.begin(), parent->knownChunks.end(), this);
if(it != parent->knownChunks.end()) parent->knownChunks.erase(it);
}
- __int64 id = (pos.x + 0x7fffffffLL) | ((pos.z + 0x7fffffffLL) << 32);
+ int64_t id = (pos.x + 0x7fffffffLL) | ((pos.z + 0x7fffffffLL) << 32);
auto it = parent->chunks.find(id);
if( it != parent->chunks.end() )
{
@@ -421,7 +421,7 @@ ServerLevel *PlayerChunkMap::getLevel()
void PlayerChunkMap::tick()
{
- __int64 time = level->getGameTime();
+ int64_t time = level->getGameTime();
if (time - lastInhabitedUpdate > Level::TICKS_PER_DAY / 3)
{
@@ -474,13 +474,13 @@ void PlayerChunkMap::tick()
bool PlayerChunkMap::hasChunk(int x, int z)
{
- __int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
+ int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
return chunks.find(id) != chunks.end();
}
PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create)
{
- __int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
+ int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
auto it = chunks.find(id);
PlayerChunk *chunk = nullptr;
@@ -502,7 +502,7 @@ PlayerChunkMap::PlayerChunk *PlayerChunkMap::getChunk(int x, int z, bool create)
// queue a request for it to be created.
void PlayerChunkMap::getChunkAndAddPlayer(int x, int z, shared_ptr<ServerPlayer> player)
{
- __int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
+ int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
auto it = chunks.find(id);
if( it != chunks.end() )
@@ -529,7 +529,7 @@ void PlayerChunkMap::getChunkAndRemovePlayer(int x, int z, shared_ptr<ServerPlay
return;
}
}
- __int64 id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
+ int64_t id = (x + 0x7fffffffLL) | ((z + 0x7fffffffLL) << 32);
auto it = chunks.find(id);
if( it != chunks.end() )
diff --git a/Minecraft.Client/PlayerChunkMap.h b/Minecraft.Client/PlayerChunkMap.h
index 9d1ab1b5..b19f176d 100644
--- a/Minecraft.Client/PlayerChunkMap.h
+++ b/Minecraft.Client/PlayerChunkMap.h
@@ -45,7 +45,7 @@ public:
int zChangeMin, zChangeMax;
int ticksToNextRegionUpdate; // 4J added
bool prioritised; // 4J added
- __int64 firstInhabitedTime;
+ int64_t firstInhabitedTime;
public:
PlayerChunk(int x, int z, PlayerChunkMap *pcm);
@@ -73,7 +73,7 @@ public:
vector<shared_ptr<ServerPlayer> > players;
void flagEntitiesToBeRemoved(unsigned int *flags, bool *removedFound); // 4J added
private:
- unordered_map<__int64,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap
+ unordered_map<int64_t,PlayerChunk *,LongKeyHash,LongKeyEq> chunks; // 4J - was LongHashMap
vector<PlayerChunk *> changedChunks;
vector<PlayerChunk *> knownChunks;
vector<PlayerChunkAddRequest> addRequests; // 4J added
@@ -82,7 +82,7 @@ private:
ServerLevel *level;
int radius;
int dimension;
- __int64 lastInhabitedUpdate;
+ int64_t lastInhabitedUpdate;
public:
PlayerChunkMap(ServerLevel *level, int dimension, int radius);
diff --git a/Minecraft.Client/PlayerConnection.h b/Minecraft.Client/PlayerConnection.h
index c691e6f5..ff6093a3 100644
--- a/Minecraft.Client/PlayerConnection.h
+++ b/Minecraft.Client/PlayerConnection.h
@@ -30,9 +30,9 @@ private:
bool didTick;
int lastKeepAliveId;
- __int64 lastKeepAliveTime;
+ int64_t lastKeepAliveTime;
static Random random;
- __int64 lastKeepAliveTick;
+ int64_t lastKeepAliveTick;
int chatSpamTickCount;
int dropSpamTickCount;
@@ -81,7 +81,7 @@ private:
public:
// 4J Stu - Handlers only valid in debug mode
-#ifndef _CONTENT_PACKAGE
+#ifndef _CONTENT_PACKAGE
virtual void handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet);
#endif
virtual void handleContainerClick(shared_ptr<ContainerClickPacket> packet);
@@ -89,14 +89,14 @@ public:
virtual void handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotPacket> packet);
virtual void handleContainerAck(shared_ptr<ContainerAckPacket> packet);
virtual void handleSignUpdate(shared_ptr<SignUpdatePacket> packet);
- virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet);
+ virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet);
virtual void handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet); // 4J Added
virtual bool isServerPacketListener();
virtual void handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket);
virtual void handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket);
virtual bool isDisconnected();
- // 4J Added
+ // 4J Added
virtual void handleCraftItem(shared_ptr<CraftItemPacket> packet);
virtual void handleTradeItem(shared_ptr<TradeItemPacket> packet);
virtual void handleDebugOptions(shared_ptr<DebugOptionsPacket> packet);
diff --git a/Minecraft.Client/ProgressRenderer.cpp b/Minecraft.Client/ProgressRenderer.cpp
index a7c3fd30..575a4510 100644
--- a/Minecraft.Client/ProgressRenderer.cpp
+++ b/Minecraft.Client/ProgressRenderer.cpp
@@ -24,7 +24,7 @@ void ProgressRenderer::progressStart(int title)
void ProgressRenderer::progressStartNoAbort(int string)
{
- noAbort = true;
+ noAbort = true;
_progressStart(string);
}
@@ -36,7 +36,7 @@ void ProgressRenderer::_progressStart(int title)
if (noAbort) return;
// throw new StopGameException(); // 4J - removed
}
-
+
EnterCriticalSection( &ProgressRenderer::s_progress );
lastPercent = 0;
this->title = title;
@@ -88,7 +88,7 @@ void ProgressRenderer::progressStagePercentage(int i)
}
- __int64 now = System::currentTimeMillis();
+ int64_t now = System::currentTimeMillis();
if (now - lastTime < 20) return;
lastTime = now;
diff --git a/Minecraft.Client/ProgressRenderer.h b/Minecraft.Client/ProgressRenderer.h
index 29c847d0..a66c73fb 100644
--- a/Minecraft.Client/ProgressRenderer.h
+++ b/Minecraft.Client/ProgressRenderer.h
@@ -25,7 +25,7 @@ private:
int status;
Minecraft *minecraft;
int title;
- __int64 lastTime;
+ int64_t lastTime;
bool noAbort;
wstring m_wstrText;
eProgressStringType m_eType;
diff --git a/Minecraft.Client/ScrolledSelectionList.h b/Minecraft.Client/ScrolledSelectionList.h
index 77ec1fd8..0fc38e50 100644
--- a/Minecraft.Client/ScrolledSelectionList.h
+++ b/Minecraft.Client/ScrolledSelectionList.h
@@ -28,7 +28,7 @@ private:
float yo;
int lastSelection;
- __int64 lastSelectionTime ;
+ int64_t lastSelectionTime ;
bool renderSelection;
bool _renderHeader;
@@ -40,7 +40,7 @@ public:
protected:
void setRenderHeader(bool renderHeader, int headerHeight);
- virtual int getNumberOfItems() = 0;
+ virtual int getNumberOfItems() = 0;
virtual void selectItem(int item, bool doubleClick) = 0;
virtual bool isSelectedItem(int item) = 0;
virtual int getMaxPosition();
diff --git a/Minecraft.Client/SelectWorldScreen.cpp b/Minecraft.Client/SelectWorldScreen.cpp
index 0481f1e5..ebae8c83 100644
--- a/Minecraft.Client/SelectWorldScreen.cpp
+++ b/Minecraft.Client/SelectWorldScreen.cpp
@@ -294,7 +294,7 @@ void SelectWorldScreen::WorldSelectionList::renderItem(int i, int x, int y, int
swprintf(buffer,20,L"%d/%d/%d %d:%02d",time.wDay, time.wMonth, time.wYear, time.wHour, time.wMinute); // 4J - TODO Localise this
id = id + L" (" + buffer;
- __int64 size = levelSummary->getSizeOnDisk();
+ int64_t size = levelSummary->getSizeOnDisk();
id = id + L", " + std::to_wstring(static_cast<float>(size / 1024 * 100 / 1024 / 100.0f)) + L" MB)";
wstring info;
diff --git a/Minecraft.Client/ServerLevel.cpp b/Minecraft.Client/ServerLevel.cpp
index 1e00b591..242a0df9 100644
--- a/Minecraft.Client/ServerLevel.cpp
+++ b/Minecraft.Client/ServerLevel.cpp
@@ -207,7 +207,7 @@ void ServerLevel::tick()
if (getGameRules()->getBoolean(GameRules::RULE_DAYLIGHT))
{
// skip time until new day
- __int64 newTime = levelData->getDayTime() + TICKS_PER_DAY;
+ int64_t newTime = levelData->getDayTime() + TICKS_PER_DAY;
// 4J : WESTY : Changed so that time update goes through stats tracking update code.
//levelData->setTime(newTime - (newTime % TICKS_PER_DAY));
@@ -248,7 +248,7 @@ void ServerLevel::tick()
//4J - temporarily disabling saves as they are causing gameplay to generally stutter quite a lot
- __int64 time = levelData->getGameTime() + 1;
+ int64_t time = levelData->getGameTime() + 1;
// 4J Stu - Putting this back in, but I have reduced the number of chunks that save when not forced
#ifdef _LARGE_WORLDS
if (time % (saveInterval) == (dimension->id + 1))
@@ -1232,9 +1232,9 @@ EntityTracker *ServerLevel::getTracker()
return tracker;
}
-void ServerLevel::setTimeAndAdjustTileTicks(__int64 newTime)
+void ServerLevel::setTimeAndAdjustTileTicks(int64_t newTime)
{
- __int64 delta = newTime - levelData->getGameTime();
+ int64_t delta = newTime - levelData->getGameTime();
// 4J - can't directly adjust m_delay in a set as it has a const interator, since changing values in here might change the ordering of the elements in the set.
// Instead move to a vector, do the adjustment, put back in the set.
vector<TickNextTickData> temp;
diff --git a/Minecraft.Client/ServerLevel.h b/Minecraft.Client/ServerLevel.h
index 45f3114d..77a5cb78 100644
--- a/Minecraft.Client/ServerLevel.h
+++ b/Minecraft.Client/ServerLevel.h
@@ -122,7 +122,7 @@ protected:
public:
MinecraftServer *getServer();
EntityTracker *getTracker();
- void setTimeAndAdjustTileTicks(__int64 newTime);
+ void setTimeAndAdjustTileTicks(int64_t newTime);
PlayerChunkMap *getChunkMap();
PortalForcer *getPortalForcer();
void sendParticles(const wstring &name, double x, double y, double z, int count);
diff --git a/Minecraft.Client/ServerPlayer.cpp b/Minecraft.Client/ServerPlayer.cpp
index 76332358..789b3176 100644
--- a/Minecraft.Client/ServerPlayer.cpp
+++ b/Minecraft.Client/ServerPlayer.cpp
@@ -395,9 +395,9 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
okToSend = true;
MinecraftServer::chunkPacketManagement_DidSendTo(connection->getNetworkPlayer());
-// static unordered_map<wstring,__int64> mapLastTime;
-// __int64 thisTime = System::currentTimeMillis();
-// __int64 lastTime = mapLastTime[connection->getNetworkPlayer()->GetUID().toString()];
+// static unordered_map<wstring,int64_t> mapLastTime;
+// int64_t thisTime = System::currentTimeMillis();
+// int64_t lastTime = mapLastTime[connection->getNetworkPlayer()->GetUID().toString()];
// app.DebugPrintf(" - OK to send (%d ms since last)\n", thisTime - lastTime);
// mapLastTime[connection->getNetworkPlayer()->GetUID().toString()] = thisTime;
}
@@ -428,9 +428,9 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks)
{
// app.DebugPrintf("Creating BRUP for %d %d\n",nearest.x, nearest.z);
PIXBeginNamedEvent(0,"Creation BRUP for sending\n");
- __int64 before = System::currentTimeMillis();
+ int64_t before = System::currentTimeMillis();
shared_ptr<BlockRegionUpdatePacket> packet = shared_ptr<BlockRegionUpdatePacket>( new BlockRegionUpdatePacket(nearest.x * 16, 0, nearest.z * 16, 16, Level::maxBuildHeight, 16, level) );
- __int64 after = System::currentTimeMillis();
+ int64_t after = System::currentTimeMillis();
// app.DebugPrintf(">>><<< %d ms\n",after-before);
PIXEndNamedEvent();
if( dontDelayChunks ) packet->shouldDelay = false;
diff --git a/Minecraft.Client/ServerPlayer.h b/Minecraft.Client/ServerPlayer.h
index 57ea8947..aefa4a42 100644
--- a/Minecraft.Client/ServerPlayer.h
+++ b/Minecraft.Client/ServerPlayer.h
@@ -41,7 +41,7 @@ private:
int lastSentExp;
int invulnerableTime;
int viewDistance;
- __int64 lastActionTime;
+ int64_t lastActionTime;
int lastBrupSendTickCount; // 4J Added
public:
@@ -169,5 +169,5 @@ public:
protected:
// 4J Added to record telemetry of player deaths, this should store the last source of damage
- ETelemetryChallenges m_lastDamageSource;
+ ETelemetryChallenges m_lastDamageSource;
};
diff --git a/Minecraft.Client/StringTable.cpp b/Minecraft.Client/StringTable.cpp
index e4baecac..234a8943 100644
--- a/Minecraft.Client/StringTable.cpp
+++ b/Minecraft.Client/StringTable.cpp
@@ -44,7 +44,7 @@ void StringTable::ProcessStringTableData(void)
app.getLocale(locales);
bool foundLang = false;
- __int64 bytesToSkip = 0;
+ int64_t bytesToSkip = 0;
int dataSize = 0;
//
diff --git a/Minecraft.Client/TileRenderer.cpp b/Minecraft.Client/TileRenderer.cpp
index 2acc6170..4735b941 100644
--- a/Minecraft.Client/TileRenderer.cpp
+++ b/Minecraft.Client/TileRenderer.cpp
@@ -4167,7 +4167,7 @@ bool TileRenderer::tesselateCrossInWorld( Tile* tt, int x, int y, int z )
if (tt == Tile::tallgrass)
{
- __int64 seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
+ int64_t seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
seed = seed * seed * 42317861 + seed * 11;
xt += ((((seed >> 16) & 0xf) / 15.0f) - 0.5f) * 0.5f;
@@ -4406,7 +4406,7 @@ bool TileRenderer::tesselateLilypadInWorld(Tile *tt, int x, int y, int z)
float u1 = tex->getU1(true);
float v1 = tex->getV1(true);
- __int64 seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
+ int64_t seed = (x * 3129871) ^ (z * 116129781l) ^ (y);
seed = seed * seed * 42317861 + seed * 11;
int dir = (int) ((seed >> 16) & 0x3);
@@ -5261,7 +5261,7 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Tile*
{
if ( getTexture(tt)->getFlags() == Icon::IS_GRASS_TOP ) tintSides = false;
}
- else if (hasFixedTexture())
+ else if (hasFixedTexture())
{
tintSides = false;
}
@@ -5528,7 +5528,7 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Tile*
float ll00z = tt->getShadeBrightness(level, pX, pY, pZ - 1);
{
- if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
+ if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
{
float _ll1 = (llx0z + llxYz + ll00z + ll0Yz) / 4.0f;
float _ll2 = (ll00z + ll0Yz + llX0z + llXYz) / 4.0f;
@@ -5683,7 +5683,7 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Tile*
float ll00Z = tt->getShadeBrightness(level, pX, pY, pZ + 1);
{
- if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
+ if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
{
float _ll1 = (llx0Z + llxYZ + ll00Z + ll0YZ) / 4.0f;
float _ll4 = (ll00Z + ll0YZ + llX0Z + llXYZ) / 4.0f;
@@ -5834,7 +5834,7 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Tile*
float llx00 = tt->getShadeBrightness(level, pX - 1, pY, pZ);
{
- if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
+ if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
{
float _ll4 = (llxy0 + llxyZ + llx00 + llx0Z) / 4.0f;
float _ll1 = (llx00 + llx0Z + llxY0 + llxYZ) / 4.0f;
@@ -5985,7 +5985,7 @@ bool TileRenderer::tesselateBlockInWorldWithAmbienceOcclusionTexLighting( Tile*
float llX00 = tt->getShadeBrightness(level, pX + 1, pY, pZ);
{
- if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
+ if(smoothShapeLighting) // MGH - unifying tesselateBlockInWorldWithAmbienceOcclusionTexLighting and tesselateBlockInWorldWithAmbienceOcclusionTexLighting2
{
float _ll1 = (llXy0 + llXyZ + llX00 + llX0Z) / 4.0f;
float _ll2 = (llXyz + llXy0 + llX0z + llX00) / 4.0f;
@@ -7959,7 +7959,7 @@ void TileRenderer::renderTile( Tile* tile, int data, float brightness, float fAl
data = Facing::UP;
}
- tile->updateDefaultShape();
+ tile->updateDefaultShape();
setShape(tile);
glRotatef(90, 0, 1, 0);
diff --git a/Minecraft.Client/Timer.cpp b/Minecraft.Client/Timer.cpp
index 15a2c2f1..636904b7 100644
--- a/Minecraft.Client/Timer.cpp
+++ b/Minecraft.Client/Timer.cpp
@@ -20,9 +20,9 @@ Timer::Timer(float ticksPerSecond)
void Timer::advanceTime()
{
- __int64 nowMs = System::currentTimeMillis();
- __int64 passedMs = nowMs - lastMs;
-
+ int64_t nowMs = System::currentTimeMillis();
+ int64_t passedMs = nowMs - lastMs;
+
// 4J - Use high-resolution timer for 'now' in seconds
double now = System::nanoTime() / 1000000000.0;
@@ -40,8 +40,8 @@ void Timer::advanceTime()
accumMs += passedMs;
if (accumMs > 1000)
{
- __int64 msSysTime = (__int64)(now * 1000.0);
- __int64 passedMsSysTime = msSysTime - lastMsSysTime;
+ int64_t msSysTime = (int64_t)(now * 1000.0);
+ int64_t passedMsSysTime = msSysTime - lastMsSysTime;
double adjustTimeT = accumMs / (double) passedMsSysTime;
adjustTime += (adjustTimeT - adjustTime) * 0.2f;
@@ -51,7 +51,7 @@ void Timer::advanceTime()
}
if (accumMs < 0)
{
- lastMsSysTime = (__int64)(now * 1000.0);
+ lastMsSysTime = (int64_t)(now * 1000.0);
}
}
lastMs = nowMs;
@@ -89,9 +89,9 @@ void Timer::advanceTimeQuickly()
void Timer::skipTime()
{
- __int64 nowMs = System::currentTimeMillis();
- __int64 passedMs = nowMs - lastMs;
- __int64 msSysTime = System::nanoTime() / 1000000;
+ int64_t nowMs = System::currentTimeMillis();
+ int64_t passedMs = nowMs - lastMs;
+ int64_t msSysTime = System::nanoTime() / 1000000;
double now = msSysTime / 1000.0;
@@ -108,7 +108,7 @@ void Timer::skipTime()
accumMs += passedMs;
if (accumMs > 1000)
{
- __int64 passedMsSysTime = msSysTime - lastMsSysTime;
+ int64_t passedMsSysTime = msSysTime - lastMsSysTime;
double adjustTimeT = accumMs / (double) passedMsSysTime;
adjustTime += (adjustTimeT - adjustTime) * 0.2f;
diff --git a/Minecraft.Client/Timer.h b/Minecraft.Client/Timer.h
index f9737eb0..8bea39d4 100644
--- a/Minecraft.Client/Timer.h
+++ b/Minecraft.Client/Timer.h
@@ -17,9 +17,9 @@ public:
float passedTime;
private:
- __int64 lastMs;
- __int64 lastMsSysTime;
- __int64 accumMs;
+ int64_t lastMs;
+ int64_t lastMsSysTime;
+ int64_t accumMs;
double adjustTime;
diff --git a/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h
index 896f730a..45bfb31a 100644
--- a/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h
+++ b/Minecraft.Client/Windows64/4JLibs/inc/4J_Storage.h
@@ -15,7 +15,7 @@ typedef struct
}
CONTAINER_METADATA;
-typedef struct
+typedef struct
{
char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH];
char UTF8SaveTitle[MAX_DISPLAYNAME_LENGTH];
@@ -24,7 +24,7 @@ typedef struct
}
SAVE_INFO,*PSAVE_INFO;
-typedef struct
+typedef struct
{
int iSaveC;
PSAVE_INFO SaveInfoA;
@@ -43,7 +43,7 @@ class C4JStorage
public:
// Structs defined in the DLC_Creator, but added here to be used in the app
- typedef struct
+ typedef struct
{
unsigned int uiFileSize;
DWORD dwType;
@@ -61,7 +61,7 @@ public:
DLC_FILE_PARAM, *PDLC_FILE_PARAM;
// End of DLC_Creator structs
- typedef struct
+ typedef struct
{
WCHAR wchDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
CHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
@@ -71,7 +71,7 @@ public:
CACHEINFOSTRUCT;
// structure to hold DLC info in TMS
- typedef struct
+ typedef struct
{
DWORD dwVersion;
DWORD dwNewOffers;
@@ -111,7 +111,7 @@ public:
enum ESaveGameControlState
{
ESaveGameControl_Idle=0,
- ESaveGameControl_Save,
+ ESaveGameControl_Save,
ESaveGameControl_InternalRequestingDevice,
ESaveGameControl_InternalGetSaveName,
ESaveGameControl_InternalSaving,
@@ -122,16 +122,16 @@ public:
enum ESaveGameState
{
ESaveGame_Idle=0,
- ESaveGame_Save,
+ ESaveGame_Save,
ESaveGame_InternalRequestingDevice,
ESaveGame_InternalGetSaveName,
ESaveGame_InternalSaving,
ESaveGame_CopySave,
ESaveGame_CopyingSave,
- ESaveGame_Load,
- ESaveGame_GetSavesInfo,
- ESaveGame_Rename,
- ESaveGame_Delete,
+ ESaveGame_Load,
+ ESaveGame_GetSavesInfo,
+ ESaveGame_Rename,
+ ESaveGame_Delete,
ESaveGame_GetSaveThumbnail // Not used as an actual state in the PS4, but the game expects this to be returned to indicate success when getting a thumbnail
@@ -210,7 +210,7 @@ public:
};
- typedef struct
+ typedef struct
{
CHAR szFilename[256];
int iFileSize;
@@ -218,14 +218,14 @@ public:
}
TMSPP_FILE_DETAILS, *PTMSPP_FILE_DETAILS;
- typedef struct
+ typedef struct
{
int iCount;
PTMSPP_FILE_DETAILS FileDetailsA;
}
TMSPP_FILE_LIST, *PTMSPP_FILE_LIST;
- typedef struct
+ typedef struct
{
DWORD dwSize;
PBYTE pbData;
@@ -264,7 +264,7 @@ public:
void SetSaveImages( PBYTE pbThumbnail,DWORD dwThumbnailBytes,PBYTE pbImage,DWORD dwImageBytes, PBYTE pbTextData ,DWORD dwTextDataBytes); // Sets the thumbnail & image for the save, optionally setting the metadata in the png
C4JStorage::ESaveGameState SaveSaveData(int( *Func)(LPVOID ,const bool),LPVOID lpParam);
void CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam);
- void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected);
+ void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected);
bool GetSaveDeviceSelected(unsigned int iPad);
C4JStorage::ESaveGameState DoesSaveExist(bool *pbExists);
bool EnoughSpaceForAMinSaveGame();
@@ -286,12 +286,12 @@ public:
// DLC
void RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam );
void SetDLCPackageRoot(char *pszDLCRoot);
- C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT);
+ C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT);
DWORD CancelGetDLCOffers();
void ClearDLCOffers();
XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(DWORD dw);
int GetOfferCount();
- DWORD InstallOffer(int iOfferIDC, __uint64 *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial=false);
+ DWORD InstallOffer(int iOfferIDC, uint64_t *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial=false);
DWORD GetAvailableDLCCount( int iPad);
C4JStorage::EDLCStatus GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam);
@@ -335,7 +335,7 @@ public:
unsigned int CRC(unsigned char *buf, int len);
// #ifdef _DEBUG
-// void SetSaveName(int i);
+// void SetSaveName(int i);
// #endif
// string table for all the Storage problems. Loaded by the application
C4JStringTable *m_pStringTable;
diff --git a/Minecraft.Client/Windows64/Iggy/include/rrCore.h b/Minecraft.Client/Windows64/Iggy/include/rrCore.h
index e88b5f8c..17ebee3a 100644
--- a/Minecraft.Client/Windows64/Iggy/include/rrCore.h
+++ b/Minecraft.Client/Windows64/Iggy/include/rrCore.h
@@ -114,8 +114,8 @@
#define __RADLITTLEENDIAN__
#ifdef __i386__
#define __RADX86__
- #else
- #define __RADARM__
+ #else
+ #define __RADARM__
#endif
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -132,7 +132,7 @@
#define __RADX86__
#else
#error Unknown processor
-#endif
+#endif
#define __RADLITTLEENDIAN__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -155,7 +155,7 @@
#define __RADNACL__
#define __RAD32__
#define __RADLITTLEENDIAN__
- #define __RADX86__
+ #define __RADX86__
#define RADINLINE inline
#define RADRESTRICT __restrict
@@ -196,7 +196,7 @@
#define __RAD64REGS__
#define __RADLITTLEENDIAN__
#define RADINLINE inline
- #define RADRESTRICT __restrict
+ #define RADRESTRICT __restrict
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
@@ -265,7 +265,7 @@
#endif
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
-
+
#elif defined(CAFE) // has to be before HOLLYWOOD_REV since it also defines it
#define __RADWIIU__
@@ -480,7 +480,7 @@
#undef RADRESTRICT /* could have been defined above... */
#define RADRESTRICT __restrict
-
+
#undef RADSTRUCT
#define RADSTRUCT struct __attribute__((__packed__))
#endif
@@ -885,7 +885,7 @@
#define RAD_ALIGN(type,var,num) type __declspec(align(num)) var
#else
// NOTE: / / is a guaranteed parse error in C/C++.
- #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
+ #define RAD_ALIGN(type,var,num) RAD_ALIGN_USED_BUT_NOT_DEFINED / /
#endif
// WARNING : RAD_TLS should really only be used for debug/tools stuff
@@ -917,8 +917,8 @@
#define RAD_S32 signed int
// But pointers are 64 bits.
#if (_MSC_VER >= 1300 && defined(_Wp64) && _Wp64 )
- #define RAD_SINTa __w64 signed __int64
- #define RAD_UINTa __w64 unsigned __int64
+ #define RAD_SINTa __w64 signed long long
+ #define RAD_UINTa __w64 unsigned long long
#else // non-vc.net compiler or /Wp64 turned off
#define RAD_UINTa unsigned long long
#define RAD_SINTa signed long long
@@ -976,8 +976,8 @@
#define RAD_U64 unsigned long long
#define RAD_S64 signed long long
#elif defined(__RADX64__) || defined(__RAD32__)
- #define RAD_U64 unsigned __int64
- #define RAD_S64 signed __int64
+ #define RAD_U64 unsigned long long
+ #define RAD_S64 signed long long
#else
// 16-bit
typedef RADSTRUCT RAD_U64 // do this so that we don't accidentally use U64s
@@ -1134,7 +1134,7 @@
// helpers for doing an if ( ) with expect :
// if ( RAD_LIKELY(expr) ) { ... }
-
+
#define RAD_LIKELY(expr) RAD_EXPECT(expr,1)
#define RAD_UNLIKELY(expr) RAD_EXPECT(expr,0)
@@ -1324,7 +1324,7 @@
__pragma(warning(push)) \
__pragma(warning(disable:4127)) \
} while(0) \
- __pragma(warning(pop))
+ __pragma(warning(pop))
#define RAD_STATEMENT_END_TRUE \
__pragma(warning(push)) \
@@ -1333,10 +1333,10 @@
__pragma(warning(pop))
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#else
- #define RAD_USE_STANDARD_LOOP_CONSTRUCT
+ #define RAD_USE_STANDARD_LOOP_CONSTRUCT
#endif
#ifdef RAD_USE_STANDARD_LOOP_CONSTRUCT
@@ -1345,7 +1345,7 @@
#define RAD_STATEMENT_END_FALSE \
} while ( (void)0,0 )
-
+
#define RAD_STATEMENT_END_TRUE \
} while ( (void)1,1 )
@@ -1355,7 +1355,7 @@
RAD_STATEMENT_START \
code \
RAD_STATEMENT_END_FALSE
-
+
#define RAD_INFINITE_LOOP( code ) \
RAD_STATEMENT_START \
code \
@@ -1363,7 +1363,7 @@
// Must be placed after variable declarations for code compiled as .c
-#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
+#if defined(_MSC_VER) && _MSC_VER >= 1700 // in 2012 aka 11.0 and later
# define RR_UNUSED_VARIABLE(x) (void) x
#else
# define RR_UNUSED_VARIABLE(x) (void)(sizeof(x))
@@ -1473,7 +1473,7 @@
// just to make gcc shut up about derefing null :
#define RR_MEMBER_OFFSET_PTR(type,member,ptr) ( (SINTa) &(((type *)(ptr))->member) - (SINTa)(ptr) )
#define RR_MEMBER_SIZE_PTR(type,member,ptr) ( sizeof( ((type *) (ptr))->member) )
-
+
// MEMBER_TO_OWNER takes a pointer to a member and gives you back the base of the object
// you should then RR_ASSERT( &(ret->member) == ptr );
#define RR_MEMBER_TO_OWNER(type,member,ptr) (type *)( ((char *)(ptr)) - RR_MEMBER_OFFSET_PTR(type,member,ptr) )
@@ -1482,7 +1482,7 @@
// Cache / prefetch macros :
// RR_PREFETCH for various platforms :
-//
+//
// RR_PREFETCH_SEQUENTIAL : prefetch memory for reading in a sequential scan
// platforms that automatically prefetch sequential (eg. PC) should be a no-op here
// RR_PREFETCH_WRITE_INVALIDATE : prefetch memory for writing - contents of memory are undefined
@@ -1707,7 +1707,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define rrDisplayAssertion(i,n,l,f,m) ( ( g_fp_rrDisplayAssertion ) ? (*g_fp_rrDisplayAssertion)(i,n,l,f,m) : 1 )
//-----------------------------------------------------------
-
+
// RAD_NO_BREAK : option if you don't like your assert to break
// CB : RR_BREAK is *always* a break ; RR_ASSERT_BREAK is optional
#ifdef RAD_NO_BREAK
@@ -1725,7 +1725,7 @@ extern fp_rrDisplayAssertion * g_fp_rrDisplayAssertion;
#define RR_ASSERT_LITE_ALWAYS(exp) RAD_STATEMENT_WRAPPER( if ( ! (exp) ) { RR_ASSERT_BREAK(); } )
//-----------------------------------
-#ifdef RR_DO_ASSERTS
+#ifdef RR_DO_ASSERTS
#define RR_ASSERT(exp) RR_ASSERT_ALWAYS(exp)
#define RR_ASSERT_LITE(exp) RR_ASSERT_LITE_ALWAYS(exp)
@@ -1883,7 +1883,7 @@ unsigned long __cdecl _byteswap_ulong (unsigned long _Long);
#define RR_BSWAP16 _byteswap_ushort
#define RR_BSWAP32 _byteswap_ulong
-unsigned __int64 __cdecl _byteswap_uint64 (unsigned __int64 val);
+unsigned long long __cdecl _byteswap_uint64 (unsigned long long val);
#pragma intrinsic(_byteswap_uint64)
#define RR_BSWAP64 _byteswap_uint64
@@ -1909,7 +1909,7 @@ RADFORCEINLINE unsigned long RR_BSWAP32 (unsigned long _Long)
return _Long;
}
-RADFORCEINLINE unsigned __int64 RR_BSWAP64 (unsigned __int64 _Long)
+RADFORCEINLINE unsigned long long RR_BSWAP64 (unsigned long long _Long)
{
__asm {
mov eax, DWORD PTR _Long
@@ -2250,10 +2250,10 @@ void __storewordbytereverse (unsigned int val, int offset, void *bas
#if ( defined(_MSC_VER) && _MSC_VER >= 1300)
-unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
+unsigned long long __cdecl _rotl64(unsigned long long _Val, int _Shift);
#pragma intrinsic(_rotl64)
-#define RR_ROTL64(x,k) _rotl64((unsigned __int64)(x),(int)(k))
+#define RR_ROTL64(x,k) _rotl64((unsigned long long)(x),(int)(k))
#elif defined(__RADCELL__)
@@ -2262,7 +2262,7 @@ unsigned __int64 __cdecl _rotl64(unsigned __int64 _Val, int _Shift);
#elif defined(__RADLINUX__) || defined(__RADMACAPI__)
-//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
+//APTODO: Just to compile linux. Should we be doing better than this? If not, combine with above.
#define RR_ROTL64(u64,num) ( ( (u64) << (num) ) | ( (u64) >> (64 - (num))) )
#else
diff --git a/Minecraft.Client/Windows64/Windows64_App.cpp b/Minecraft.Client/Windows64/Windows64_App.cpp
index ad9e1f24..497808e1 100644
--- a/Minecraft.Client/Windows64/Windows64_App.cpp
+++ b/Minecraft.Client/Windows64/Windows64_App.cpp
@@ -95,7 +95,7 @@ void CConsoleMinecraftApp::TemporaryCreateGameStart()
StorageManager.SetSaveTitle(wWorldName.c_str());
bool isFlat = false;
- __int64 seedValue = 0; // BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
+ int64_t seedValue = 0; // BiomeSource::findSeed(isFlat?LevelType::lvl_flat:LevelType::lvl_normal); // 4J - was (new Random())->nextLong() - now trying to actually find a seed to suit our requirements
NetworkGameInitData *param = new NetworkGameInitData();
param->seed = seedValue;
diff --git a/Minecraft.Client/Windows64/Windows64_Xuid.h b/Minecraft.Client/Windows64/Windows64_Xuid.h
index 93577751..aa88f296 100644
--- a/Minecraft.Client/Windows64/Windows64_Xuid.h
+++ b/Minecraft.Client/Windows64/Windows64_Xuid.h
@@ -85,9 +85,9 @@ namespace Win64Xuid
return false;
// Compatibility: earlier experiments may have written raw 8-byte uid.dat.
- if (readBytes == sizeof(unsigned __int64))
+ if (readBytes == sizeof(uint64_t))
{
- unsigned __int64 raw = 0;
+ uint64_t raw = 0;
memcpy(&raw, buffer, sizeof(raw));
PlayerUID parsed = (PlayerUID)raw;
if (IsPersistedUidValid(parsed))
@@ -106,7 +106,7 @@ namespace Win64Xuid
errno = 0;
char* end = NULL;
- unsigned __int64 raw = _strtoui64(begin, &end, 0);
+ uint64_t raw = _strtoui64(begin, &end, 0);
if (begin == end || errno != 0)
return false;
@@ -140,7 +140,7 @@ namespace Win64Xuid
return written > 0;
}
- inline unsigned __int64 Mix64(unsigned __int64 x)
+ inline uint64_t Mix64(uint64_t x)
{
x += 0x9E3779B97F4A7C15ULL;
x = (x ^ (x >> 30)) * 0xBF58476D1CE4E5B9ULL;
@@ -153,20 +153,20 @@ namespace Win64Xuid
// Avoid rand_s dependency: mix several Win64 runtime values into a 64-bit seed.
FILETIME ft = {};
GetSystemTimeAsFileTime(&ft);
- unsigned __int64 t = (((unsigned __int64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+ uint64_t t = (((uint64_t)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
LARGE_INTEGER qpc = {};
QueryPerformanceCounter(&qpc);
- unsigned __int64 seed = t;
- seed ^= (unsigned __int64)qpc.QuadPart;
- seed ^= ((unsigned __int64)GetCurrentProcessId() << 32);
- seed ^= (unsigned __int64)GetCurrentThreadId();
- seed ^= (unsigned __int64)GetTickCount();
- seed ^= (unsigned __int64)(size_t)&qpc;
- seed ^= (unsigned __int64)(size_t)GetModuleHandleA(NULL);
+ uint64_t seed = t;
+ seed ^= (uint64_t)qpc.QuadPart;
+ seed ^= ((uint64_t)GetCurrentProcessId() << 32);
+ seed ^= (uint64_t)GetCurrentThreadId();
+ seed ^= (uint64_t)GetTickCount();
+ seed ^= (uint64_t)(size_t)&qpc;
+ seed ^= (uint64_t)(size_t)GetModuleHandleA(NULL);
- unsigned __int64 raw = Mix64(seed) ^ Mix64(seed + 0xA0761D6478BD642FULL);
+ uint64_t raw = Mix64(seed) ^ Mix64(seed + 0xA0761D6478BD642FULL);
raw ^= 0x8F4B2D6C1A93E705ULL;
raw |= 0x8000000000000000ULL;
diff --git a/Minecraft.Client/Xbox/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Xbox/4JLibs/inc/4J_Storage.h
index 2988dc2c..2ba90566 100644
--- a/Minecraft.Client/Xbox/4JLibs/inc/4J_Storage.h
+++ b/Minecraft.Client/Xbox/4JLibs/inc/4J_Storage.h
@@ -5,7 +5,7 @@ using namespace std;
class CXuiStringTable;
-typedef struct
+typedef struct
{
FILETIME fTime;
XCONTENT_DATA Content;
@@ -34,7 +34,7 @@ class C4JStorage
public:
// Structs defined in the DLC_Creator, but added here to be used in the app
- typedef struct
+ typedef struct
{
unsigned int uiFileSize;
DWORD dwType;
@@ -52,7 +52,7 @@ public:
DLC_FILE_PARAM, *PDLC_FILE_PARAM;
// End of DLC_Creator structs
- typedef struct
+ typedef struct
{
WCHAR wchDisplayName[XCONTENT_MAX_DISPLAYNAME_LENGTH];
CHAR szFileName[XCONTENT_MAX_FILENAME_LENGTH];
@@ -62,7 +62,7 @@ public:
CACHEINFOSTRUCT;
// structure to hold DLC info in TMS
- typedef struct
+ typedef struct
{
DWORD dwVersion;
DWORD dwNewOffers;
@@ -102,7 +102,7 @@ public:
enum ESaveGameControlState
{
ESaveGameControl_Idle=0,
- ESaveGameControl_Save,
+ ESaveGameControl_Save,
ESaveGameControl_InternalRequestingDevice,
ESaveGameControl_InternalGetSaveName,
ESaveGameControl_InternalSaving,
@@ -189,7 +189,7 @@ public:
TMS_UGCTYPE_MAX
};
- typedef struct
+ typedef struct
{
CHAR szFilename[256];
int iFileSize;
@@ -197,14 +197,14 @@ public:
}
TMSPP_FILE_DETAILS, *PTMSPP_FILE_DETAILS;
- typedef struct
+ typedef struct
{
int iCount;
PTMSPP_FILE_DETAILS FileDetailsA;
}
TMSPP_FILE_LIST, *PTMSPP_FILE_LIST;
- typedef struct
+ typedef struct
{
DWORD dwSize;
PBYTE pbData;
@@ -241,7 +241,7 @@ public:
PVOID AllocateSaveData(unsigned int uiBytes);
void SaveSaveData(unsigned int uiBytes,PBYTE pbThumbnail=NULL,DWORD cbThumbnail=0,PBYTE pbTextData=NULL, DWORD dwTextLen=0);
void CopySaveDataToNewSave(PBYTE pbThumbnail,DWORD cbThumbnail,WCHAR *wchNewName,int ( *Func)(LPVOID lpParam, bool), LPVOID lpParam);
- void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected);
+ void SetSaveDeviceSelected(unsigned int uiPad,bool bSelected);
bool GetSaveDeviceSelected(unsigned int iPad);
C4JStorage::ELoadGameStatus DoesSaveExist(bool *pbExists);
bool EnoughSpaceForAMinSaveGame();
@@ -260,13 +260,13 @@ public:
// DLC
void RegisterMarketplaceCountsCallback(int ( *Func)(LPVOID lpParam, C4JStorage::DLC_TMS_DETAILS *, int), LPVOID lpParam );
void SetDLCPackageRoot(char *pszDLCRoot);
- C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT);
+ C4JStorage::EDLCStatus GetDLCOffers(int iPad,int( *Func)(LPVOID, int, DWORD, int),LPVOID lpParam, DWORD dwOfferTypesBitmask=XMARKETPLACE_OFFERING_TYPE_CONTENT);
DWORD CancelGetDLCOffers();
void ClearDLCOffers();
//XMARKETPLACE_CONTENTOFFER_INFO& GetOffer(DWORD dw);
XMARKETPLACE_CURRENCY_CONTENTOFFER_INFO& GetOffer(DWORD dw);
int GetOfferCount();
- DWORD InstallOffer(int iOfferIDC,unsigned __int64 *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial=false);
+ DWORD InstallOffer(int iOfferIDC,uint64_t *ullOfferIDA,int( *Func)(LPVOID, int, int),LPVOID lpParam, bool bTrial=false);
DWORD GetAvailableDLCCount( int iPad);
C4JStorage::EDLCStatus GetInstalledDLC(int iPad,int( *Func)(LPVOID, int, int),LPVOID lpParam);
@@ -297,7 +297,7 @@ public:
HRESULT TMSPP_SetTitleGroupID(LPCSTR szGroupID);
// #ifdef _DEBUG
-// void SetSaveName(int i);
+// void SetSaveName(int i);
// #endif
// string table for all the Storage problems. Loaded by the application
CXuiStringTable *m_pStringTable;
diff --git a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
index 386a0206..5216d908 100644
--- a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
+++ b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.cpp
@@ -137,6 +137,6 @@ int NetworkPlayerXbox::GetTimeSinceLastChunkPacket_ms()
return INT_MAX;
}
- __int64 currentTime = System::currentTimeMillis();
+ int64_t currentTime = System::currentTimeMillis();
return (int)( currentTime - m_lastChunkPacketTime );
} \ No newline at end of file
diff --git a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.h b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.h
index bec7a125..77ef84cc 100644
--- a/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.h
+++ b/Minecraft.Client/Xbox/Network/NetworkPlayerXbox.h
@@ -39,5 +39,5 @@ public:
private:
IQNetPlayer *m_qnetPlayer;
Socket *m_pSocket;
- __int64 m_lastChunkPacketTime;
+ int64_t m_lastChunkPacketTime;
}; \ No newline at end of file
diff --git a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGCTypes.h b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGCTypes.h
index 6d1056ff..42b87ee6 100644
--- a/Minecraft.Client/Xbox/Sentient/Include/SenClientUGCTypes.h
+++ b/Minecraft.Client/Xbox/Sentient/Include/SenClientUGCTypes.h
@@ -43,7 +43,7 @@ namespace Sentient
};
typedef unsigned int SenUGCMetaDataFlags;
- enum
+ enum
{
SenUGCMetaDataFlags_NoFlags = 0x00000000,
SenUGCMetaDataFlags_FriendsCanEdit = 0x00000001,
@@ -66,7 +66,7 @@ namespace Sentient
#pragma warning ( disable : 4996 ) // @TODO - Removed once Int16 Descriptors are deprecated
memset(descriptors, 0, sizeof(SenUGCDescriptor) * NrUgcDescriptors);
#pragma warning ( default : 4996 )
- memset(descriptors2, 0, sizeof(__int64) * NrUgcDescriptors);
+ memset(descriptors2, 0, sizeof(long long) * NrUgcDescriptors);
}
SenUGCID parentID;
@@ -80,10 +80,10 @@ namespace Sentient
wchar_t shortName[ShortNameLength];
static const int NrUgcDescriptors = 4;
-
+
__declspec(deprecated("Descriptors have increased in size (from Int16 to Int64). Please Use descriptors2 instead"))
SenUGCDescriptor descriptors[NrUgcDescriptors];
- __int64 descriptors2[NrUgcDescriptors];
+ long long descriptors2[NrUgcDescriptors];
static const int BlobSizeLimit = 1024;
size_t metaDataBlobSize;
@@ -160,10 +160,10 @@ namespace Sentient
enum SenUGCSortBy
{
- SenUGCSortBy_CreationDate,
- SenUGCSortBy_TopFavorites,
- SenUGCSortBy_TopReviewScoreAverage,
- SenUGCSortBy_TopDownloadsTotal
+ SenUGCSortBy_CreationDate,
+ SenUGCSortBy_TopFavorites,
+ SenUGCSortBy_TopReviewScoreAverage,
+ SenUGCSortBy_TopDownloadsTotal
};
enum SenUGCAuthorType
@@ -211,7 +211,7 @@ namespace Sentient
};
// ***** Leaderboard types
- typedef __int64 SenLeaderboardEntryValue;
+ typedef long long SenLeaderboardEntryValue;
typedef ULONGLONG SenLeaderboardActorId;
enum SenLeaderboardSortType
@@ -224,7 +224,7 @@ namespace Sentient
/// @brief Leaderboard Metadata retrieval flag.
///
/// @details When retrieving Leaderboard information, a client can choose
- /// to bypass retrieval or retrieve specific details regarding the
+ /// to bypass retrieval or retrieve specific details regarding the
/// Metadata stored for a given Leaderboard or Leaderboard Entry.
///
enum SenLeaderboardMetadataFlag
diff --git a/Minecraft.Client/Xbox/XML/ATGXmlParser.cpp b/Minecraft.Client/Xbox/XML/ATGXmlParser.cpp
index 5366e721..cfa92064 100644
--- a/Minecraft.Client/Xbox/XML/ATGXmlParser.cpp
+++ b/Minecraft.Client/Xbox/XML/ATGXmlParser.cpp
@@ -1,13 +1,13 @@
-// 4J-PB -
-// The ATG Framework is a common set of C++ class libraries that is used by the samples in the XDK, and was developed by the Advanced Technology Group (ATG).
-// The ATG Framework offers a clean and consistent format for the samples. These classes define functions used by all the samples.
-// The ATG Framework together with the samples demonstrates best practices and innovative techniques for Xbox 360. There are many useful sections of code in the samples.
-// You are encouraged to incorporate this code into your titles.
+// 4J-PB -
+// The ATG Framework is a common set of C++ class libraries that is used by the samples in the XDK, and was developed by the Advanced Technology Group (ATG).
+// The ATG Framework offers a clean and consistent format for the samples. These classes define functions used by all the samples.
+// The ATG Framework together with the samples demonstrates best practices and innovative techniques for Xbox 360. There are many useful sections of code in the samples.
+// You are encouraged to incorporate this code into your titles.
//-------------------------------------------------------------------------------------
// AtgXmlParser.cpp
-//
+//
// Simple callback non-validating XML parser implementation.
//
// Xbox Advanced Technology Group.
@@ -35,7 +35,7 @@ XMLParser::XMLParser()
// Name: XMLParser::~XMLParser
//-------------------------------------------------------------------------------------
XMLParser::~XMLParser()
-{
+{
}
@@ -51,11 +51,11 @@ VOID XMLParser::FillBuffer()
if( m_hFile == NULL )
{
- if( m_uInXMLBufferCharsLeft > XML_READ_BUFFER_SIZE )
+ if( m_uInXMLBufferCharsLeft > XML_READ_BUFFER_SIZE )
NChars = XML_READ_BUFFER_SIZE;
else
NChars = m_uInXMLBufferCharsLeft;
-
+
CopyMemory( m_pReadBuf, m_pInXMLBuffer, NChars );
m_uInXMLBufferCharsLeft -= NChars;
m_pInXMLBuffer += NChars;
@@ -69,7 +69,7 @@ VOID XMLParser::FillBuffer()
}
m_dwCharsConsumed += NChars;
- __int64 iProgress = m_dwCharsTotal ? (( (__int64)m_dwCharsConsumed * 1000 ) / (__int64)m_dwCharsTotal) : 0;
+ int64_t iProgress = m_dwCharsTotal ? (( (int64_t)m_dwCharsConsumed * 1000 ) / (int64_t)m_dwCharsTotal) : 0;
m_pISAXCallback->SetParseProgress( (DWORD)iProgress );
m_pReadBuf[ NChars ] = '\0';
@@ -89,7 +89,7 @@ VOID XMLParser::SkipNextAdvance()
//-------------------------------------------------------------------------------------
// Name: XMLParser::ConsumeSpace
-// Desc: Skips spaces in the current stream
+// Desc: Skips spaces in the current stream
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ConsumeSpace()
{
@@ -104,29 +104,29 @@ HRESULT XMLParser::ConsumeSpace()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
- }
- SkipNextAdvance();
+ }
+ SkipNextAdvance();
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::ConvertEscape
-// Desc: Copies and converts an escape sequence into m_pWriteBuf
+// Desc: Copies and converts an escape sequence into m_pWriteBuf
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ConvertEscape()
-{
+{
HRESULT hr;
WCHAR wVal = 0;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
- // all escape sequences start with &, so ignore the first character
-
+ // all escape sequences start with &, so ignore the first character
+
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
if ( m_Ch == '#' ) // character as hex or decimal
{
if( FAILED( hr = AdvanceCharacter() ) )
@@ -135,9 +135,9 @@ HRESULT XMLParser::ConvertEscape()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
while ( m_Ch != ';' )
- {
+ {
wVal *= 16;
if ( ( m_Ch >= '0' ) && ( m_Ch <= '9' ) )
@@ -151,11 +151,11 @@ HRESULT XMLParser::ConvertEscape()
else if ( ( m_Ch >= 'A' ) && ( m_Ch <= 'F' ) )
{
wVal += m_Ch - 'A' + 10;
- }
+ }
else
{
- Error( E_INVALID_XML_SYNTAX, "Expected hex digit as part of &#x escape sequence" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Expected hex digit as part of &#x escape sequence" );
+ return E_INVALID_XML_SYNTAX;
}
if( FAILED( hr = AdvanceCharacter() ) )
@@ -165,7 +165,7 @@ HRESULT XMLParser::ConvertEscape()
else // decimal number
{
while ( m_Ch != ';' )
- {
+ {
wVal *= 10;
if ( ( m_Ch >= '0' ) && ( m_Ch <= '9' ) )
@@ -174,7 +174,7 @@ HRESULT XMLParser::ConvertEscape()
}
else
{
- Error( E_INVALID_XML_SYNTAX, "Expected decimal digit as part of &# escape sequence" );
+ Error( E_INVALID_XML_SYNTAX, "Expected decimal digit as part of &# escape sequence" );
return E_INVALID_XML_SYNTAX;
}
@@ -187,7 +187,7 @@ HRESULT XMLParser::ConvertEscape()
m_Ch = wVal;
return S_OK;
- }
+ }
// must be an entity reference
@@ -197,13 +197,13 @@ HRESULT XMLParser::ConvertEscape()
SkipNextAdvance();
if( FAILED( hr = AdvanceName() ) )
return hr;
-
+
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
m_pWritePtr = pEntityRefVal;
if ( EntityRefLen == 0 )
{
- Error( E_INVALID_XML_SYNTAX, "Expecting entity name after &" );
+ Error( E_INVALID_XML_SYNTAX, "Expecting entity name after &" );
return E_INVALID_XML_SYNTAX;
}
@@ -219,7 +219,7 @@ HRESULT XMLParser::ConvertEscape()
wVal = '"';
else
{
- Error( E_INVALID_XML_SYNTAX, "Unrecognized entity name after & - (should be lt, gt, amp, apos, or quot)" );
+ Error( E_INVALID_XML_SYNTAX, "Unrecognized entity name after & - (should be lt, gt, amp, apos, or quot)" );
return E_INVALID_XML_SYNTAX; // return false if unrecognized token sequence
}
@@ -228,10 +228,10 @@ HRESULT XMLParser::ConvertEscape()
if( m_Ch != ';' )
{
- Error( E_INVALID_XML_SYNTAX, "Expected terminating ; for entity reference" );
+ Error( E_INVALID_XML_SYNTAX, "Expected terminating ; for entity reference" );
return E_INVALID_XML_SYNTAX; // malformed reference - needs terminating ;
}
-
+
m_Ch = wVal;
return S_OK;
}
@@ -250,41 +250,41 @@ HRESULT XMLParser::AdvanceAttrVal()
return hr;
if( ( m_Ch != '"' ) && ( m_Ch != '\'' ) )
- {
- Error( E_INVALID_XML_SYNTAX, "Attribute values must be enclosed in quotes" );
+ {
+ Error( E_INVALID_XML_SYNTAX, "Attribute values must be enclosed in quotes" );
return E_INVALID_XML_SYNTAX;
}
wQuoteChar = m_Ch;
-
+
for( ;; )
{
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- else if( m_Ch == wQuoteChar )
- break;
+ return hr;
+ else if( m_Ch == wQuoteChar )
+ break;
else if( m_Ch == '&' )
{
SkipNextAdvance();
if( FAILED( hr = ConvertEscape() ) )
- return hr;
+ return hr;
}
- else if( m_Ch == '<' )
+ else if( m_Ch == '<' )
{
- Error( E_INVALID_XML_SYNTAX, "Illegal character '<' in element tag" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Illegal character '<' in element tag" );
+ return E_INVALID_XML_SYNTAX;
}
-
+
// copy character into the buffer
-
- if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
+
+ if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
- Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
+ return E_INVALID_XML_SYNTAX;
}
-
+
*m_pWritePtr = m_Ch;
- m_pWritePtr++;
+ m_pWritePtr++;
}
return S_OK;
}
@@ -296,18 +296,18 @@ HRESULT XMLParser::AdvanceAttrVal()
// Ignores leading whitespace. Currently does not support unicode names
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceName()
-{
+{
HRESULT hr;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( ( ( m_Ch < 'A' ) || ( m_Ch > 'Z' ) ) &&
( ( m_Ch < 'a' ) || ( m_Ch > 'z' ) ) &&
( m_Ch != '_' ) && ( m_Ch != ':' ) )
{
- Error( E_INVALID_XML_SYNTAX, "Names must start with an alphabetic character or _ or :" );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Names must start with an alphabetic character or _ or :" );
+ return E_INVALID_XML_SYNTAX;
}
while( ( ( m_Ch >= 'A' ) && ( m_Ch <= 'Z' ) ) ||
@@ -319,17 +319,17 @@ HRESULT XMLParser::AdvanceName()
if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
- Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
+ Error( E_INVALID_XML_SYNTAX, "Total element tag size may not be more than %d characters", XML_WRITE_BUFFER_SIZE );
return E_INVALID_XML_SYNTAX;
- }
+ }
*m_pWritePtr = m_Ch;
m_pWritePtr++;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
}
-
+
SkipNextAdvance();
return S_OK;
}
@@ -343,7 +343,7 @@ HRESULT XMLParser::AdvanceName()
// Returns S_OK if there are more characters, E_ABORT for no characters to read
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
-{
+{
if( m_bSkipNextAdvance )
{
m_bSkipNextAdvance = FALSE;
@@ -351,20 +351,20 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
}
// If we hit EOF in the middle of a character,
- // it's ok-- we'll just have a corrupt last character
+ // it's ok-- we'll just have a corrupt last character
// (the buffer is padded with double NULLs )
if ( ( m_pReadPtr[0] == '\0' ) && ( m_pReadPtr[1] == '\0' ) )
{
// Read more from the file
- FillBuffer();
+ FillBuffer();
// We are at EOF if it is still NULL
if ( ( m_pReadPtr[0] == '\0' ) && ( m_pReadPtr[1] == '\0' ) )
{
if( !bOkToFail )
{
- Error( E_INVALID_XML_SYNTAX, "Unexpected EOF while parsing XML file" );
+ Error( E_INVALID_XML_SYNTAX, "Unexpected EOF while parsing XML file" );
return E_INVALID_XML_SYNTAX;
}
else
@@ -372,7 +372,7 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
return E_FAIL;
}
}
- }
+ }
if( m_bUnicode == FALSE )
{
@@ -382,13 +382,13 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
else // if( m_bUnicode == TRUE )
{
m_Ch = *((WCHAR *)m_pReadPtr);
-
+
if( m_bReverseBytes )
{
m_Ch = ( m_Ch << 8 ) + ( m_Ch >> 8 );
}
-
- m_pReadPtr += 2;
+
+ m_pReadPtr += 2;
}
if( m_Ch == '\n' )
@@ -398,114 +398,114 @@ HRESULT XMLParser::AdvanceCharacter( BOOL bOkToFail )
}
else if( m_Ch != '\r' )
m_pISAXCallback->m_LinePos++;
-
+
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::AdvanceElement
-// Desc: Builds <element> data, calls callback
+// Desc: Builds <element> data, calls callback
//-------------------------------------------------------------------------------------
HRESULT XMLParser::AdvanceElement()
-{
+{
HRESULT hr;
// write ptr at the beginning of the buffer
m_pWritePtr = m_pWriteBuf;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ return hr;
+
// if first character wasn't '<', we wouldn't be here
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( m_Ch == '!' )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
if ( m_Ch == '-' )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != '-' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != '-' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '-' after '<!-'" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceComment() ) )
- return hr;
+ if( FAILED( hr = AdvanceComment() ) )
+ return hr;
return S_OK;
}
-
- if( m_Ch != '[' )
+
+ if( m_Ch != '[' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'C' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'C' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'D' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'D' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'A' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'A' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'T' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'T' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != 'A' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != 'A' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
- if( m_Ch != '[' )
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+ if( m_Ch != '[' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '<![CDATA['" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( hr = AdvanceCDATA() ) )
+ if( FAILED( hr = AdvanceCDATA() ) )
return hr;
}
- else if( m_Ch == '/' )
+ else if( m_Ch == '/' )
{
WCHAR *pEntityRefVal = m_pWritePtr;
-
- if( FAILED( hr = AdvanceName() ) )
+
+ if( FAILED( hr = AdvanceName() ) )
return hr;
- if( FAILED( m_pISAXCallback->ElementEnd( pEntityRefVal,
+ if( FAILED( m_pISAXCallback->ElementEnd( pEntityRefVal,
(UINT) ( m_pWritePtr - pEntityRefVal ) ) ) )
return E_ABORT;
-
- if( FAILED( hr = ConsumeSpace() ) )
+
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
if( m_Ch != '>' )
{
@@ -513,42 +513,42 @@ HRESULT XMLParser::AdvanceElement()
return E_INVALID_XML_SYNTAX;
}
}
- else if( m_Ch == '?' )
+ else if( m_Ch == '?' )
{
// just skip any xml header tag since not really important after identifying character set
for( ;; )
{
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
+
if ( m_Ch == '>' )
return S_OK;
}
}
else
{
- XMLAttribute Attributes[ XML_MAX_ATTRIBUTES_PER_ELEMENT ];
+ XMLAttribute Attributes[ XML_MAX_ATTRIBUTES_PER_ELEMENT ];
UINT NumAttrs;
WCHAR *pEntityRefVal = m_pWritePtr;
UINT EntityRefLen;
NumAttrs = 0;
-
+
SkipNextAdvance();
// Entity tag
- if( FAILED( hr = AdvanceName() ) )
+ if( FAILED( hr = AdvanceName() ) )
return hr;
EntityRefLen = (UINT)( m_pWritePtr - pEntityRefVal );
- if( FAILED( hr = ConsumeSpace() ) )
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
-
+
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
-
+ return hr;
+
// read attributes
while( ( m_Ch != '>' ) && ( m_Ch != '/' ) )
{
@@ -556,31 +556,31 @@ HRESULT XMLParser::AdvanceElement()
if ( NumAttrs >= XML_MAX_ATTRIBUTES_PER_ELEMENT )
{
- Error( E_INVALID_XML_SYNTAX, "Elements may not have more than %d attributes", XML_MAX_ATTRIBUTES_PER_ELEMENT );
- return E_INVALID_XML_SYNTAX;
+ Error( E_INVALID_XML_SYNTAX, "Elements may not have more than %d attributes", XML_MAX_ATTRIBUTES_PER_ELEMENT );
+ return E_INVALID_XML_SYNTAX;
}
Attributes[ NumAttrs ].strName = m_pWritePtr;
-
+
// Attribute name
if( FAILED( hr = AdvanceName() ) )
return hr;
-
+
Attributes[ NumAttrs ].NameLen = (UINT)( m_pWritePtr - Attributes[ NumAttrs ].strName );
if( FAILED( hr = ConsumeSpace() ) )
return hr;
- if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ if( FAILED( hr = AdvanceCharacter() ) )
+ return hr;
- if( m_Ch != '=' )
+ if( m_Ch != '=' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '=' character after attribute name" );
return E_INVALID_XML_SYNTAX;
}
-
- if( FAILED( hr = ConsumeSpace() ) )
+
+ if( FAILED( hr = ConsumeSpace() ) )
return hr;
Attributes[ NumAttrs ].strValue = m_pWritePtr;
@@ -588,29 +588,29 @@ HRESULT XMLParser::AdvanceElement()
if( FAILED( hr = AdvanceAttrVal() ) )
return hr;
- Attributes[ NumAttrs ].ValueLen = (UINT)( m_pWritePtr -
+ Attributes[ NumAttrs ].ValueLen = (UINT)( m_pWritePtr -
Attributes[ NumAttrs ].strValue );
++NumAttrs;
-
+
if( FAILED( hr = ConsumeSpace() ) )
- return hr;
+ return hr;
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
}
if( m_Ch == '/' )
{
if( FAILED( hr = AdvanceCharacter() ) )
- return hr;
+ return hr;
if( m_Ch != '>' )
{
Error( E_INVALID_XML_SYNTAX, "Expecting '>' after '/' in element tag" );
return E_INVALID_XML_SYNTAX;
}
- if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
+ if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
Attributes, NumAttrs ) ) )
return E_ABORT;
@@ -619,7 +619,7 @@ HRESULT XMLParser::AdvanceElement()
}
else
{
- if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
+ if( FAILED( m_pISAXCallback->ElementBegin( pEntityRefVal, EntityRefLen,
Attributes, NumAttrs ) ) )
return E_ABORT;
}
@@ -637,7 +637,7 @@ HRESULT XMLParser::AdvanceCDATA()
{
HRESULT hr;
WORD wStage = 0;
-
+
if( FAILED( m_pISAXCallback->CDATABegin() ) )
return E_ABORT;
@@ -645,10 +645,10 @@ HRESULT XMLParser::AdvanceCDATA()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
*m_pWritePtr = m_Ch;
m_pWritePtr++;
-
+
if( ( m_Ch == ']' ) && ( wStage == 0 ) )
wStage = 1;
else if( ( m_Ch == ']' ) && ( wStage == 1 ) )
@@ -666,9 +666,9 @@ HRESULT XMLParser::AdvanceCDATA()
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), TRUE ) ) )
return E_ABORT;
m_pWritePtr = m_pWriteBuf;
- }
+ }
}
-
+
if( FAILED( m_pISAXCallback->CDATAData( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
return E_ABORT;
@@ -676,7 +676,7 @@ HRESULT XMLParser::AdvanceCDATA()
if( FAILED( m_pISAXCallback->CDATAEnd() ) )
return E_ABORT;
-
+
return S_OK;
}
@@ -694,24 +694,24 @@ HRESULT XMLParser::AdvanceComment()
{
if( FAILED( hr = AdvanceCharacter() ) )
return hr;
-
+
if (( m_Ch == '-' ) && ( wStage == 0 ))
wStage = 1;
else if (( m_Ch == '-' ) && ( wStage == 1 ))
wStage = 2;
- else if (( m_Ch == '>' ) && ( wStage == 2 ))
- break;
+ else if (( m_Ch == '>' ) && ( wStage == 2 ))
+ break;
else
- wStage = 0;
+ wStage = 0;
}
-
+
return S_OK;
}
//-------------------------------------------------------------------------------------
// Name: XMLParser::RegisterSAXCallbackInterface
-// Desc: Registers callback interface
+// Desc: Registers callback interface
//-------------------------------------------------------------------------------------
VOID XMLParser::RegisterSAXCallbackInterface( ISAXCallback *pISAXCallback )
{
@@ -721,7 +721,7 @@ VOID XMLParser::RegisterSAXCallbackInterface( ISAXCallback *pISAXCallback )
//-------------------------------------------------------------------------------------
// Name: XMLParser::GetSAXCallbackInterface
-// Desc: Returns current callback interface
+// Desc: Returns current callback interface
//-------------------------------------------------------------------------------------
ISAXCallback* XMLParser::GetSAXCallbackInterface()
{
@@ -740,7 +740,7 @@ HRESULT XMLParser::MainParseLoop()
if( FAILED( m_pISAXCallback->StartDocument() ) )
return E_ABORT;
-
+
m_pWritePtr = m_pWriteBuf;
FillBuffer();
@@ -751,57 +751,57 @@ HRESULT XMLParser::MainParseLoop()
m_bReverseBytes = FALSE;
m_pReadPtr += 2;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0xFFFE )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0xFFFE )
{
m_bUnicode = TRUE;
m_bReverseBytes = TRUE;
- m_pReadPtr += 2;
+ m_pReadPtr += 2;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0x003C )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0x003C )
{
- m_bUnicode = TRUE;
+ m_bUnicode = TRUE;
m_bReverseBytes = FALSE;
}
- else if ( *((WCHAR *) m_pReadBuf ) == 0x3C00 )
+ else if ( *((WCHAR *) m_pReadBuf ) == 0x3C00 )
{
m_bUnicode = TRUE;
- m_bReverseBytes = TRUE;
+ m_bReverseBytes = TRUE;
}
else if ( m_pReadBuf[ 0 ] == 0x3C )
{
- m_bUnicode = FALSE;
- m_bReverseBytes = FALSE;
+ m_bUnicode = FALSE;
+ m_bReverseBytes = FALSE;
}
else
- {
+ {
Error( E_INVALID_XML_SYNTAX, "Unrecognized encoding (parser does not support UTF-8 language encodings)" );
- return E_INVALID_XML_SYNTAX;
+ return E_INVALID_XML_SYNTAX;
}
-
+
for( ;; )
{
if( FAILED( AdvanceCharacter( TRUE ) ) )
{
if ( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
- return E_ABORT;
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
+ return E_ABORT;
bWhiteSpaceOnly = TRUE;
}
-
+
if( FAILED( m_pISAXCallback->EndDocument() ) )
return E_ABORT;
-
- return S_OK;
+
+ return S_OK;
}
if( m_Ch == '<' )
{
if( ( (UINT) ( m_pWritePtr - m_pWriteBuf ) != 0 ) && ( !bWhiteSpaceOnly ) )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
- return E_ABORT;
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf, (UINT)( m_pWritePtr - m_pWriteBuf ), FALSE ) ) )
+ return E_ABORT;
bWhiteSpaceOnly = TRUE;
}
@@ -810,45 +810,45 @@ HRESULT XMLParser::MainParseLoop()
m_pWritePtr = m_pWriteBuf;
- if( FAILED( hr = AdvanceElement() ) )
- return hr;
+ if( FAILED( hr = AdvanceElement() ) )
+ return hr;
m_pWritePtr = m_pWriteBuf;
}
- else
+ else
{
if( m_Ch == '&' )
{
SkipNextAdvance();
- if( FAILED( hr = ConvertEscape() ) )
- return hr;
+ if( FAILED( hr = ConvertEscape() ) )
+ return hr;
}
- if( bWhiteSpaceOnly && ( m_Ch != ' ' ) && ( m_Ch != '\n' ) && ( m_Ch != '\r' ) &&
- ( m_Ch != '\t' ) )
+ if( bWhiteSpaceOnly && ( m_Ch != ' ' ) && ( m_Ch != '\n' ) && ( m_Ch != '\r' ) &&
+ ( m_Ch != '\t' ) )
{
bWhiteSpaceOnly = FALSE;
}
*m_pWritePtr = m_Ch;
m_pWritePtr++;
-
+
if( m_pWritePtr - m_pWriteBuf >= XML_WRITE_BUFFER_SIZE )
{
if( !bWhiteSpaceOnly )
- {
- if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf,
- ( UINT ) ( m_pWritePtr - m_pWriteBuf ),
+ {
+ if( FAILED( m_pISAXCallback->ElementContent( m_pWriteBuf,
+ ( UINT ) ( m_pWritePtr - m_pWriteBuf ),
TRUE ) ) )
{
- return E_ABORT;
+ return E_ABORT;
}
}
m_pWritePtr = m_pWriteBuf;
bWhiteSpaceOnly = TRUE;
}
- }
+ }
}
}
@@ -858,31 +858,31 @@ HRESULT XMLParser::MainParseLoop()
// Desc: Builds element data
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
-{
+{
HRESULT hr;
if( m_pISAXCallback == NULL )
return E_NOINTERFACE;
- m_pISAXCallback->m_LineNum = 1;
+ m_pISAXCallback->m_LineNum = 1;
m_pISAXCallback->m_LinePos = 0;
m_pISAXCallback->m_strFilename = strFilename; // save this off only while we parse the file
m_bSkipNextAdvance = FALSE;
- m_pReadPtr = m_pReadBuf;
-
+ m_pReadPtr = m_pReadBuf;
+
m_pReadBuf[ 0 ] = '\0';
- m_pReadBuf[ 1 ] = '\0';
-
+ m_pReadBuf[ 1 ] = '\0';
+
m_pInXMLBuffer = NULL;
m_uInXMLBufferCharsLeft = 0;
- m_hFile = CreateFile( strFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL );
+ m_hFile = CreateFile( strFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL );
if( m_hFile == INVALID_HANDLE_VALUE )
- {
+ {
Error( E_COULD_NOT_OPEN_FILE, "Error opening file" );
hr = E_COULD_NOT_OPEN_FILE;
-
+
}
else
{
@@ -892,14 +892,14 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
m_dwCharsConsumed = 0;
hr = MainParseLoop();
}
-
+
// Close the file
if( m_hFile != INVALID_HANDLE_VALUE )
CloseHandle( m_hFile );
m_hFile = INVALID_HANDLE_VALUE;
// we no longer own strFilename, so un-set it
- m_pISAXCallback->m_strFilename = NULL;
+ m_pISAXCallback->m_strFilename = NULL;
return hr;
}
@@ -909,38 +909,38 @@ HRESULT XMLParser::ParseXMLFile( CONST CHAR *strFilename )
// Desc: Builds element data
//-------------------------------------------------------------------------------------
HRESULT XMLParser::ParseXMLBuffer( CONST CHAR *strBuffer, UINT uBufferSize )
-{
+{
HRESULT hr;
-
+
if( m_pISAXCallback == NULL )
return E_NOINTERFACE;
- m_pISAXCallback->m_LineNum = 1;
+ m_pISAXCallback->m_LineNum = 1;
m_pISAXCallback->m_LinePos = 0;
m_pISAXCallback->m_strFilename = ""; // save this off only while we parse the file
m_bSkipNextAdvance = FALSE;
m_pReadPtr = m_pReadBuf;
-
+
m_pReadBuf[ 0 ] = '\0';
- m_pReadBuf[ 1 ] = '\0';
+ m_pReadBuf[ 1 ] = '\0';
m_hFile = NULL;
m_pInXMLBuffer = strBuffer;
m_uInXMLBufferCharsLeft = uBufferSize;
m_dwCharsTotal = uBufferSize;
m_dwCharsConsumed = 0;
-
+
hr = MainParseLoop();
// we no longer own strFilename, so un-set it
- m_pISAXCallback->m_strFilename = NULL;
+ m_pISAXCallback->m_strFilename = NULL;
return hr;
}
//-------------------------------------------------------------------------------------
-// XMLParser::Error()
+// XMLParser::Error()
// Logs an error through the callback interface
//-------------------------------------------------------------------------------------
#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation
@@ -955,7 +955,7 @@ VOID XMLParser::Error( HRESULT hErr, CONST CHAR* strFormat, ... )
va_start( pArglist, strFormat );
vsprintf( strBuffer, strFormat, pArglist );
-
+
m_pISAXCallback->Error( hErr, strBuffer );
va_end( pArglist );
}
diff --git a/Minecraft.Client/stdafx.h b/Minecraft.Client/stdafx.h
index 7614d058..87a42bec 100644
--- a/Minecraft.Client/stdafx.h
+++ b/Minecraft.Client/stdafx.h
@@ -57,7 +57,6 @@
#include <unordered_map>
#include <unordered_set>
#include <vector>
-typedef unsigned __int64 __uint64;
#endif
#ifdef _WINDOWS64