Remove all MSVC __int64
This commit is contained in:
@@ -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);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ¶meterName);
|
||||
void setParameter(const wstring ¶meterName,ValueType value);
|
||||
GameRuleDefinition *getGameRuleDefinition();
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -39,5 +39,5 @@ public:
|
||||
private:
|
||||
SQRNetworkPlayer *m_sqrPlayer;
|
||||
Socket *m_pSocket;
|
||||
__int64 m_lastChunkPacketTime;
|
||||
int64_t m_lastChunkPacketTime;
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
@@ -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)
|
||||
{
|
||||
@@ -2479,7 +2479,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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
};
|
||||
|
||||
@@ -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 ,
|
||||
"" ,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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(¶m);
|
||||
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(¶m);
|
||||
@@ -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(¶m);
|
||||
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(¶m);
|
||||
@@ -1050,8 +1050,8 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
|
||||
SceNpCommerceDialogParam param;
|
||||
sceNpCommerceDialogParamInitialize(¶m);
|
||||
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(¶m);
|
||||
|
||||
@@ -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(¶m);
|
||||
// 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(¶m);
|
||||
// }
|
||||
// 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;
|
||||
// }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user