Get rid of MSVC's __int64

Use either int64_t, uint64_t or long long and unsigned long long, defined as per C++11 standard
This commit is contained in:
void_17
2026-03-02 15:53:32 +07:00
parent d6ec138710
commit d63f79325f
308 changed files with 5371 additions and 5379 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,7 @@ typedef struct _JoinFromInviteData
DWORD dwUserIndex; // dwUserIndex
DWORD dwLocalUsersMask; // dwUserMask
const INVITE_INFO *pInviteInfo; // pInviteInfo
}
}
JoinFromInviteData;
class Player;
@@ -50,7 +50,7 @@ class Merchant;
class CMinecraftAudio;
class CMinecraftApp
class CMinecraftApp
#ifdef _XBOX
: public CXuiModule
@@ -87,7 +87,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
@@ -108,7 +108,7 @@ public:
static const int USER_RR = 5;
static const int USER_SR = 6;
static const int USER_UI = 7; // 4J Stu - This also makes it appear on the UI console
void HandleButtonPresses();
bool IntroRunning() { return m_bIntroRunning;}
void SetIntroRunning(bool bSet) {m_bIntroRunning=bSet;}
@@ -152,14 +152,14 @@ 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];}
void SetXuiServerAction(int iPad, eXuiServerAction action, LPVOID param = NULL) {m_eXuiServerAction[iPad]=action; m_eXuiServerActionParam[iPad] = param;}
eXuiServerAction GetGlobalXuiServerAction() {return m_eGlobalXuiServerAction;}
void SetGlobalXuiServerAction(eXuiServerAction action) {m_eGlobalXuiServerAction=action;}
DisconnectPacket::eDisconnectReason GetDisconnectReason() { return m_disconnectReason; }
void SetDisconnectReason(DisconnectPacket::eDisconnectReason bVal) { m_disconnectReason = bVal; }
@@ -224,7 +224,7 @@ public:
#endif
virtual void SetRichPresenceContext(int iPad, int contextId) = 0;
void SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucVal);
unsigned char GetGameSettings(int iPad,eGameSetting eVal);
unsigned char GetGameSettings(eGameSetting eVal); // for the primary pad
@@ -268,7 +268,7 @@ public:
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal);
void ActionDebugMask(int iPad, bool bSetAllClear=false);
//
//
bool IsLocalMultiplayerAvailable();
// for sign in change monitoring
@@ -343,7 +343,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();}
@@ -424,11 +424,11 @@ public:
byteArray getArchiveFile(const wstring &filename);
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);
@@ -456,7 +456,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
@@ -489,7 +489,7 @@ public:
// trial timer
void SetTrialTimerStart(void);
float getTrialTimer(void);
// notifications from the game for qnet
VNOTIFICATIONS *GetNotifications() {return &m_vNotifications;}
@@ -501,7 +501,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;
@@ -525,20 +525,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;
@@ -590,7 +590,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);
@@ -618,7 +618,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;
@@ -701,7 +701,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;
@@ -745,7 +745,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);
@@ -887,15 +887,15 @@ public:
#ifdef _XBOX
// bool m_bTransferSavesToXboxOne;
// unsigned int m_uiTransferSlotC;
#elif defined (__PS3__)
#elif defined _DURANGO
#elif defined _WINDOWS64
//CMinecraftAudio audio;
#else // PS4
#endif
#ifdef _XBOX_ONE
@@ -907,5 +907,5 @@ private:
#endif
};
//singleton
//singleton
//extern CMinecraftApp app;

View File

@@ -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);

View File

@@ -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 = max(destinationBox->x0, (double)chunk->x*16);
int xEnd = min(destinationBox->x1, (double)((xStart>>4)<<4) + 16);
@@ -281,7 +281,7 @@ __int64 ConsoleSchematicFile::applyBlocksAndData(LevelChunk *chunk, AABB *chunkB
// blockData[i] = Tile::whiteStone_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);
@@ -447,7 +447,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);
@@ -480,7 +480,7 @@ void ConsoleSchematicFile::applyTileEntities(LevelChunk *chunk, AABB *chunkBox,
for(AUTO_VAR(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;
@@ -500,7 +500,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);
@@ -513,7 +513,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);
@@ -561,7 +561,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;
@@ -615,7 +615,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;
@@ -624,7 +624,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;
@@ -718,7 +718,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
{
CompoundTag *eTag = new CompoundTag();
if( e->save(eTag) )
{
{
ListTag<DoubleTag> *pos = (ListTag<DoubleTag> *) eTag->getList(L"Pos");
pos->get(0)->data -= xStart;
@@ -726,7 +726,7 @@ void ConsoleSchematicFile::generateSchematicFile(DataOutputStream *dos, Level *l
pos->get(2)->data -= zStart;
if( e->GetType() == eTYPE_PAINTING || e->GetType() == eTYPE_ITEM_FRAME )
{
{
((IntTag *) eTag->get(L"TileX") )->data -= xStart;
((IntTag *) eTag->get(L"TileY") )->data -= yStart;
((IntTag *) eTag->get(L"TileZ") )->data -= zStart;
@@ -767,7 +767,7 @@ void ConsoleSchematicFile::getBlocksAndData(LevelChunk *chunk, byteArray *data,
// skyLightP += skyLightData.length;
// return;
//}
bool bHasLower, bHasUpper;
bHasLower = bHasUpper = false;
int lowerY0, lowerY1, upperY0, upperY1;

View File

@@ -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);

View File

@@ -14,7 +14,7 @@ public:
typedef struct _ValueType
{
union{
__int64 i64;
int64_t i64;
int i;
char c;
bool b;
@@ -44,7 +44,7 @@ public:
virtual ~GameRule();
Connection *getConnection() { return m_connection; }
ValueType getParameter(const wstring &parameterName);
void setParameter(const wstring &parameterName,ValueType value);
GameRuleDefinition *getGameRuleDefinition();

View File

@@ -77,7 +77,7 @@ WCHAR *GameRuleManager::wchAttrNameA[] =
L"spawnY", // eGameRuleAttr_spawnY
L"spawnZ", // eGameRuleAttr_spawnZ
L"orientation",
L"dimension",
L"dimension",
L"topTileId", // eGameRuleAttr_topTileId
L"biomeId", // eGameRuleAttr_biomeId
L"feature", // eGameRuleAttr_feature
@@ -114,7 +114,7 @@ void GameRuleManager::loadGameRules(DLCPack *pack)
readRuleFile(createdLevelGenerationOptions, dData, dSize, strings);
createdLevelGenerationOptions->setSrc( LevelGenerationOptions::eSrc_fromDLC );
//createdLevelGenerationOptions->setSrc( LevelGenerationOptions::eSrc_fromDLC );
dlcHeader->lgo = createdLevelGenerationOptions;
@@ -130,12 +130,12 @@ void GameRuleManager::loadGameRules(DLCPack *pack)
LevelGenerationOptions *createdLevelGenerationOptions = new LevelGenerationOptions();
// = loadGameRules(dData, dSize); //, strings);
createdLevelGenerationOptions->setGrSource( new JustGrSource() );
readRuleFile(createdLevelGenerationOptions, dData, dSize, strings);
createdLevelGenerationOptions->setSrc( LevelGenerationOptions::eSrc_tutorial );
//createdLevelGenerationOptions->set_DLCGameRulesFile( dlcFile );
createdLevelGenerationOptions->setLoadedData();
@@ -169,7 +169,7 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, byte *dIn, UINT
app.DebugPrintf("\tversion=%d.\n", version);
for (int i = 0; i < 8; i++) dis.readByte();
BYTE compression_type = dis.readByte();
app.DebugPrintf("\tcompressionType=%d.\n", compression_type);
@@ -179,11 +179,11 @@ void GameRuleManager::loadGameRules(LevelGenerationOptions *lgo, byte *dIn, UINT
decomp_len = dis.readInt();
app.DebugPrintf("\tcompr_len=%d.\n\tdecomp_len=%d.\n", compr_len, decomp_len);
// Decompress File Body
byteArray content(new BYTE[decomp_len], decomp_len),
byteArray content(new BYTE[decomp_len], decomp_len),
compr_content(new BYTE[compr_len], compr_len);
dis.read(compr_content);
@@ -256,7 +256,7 @@ void GameRuleManager::saveGameRules(byte **dOut, UINT *dSize)
// Initialise output stream.
ByteArrayOutputStream baos;
DataOutputStream dos(&baos);
// Write header.
// VERSION NUMBER
@@ -284,7 +284,7 @@ void GameRuleManager::saveGameRules(byte **dOut, UINT *dSize)
compr_dos.writeInt( 0 ); // XmlObjects.length
}
else
{
{
StringTable *st = m_currentGameRuleDefinitions->getStringTable();
if (st == NULL)
@@ -316,9 +316,9 @@ void GameRuleManager::saveGameRules(byte **dOut, UINT *dSize)
dos.writeInt( compr_ba.length ); // Write length
dos.writeInt( compr_baos.buf.length );
dos.write(compr_ba);
delete [] compr_ba.data;
compr_dos.close();
compr_baos.close();
// -- END COMPRESSED -- //
@@ -328,7 +328,7 @@ void GameRuleManager::saveGameRules(byte **dOut, UINT *dSize)
*dOut = baos.buf.data;
baos.buf.data = NULL;
dos.close(); baos.close();
}
@@ -383,7 +383,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
//DWORD dwLen = 0;
//PBYTE pbData = dlcFile->getData(dwLen);
//byteArray data(pbData,dwLen);
byteArray data(dIn, dSize);
ByteArrayInputStream bais(data);
DataInputStream dis(&bais);
@@ -391,7 +391,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)
{
@@ -502,7 +502,7 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
}
}*/
// subfile
// subfile
UINT numFiles = contentDis->readInt();
for (UINT i = 0; i < numFiles; i++)
{
@@ -570,10 +570,10 @@ bool GameRuleManager::readRuleFile(LevelGenerationOptions *lgo, byte *dIn, UINT
LevelGenerationOptions *GameRuleManager::readHeader(DLCGameRulesHeader *grh)
{
LevelGenerationOptions *out =
LevelGenerationOptions *out =
new LevelGenerationOptions();
out->setSrc(LevelGenerationOptions::eSrc_fromDLC);
out->setGrSource(grh);
addLevelGenerationOptions(out);
@@ -733,7 +733,7 @@ LPCWSTR GameRuleManager::GetGameRulesString(const wstring &key)
LEVEL_GEN_ID GameRuleManager::addLevelGenerationOptions(LevelGenerationOptions *lgo)
{
vector<LevelGenerationOptions *> *lgs = m_levelGenerators.getLevelGenerators();
for (int i = 0; i<lgs->size(); i++)
if (lgs->at(i) == lgo)
return i;
@@ -753,7 +753,7 @@ void GameRuleManager::unloadCurrentGameRules()
if (m_currentLevelGenerationOptions->isFromSave())
{
m_levelGenerators.removeLevelGenerator( m_currentLevelGenerationOptions );
delete m_currentLevelGenerationOptions;
}
else if (m_currentLevelGenerationOptions->isFromDLC())

View File

@@ -70,17 +70,17 @@ LevelGenerationOptions::~LevelGenerationOptions()
{
delete *it;
}
for(AUTO_VAR(it, m_biomeOverrides.begin()); it != m_biomeOverrides.end(); ++it)
{
delete *it;
}
for(AUTO_VAR(it, m_features.begin()); it != m_features.end(); ++it)
{
delete *it;
}
if (m_stringTable)
if (!isTutorial())
delete m_stringTable;
@@ -93,7 +93,7 @@ ConsoleGameRules::EGameRuleType LevelGenerationOptions::getActionType() { return
void LevelGenerationOptions::writeAttributes(DataOutputStream *dos, UINT numAttrs)
{
GameRuleDefinition::writeAttributes(dos, numAttrs + 5);
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_spawnX);
dos->writeUTF(_toString(m_spawnPos->x));
ConsoleGameRules::write(dos, ConsoleGameRules::eGameRuleAttr_spawnY);
@@ -110,12 +110,12 @@ void LevelGenerationOptions::writeAttributes(DataOutputStream *dos, UINT numAttr
void LevelGenerationOptions::getChildren(vector<GameRuleDefinition *> *children)
{
GameRuleDefinition::getChildren(children);
vector<ApplySchematicRuleDefinition *> used_schematics;
for (AUTO_VAR(it, m_schematicRules.begin()); it != m_schematicRules.end(); it++)
if ( !(*it)->isComplete() )
used_schematics.push_back( *it );
for(AUTO_VAR(it, m_structureRules.begin()); it!=m_structureRules.end(); it++)
children->push_back( *it );
for(AUTO_VAR(it, used_schematics.begin()); it!=used_schematics.end(); it++)
@@ -162,7 +162,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)
@@ -213,7 +213,7 @@ void LevelGenerationOptions::addAttribute(const wstring &attributeName, const ws
app.DebugPrintf("LevelGenerationOptions: Adding parameter displayName=%ls\n", getDisplayName());
}
else if(attributeName.compare(L"texturePackId") == 0)
{
{
setRequiredTexturePackId( _fromString<unsigned int>(attributeValue) );
setRequiresTexturePack( true );
app.DebugPrintf("LevelGenerationOptions: Adding parameter texturePackId=%0x\n", getRequiredTexturePackId());
@@ -290,14 +290,14 @@ bool LevelGenerationOptions::checkIntersects(int x0, int y0, int z0, int x1, int
for( AUTO_VAR(it, m_structureRules.begin()); it != m_structureRules.end(); it++ )
{
ConsoleGenerateStructure *structureStart = *it;
ConsoleGenerateStructure *structureStart = *it;
int minY = structureStart->getMinY();
if(minY < m_minY) m_minY = minY;
}
m_bHaveMinY = true;
}
// 4J Stu - We DO NOT intersect if our upper bound is below the lower bound for all schematics
if( y1 < m_minY ) return false;
@@ -313,7 +313,7 @@ bool LevelGenerationOptions::checkIntersects(int x0, int y0, int z0, int x1, int
{
for( AUTO_VAR(it, m_structureRules.begin()); it != m_structureRules.end(); it++ )
{
ConsoleGenerateStructure *structureStart = *it;
ConsoleGenerateStructure *structureStart = *it;
intersects = structureStart->checkIntersects(x0,y0,z0,x1,y1,z1);
if(intersects) break;
}
@@ -438,12 +438,12 @@ unordered_map<wstring, ConsoleSchematicFile *> *LevelGenerationOptions::getUnfin
usedFiles.insert( (*it)->getSchematicName() );
// Clean schematic files.
unordered_map<wstring, ConsoleSchematicFile *> *out
unordered_map<wstring, ConsoleSchematicFile *> *out
= new unordered_map<wstring, ConsoleSchematicFile *>();
for (AUTO_VAR(it, usedFiles.begin()); it!=usedFiles.end(); it++)
out->insert( pair<wstring, ConsoleSchematicFile *>(*it, getSchematicFile(*it)) );
return out;
return out;
}
void LevelGenerationOptions::reset_start()
@@ -505,7 +505,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; }
Pos *LevelGenerationOptions::getSpawnPos() { return m_spawnPos; }
bool LevelGenerationOptions::getuseFlatWorld() { return m_useFlatWorld; }

View File

@@ -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;
vector<ApplySchematicRuleDefinition *> m_schematicRules;
@@ -167,13 +167,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();
Pos *getSpawnPos();
bool getuseFlatWorld();
@@ -185,7 +185,7 @@ public:
private:
void clearSchematics();
public:
public:
ConsoleSchematicFile *loadSchematicFile(const wstring &filename, PBYTE pbData, DWORD dwLen);
public:
@@ -203,7 +203,7 @@ public:
LPCWSTR getString(const wstring &key);
unordered_map<wstring, ConsoleSchematicFile *> *getUnfinishedSchematicFiles();
// 4J-JEV:
// ApplySchematicRules contain limited state
// which needs to be reset BEFORE a new game starts.

View File

@@ -44,8 +44,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()
@@ -74,7 +74,7 @@ void CGameNetworkManager::Initialise()
#else
s_pPlatformNetworkManager = new CPlatformNetworkManagerStub();
#endif
s_pPlatformNetworkManager->Initialise( this, flagIndexSize );
s_pPlatformNetworkManager->Initialise( this, flagIndexSize );
m_bNetworkThreadRunning = false;
m_bInitialised = true;
}
@@ -104,7 +104,7 @@ void CGameNetworkManager::DoWork()
if((g_NetworkManager.GetLockedProfile()!=-1) && iPrimaryPlayer!=-1 && bConnected == false && g_NetworkManager.IsInSession() )
{
app.SetAction(iPrimaryPlayer,eAppAction_EthernetDisconnected);
}
}
}
break;
case XN_LIVE_INVITE_ACCEPTED:
@@ -161,12 +161,12 @@ bool CGameNetworkManager::_RunNetworkGame(LPVOID lpParameter)
success = s_pPlatformNetworkManager->_RunNetworkGame();
if(!success)
{
{
app.SetAction(ProfileManager.GetPrimaryPad(),eAppAction_ExitWorld,(void *)TRUE);
return true;
}
}
if( g_NetworkManager.IsLeavingGame() ) return false;
app.SetGameStarted(true);
@@ -188,12 +188,12 @@ 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;
seed = param->seed;
app.setLevelGenerationOptions(param->levelGen);
if(param->levelGen != NULL)
{
@@ -204,12 +204,12 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
}
else
{
param->seed = seed = app.getLevelGenerationOptions()->getLevelSeed();
param->seed = seed = app.getLevelGenerationOptions()->getLevelSeed();
}
}
}
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() )
{
@@ -227,7 +227,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
ServerReadyWait();
ServerReadyDestroy();
if( MinecraftServer::serverHalted() )
if( MinecraftServer::serverHalted() )
return false;
// printf("Server ready to go!\n");
@@ -238,7 +238,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
}
#ifndef _XBOX
Minecraft *pMinecraft = Minecraft::GetInstance();
Minecraft *pMinecraft = Minecraft::GetInstance();
// Make sure that we have transitioned through any joining/creating stages and are actually playing the game, so that we know the players should be valid
bool changedMessage = false;
while(!IsReadyToPlayOrIdle())
@@ -458,7 +458,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, LPVOID lpParame
return false;
}
if(g_NetworkManager.IsLeavingGame() || !IsInSession() )
{
for(AUTO_VAR(it, createdConnections.begin()); it < createdConnections.end(); ++it)
@@ -754,7 +754,7 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void *pParam,bool bContin
ProfileManager.SetPrimaryPad(iPad);
g_NetworkManager.SetLocalGame(false);
// If the player was signed in before selecting play, we'll not have read the profile yet, so query the sign-in status to get this to happen
ProfileManager.QuerySigninStatus();
@@ -770,7 +770,7 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void *pParam,bool bContin
pInviteInfo ); // pInviteInfo
if( !success )
{
app.DebugPrintf( "Failed joining game from invite\n" );
app.DebugPrintf( "Failed joining game from invite\n" );
}
}
}
@@ -816,7 +816,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
Compression::UseDefaultThreadStorage();
Tile::CreateNewThreadStorage();
IntCache::CreateNewThreadStorage();
g_NetworkManager.m_bNetworkThreadRunning = true;
bool success = g_NetworkManager._RunNetworkGame(lpParameter);
g_NetworkManager.m_bNetworkThreadRunning = false;
@@ -828,7 +828,7 @@ int CGameNetworkManager::RunNetworkGameThreadProc( void* lpParameter )
Sleep(1);
}
ui.CleanUpSkinReload();
if(app.GetDisconnectReason() == DisconnectPacket::eDisconnect_None)
if(app.GetDisconnectReason() == DisconnectPacket::eDisconnect_None)
{
app.SetDisconnectReason( DisconnectPacket::eDisconnect_ConnectionCreationFailed );
}
@@ -850,7 +850,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;
@@ -861,7 +861,7 @@ int CGameNetworkManager::ServerThreadProc( void* lpParameter )
SetThreadName(-1, "Minecraft Server thread");
AABB::CreateNewThreadStorage();
Vec3::CreateNewThreadStorage();
IntCache::CreateNewThreadStorage();
IntCache::CreateNewThreadStorage();
Compression::UseDefaultThreadStorage();
OldChunkStorage::UseDefaultThreadStorage();
Entity::useSmallIds();
@@ -869,7 +869,7 @@ int CGameNetworkManager::ServerThreadProc( void* lpParameter )
Tile::CreateNewThreadStorage();
MinecraftServer::main(seed, lpParameter); //saveData, app.GetGameHostOption(eGameHostOption_All));
Tile::ReleaseThreadStorage();
AABB::ReleaseThreadStorage();
Vec3::ReleaseThreadStorage();
@@ -926,7 +926,7 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc( void* lpParam )
// The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle this
int CGameNetworkManager::MustSignInReturned_0(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CGameNetworkManager::PSNSignInReturned_0, pParam,true);
@@ -986,7 +986,7 @@ int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, int i
// The pair of methods MustSignInReturned_1 & PSNSignInReturned_1 handle this
int CGameNetworkManager::MustSignInReturned_1(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
#ifdef __PS3__
SQRNetworkManager_PS3::AttemptPSNSignIn(&CGameNetworkManager::PSNSignInReturned_1, pParam,true);
@@ -1018,7 +1018,7 @@ int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, int i
#elif defined __ORBIS__
// TODO: No Orbis equivalent (should there be?)
#endif
}
}
@@ -1043,7 +1043,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
Vec3::UseDefaultThreadStorage();
Compression::UseDefaultThreadStorage();
Minecraft *pMinecraft = Minecraft::GetInstance();
Minecraft *pMinecraft = Minecraft::GetInstance();
MinecraftServer *pServer = MinecraftServer::getInstance();
#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
@@ -1082,7 +1082,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
pMinecraft->progressRenderer->progressStartNoAbort( g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT) );
pMinecraft->progressRenderer->progressStage( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME );
}
#else
pMinecraft->progressRenderer->progressStartNoAbort( g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT) );
pMinecraft->progressRenderer->progressStage( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME );
@@ -1096,7 +1096,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
// wait for the server to be in a non-ticking state
pServer->m_serverPausedEvent->WaitForSignal(INFINITE);
#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
// Swap these two messages around as one is too long to display at 480
pMinecraft->progressRenderer->progressStartNoAbort( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME );
@@ -1158,7 +1158,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
{
Sleep(1);
}
// Reset this flag as the we don't need to know that we only lost the room only from this point onwards, the behaviour is exactly the same
g_NetworkManager.m_bLastDisconnectWasLostRoomOnly = false;
g_NetworkManager.m_bFullSessionMessageOnNextSessionChange = false;
@@ -1189,7 +1189,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
{
Sleep(1);
}
// Restore the network player of all the server players that are local
if( pServer != NULL )
{
@@ -1218,7 +1218,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
}
}
}
pMinecraft->progressRenderer->progressStagePercentage(100);
#ifndef _XBOX
@@ -1240,7 +1240,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
#endif
// Start the game again
app.SetGameStarted(true);
app.SetGameStarted(true);
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetChangingSessionType(false);
app.SetReallyChangingSessionType(false);
@@ -1294,7 +1294,7 @@ void CGameNetworkManager::StateChange_AnyToJoining()
app.DebugPrintf("Disabling Guest Signin\n");
XEnableGuestSignin(FALSE);
Minecraft::GetInstance()->clearPendingClientTextureRequests();
ConnectionProgressParams *param = new ConnectionProgressParams();
param->iPad = ProfileManager.GetPrimaryPad();
param->stringId = -1;
@@ -1342,7 +1342,7 @@ void CGameNetworkManager::StateChange_AnyToStarting()
completionData->type = e_ProgressCompletion_CloseAllPlayersUIScenes;
completionData->iPad = ProfileManager.GetPrimaryPad();
loadingParams->completionData = completionData;
ui.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_FullscreenProgress, loadingParams);
}
}
@@ -1463,7 +1463,7 @@ void CGameNetworkManager::PlayerJoining( INetworkPlayer *pNetworkPlayer )
bool multiplayer = g_NetworkManager.GetPlayerCount() > 1, localgame = g_NetworkManager.IsLocalGame();
for (int iPad=0; iPad<XUSER_MAX_COUNT; ++iPad)
{
INetworkPlayer *pNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPad);
INetworkPlayer *pNetworkPlayer = g_NetworkManager.GetLocalPlayerByUserIndex(iPad);
if (pNetworkPlayer == NULL) continue;
app.SetRichPresenceContext(iPad,CONTEXT_GAME_STATE_BLANK);
@@ -1488,7 +1488,7 @@ void CGameNetworkManager::PlayerJoining( INetworkPlayer *pNetworkPlayer )
else
{
if( !pNetworkPlayer->IsHost() )
{
{
for(int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(Minecraft::GetInstance()->localplayers[idx] != NULL)
@@ -1544,7 +1544,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
}
// Need to check we're signed in to PSN
bool isSignedInLive = true;
bool isSignedInLive = true;
bool isLocalMultiplayerAvailable = app.IsLocalMultiplayerAvailable();
int iPadNotSignedInLive = -1;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; i++)
@@ -1584,7 +1584,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
else
{
{
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -1601,10 +1601,10 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
{
m_pInviteInfo = (INVITE_INFO *) pInviteInfo;
m_iPlayerInvited = userIndex;
m_pUpsell = new PsPlusUpsellWrapper(index);
m_pUpsell->displayUpsell();
return;
}
}
@@ -1612,7 +1612,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
#ifdef __PSVITA__
// Need to check we're signed in to PSN
bool isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
bool isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
if (!isSignedInLive)
{
// Determine why they're not "signed in live"
@@ -1625,7 +1625,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
// ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL, app.GetStringTable());
// }
// else
{
{
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
@@ -1648,9 +1648,9 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
// 4J-PB we shouldn't bring any inactive players into the game, except for the invited player (who may be an inactive player)
// 4J Stu - If we are not in a game, then bring in all players signed in
if(index==userIndex || pMinecraft->localplayers[index]!=NULL )
{
{
++joiningUsers;
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
localUsersMask |= GetLocalPlayerMask( index );
}
}
@@ -1667,7 +1667,7 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
#endif
#if defined(_XBOX) || defined(__PS3__)
if(joiningUsers > 1 && !RenderManager.IsHiDef() && userIndex != ProfileManager.GetPrimaryPad())
{
@@ -1716,9 +1716,9 @@ void CGameNetworkManager::GameInviteReceived( int userIndex, const INVITE_INFO *
}
#endif
if( !g_NetworkManager.IsInSession() )
{
{
#ifndef __PS3__
HandleInviteWhenInMenus(userIndex, pInviteInfo);
HandleInviteWhenInMenus(userIndex, pInviteInfo);
#else
// PS3 is more complicated here - we need to make sure that the player is online. If they are then we can do the same as the xbox, if not we need to try and get them online and then, if they do sign in, go down the same path
if(ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()))
@@ -1771,7 +1771,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus( int userIndex, const INVITE_I
if(!ProfileManager.IsFullVersion())
{
// The marketplace will fail with the primary player set to -1
ProfileManager.SetPrimaryPad(userIndex);
ProfileManager.SetPrimaryPad(userIndex);
app.SetAction(userIndex,eAppAction_DashboardTrialJoinFromInvite);
}
@@ -1809,7 +1809,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus( int userIndex, const INVITE_I
ProfileManager.QuerySigninStatus();
// 4J-PB - clear any previous connection errors
Minecraft::GetInstance()->clearConnectionFailed();
Minecraft::GetInstance()->clearConnectionFailed();
g_NetworkManager.SetLocalGame(false);
@@ -1819,7 +1819,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus( int userIndex, const INVITE_I
bool success = g_NetworkManager.JoinGameFromInviteInfo( userIndex, localUsersMask, pInviteInfo );
if( !success )
{
app.DebugPrintf( "Failed joining game from invite\n" );
app.DebugPrintf( "Failed joining game from invite\n" );
}
}
}

View File

@@ -99,11 +99,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);
@@ -112,13 +112,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);
@@ -129,7 +129,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);
@@ -144,8 +144,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__
@@ -163,9 +163,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

View File

@@ -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);
// }
@@ -161,17 +161,17 @@ ESavePlatform SonyRemoteStorage::getSavePlatform()
}
__int64 SonyRemoteStorage::getSaveSeed()
int64_t SonyRemoteStorage::getSaveSeed()
{
if(m_getInfoStatus != e_infoFound)
return 0;
DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription;
char seedString[17];
ZeroMemory(seedString,17);
ZeroMemory(seedString,17);
memcpy(seedString, pDescData->m_seed,16);
__uint64 seed = 0;
uint64_t seed = 0;
std::stringstream ss;
ss << seedString;
ss >> std::hex >> seed;
@@ -185,7 +185,7 @@ unsigned int SonyRemoteStorage::getSaveHostOptions()
DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription;
char optionsString[9];
ZeroMemory(optionsString,9);
ZeroMemory(optionsString,9);
memcpy(optionsString, pDescData->m_hostOptions,8);
unsigned int uiHostOptions = 0;
@@ -202,7 +202,7 @@ unsigned int SonyRemoteStorage::getSaveTexturePack()
DescriptionData* pDescData = (DescriptionData*)m_remoteFileInfo->fileDescription;
char textureString[9];
ZeroMemory(textureString,9);
ZeroMemory(textureString,9);
memcpy(textureString, pDescData->m_texturePack,8);
unsigned int uiTexturePack = 0;
@@ -219,9 +219,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;
}
@@ -284,9 +284,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
@@ -294,7 +294,7 @@ bool SonyRemoteStorage::saveIsAvailable()
int SonyRemoteStorage::getDataProgress()
{
__int64 time = System::currentTimeMillis();
int64_t time = System::currentTimeMillis();
int elapsedSecs = (time - m_startTime) / 1000;
int progVal = m_dataProgress + (elapsedSecs/3);
if(progVal > 95)
@@ -310,15 +310,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;

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "..\..\Common\Network\Sony\sceRemoteStorage\header\sceRemoteStorage.h"
@@ -42,7 +42,7 @@ public:
SceRemoteStorageData* m_remoteFileInfo;
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];
@@ -72,7 +72,7 @@ public:
const char* getLocalFilename();
const char* getSaveNameUTF8();
ESavePlatform getSavePlatform();
__int64 getSaveSeed();
int64_t getSaveSeed();
unsigned int getSaveHostOptions();
unsigned int getSaveTexturePack();
@@ -97,7 +97,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();
@@ -111,7 +111,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;

View File

@@ -41,7 +41,7 @@ bool Tutorial::PopupMessageDetails::isSameContent(PopupMessageDetails *other)
void Tutorial::staticCtor()
{
//
//
/*
*****
*****
@@ -72,7 +72,7 @@ void Tutorial::staticCtor()
s_completableTasks.push_back( e_Tutorial_State_Enchanting );
s_completableTasks.push_back( e_Tutorial_Hint_Hold_To_Mine );
s_completableTasks.push_back( e_Tutorial_Hint_Tool_Damaged );
s_completableTasks.push_back( e_Tutorial_Hint_Tool_Damaged );
s_completableTasks.push_back( e_Tutorial_Hint_Swim_Up );
s_completableTasks.push_back( e_Tutorial_Hint_Unused_2 );
@@ -164,7 +164,7 @@ void Tutorial::staticCtor()
s_completableTasks.push_back( e_Tutorial_Hint_Thin_Glass );
s_completableTasks.push_back( e_Tutorial_Hint_Melon );
s_completableTasks.push_back( e_Tutorial_Hint_Vine );
s_completableTasks.push_back( e_Tutorial_Hint_Fence_Gate );
s_completableTasks.push_back( e_Tutorial_Hint_Fence_Gate );
s_completableTasks.push_back( e_Tutorial_Hint_Mycel );
s_completableTasks.push_back( e_Tutorial_Hint_Water_Lily );
s_completableTasks.push_back( e_Tutorial_Hint_Nether_Brick );
@@ -448,7 +448,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
if(!isHintCompleted(e_Tutorial_Hint_Detector_Rail)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Detector_Rail, this, detectorRailItems, 1 ) );
int tallGrassItems[] = {Tile::tallgrass_Id};
if(!isHintCompleted(e_Tutorial_Hint_Tall_Grass))
if(!isHintCompleted(e_Tutorial_Hint_Tall_Grass))
{
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Tall_Grass, this, tallGrassItems, 1, -1, TallGrass::DEAD_SHRUB ) );
addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Tall_Grass, this, tallGrassItems, 1, -1, TallGrass::TALL_GRASS ) );
@@ -731,7 +731,7 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad( iPad )
int potatoItems[] = {Tile::potatoes_Id};
if(!isHintCompleted(e_Tutorial_Hint_Potato)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Potato, this, potatoItems, 1, -1, -1, 7 ) );
int carrotItems[] = {Tile::carrots_Id};
if(!isHintCompleted(e_Tutorial_Hint_Carrot)) addHint(e_Tutorial_State_Gameplay, new LookAtTileHint(e_Tutorial_Hint_Carrot, this, carrotItems, 1, -1, -1, 7 ) );
@@ -1208,7 +1208,7 @@ void Tutorial::tick()
}
else if(m_freezeTime && m_timeFrozen && m_fullTutorialComplete)
{
__int64 currentTime = pMinecraft->level->getTime();
int64_t currentTime = pMinecraft->level->getTime();
int currentDayTime = (currentTime % Level::TICKS_PER_DAY);
int timeToAdd = 0;
if(currentDayTime > m_iTutorialFreezeTimeValue)
@@ -1219,7 +1219,7 @@ void Tutorial::tick()
{
timeToAdd = m_iTutorialFreezeTimeValue - currentDayTime;
}
__int64 targetTime = currentTime + timeToAdd;
int64_t targetTime = currentTime + timeToAdd;
MinecraftServer::SetTimeOfDay(-1);
MinecraftServer::SetTime(targetTime);
pMinecraft->level->setOverrideTimeOfDay(-1);
@@ -1228,7 +1228,7 @@ void Tutorial::tick()
}
if(!m_allowShow)
{
{
if( currentTask[m_CurrentState] != NULL && (!currentTask[m_CurrentState]->AllowFade() || (lastMessageTime + m_iTutorialDisplayMessageTime ) > GetTickCount() ) )
{
uiTempDisabled = true;
@@ -1264,7 +1264,7 @@ void Tutorial::tick()
app.TutorialSceneNavigateBack(m_iPad);
m_bSceneIsSplitscreen=app.GetLocalPlayerCount()>1;
if(m_bSceneIsSplitscreen)
{
{
app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup,(void *)this, false, false, &m_hTutorialScene);
}
else
@@ -1359,7 +1359,7 @@ void Tutorial::tick()
{
isCurrentTask = false;
if(
( !task->ShowMinimumTime() || ( task->hasBeenActivated() && (lastMessageTime + m_iTutorialMinimumDisplayMessageTime ) < GetTickCount() ) )
( !task->ShowMinimumTime() || ( task->hasBeenActivated() && (lastMessageTime + m_iTutorialMinimumDisplayMessageTime ) < GetTickCount() ) )
&& task->isCompleted()
)
{
@@ -1503,7 +1503,7 @@ void Tutorial::tick()
message->m_promptId = currentTask[m_CurrentState]->getPromptId();
message->m_allowFade = currentTask[m_CurrentState]->AllowFade();
setMessage( message );
currentTask[m_CurrentState]->TaskReminders()? m_iTaskReminders = 1 : m_iTaskReminders = 0;
currentTask[m_CurrentState]->TaskReminders()? m_iTaskReminders = 1 : m_iTaskReminders = 0;
}
else
{
@@ -1636,7 +1636,7 @@ bool Tutorial::setMessage(TutorialHint *hint, PopupMessageDetails *message)
bool messageShown = false;
DWORD time = GetTickCount();
if(message != NULL && (message->m_forceDisplay || hintsOn) &&
(!message->m_delay ||
(!message->m_delay ||
(
(m_hintDisplayed && (time - m_lastHintDisplayedTime) > m_iTutorialHintDelayTime ) ||
(!m_hintDisplayed && (time - lastMessageTime) > m_iTutorialMinimumDisplayMessageTime )
@@ -1648,7 +1648,7 @@ bool Tutorial::setMessage(TutorialHint *hint, PopupMessageDetails *message)
if(messageShown)
{
m_lastHintDisplayedTime = time;
m_lastHintDisplayedTime = time;
m_hintDisplayed = true;
if(hint!=NULL) setHintCompleted( hint );
}
@@ -1672,7 +1672,7 @@ void Tutorial::showTutorialPopup(bool show)
m_allowShow = show;
if(!show)
{
{
if( currentTask[m_CurrentState] != NULL && (!currentTask[m_CurrentState]->AllowFade() || (lastMessageTime + m_iTutorialDisplayMessageTime ) > GetTickCount() ) )
{
uiTempDisabled = true;
@@ -2099,7 +2099,7 @@ void Tutorial::changeTutorialState(eTutorial_State newState, UIScene *scene /*=
// The action that caused the change of state may also have completed the current task
if( currentTask[m_CurrentState] != NULL && currentTask[m_CurrentState]->isCompleted() )
{
activeTasks[m_CurrentState].erase( find( activeTasks[m_CurrentState].begin(), activeTasks[m_CurrentState].end(), currentTask[m_CurrentState]) );
activeTasks[m_CurrentState].erase( find( activeTasks[m_CurrentState].begin(), activeTasks[m_CurrentState].end(), currentTask[m_CurrentState]) );
if( activeTasks[m_CurrentState].size() > 0 )
{

View File

@@ -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

View File

@@ -24,7 +24,7 @@ bool UIControl_SpaceIndicatorBar::setupControl(UIScene *scene, IggyValuePath *pa
return success;
}
void UIControl_SpaceIndicatorBar::init(const wstring &label, int id, __int64 min, __int64 max)
void UIControl_SpaceIndicatorBar::init(const wstring &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);

View File

@@ -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(const wstring &label, int id, __int64 min, __int64 max);
void init(const wstring &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);
};

View File

@@ -124,7 +124,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 )
{
@@ -272,7 +272,7 @@ void UIController::postInit()
IggySetTextureSubstitutionCallbacks ( &UIController::TextureSubstitutionCreateCallback , &UIController::TextureSubstitutionDestroyCallback, this );
SetupFont();
//
//
loadSkins();
for(unsigned int i = 0; i < eUIGroup_COUNT; ++i)
@@ -402,7 +402,7 @@ void UIController::tick()
EnderDragonRenderer::bossInstance = nullptr;
// Clear out the cached movie file data
__int64 currentTime = System::currentTimeMillis();
int64_t currentTime = System::currentTimeMillis();
for(AUTO_VAR(it, m_cachedMovieData.begin()); it != m_cachedMovieData.end();)
{
if(it->second.m_expiry < currentTime)
@@ -522,7 +522,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 ,
"" ,
@@ -632,7 +632,7 @@ void UIController::CleanUpSkinReload()
{
if(!Minecraft::GetInstance()->skins->getSelected()->hasAudio())
{
#ifdef _DURANGO
#ifdef _DURANGO
DWORD result = StorageManager.UnmountInstalledDLC(L"TPACK");
#else
DWORD result = StorageManager.UnmountInstalledDLC("TPACK");
@@ -653,7 +653,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_VAR(it,m_cachedMovieData.find(filename));
if(it == m_cachedMovieData.end() )
{
@@ -699,7 +699,7 @@ void UIController::handleInput()
{
#ifdef _DURANGO
// 4J-JEV: Added exception for primary play who migh've uttered speech commands.
if(iPad != ProfileManager.GetPrimaryPad()
if(iPad != ProfileManager.GetPrimaryPad()
&& (!InputManager.IsPadConnected(iPad) || !InputManager.IsPadLocked(iPad)) ) continue;
#endif
for(unsigned int key = 0; key <= ACTION_MAX_MENU; ++key)
@@ -775,7 +775,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
{
// no active touch? clear active and highlighted touch UI elements
m_ActiveUIElement = NULL;
m_HighlightedUIElement = NULL;
m_HighlightedUIElement = NULL;
// fullscreen first
UIScene *pScene=m_groups[(int)eUIGroup_Fullscreen]->getCurrentScene();
@@ -825,7 +825,7 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
}
}
}
}
}
else if(m_bTouchscreenPressed && pTouchData->reportNum==1)
{
// fullscreen first
@@ -1006,8 +1006,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)
@@ -1016,8 +1016,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)
{
@@ -1045,8 +1045,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
app.DebugPrintf(app.USER_SR, "Total static: %d , Total dynamic: %d\n", totalStatic, totalDynamic);
app.DebugPrintf(app.USER_SR, "\n\nEND TOTAL SWF MEMORY USAGE\n");
app.DebugPrintf(app.USER_SR, "********************************\n\n");
}
else
}
else
#endif
#endif
#endif
@@ -1243,7 +1243,7 @@ void UIController::setupCustomDrawGameState()
glLoadIdentity();
glOrtho(0, m_fScreenWidth, m_fScreenHeight, 0, 1000, 3000);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_ALPHA_TEST);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.1f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
@@ -1343,10 +1343,10 @@ void RADLINK UIController::CustomDrawCallback(void *user_callback_data, Iggy *pl
//Description
//Callback to create a user-defined texture to replace SWF-defined textures.
//Parameters
//width - Input value: optional number of pixels wide specified from AS3, or -1 if not defined. Output value: the number of pixels wide to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//height - Input value: optional number of pixels high specified from AS3, or -1 if not defined. Output value: the number of pixels high to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//destroy_callback_data - Optional additional output value you can set; the value will be passed along to the corresponding Iggy_TextureSubstitutionDestroyCallback (e.g. you can store the pointer to your own internal structure here).
//return - A platform-independent wrapped texture handle provided by GDraw, or NULL (NULL with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
//width - Input value: optional number of pixels wide specified from AS3, or -1 if not defined. Output value: the number of pixels wide to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//height - Input value: optional number of pixels high specified from AS3, or -1 if not defined. Output value: the number of pixels high to pretend to Iggy that the bitmap is. SWF and AS3 scales bitmaps based on their pixel dimensions, so you can use this to substitute a texture that is higher or lower resolution that ActionScript thinks it is.
//destroy_callback_data - Optional additional output value you can set; the value will be passed along to the corresponding Iggy_TextureSubstitutionDestroyCallback (e.g. you can store the pointer to your own internal structure here).
//return - A platform-independent wrapped texture handle provided by GDraw, or NULL (NULL with throw an ActionScript 3 ArgumentError that the Flash developer can catch) Use by calling IggySetTextureSubstitutionCallbacks.
//
//Discussion
//
@@ -1551,7 +1551,7 @@ bool UIController::NavigateBack(int iPad, bool forceUsePad, EUIScene eScene, EUI
void UIController::NavigateToHomeMenu()
{
ui.CloseAllPlayersScenes();
// Alert the app the we no longer want to be informed of ethernet connections
app.SetLiveLinkRequired( false );
@@ -1714,7 +1714,7 @@ void UIController::CloseUIScenes(int iPad, bool forceIPad)
m_groups[(int)group]->closeAllScenes();
m_groups[(int)group]->getTooltips()->SetTooltips(-1);
// This should cause the popup to dissappear
TutorialPopupInfo popupInfo;
if(m_groups[(int)group]->getTutorialPopup()) m_groups[(int)group]->getTutorialPopup()->SetTutorialDescription(&popupInfo);
@@ -1865,7 +1865,7 @@ void UIController::SetMenuDisplayed(int iPad,bool bVal)
#ifdef _DURANGO
// 4J-JEV: When in-game, allow player to toggle the 'Pause' and 'IngameInfo' menus via Kinnect.
if (Minecraft::GetInstance()->running)
if (Minecraft::GetInstance()->running)
InputManager.SetEnabledGtcButtons(_360_GTC_MENU | _360_GTC_PAUSE | _360_GTC_VIEW);
#endif
}
@@ -2280,7 +2280,7 @@ void UIController::SetTrialTimerLimitSecs(unsigned int uiSeconds)
void UIController::UpdateTrialTimer(unsigned int iPad)
{
WCHAR wcTime[20];
WCHAR wcTime[20];
DWORD dwTimeTicks=(DWORD)app.getTrialTimer();
@@ -2342,7 +2342,7 @@ void UIController::ShowAutosaveCountdownTimer(bool show)
void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
{
#if !(defined(_XBOX_ONE) || defined(__ORBIS__))
WCHAR wcAutosaveCountdown[100];
WCHAR wcAutosaveCountdown[100];
swprintf( wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN),uiSeconds);
if(m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()) m_groups[(int)eUIGroup_Fullscreen]->getPressStartToPlay()->setTrialTimer(wcAutosaveCountdown);
#endif
@@ -2507,7 +2507,7 @@ C4JStorage::EMessageResult UIController::RequestUGCMessageBox(UINT title/* = -1
#ifdef __ORBIS__
// Show the vague UGC system message in addition to our message
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad );
return C4JStorage::EMessage_ResultAccept;
return C4JStorage::EMessage_ResultAccept;
#elif defined(__PSVITA__)
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, iPad );
UINT uiIDA[1];
@@ -2544,7 +2544,7 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox(UINT
#ifdef __ORBIS__
// Show the vague UGC system message in addition to our message
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad );
return C4JStorage::EMessage_ResultAccept;
return C4JStorage::EMessage_ResultAccept;
#elif defined(__PSVITA__)
ProfileManager.ShowSystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_AGE_RESTRICTION, iPad );
return C4JStorage::EMessage_ResultAccept;
@@ -2584,7 +2584,7 @@ void UIController::setFontCachingCalculationBuffer(int length)
}
}
// 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 *UIController::FindScene(EUIScene sceneType)
{
UIScene *pScene = NULL;
@@ -2723,7 +2723,7 @@ void UIController::TouchBoxesClear(UIScene *pUIScene)
for (AUTO_VAR(it, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].begin()); it != itEnd; it++)
{
UIELEMENT *element=(UIELEMENT *)*it;
delete element;
delete element;
}
m_TouchBoxes[eUIGroup][eUILayer][eUIscene].clear();
}
@@ -2759,7 +2759,7 @@ bool UIController::TouchBoxHit(UIScene *pUIScene,S32 x, S32 y)
return true;
}
}
}
}
}
//app.DebugPrintf("MISS at x = %i y = %i\n", (int)x, (int)y);

View File

@@ -15,7 +15,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;
@@ -29,7 +29,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;
@@ -45,7 +45,7 @@ private:
// 4J-PB - ui element type for PSVita touch control
#ifdef __PSVITA__
typedef struct
typedef struct
{
UIControl *pControl;
S32 x1,y1,x2,y2;
@@ -110,7 +110,7 @@ private:
C4JRender::eViewportType m_currentRenderViewport;
bool m_bCustomRenderPosition;
static DWORD m_dwTrialTimerLimitSecs;
unordered_map<wstring, byteArray> m_substitutionTextures;
@@ -118,7 +118,7 @@ private:
typedef struct _CachedMovieData
{
byteArray m_ba;
__int64 m_expiry;
int64_t m_expiry;
} CachedMovieData;
unordered_map<wstring, CachedMovieData> m_cachedMovieData;
@@ -179,7 +179,7 @@ protected:
void postInit();
public:
public:
CRITICAL_SECTION m_Allocatorlock;
void SetupFont();
public:
@@ -208,7 +208,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 );
@@ -278,7 +278,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);

View File

@@ -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)
@@ -379,16 +379,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);
@@ -402,7 +402,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;

View File

@@ -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;
@@ -90,7 +90,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();
};

View File

@@ -38,7 +38,7 @@ void UILayer::tick()
m_scenesToDelete.push_back(scene);
}
}
while (!m_scenesToDestroy.empty())
{
UIScene *scene = m_scenesToDestroy.back();
@@ -46,13 +46,13 @@ void UILayer::tick()
scene->destroyMovie();
}
m_scenesToDestroy.clear();
for(AUTO_VAR(it,m_components.begin()); it != m_components.end(); ++it)
{
(*it)->tick();
}
// Note: reverse iterator, the last element is the top of the stack
int sceneIndex = m_sceneStack.size() - 1;
int sceneIndex = m_sceneStack.size() - 1;
//for(AUTO_VAR(it,m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it)
while( sceneIndex >= 0 && sceneIndex < m_sceneStack.size() )
{
@@ -422,9 +422,9 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
}
m_sceneStack.push_back(newScene);
updateFocusState();
newScene->tick();
return true;
@@ -706,12 +706,12 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
// 4J-PB - this should just be true
m_bMenuDisplayed=true;
EUIScene sceneType = scene->getSceneType();
switch(sceneType)
{
case eUIScene_PauseMenu:
m_bPauseMenuDisplayed = true;
m_bPauseMenuDisplayed = true;
break;
case eUIScene_Crafting2x2Menu:
case eUIScene_Crafting3x3Menu:
@@ -727,7 +727,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
// Intentional fall-through
case eUIScene_DeathMenu:
case eUIScene_FullscreenProgress:
case eUIScene_FullscreenProgress:
case eUIScene_SignEntryMenu:
case eUIScene_EndPoem:
m_bIgnoreAutosaveMenuDisplayed = true;
@@ -736,7 +736,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */)
switch(sceneType)
{
case eUIScene_FullscreenProgress:
case eUIScene_FullscreenProgress:
case eUIScene_EndPoem:
case eUIScene_Credits:
case eUIScene_LeaderboardsMenu:
@@ -775,8 +775,8 @@ void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
UIScene *scene = *it;
if(scene->hasFocus(iPad) && scene->canHandleInput())
{
// 4J-PB - ignore repeats of action ABXY buttons
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
// 4J-PB - ignore repeats of action ABXY buttons
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
// 4J Stu - Changed this slightly to add the allowRepeat function so we can allow repeats in the crafting menu
if(repeat && !scene->allowRepeat(key) )
{
@@ -784,8 +784,8 @@ void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed, bool rel
}
scene->handleInput(iPad, key, repeat, pressed, released, handled);
}
// Fix for PS3 #444 - [IN GAME] If the user keeps pressing CROSS while on the 'Save Game' screen the title will crash.
// Fix for PS3 #444 - [IN GAME] If the user keeps pressing CROSS while on the 'Save Game' screen the title will crash.
handled = handled || scene->hidesLowerScenes();
if(handled ) break;
}
@@ -842,10 +842,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_VAR(it,m_components.begin()); it != m_components.end(); ++it)
{
(*it)->PrintTotalMemoryUsage(layerStatic, layerDynamic);
@@ -859,7 +859,7 @@ void UILayer::PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic)
totalDynamic += layerDynamic;
}
// 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 *UILayer::FindScene(EUIScene sceneType)
{
for (int i = 0; i < m_sceneStack.size(); i++)

View File

@@ -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:
@@ -85,7 +85,7 @@ public:
#endif
void handleUnlockFullVersion();
UIScene *FindScene(EUIScene sceneType);
void PrintTotalMemoryUsage(__int64 &totalStatic, __int64 &totalDynamic);
void PrintTotalMemoryUsage(int64_t &totalStatic, int64_t &totalDynamic);
};

View File

@@ -13,7 +13,7 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
m_iPad = iPad;
swf = NULL;
m_pItemRenderer = NULL;
bHasFocus = false;
m_hasTickedOnce = false;
m_bFocussedOnce = false;
@@ -27,7 +27,7 @@ UIScene::UIScene(int iPad, UILayer *parentLayer)
m_bUpdateOpacity = false;
m_backScene = NULL;
m_cacheSlotRenders = false;
m_needsCacheRendered = true;
m_expectedCachedSlotCount = 0;
@@ -94,7 +94,7 @@ void UIScene::reloadMovie(bool force)
}
handleReload();
IggyDataValue result;
IggyDataValue value[1];
@@ -328,11 +328,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;
IggyPlayerInitializeAndTickRS ( swf );
__int64 afterTick = ui.iggyAllocCount;
int64_t afterLoad = ui.iggyAllocCount;
IggyPlayerInitializeAndTickRS ( swf );
int64_t afterTick = ui.iggyAllocCount;
if(!swf)
{
@@ -343,7 +343,7 @@ void UIScene::loadMovie()
app.FatalLoadError();
}
app.DebugPrintf( app.USER_SR, "Loaded iggy movie %ls\n", moviePath.c_str() );
IggyProperties *properties = IggyPlayerProperties ( swf );
IggyProperties *properties = IggyPlayerProperties ( swf );
m_movieHeight = properties->movie_height_in_pixels;
m_movieWidth = properties->movie_width_in_pixels;
@@ -351,7 +351,7 @@ void UIScene::loadMovie()
m_renderHeight = m_movieHeight;
S32 width, height;
m_parentLayer->getRenderDimensions(width, height);
m_parentLayer->getRenderDimensions(width, height);
IggyPlayerSetDisplaySize( swf, width, height );
IggyPlayerSetUserdata(swf,this);
@@ -361,8 +361,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 ,
@@ -372,7 +372,7 @@ void UIScene::loadMovie()
{
totalStatic += memoryInfo.static_allocation_bytes;
totalDynamic += memoryInfo.dynamic_allocation_bytes;
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory,
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory,
memoryInfo.static_allocation_bytes, memoryInfo.static_allocation_count, memoryInfo.dynamic_allocation_bytes, memoryInfo.dynamic_allocation_count);
++iteration;
//if(memoryInfo.static_allocation_bytes > 0) getDebugMemoryUseRecursive(moviePath, memoryInfo);
@@ -398,22 +398,22 @@ void UIScene::getDebugMemoryUseRecursive(const wstring &moviePath, IggyMemoryUse
internalIteration ,
&internalMemoryInfo ))
{
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), internalMemoryInfo.subcategory_stringlen, internalMemoryInfo.subcategory,
internalMemoryInfo.static_allocation_bytes, internalMemoryInfo.static_allocation_count, internalMemoryInfo.dynamic_allocation_bytes, internalMemoryInfo.dynamic_allocation_count);
++internalIteration;
if(internalMemoryInfo.subcategory_stringlen > memoryInfo.subcategory_stringlen) getDebugMemoryUseRecursive(moviePath, internalMemoryInfo);
}
}
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 ,
"" ,
@@ -483,7 +483,7 @@ void UIScene::tickTimers()
{
it = m_timers.erase(it);
}
else
else
{
if(currentTime > it->second.targetTime)
{
@@ -634,7 +634,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
if(useCommandBuffers) RenderManager.CBuffStart(list, true);
#endif
PIXBeginNamedEvent(0,"Draw uncached");
ui.setupCustomDrawMatrices(this, customDrawRegion);
ui.setupCustomDrawMatrices(this, customDrawRegion);
_customDrawSlotControl(customDrawRegion, iPad, item, fAlpha, isFoil, bDecorations, useCommandBuffers);
delete customDrawRegion;
PIXEndNamedEvent();
@@ -644,7 +644,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
for(AUTO_VAR(it, m_cachedSlotDraw.begin()); it != m_cachedSlotDraw.end(); ++it)
{
CachedSlotDrawData *drawData = *it;
ui.setupCustomDrawMatrices(this, drawData->customDrawRegion);
ui.setupCustomDrawMatrices(this, drawData->customDrawRegion);
_customDrawSlotControl(drawData->customDrawRegion, iPad, drawData->item, drawData->fAlpha, drawData->isFoil, drawData->bDecorations, useCommandBuffers);
delete drawData->customDrawRegion;
delete drawData;
@@ -698,7 +698,7 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion *region, int iP
// Finish GDraw and anything else that needs to be finalised
ui.endCustomDraw(region);
}
}
}
}
void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_ptr<ItemInstance> item, float fAlpha, bool isFoil, bool bDecorations, bool usingCommandBuffer)
@@ -716,7 +716,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
// we might want separate x & y scales here
float scaleX = bwidth / 16.0f;
float scaleY = bheight / 16.0f;
float scaleY = bheight / 16.0f;
glEnable(GL_RESCALE_NORMAL);
glPushMatrix();
@@ -751,8 +751,8 @@ void UIScene::_customDrawSlotControl(CustomDrawData *region, int iPad, shared_pt
if(bDecorations)
{
if((scaleX!=1.0f) ||(scaleY!=1.0f))
{
glPushMatrix();
{
glPushMatrix();
glScalef(scaleX, scaleY, 1.0f);
int iX= (int)(0.5f+((float)x)/scaleX);
int iY= (int)(0.5f+((float)y)/scaleY);
@@ -975,8 +975,8 @@ int UIScene::convertGameActionToIggyKeycode(int action)
bool UIScene::allowRepeat(int key)
{
// 4J-PB - ignore repeats of action ABXY buttons
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
// 4J-PB - ignore repeats of action ABXY buttons
// fix for PS3 213 - [MAIN MENU] Holding down buttons will continue to activate every prompt.
switch(key)
{
case ACTION_MENU_OK:

View File

@@ -40,7 +40,7 @@ class UILayer;
class UIScene
{
friend class UILayer;
public:
public:
IggyValuePath *m_rootPath;
private:
@@ -80,7 +80,7 @@ public:
protected:
ESceneResolution m_loadedResolution;
bool m_bIsReloading;
bool m_bFocussedOnce;
@@ -96,7 +96,7 @@ protected:
public:
virtual Iggy *getMovie() { return swf; }
void destroyMovie();
virtual void reloadMovie(bool force = false);
virtual bool needsReloaded();
@@ -127,7 +127,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);
@@ -140,7 +140,7 @@ public:
IggyName registerFastName(const wstring &name);
#ifdef __PSVITA__
void SetFocusToElement(int iID);
void SetFocusToElement(int iID);
void UpdateSceneControls();
#endif
protected:
@@ -160,7 +160,7 @@ public:
void gainFocus();
void loseFocus();
virtual void updateTooltips();
virtual void updateComponents() {}
virtual void handleGainFocus(bool navBack);
@@ -188,7 +188,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;
@@ -260,7 +260,7 @@ public:
protected:
#ifdef _DURANGO
#ifdef _DURANGO
virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; }
#endif

View File

@@ -61,11 +61,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;
@@ -85,7 +85,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 ))
@@ -118,9 +118,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;
}
}
}
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
if(getSceneResolution() == eSceneResolution_1080)
{
@@ -339,7 +339,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();
@@ -374,7 +374,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.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
#endif
@@ -385,7 +385,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);
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
if(getSceneResolution() == eSceneResolution_1080)
{
@@ -557,7 +557,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();
@@ -609,7 +609,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 2, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
#endif
#if defined _XBOX_ONE || defined __ORBIS__
@@ -636,7 +636,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;
}
@@ -683,7 +683,7 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id)
m_MoreOptionsParams.bInviteOnly = FALSE;
m_MoreOptionsParams.bAllowFriendsOfFriends = FALSE;
}
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
if(getSceneResolution() == eSceneResolution_1080)
{
@@ -721,7 +721,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]);
@@ -803,7 +803,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))
@@ -855,7 +855,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL,NULL, app.GetStringTable());
}
else
{
{
// Not signed in to PSN
UINT uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
@@ -901,7 +901,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -916,7 +916,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
#endif
if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges == TRUE)
{
{
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@@ -980,7 +980,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -1033,8 +1033,8 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -1107,13 +1107,13 @@ 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();
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
@@ -1132,7 +1132,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 )
@@ -1336,7 +1336,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
}
}
else
{
{
pClass->m_bIgnoreInput = false;
}
return 0;
@@ -1347,7 +1347,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;
@@ -1392,7 +1392,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
}
else
{
{
#if defined( __ORBIS__) || defined(__PSVITA__)
bool isOnlineGame = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
if(isOnlineGame)
@@ -1422,7 +1422,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);
}
@@ -1434,28 +1434,28 @@ int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStor
// {
// int32_t iResult;
// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam;
//
//
// // continue offline, or upsell PS Plus?
// if(result==C4JStorage::EMessage_ResultDecline)
// if(result==C4JStorage::EMessage_ResultDecline)
// {
// // upsell psplus
// int32_t iResult=sceNpCommerceDialogInitialize();
//
//
// SceNpCommerceDialogParam param;
// sceNpCommerceDialogParamInitialize(&param);
// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
// param.userId = ProfileManager.getUserID(pClass->m_iPad);
//
//
// iResult=sceNpCommerceDialogOpen(&param);
// }
// else if(result==C4JStorage::EMessage_ResultAccept)
// else if(result==C4JStorage::EMessage_ResultAccept)
// {
// // continue offline
// pClass->m_MoreOptionsParams.bOnlineGame=false;
// pClass->checkStateAndStartGame();
// }
//
//
// pClass->m_bIgnoreInput=false;
// return 0;
// }

View File

@@ -16,13 +16,13 @@ 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;
UIControl_Slider m_sliderDifficulty;
UIControl_BitmapIcon m_bitmapIcon;
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
UIControl_CheckBox m_checkboxOnline;
#endif
@@ -35,7 +35,7 @@ private:
UI_MAP_ELEMENT( m_labelSeed, "Seed")
UI_MAP_ELEMENT( m_texturePackList, "TexturePackSelector")
UI_MAP_ELEMENT( m_buttonGamemode, "GameModeToggle")
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
UI_MAP_ELEMENT( m_checkboxOnline, "CheckboxOnline")
#endif
@@ -48,7 +48,7 @@ private:
LevelGenerationOptions *m_levelGen;
DLCPack * m_pDLCPack;
int m_iSaveGameInfoIndex;
int m_CurrentDifficulty;
bool m_bGameModeSurvival;
@@ -61,7 +61,7 @@ private:
bool m_bRequestQuadrantSignin;
bool m_bIsCorrupt;
bool m_bThumbnailGetFailed;
__int64 m_seed;
int64_t m_seed;
#ifdef __PS3__
std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo;
@@ -75,7 +75,7 @@ private:
bool m_bRebuildTouchBoxes;
public:
UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLayer);
virtual void updateTooltips();
virtual void updateComponents();
@@ -110,7 +110,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);

View File

@@ -207,7 +207,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
bool bTexturePackAlreadyListed;
bool bNeedToGetTPD=false;
Minecraft *pMinecraft = Minecraft::GetInstance();
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i)
{
@@ -311,7 +311,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
// update the tooltips
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should the the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
int iLB = -1;
int iX=-1;
@@ -322,7 +322,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
else if (DoesSavesListHaveFocus())
{
if((m_iDefaultButtonsC > 0) && (m_iSaveListIndex >= m_iDefaultButtonsC))
{
{
if(StorageManager.GetSaveDisabled())
{
iRB=IDS_TOOLTIPS_DELETESAVE;
@@ -378,7 +378,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
// Is there a save from PS3 or PSVita available?
// Sony asked that this be displayed at all times so users are aware of the functionality. We'll display some text when there's no save available
//if(app.getRemoteStorage()->saveIsAvailable())
{
{
bool bSignedInLive = ProfileManager.IsSignedInLive(m_iPad);
if(bSignedInLive)
{
@@ -393,7 +393,7 @@ void UIScene_LoadOrJoinMenu::updateTooltips()
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK, iX, iY,-1,-1,iLB,iRB);
}
//
//
void UIScene_LoadOrJoinMenu::Initialise()
{
m_iSaveListIndex = 0;
@@ -481,7 +481,7 @@ void UIScene_LoadOrJoinMenu::handleGainFocus(bool navBack)
{
app.SetLiveLinkRequired( true );
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
// re-enable button presses
m_bIgnoreInput=false;
@@ -825,7 +825,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
m_pSaveDetails=StorageManager.ReturnSavesInfo();
if(m_pSaveDetails==NULL)
{
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
}
#endif
@@ -874,7 +874,7 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
m_pSaveDetails=StorageManager.ReturnSavesInfo();
if(m_pSaveDetails==NULL)
{
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
}
#if TO_BE_IMPLEMENTED
@@ -918,7 +918,7 @@ void UIScene_LoadOrJoinMenu::AddDefaultButtons()
continue;
}
}
m_generators.push_back(levelGen);
m_buttonListSaves.addItem(levelGen->getWorldName());
@@ -969,7 +969,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
case ACTION_MENU_X:
#if TO_BE_IMPLEMENTED
// Change device
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
// device, and repeatedly backs out of the SD screen, disconnects from LIVE, and then selects a SD, the title crashes.
m_bIgnoreInput=true;
StorageManager.SetSaveDevice(&CScene_MultiGameJoinLoad::DeviceSelectReturned,this,true);
@@ -987,7 +987,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
bool bSignedInLive = ProfileManager.IsSignedInLive(iPad);
if(bSignedInLive)
{
{
LaunchSaveTransfer();
}
}
@@ -1171,7 +1171,7 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
UIScene_LoadOrJoinMenu *pClass=(UIScene_LoadOrJoinMenu *)lpParam;
pClass->m_bIgnoreInput=false;
if (bRes)
{
{
uint16_t ui16Text[128];
ZeroMemory(ui16Text, 128 * sizeof(uint16_t) );
InputManager.GetText(ui16Text);
@@ -1184,13 +1184,13 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(LPVOID lpParam,boo
StorageManager.RenameSaveData(pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text,&UIScene_LoadOrJoinMenu::RenameSaveDataReturned,pClass);
#endif
}
else
else
{
pClass->m_bIgnoreInput=false;
pClass->updateTooltips();
}
}
else
}
else
{
pClass->m_bIgnoreInput=false;
pClass->updateTooltips();
@@ -1204,13 +1204,13 @@ void UIScene_LoadOrJoinMenu::handleInitFocus(F64 controlId, F64 childId)
app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleInitFocus - %d , %d\n", (int)controlId, (int)childId);
}
void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId)
void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId)
{
app.DebugPrintf(app.USER_SR, "UIScene_LoadOrJoinMenu::handleFocusChange - %d , %d\n", (int)controlId, (int)childId);
switch((int)controlId)
{
case eControl_GamesList:
case eControl_GamesList:
m_iGameListIndex = childId;
m_buttonListGames.updateChildFocus( (int) childId );
break;
@@ -1246,7 +1246,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
ui.PlayUISFX(eSFX_Press);
if((int)childId == JOIN_LOAD_CREATE_BUTTON_INDEX)
{
{
app.SetTutorialMode( false );
m_controlJoinTimer.setVisible( false );
@@ -1298,7 +1298,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
}
else
#endif
{
{
app.SetTutorialMode( false );
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
@@ -1340,7 +1340,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
case eControl_GamesList:
{
m_bIgnoreInput=true;
m_eAction = eAction_JoinGame;
//CD - Added for audio
@@ -1375,7 +1375,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
bool bPlayStationPlus=true;
int iPadWithNoPlaystationPlus=0;
bool isSignedInLive = true;
bool isSignedInLive = true;
int iPadNotSignedInLive = -1;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
@@ -1458,7 +1458,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
SceNpCommerceDialogParam param;
sceNpCommerceDialogParamInitialize(&param);
param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY;
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
@@ -1532,7 +1532,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
}
void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
{
{
// Load data from disc
//File saveFile( L"Tutorial\\Tutorial" );
//LoadSaveFromDisk(&saveFile);
@@ -1630,7 +1630,7 @@ void UIScene_LoadOrJoinMenu::UpdateGamesList()
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should show the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
int iX=-1;
@@ -1854,7 +1854,7 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
if(iImageDataBytes!=0)
{
// set the image
// set the image
registerSubstitutionTexture(textureName,pbImageData,iImageDataBytes,true);
m_iConfigA[i]=-1;
}
@@ -1867,7 +1867,7 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
bool bAllDone=true;
for(int i=0;i<m_iTexturePacksNotInstalled;i++)
{
if(m_iConfigA[i]!=-1)
if(m_iConfigA[i]!=-1)
{
bAllDone = false;
}
@@ -1882,13 +1882,13 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id)
}
break;
#endif
#endif
}
}
void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform savePlatform /*= SAVE_FILE_PLATFORM_LOCAL*/)
{
{
// we'll only be coming in here when the tutorial is loaded now
StorageManager.ResetSaveData();
@@ -1896,7 +1896,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);
@@ -1946,7 +1946,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk(File *saveFile, ESavePlatform save
#ifdef SONY_REMOTE_STORAGE_DOWNLOAD
void UIScene_LoadOrJoinMenu::LoadSaveFromCloud()
{
{
wchar_t wFileName[128];
mbstowcs(wFileName, app.getRemoteStorage()->getLocalFilename(), strlen(app.getRemoteStorage()->getLocalFilename())+1); // plus null
@@ -1960,7 +1960,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);
@@ -2019,7 +2019,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned(void *pParam,int iPad,C4JSt
// Check that we have a valid save selected (can get a bad index if the save list has been refreshed)
bool validSelection= pClass->m_iDefaultButtonsC != 0 && pClass->m_iSaveListIndex >= pClass->m_iDefaultButtonsC;
if(result==C4JStorage::EMessage_ResultDecline && validSelection)
if(result==C4JStorage::EMessage_ResultDecline && validSelection)
{
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
{
@@ -2049,7 +2049,7 @@ int UIScene_LoadOrJoinMenu::DeleteSaveDataReturned(LPVOID lpParam,bool bRes)
if(bRes)
{
// wipe the list and repopulate it
pClass->m_iState=e_SavesRepopulateAfterDelete;
pClass->m_iState=e_SavesRepopulateAfterDelete;
}
else pClass->m_bIgnoreInput=false;
@@ -2169,7 +2169,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
UIScene_LoadOrJoinMenu *pClass = (UIScene_LoadOrJoinMenu *)pParam;
// Exit with or without saving
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
// we need to enable background downloading for the DLC
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW);
@@ -2194,9 +2194,9 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
#endif
#if defined _XBOX_ONE
#if defined _XBOX_ONE
if(ProfileManager.IsSignedIn(iPad))
{
{
if (ProfileManager.IsSignedInLive(iPad))
{
wstring ProductId;
@@ -2205,13 +2205,13 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
StorageManager.InstallOffer(1,(WCHAR *)ProductId.c_str(),NULL,NULL);
}
else
{
{
// 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no active network connection user is unable to convert from Trial to Full texture pack and is not messaged why.
UINT uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
}
#endif
#endif
}
pClass->m_bIgnoreInput=false;
@@ -2223,7 +2223,7 @@ int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStora
{
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
#if defined(__PS3__)
SQRNetworkManager_PS3::AttemptPSNSignIn(&UIScene_LoadOrJoinMenu::PSN_SignInReturned, pClass);
@@ -2442,7 +2442,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
DWORD dwDataSizeSaveImage=0;
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
BYTE bTextMetadata[88];
ZeroMemory(bTextMetadata,88);
@@ -2470,7 +2470,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
{
// we can't cancel here, we need the saves info so we can delete the file
if(pClass->m_saveTransferDownloadCancelled)
{
{
WCHAR wcTemp[256];
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
m_wstrStageText=wcTemp;
@@ -2485,7 +2485,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
break;
case eSaveTransfer_GettingSavesInfo:
if(pClass->m_saveTransferDownloadCancelled)
{
{
WCHAR wcTemp[256];
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
m_wstrStageText=wcTemp;
@@ -2602,7 +2602,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
DWORD dwDataSizeSaveImage=0;
StorageManager.GetDefaultSaveImage(&pbDataSaveImage, &dwDataSizeSaveImage); // Get the default save thumbnail (as set by SetDefaultImages) for use on saving games t
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
StorageManager.GetDefaultSaveThumbnail(&pbThumbnailData,&dwThumbnailDataSize); // Get the default save image (as set by SetDefaultImages) for use on saving games that
BYTE bTextMetadata[88];
ZeroMemory(bTextMetadata,88);
@@ -2613,12 +2613,12 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
}
#ifdef SPLIT_SAVES
#ifdef SPLIT_SAVES
ConsoleSaveFileOriginal oldFormatSave( wSaveName, ba.data, ba.length, false, app.getRemoteStorage()->getSavePlatform() );
pSave = new ConsoleSaveFileSplit( &oldFormatSave, false, pMinecraft->progressRenderer );
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
pSave->Flush(false,false);
pSave->Flush(false,false);
pClass->m_eSaveTransferState = eSaveTransfer_Saving;
#else
pSave = new ConsoleSaveFileOriginal( wSaveName, ba.data, ba.length, false, app.getRemoteStorage()->getSavePlatform() );
@@ -2654,7 +2654,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
delete pSave;
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
pClass->m_eSaveTransferState = eSaveTransfer_Succeeded;
}
@@ -2668,7 +2668,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
app.getRemoteStorage()->waitForStorageManagerIdle(); // wait for everything to complete before we hand control back to the player
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
pClass->m_eSaveTransferState = eSaveTransfer_Finished;
}
break;
@@ -2683,7 +2683,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
if(bSaveFileCreated)
{
if(pClass->m_saveTransferDownloadCancelled)
{
{
WCHAR wcTemp[256];
swprintf(wcTemp,256, app.GetString(IDS_CANCEL)); // MGH - should change this string to "cancelling download"
m_wstrStageText=wcTemp;
@@ -2743,7 +2743,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc( LPVOID lpParameter
{
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_DOWNLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveFinishedCallback,pClass, app.GetStringTable());
pClass->m_eSaveTransferState = eSaveTransfer_Finished;
}
if(bSaveFileCreated) // save file has been created, then deleted.
@@ -2887,7 +2887,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParameter )
{
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADCOMPLETE, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
pClass->m_eSaveUploadState = esaveUpload_Finished;
}
break;
@@ -2904,7 +2904,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc( LPVOID lpParameter )
{
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
ui.RequestMessageBox( IDS_TOOLTIPS_SAVETRANSFER_UPLOAD, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA,1,ProfileManager.GetPrimaryPad(),CrossSaveUploadFinishedCallback,pClass, app.GetStringTable());
pClass->m_eSaveUploadState = esaveUpload_Finished;
}
}
@@ -2953,7 +2953,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferDialogReturned(void *pParam,int iPad,C4J
{
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
// upload the save
pClass->LaunchSaveUpload();
@@ -3062,13 +3062,13 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
ByteArrayInputStream bais(UIScene_LoadOrJoinMenu::s_transferData);
DataInputStream dis(&bais);
wstring saveTitle = dis.readUTF();
wstring saveTitle = dis.readUTF();
StorageManager.SetSaveTitle(saveTitle.c_str());
wstring saveUniqueName = dis.readUTF();
// 4J Stu - Don't set this any more. We added it so that we could share the ban list data for this save
// However if the player downloads the same save multiple times, it will overwrite the previous version
// However if the player downloads the same save multiple times, it will overwrite the previous version
// with that filname, and they could have made changes to it.
//StorageManager.SetSaveUniqueFilename((wchar_t *)saveUniqueName.c_str());
@@ -3091,13 +3091,13 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
case eSaveTransferFile_SaveData:
{
#ifdef SPLIT_SAVES
if(!pStateContainer->m_bSaveTransferCancelled)
if(!pStateContainer->m_bSaveTransferCancelled)
{
ConsoleSaveFileOriginal oldFormatSave( L"Temp name", UIScene_LoadOrJoinMenu::s_transferData.data, UIScene_LoadOrJoinMenu::s_transferData.length, false, SAVE_FILE_PLATFORM_X360 );
pSave = new ConsoleSaveFileSplit( &oldFormatSave, false, pMinecraft->progressRenderer );
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
}
pStateContainer->m_eSaveTransferState=C4JStorage::eSaveTransfer_Saving;
@@ -3118,7 +3118,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
pSave->ConvertToLocalPlatform();
pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING);
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false);
pStateContainer->m_iProgress+=1;
if(pStateContainer->m_iProgress==101)
@@ -3134,8 +3134,8 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
// On Durango/Orbis, we need to wait for all the asynchronous saving processes to complete before destroying the levels, as that will ultimately delete
// the directory level storage & therefore the ConsoleSaveSplit instance, which needs to be around until all the sub files have completed saving.
#if defined(_DURANGO) || defined(__ORBIS__)
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
pMinecraft->progressRenderer->progressStage(IDS_PROGRESS_SAVING_TO_DISC);
while(StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle )
{
Sleep(10);
@@ -3150,9 +3150,9 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
#ifdef _XBOX_ONE
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_AND_CONVERT_COMPLETE);
#endif
pStateContainer->m_eSaveTransferState=C4JStorage::eSaveTransfer_Idle;
// wipe the list and repopulate it
if(!pStateContainer->m_bSaveTransferCancelled) pStateContainer->m_pClass->m_iState=e_SavesRepopulateAfterTransferDownload;
@@ -3192,7 +3192,7 @@ int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc( LPVOID lpParameter )
}
void UIScene_LoadOrJoinMenu::RequestFileSize( SaveTransferStateContainer *pClass, wchar_t *filename )
{
{
Minecraft *pMinecraft=Minecraft::GetInstance();
// get the save file size
@@ -3298,7 +3298,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferUpdateProgress(LPVOID lpParam,unsigned l
if(pClass->m_bSaveTransferCancelled) // was cancelled
{
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING);
pMinecraft->progressRenderer->progressStage(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING);
swprintf(wcTemp,app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING));
m_wstrStageText=wcTemp;
pMinecraft->progressRenderer->progressStage( m_wstrStageText );
@@ -3373,7 +3373,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDialogReturned(void *pParam,int iPad,C4JStor
{
UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam;
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
LoadingInputParams *loadingParams = new LoadingInputParams();
@@ -3418,7 +3418,7 @@ int UIScene_LoadOrJoinMenu::CopySaveThreadProc( LPVOID lpParameter )
ui.LeaveCallbackIdCriticalSection();
// Copy save data takes two callbacks - one for completion, and one for progress. The progress callback also lets us cancel the operation, if we return false.
StorageManager.CopySaveData(&pClass->m_pSaveDetails->SaveInfoA[pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC],UIScene_LoadOrJoinMenu::CopySaveDataReturned,UIScene_LoadOrJoinMenu::CopySaveDataProgress,lpParameter);
bool bContinue = true;
do
{
@@ -3455,7 +3455,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDataReturned(LPVOID lpParam, bool success, C
{
pClass->m_bCopying = false;
// wipe the list and repopulate it
pClass->m_iState=e_SavesRepopulateAfterDelete;
pClass->m_iState=e_SavesRepopulateAfterDelete;
ui.LeaveCallbackIdCriticalSection();
}
else

View File

@@ -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;

View File

@@ -42,13 +42,13 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
m_iTexturePacksNotInstalled=0;
m_iConfigA=NULL;
XuiControlSetText(m_LabelNoGames,app.GetString(IDS_NO_GAMES_FOUND));
XuiControlSetText(m_GamesList,app.GetString(IDS_JOIN_GAME));
XuiControlSetText(m_SavesList,app.GetString(IDS_START_GAME));
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
@@ -64,17 +64,17 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
m_bRetrievingSaveInfo=false;
m_bSaveTransferInProgress=false;
// check for a default custom cloak in the global storage
// 4J-PB - changed to a config file
// if(ProfileManager.IsSignedInLive( m_iPad ))
// {
// {
// app.InstallDefaultCape();
// }
m_initData= new JoinMenuInitData();
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
XPARTY_USER_LIST partyList;
if((XPartyGetUserList( &partyList ) != XPARTY_E_NOT_IN_PARTY ) && (partyList.dwUserCount>1))
@@ -90,7 +90,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
if(m_bInParty) iLB = IDS_TOOLTIPS_PARTY_GAMES;
XuiSetTimer(m_hObj,JOIN_LOAD_ONLINE_TIMER_ID,JOIN_LOAD_ONLINE_TIMER_TIME);
m_iSaveInfoC=0;
VOID *pObj;
@@ -110,7 +110,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
{
// if we're waiting for DLC to mount, don't fill the save list. The custom message on end of dlc mounting will do that
m_bIgnoreInput=false;
m_iChangingSaveGameInfoIndex = 0;
@@ -135,7 +135,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
// saving is disabled, but we should still be able to load from a selected save device
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK,IDS_TOOLTIPS_CHANGEDEVICE,-1,-1,-1,iLB,IDS_TOOLTIPS_DELETESAVE);
GetSaveInfo();
}
else
@@ -153,7 +153,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
// 4J-PB - we need to check that there is enough space left to create a copy of the save (for a rename)
bool bCanRename = StorageManager.EnoughSpaceForAMinSaveGame();
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK,IDS_TOOLTIPS_CHANGEDEVICE,-1,-1,-1,-1,bCanRename?IDS_TOOLTIPS_SAVEOPTIONS:IDS_TOOLTIPS_DELETESAVE);
GetSaveInfo();
}
}
@@ -165,7 +165,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
// 4J Stu - Fix for #12530 -TCR 001 BAS Game Stability: Title will crash if the player disconnects while starting a new world and then opts to play the tutorial once they have been returned to the Main Menu.
MinecraftServer::resetFlags();
// If we're not ignoring input, then we aren't still waiting for the DLC to mount, and can now check for corrupt dlc. Otherwise this will happen when the dlc has finished mounting.
if( !m_bIgnoreInput)
{
@@ -191,7 +191,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
bool bTexturePackAlreadyListed;
bool bNeedToGetTPD=false;
Minecraft *pMinecraft = Minecraft::GetInstance();
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
int texturePacksCount = pMinecraft->skins->getTexturePackCount();
//CXuiCtrl4JList::LIST_ITEM_INFO ListInfo;
//HRESULT hr;
@@ -295,7 +295,7 @@ void CScene_MultiGameJoinLoad::AddDefaultButtons()
// increment the count of the mash-up pack worlds in the save list
m_iMashUpButtonsC++;
TexturePack *tp = Minecraft::GetInstance()->skins->getTexturePackById(levelGen->getRequiredTexturePackId());
DWORD dwImageBytes;
DWORD dwImageBytes;
PBYTE pbImageData = tp->getPackIcon(dwImageBytes);
HXUIBRUSH hXuiBrush;
@@ -353,8 +353,8 @@ HRESULT CScene_MultiGameJoinLoad::GetSaveInfo( )
ListInfo.fEnabled=TRUE;
ListInfo.iData = -1;
m_pSavesList->AddData(ListInfo);
}
m_pSavesList->SetCurSelVisible(0);
}
m_pSavesList->SetCurSelVisible(0);
}
else
{
@@ -419,7 +419,7 @@ int CScene_MultiGameJoinLoad::DeviceRemovedDialogReturned(void *pParam,int iPad,
CScene_MultiGameJoinLoad* pClass = (CScene_MultiGameJoinLoad*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
if(result==C4JStorage::EMessage_ResultDecline)
{
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(ProfileManager.GetPrimaryPad(),false);
@@ -462,7 +462,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
//CScene_MultiGameInfo::JoinMenuInitData *initData = new CScene_MultiGameInfo::JoinMenuInitData();
m_initData->iPad = m_iPad;
m_initData->selectedSession = currentSessions.at( nIndex );
// check that we have the texture pack available
// If it's not the default texture pack
if(m_initData->selectedSession->data.texturePackParentId!=0)
@@ -513,7 +513,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
return S_OK;
}
}
m_NetGamesListTimer.SetShow( FALSE );
// Reset the background downloading, in case we changed it by attempting to download a texture pack
@@ -536,7 +536,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
CXuiCtrl4JList::LIST_ITEM_INFO info = m_pSavesList->GetData(iIndex);
if(iIndex == JOIN_LOAD_CREATE_BUTTON_INDEX)
{
{
app.SetTutorialMode( false );
m_NetGamesListTimer.SetShow( FALSE );
@@ -571,7 +571,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
}
}
else
{
{
// check if this is a damaged save
if(m_pSavesList->GetData(iIndex).bIsDamaged)
{
@@ -582,7 +582,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable());
}
else
{
{
app.SetTutorialMode( false );
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
{
@@ -605,7 +605,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
}
}
}
return S_OK;
}
@@ -632,11 +632,11 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
app.NavigateBack(XUSER_INDEX_ANY);
rfHandled = TRUE;
break;
break;
case VK_PAD_X:
// Change device
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
// Fix for #12531 - TCR 001: BAS Game Stability: When a player selects to change a storage
// device, and repeatedly backs out of the SD screen, disconnects from LIVE, and then selects a SD, the title crashes.
m_bIgnoreInput=true;
StorageManager.SetSaveDevice(&CScene_MultiGameJoinLoad::DeviceSelectReturned,this,true);
@@ -657,7 +657,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
{
// save transfer - make sure they want to overwrite a save that is up there
if(ProfileManager.IsSignedInLive( m_iPad ))
{
{
// 4J-PB - required for a delete of the save if it's found to be a corrupted save
DWORD nIndex = m_pSavesList->GetCurSel();
m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(nIndex).iIndex;
@@ -668,13 +668,13 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
ui.RequestMessageBox(IDS_SAVE_TRANSFER_TITLE, IDS_SAVE_TRANSFER_TEXT, uiIDA, 2, pInputData->UserIndex,&CScene_MultiGameJoinLoad::SaveTransferDialogReturned,this, app.GetStringTable());
}
}
}
break;
case VK_PAD_RSHOULDER:
if(DoesSavesListHaveFocus())
{
m_bIgnoreInput = true;
int iIndex=m_SavesList.GetCurSel();
m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(iIndex).iIndex;
@@ -755,19 +755,19 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
}
break;
}
return hr;
}
HRESULT CScene_MultiGameJoinLoad::OnNavReturn(HXUIOBJ hSceneFrom,BOOL& rfHandled)
{
CXuiSceneBase::ShowLogo( DEFAULT_XUI_MENU_USER, TRUE );
// start the texture pack timer again
XuiSetTimer(m_hObj,CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID,CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME);
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
m_bMultiplayerAllowed = ProfileManager.IsSignedInLive( m_iPad ) && ProfileManager.AllowedToPlayMultiplayer(m_iPad);
// re-enable button presses
m_bIgnoreInput=false;
@@ -812,7 +812,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNavReturn(HXUIOBJ hSceneFrom,BOOL& rfHandled
iY = IDS_TOOLTIPS_VIEW_GAMERCARD;
}
else if(DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -901,7 +901,7 @@ HRESULT CScene_MultiGameJoinLoad::OnTransitionStart( XUIMessageTransition *pTran
if(pTransition->dwTransType == XUI_TRANSITION_BACKTO)
{
// Can't call this here because if you back out of the load info screen and then go back in and load a game, it will attempt to use the dlc as it's running a mount of the dlc
// block input if we're waiting for DLC to install, and wipe the saves list. The end of dlc mounting custom message will fill the list again
if(app.StartInstallDLCProcess(m_iPad)==false)
{
@@ -925,14 +925,14 @@ HRESULT CScene_MultiGameJoinLoad::OnFontRendererChange()
// update the tooltips
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should the the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
if( DoesGamesListHaveFocus() )
{
iY = IDS_TOOLTIPS_VIEW_GAMERCARD;
}
}
else if(DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -986,12 +986,12 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifySetFocus(HXUIOBJ hObjSource, XUINotify
// update the tooltips
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should the the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
if( DoesGamesListHaveFocus() )
{
iY = IDS_TOOLTIPS_VIEW_GAMERCARD;
}
}
else if(DoesSavesListHaveFocus())
{
if(ProfileManager.IsSignedInLive( m_iPad ))
@@ -1118,7 +1118,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesListCallback(LPVOID lpParam)
// check this there's no save transfer in progress
if(!pClass->m_bSaveTransferInProgress)
{
pClass->UpdateGamesList();
pClass->UpdateGamesList();
}
}
}
@@ -1150,12 +1150,12 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
delete (*it);
}
currentSessions.clear();
m_NetGamesListTimer.SetShow( FALSE );
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should show the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
if( DoesGamesListHaveFocus() )
@@ -1163,7 +1163,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
iY = IDS_TOOLTIPS_VIEW_GAMERCARD;
}
else if(DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -1282,7 +1282,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
// is it in the tpd data ?
app.GetFileFromTPD(eTPDFileType_Icon,pbData,dwBytes,&pbImageData,&dwImageBytes );
if(dwImageBytes > 0 && pbImageData)
{
{
hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&hXuiBrush);
m_pGamesList->UpdateGraphic(sessionIndex,hXuiBrush);
}
@@ -1291,7 +1291,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
{
pbImageData = tp->getPackIcon(dwImageBytes);
if(dwImageBytes > 0 && pbImageData)
{
{
hr=XuiCreateTextureBrushFromMemory(pbImageData,dwImageBytes,&hXuiBrush);
m_pGamesList->UpdateGraphic(sessionIndex,hXuiBrush);
}
@@ -1303,7 +1303,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
XuiCreateTextureBrushFromMemory(m_DefaultMinecraftIconData,m_DefaultMinecraftIconSize,&hXuiBrush);
m_pGamesList->UpdateGraphic(sessionIndex,hXuiBrush);
}
if(memcmp( &selectedSessionId, &sessionInfo->sessionId, sizeof(SessionID) ) == 0)
{
@@ -1324,14 +1324,14 @@ void CScene_MultiGameJoinLoad::UpdateGamesList(DWORD dwNumResults, IQNetGameSear
if(m_searches>0)
--m_searches;
if(m_searches==0)
{
m_NetGamesListTimer.SetShow( FALSE );
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should show the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
if( DoesGamesListHaveFocus() )
@@ -1374,7 +1374,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList(DWORD dwNumResults, IQNetGameSear
}
unsigned int startOffset = m_GamesList.GetItemCount();
//m_GamesList.InsertItems(startOffset,dwNumResults);
//m_GamesList.InsertItems(startOffset,dwNumResults);
//m_GamesList.SetEnable(TRUE);
//XuiElementSetDisableFocusRecursion( m_GamesList.m_hObj, FALSE);
@@ -1449,7 +1449,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList(DWORD dwNumResults, IQNetGameSear
#endif
}
}
if( m_GamesList.GetItemCount() == 0)
{
m_LabelNoGames.SetShow( TRUE );
@@ -1537,14 +1537,14 @@ int CScene_MultiGameJoinLoad::DeviceSelectReturned(void *pParam,bool bContinue)
{
// if the saves list has focus, then we should show the Delete Save tooltip
// if the games list has focus, then we should show the View Gamercard tooltip
int iRB=-1;
int iRB=-1;
int iY = -1;
if( pClass->DoesGamesListHaveFocus() )
{
iY = IDS_TOOLTIPS_VIEW_GAMERCARD;
}
else if(pClass->DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( pClass->m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -1593,7 +1593,7 @@ int CScene_MultiGameJoinLoad::DeviceSelectReturned(void *pParam,bool bContinue)
pClass->GetSaveInfo();
}
else
{
{
ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK,IDS_TOOLTIPS_SELECTDEVICE,iY,-1,-1,iLB,iRB);
// clear the saves list
pClass->m_pSavesList->RemoveAllData();
@@ -1623,11 +1623,11 @@ int CScene_MultiGameJoinLoad::DeviceSelectReturned(void *pParam,bool bContinue)
HRESULT CScene_MultiGameJoinLoad::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 JOIN_LOAD_ONLINE_TIMER_ID:
{
XPARTY_USER_LIST partyList;
@@ -1673,7 +1673,7 @@ HRESULT CScene_MultiGameJoinLoad::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandl
{
}
else if(DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -1737,7 +1737,7 @@ HRESULT CScene_MultiGameJoinLoad::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandl
//CXuiCtrl4JList::LIST_ITEM_INFO ListInfo;
// for each iConfig, check if the data is available, and add it to the List, then remove it from the viConfig
for(int i=0;i<m_iTexturePacksNotInstalled;i++)
{
if(m_iConfigA[i]!=-1)
@@ -1760,7 +1760,7 @@ HRESULT CScene_MultiGameJoinLoad::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandl
bool bAllDone=true;
for(int i=0;i<m_iTexturePacksNotInstalled;i++)
{
if(m_iConfigA[i]!=-1)
if(m_iConfigA[i]!=-1)
{
bAllDone = false;
}
@@ -1878,25 +1878,25 @@ int CScene_MultiGameJoinLoad::DeleteSaveDataReturned(void *pParam,bool bSuccess)
pClass->m_iSaveInfoC=0;
pClass->GetSaveInfo();
}
pClass->m_bIgnoreInput=false;
return 0;
}
void CScene_MultiGameJoinLoad::LoadLevelGen(LevelGenerationOptions *levelGen)
{
{
// Load data from disc
//File saveFile( L"Tutorial\\Tutorial" );
//LoadSaveFromDisk(&saveFile);
// clear out the app's terrain features list
app.ClearTerrainFeaturePosition();
StorageManager.ResetSaveData();
// Make our next save default to the name of the level
StorageManager.SetSaveTitle(levelGen->getDefaultSaveName().c_str());
bool isClientSide = false;
bool isPrivate = false;
int maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
@@ -1918,7 +1918,7 @@ void CScene_MultiGameJoinLoad::LoadLevelGen(LevelGenerationOptions *levelGen)
if(levelGen->requiresTexturePack())
{
param->texturePackId = levelGen->getRequiredTexturePackId();
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->skins->selectTexturePackById(param->texturePackId);
//pMinecraft->skins->updateUI();
@@ -1939,7 +1939,7 @@ void CScene_MultiGameJoinLoad::LoadLevelGen(LevelGenerationOptions *levelGen)
}
void CScene_MultiGameJoinLoad::LoadSaveFromDisk(File *saveFile)
{
{
// we'll only be coming in here when the tutorial is loaded now
StorageManager.ResetSaveData();
@@ -1947,12 +1947,12 @@ 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);
fis.close();
bool isClientSide = false;
bool isPrivate = false;
int maxPlayers = MINECRAFT_NET_MAX_PLAYERS;
@@ -1962,7 +1962,7 @@ void CScene_MultiGameJoinLoad::LoadSaveFromDisk(File *saveFile)
isClientSide = false;
maxPlayers = 4;
}
app.SetGameHostOption(eGameHostOption_GameType,GameType::CREATIVE->getId());
g_NetworkManager.HostGame(0,isClientSide,isPrivate,maxPlayers,0);
@@ -1992,7 +1992,7 @@ int CScene_MultiGameJoinLoad::DeleteSaveDialogReturned(void *pParam,int iPad,C4J
{
CScene_MultiGameJoinLoad* pClass = (CScene_MultiGameJoinLoad*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
if(result==C4JStorage::EMessage_ResultDecline)
{
if(app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled())
{
@@ -2017,7 +2017,7 @@ int CScene_MultiGameJoinLoad::SaveTransferDialogReturned(void *pParam,int iPad,C
{
CScene_MultiGameJoinLoad* pClass = (CScene_MultiGameJoinLoad*)pParam;
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultAccept)
if(result==C4JStorage::EMessage_ResultAccept)
{
// upload the save
@@ -2042,7 +2042,7 @@ int CScene_MultiGameJoinLoad::SaveTransferDialogReturned(void *pParam,int iPad,C
int CScene_MultiGameJoinLoad::UploadSaveForXboxOneThreadProc( LPVOID lpParameter )
{
CScene_MultiGameJoinLoad* pClass = (CScene_MultiGameJoinLoad *) lpParameter;
Minecraft *pMinecraft = Minecraft::GetInstance();
Minecraft *pMinecraft = Minecraft::GetInstance();
pMinecraft->progressRenderer->progressStart(IDS_SAVE_TRANSFER_TITLE);
pMinecraft->progressRenderer->progressStage( IDS_SAVE_TRANSFER_UPLOADING );
@@ -2092,7 +2092,7 @@ int CScene_MultiGameJoinLoad::UploadSaveForXboxOneThreadProc( LPVOID lpParameter
StorageManager.GetSaveCacheFileInfo(iIndex,XContentData);
StorageManager.GetSaveCacheFileInfo(iIndex,&pbImageData,&dwImageBytes);
// if there is no thumbnail, retrieve the default one from the file.
// if there is no thumbnail, retrieve the default one from the file.
// Don't delete the image data after creating the xuibrush, since we'll use it in the rename of the save
if(pbImageData==NULL)
{
@@ -2143,7 +2143,7 @@ int CScene_MultiGameJoinLoad::UploadSaveForXboxOneThreadProc( LPVOID lpParameter
return 0;
}
// change text for completion confirmation
// change text for completion confirmation
pMinecraft->progressRenderer->progressStage( IDS_SAVE_TRANSFER_UPLOADCOMPLETE );
// done
@@ -2180,7 +2180,7 @@ void CScene_MultiGameJoinLoad::UploadFile(CScene_MultiGameJoinLoad *pClass, char
C4JStorage::TMS_FILETYPE_BINARY,
C4JStorage::TMS_UGCTYPE_NONE,
filename,
(CHAR *)data,
(CHAR *)data,
size,
&CScene_MultiGameJoinLoad::TransferComplete,pClass, 0,
&CScene_MultiGameJoinLoad::Progress,pClass);
@@ -2219,7 +2219,7 @@ bool CScene_MultiGameJoinLoad::WaitForTransferComplete( CScene_MultiGameJoinLoad
// cancelled
return false;
}
Sleep(50);
Sleep(50);
// update the progress
pMinecraft->progressRenderer->progressStagePercentage((unsigned int)(pClass->m_fProgress*100.0f));
}
@@ -2235,7 +2235,7 @@ int CScene_MultiGameJoinLoad::SaveOptionsDialogReturned(void *pParam,int iPad,C4
// results switched for this dialog
// EMessage_ResultAccept means cancel
if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
if(result==C4JStorage::EMessage_ResultDecline || result==C4JStorage::EMessage_ResultThirdOption)
{
if(result==C4JStorage::EMessage_ResultDecline) // rename
{
@@ -2302,9 +2302,9 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
UINT uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2,
StorageManager.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2,
pClass->m_iPad,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,pClass, app.GetStringTable());
}
return 0;
@@ -2366,7 +2366,7 @@ int CScene_MultiGameJoinLoad::KeyboardReturned(void *pParam,bool bSet)
if(eLoadStatus==C4JStorage::ELoadGame_DeviceRemoved)
{
// disable saving
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(ProfileManager.GetPrimaryPad(),false);
UINT uiIDA[1];
@@ -2375,11 +2375,11 @@ int CScene_MultiGameJoinLoad::KeyboardReturned(void *pParam,bool bSet)
}
#else
// rename the save
#endif
}
else
{
{
pClass->m_bIgnoreInput=false;
}
@@ -2400,7 +2400,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataForRenameReturned(void *pParam,bool bC
StorageManager.GetSaveCacheFileInfo(pClass->m_iChangingSaveGameInfoIndex-pClass->m_iDefaultButtonsC,XContentData);
StorageManager.GetSaveCacheFileInfo(pClass->m_iChangingSaveGameInfoIndex-pClass->m_iDefaultButtonsC,&pbImageData,&dwImageBytes);
// if there is no thumbnail, retrieve the default one from the file.
// if there is no thumbnail, retrieve the default one from the file.
// Don't delete the image data after creating the xuibrush, since we'll use it in the rename of the save
if(pbImageData==NULL)
{
@@ -2456,7 +2456,7 @@ int CScene_MultiGameJoinLoad::TexturePackDialogReturned(void *pParam,int iPad,C4
// 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);
@@ -2480,7 +2480,7 @@ int CScene_MultiGameJoinLoad::TexturePackDialogReturned(void *pParam,int iPad,C4
ullIndexA[0]=pDLCInfo->ullOfferID_Trial;
StorageManager.InstallOffer(1,ullIndexA,NULL,NULL);
}
}
}
}
pClass->m_bIgnoreInput=false;
return 0;
@@ -2489,7 +2489,7 @@ int CScene_MultiGameJoinLoad::TexturePackDialogReturned(void *pParam,int iPad,C4
HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCInstalled()
{
// mounted DLC may have changed
if(app.StartInstallDLCProcess(m_iPad)==false)
{
// not doing a mount, so re-enable input
@@ -2508,7 +2508,7 @@ HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCInstalled()
}
HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCMountingComplete()
{
{
VOID *pObj;
XuiObjectFromHandle( m_SavesList, &pObj );
@@ -2534,7 +2534,7 @@ HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCMountingComplete()
int iY=-1;
if(DoesSavesListHaveFocus())
{
{
if(ProfileManager.IsSignedInLive( m_iPad ))
{
iY=IDS_TOOLTIPS_UPLOAD_SAVE_FOR_XBOXONE;
@@ -2627,7 +2627,7 @@ void CScene_MultiGameJoinLoad::UpdateTooltips()
// 4J-PB - we need to check that there is enough space left to create a copy of the save (for a rename)
bool bCanRename = StorageManager.EnoughSpaceForAMinSaveGame();
if(bCanRename)
if(bCanRename)
{
iRB=IDS_TOOLTIPS_SAVEOPTIONS;
}
@@ -2694,11 +2694,11 @@ bool CScene_MultiGameJoinLoad::GetSavesInfoCallback(LPVOID pParam,int iTotalSave
pbCurrentImagePtr=pbImageData+InfoA[i].dwImageOffset;
hr=XuiCreateTextureBrushFromMemory(pbCurrentImagePtr,InfoA[i].dwImageBytes,&hXuiBrush);
pClass->m_pSavesList->UpdateGraphic(i+pClass->m_iDefaultButtonsC,hXuiBrush );
}
}
else
{
// we could put in a damaged save icon here
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
@@ -2724,7 +2724,7 @@ bool CScene_MultiGameJoinLoad::GetSavesInfoCallback(LPVOID pParam,int iTotalSave
// It's possible that the games list is updated but we haven't displayed it yet as we were still waiting on saves list to load
// This is to fix a bug where joining a game before the saves list has loaded causes a crash when this callback is called
// as the scene no longer exists
pClass->UpdateGamesList();
pClass->UpdateGamesList();
// Fix for #45154 - Frontend: DLC: Content can only be downloaded from the frontend if you have not joined/exited multiplayer
XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_AUTO);

View File

@@ -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);
}

View File

@@ -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