Merge pull request #230 from MatthewBeshay/issue/64-remove-winapi-primitives

Issue/64 remove winapi primitives
This commit is contained in:
Tropical 2026-03-15 00:45:22 -05:00 committed by GitHub
commit 816cdcc312
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
110 changed files with 918 additions and 883 deletions

View file

@ -7,12 +7,12 @@
// Desc: Internal helper function
//--------------------------------------------------------------------------------------
#ifndef _CONTENT_PACKAGE
static VOID DebugSpewV( const CHAR* strFormat, va_list pArgList )
static void DebugSpewV(const char* strFormat, va_list pArgList)
{
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || defined(__linux__)
assert(0);
#else
CHAR str[2048];
char str[2048];
// Use the secure CRT to avoid buffer overruns. Specify a count of
// _TRUNCATE so that too long strings will be silently truncated
// rather than triggering an error.
@ -27,9 +27,9 @@ static VOID DebugSpewV( const CHAR* strFormat, va_list pArgList )
// Desc: Prints formatted debug spew
//--------------------------------------------------------------------------------------
#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation
VOID CDECL DebugSpew( _In_z_ _Printf_format_string_ const CHAR* strFormat, ... )
void CDECL DebugSpew(_In_z_ _Printf_format_string_ const char* strFormat, ...)
#else
VOID CDECL DebugPrintf( const CHAR* strFormat, ... )
void CDECL DebugPrintf(const char* strFormat, ...)
#endif
{
#ifndef _CONTENT_PACKAGE
@ -39,4 +39,3 @@ VOID CDECL DebugPrintf( const CHAR* strFormat, ... )
va_end( pArgList );
#endif
}

View file

@ -1,4 +1,4 @@

#include "../Minecraft.World/Platform/stdafx.h"
#include "../Minecraft.World/Recipes/Recipy.h"
@ -3129,7 +3129,7 @@ void CMinecraftApp::HandleXuiActions(void)
pStats->clear();
// 4J-PB - the libs will display the Returned to Title screen
// UINT uiIDA[1];
// unsigned int uiIDA[1];
// uiIDA[0]=IDS_CONFIRM_OK;
//
// ui.RequestMessageBox(IDS_RETURNEDTOMENU_TITLE, IDS_RETURNEDTOTITLESCREEN_TEXT, uiIDA, 1, i,&CMinecraftApp::PrimaryPlayerSignedOutReturned,this,app.GetStringTable());
@ -5709,7 +5709,7 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4
// results switched for this dialog
if(result==C4JStorage::EMessage_ResultDecline)
{
INT saveOrCheckpointId = 0;
int saveOrCheckpointId = 0;
// Check they have the full texture pack if they are using one
// 4J-PB - Is the player trying to save but they are using a trial texturepack ?

View file

@ -197,10 +197,10 @@ public:
void SetFreezePlayers(bool bVal) { m_bFreezePlayers = bVal; }
// debug -0 show safe area
void ShowSafeArea(BOOL bShow)
void ShowSafeArea(bool show)
{
#ifdef _XBOX
CXuiSceneBase::ShowSafeArea( bShow );
CXuiSceneBase::ShowSafeArea(show);
#endif
}
// 4J-PB - to capture the social post screenshot
@ -485,7 +485,7 @@ public:
static const DWORD m_dwOfferID = 0x00000001;
static constexpr unsigned int m_dwOfferID = 0x00000001;
// timer
void InitTime();

View file

@ -342,7 +342,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft *minecraft, void *lpParamet
else
{
// 4J Stu - Host needs to generate a unique multiplayer id for sentient telemetry reporting
INT multiplayerInstanceId = TelemetryManager->GenerateMultiplayerInstanceId();
int multiplayerInstanceId = TelemetryManager->GenerateMultiplayerInstanceId();
TelemetryManager->SetMultiplayerInstanceId(multiplayerInstanceId);
}
TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected();

View file

@ -21,7 +21,7 @@ class CGameNetworkManager;
typedef struct _SearchForGamesData
{
DWORD sessionIDCount;
unsigned int sessionIDCount;
XSESSION_SEARCHRESULT_HEADER *searchBuffer;
XNQOS **ppQos;
SessionID *sessionIDList;

View file

@ -712,7 +712,7 @@ bool CPlatformNetworkManagerSony::LeaveGame(bool bMigrateHost)
if( socket != NULL )
{
//printf("Waiting for socket closed event\n");
DWORD result = socket->m_socketClosedEvent->WaitForSignal(INFINITE);
socket->m_socketClosedEvent->WaitForSignal(INFINITE);
// The session might be gone once the socket releases
if( IsInSession() )
@ -1185,9 +1185,9 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session
if( m_currentSearchResultsCount[iPad] > 0 )
{
// Loop through all the results.
for( DWORD dwResult = 0; dwResult < m_currentSearchResultsCount[iPad]; dwResult++ )
for( int resultIndex = 0; resultIndex < m_currentSearchResultsCount[iPad]; ++resultIndex )
{
pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[dwResult];
pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[resultIndex];
if(memcmp( &pSearchResult->info.sessionID, &sessionId, sizeof(SessionID) ) != 0) continue;
@ -1211,7 +1211,7 @@ bool CPlatformNetworkManagerSony::GetGameSessionInfo(int iPad, SessionID session
if(!foundSession) break;
// See if this result was contacted successfully via QoS probes.
pxnqi = &m_pCurrentQoSResult[iPad]->axnqosinfo[dwResult];
pxnqi = &m_pCurrentQoSResult[iPad]->axnqosinfo[resultIndex];
if( pxnqi->bFlags & XNET_XNQOSINFO_TARGET_CONTACTED )
{

View file

@ -9,7 +9,7 @@ bool SonyCommerce::m_bCommerceInitialised = false;
SceNpCommerce2SessionInfo SonyCommerce::m_sessionInfo;
SonyCommerce::State SonyCommerce::m_state = e_state_noSession;
int SonyCommerce::m_errorCode = 0;
LPVOID SonyCommerce::m_callbackParam = NULL;
void* SonyCommerce::m_callbackParam = NULL;
void* SonyCommerce::m_receiveBuffer = NULL;
SonyCommerce::Event SonyCommerce::m_event;
@ -29,7 +29,7 @@ sys_memory_container_t SonyCommerce::m_memContainer = SYS_MEMORY_CONTAINER_I
bool SonyCommerce::m_bUpgradingTrial = false;
SonyCommerce::CallbackFunc SonyCommerce::m_trialUpgradeCallbackFunc;
LPVOID SonyCommerce::m_trialUpgradeCallbackParam;
void* SonyCommerce::m_trialUpgradeCallbackParam;
CRITICAL_SECTION SonyCommerce::m_queueLock;
@ -81,7 +81,7 @@ void SonyCommerce::Init()
void SonyCommerce::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion)
void SonyCommerce::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion)
{
ProfileManager.SetFullVersion(bFullVersion);
if(ProfileManager.IsFullVersion())
@ -798,20 +798,20 @@ int SonyCommerce::downloadList(DownloadListInputParams &params)
return CELL_OK;
}
void SonyCommerce::UpgradeTrialCallback2(LPVOID lpParam,int err)
void SonyCommerce::UpgradeTrialCallback2(void* lpParam,int err)
{
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err);
SonyCommerce::CheckForTrialUpgradeKey();
if(err != CELL_OK)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad());
}
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
}
void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err)
void SonyCommerce::UpgradeTrialCallback1(void* lpParam,int err)
{
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err);
@ -831,7 +831,7 @@ void SonyCommerce::UpgradeTrialCallback1(LPVOID lpParam,int err)
}
else
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
C4JStorage::EMessageResult result = ui.RequestMessageBox( IDS_PRO_UNLOCKGAME_TITLE, IDS_NO_DLCOFFERS, uiIDA,1,ProfileManager.GetPrimaryPad());
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
@ -847,7 +847,7 @@ void SonyCommerce_UpgradeTrial()
app.UpgradeTrial();
}
void SonyCommerce::UpgradeTrial(CallbackFunc cb, LPVOID lpParam)
void SonyCommerce::UpgradeTrial(CallbackFunc cb, void* lpParam)
{
m_trialUpgradeCallbackFunc = cb;
m_trialUpgradeCallbackParam = lpParam;
@ -1383,7 +1383,7 @@ int SonyCommerce::commerceEnd()
return ret;
}
void SonyCommerce::CreateSession( CallbackFunc cb, LPVOID lpParam )
void SonyCommerce::CreateSession( CallbackFunc cb, void* lpParam )
{
Init();
EnterCriticalSection(&m_queueLock);
@ -1406,7 +1406,7 @@ void SonyCommerce::CloseSession()
Shutdown();
}
void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
void SonyCommerce::GetProductList( CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1416,7 +1416,7 @@ void SonyCommerce::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1428,7 +1428,7 @@ void SonyCommerce::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod
}
// 4J-PB - fill out the long description and the price for the product
void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1438,7 +1438,7 @@ void SonyCommerce::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, Prod
m_messageQueue.push(e_message_commerceAddDetailedProductInfo);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId )
void SonyCommerce::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1448,7 +1448,7 @@ void SonyCommerce::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInf
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce::Checkout( CallbackFunc cb, void* lpParam, const char* skuID )
{
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
{
@ -1469,7 +1469,7 @@ void SonyCommerce::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID )
{
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
return;
@ -1489,4 +1489,3 @@ void SonyCommerce::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, co
}

View file

@ -43,7 +43,7 @@ class SonyCommerce
{
public:
typedef void (*CallbackFunc)(LPVOID lpParam, int error_code);
typedef void (*CallbackFunc)(void* lpParam, int error_code);
/// @brief
@ -153,20 +153,20 @@ public:
public:
virtual void CreateSession(CallbackFunc cb, LPVOID lpParam) = 0;
virtual void CreateSession(CallbackFunc cb, void* lpParam) = 0;
virtual void CloseSession() = 0;
virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId) = 0;
virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId) = 0;
virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0;
virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0;
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId) = 0;
virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId) = 0;
virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId) = 0;
virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId ) = 0;
virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
#if defined(__ORBIS__) || defined( __PSVITA__)
virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID) = 0;
virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID) = 0;
#endif
virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam) = 0;
virtual void UpgradeTrial(CallbackFunc cb, void* lpParam) = 0;
virtual void CheckForTrialUpgradeKey() = 0;
virtual bool LicenseChecked() = 0;

View file

@ -21,12 +21,12 @@ static SceRemoteStorageStatus statParams;
// void remoteStorageGetCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
// void remoteStorageGetCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
// {
// app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n");
// }
//
// void remoteStorageCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
// void remoteStorageCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
// {
// app.DebugPrintf("remoteStorageCallback err : 0x%08x\n");
//
@ -40,7 +40,7 @@ static SceRemoteStorageStatus statParams;
void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
void getSaveInfoReturnCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
{
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
app.DebugPrintf("remoteStorageGetInfoCallback err : 0x%08x\n", error_code);
@ -65,7 +65,7 @@ void getSaveInfoReturnCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int
static void getSaveInfoInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
static void getSaveInfoInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
{
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
if(error_code != 0)
@ -101,7 +101,7 @@ void SonyRemoteStorage::getSaveInfo()
m_getInfoStatus = e_noInfoFound;
}
bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb, void* lpParam )
{
m_startTime = System::currentTimeMillis();
m_dataProgress = 0;
@ -109,7 +109,7 @@ bool SonyRemoteStorage::getSaveData( const char* localDirname, CallbackFunc cb,
}
static void setSaveDataInitCallback(LPVOID lpParam, SonyRemoteStorage::Status s, int error_code)
static void setSaveDataInitCallback(void* lpParam, SonyRemoteStorage::Status s, int error_code)
{
SonyRemoteStorage* pRemoteStorage = (SonyRemoteStorage*)lpParam;
if(error_code != 0)
@ -227,7 +227,7 @@ int SonyRemoteStorage::getSaveFilesize()
}
bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage::setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam )
{
m_setDataSaveInfo = info;
m_callbackFunc = cb;

View file

@ -22,7 +22,7 @@ public:
e_getStatusInProgress,
e_getStatusSucceeded
};
typedef void (*CallbackFunc)(LPVOID lpParam, Status s, int error_code);
typedef void (*CallbackFunc)(void* lpParam, Status s, int error_code);
enum GetInfoStatus
{
@ -66,7 +66,7 @@ public:
bool saveIsAvailable();
int getSaveFilesize();
bool getSaveData(const char* localDirname, CallbackFunc cb, LPVOID lpParam);
bool getSaveData(const char* localDirname, CallbackFunc cb, void* lpParam);
bool setSaveData(PSAVE_INFO info, CallbackFunc cb, void* lpParam);
bool waitingForSetData() { return (m_setDataStatus == e_settingData); }
@ -80,9 +80,9 @@ public:
void SetServiceID(char *pchServiceID) { m_pchServiceID=pchServiceID; }
virtual bool init(CallbackFunc cb, LPVOID lpParam) = 0;
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam) = 0;
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam) = 0;
virtual bool init(CallbackFunc cb, void* lpParam) = 0;
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam) = 0;
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam) = 0;
virtual void abort() = 0;
virtual bool shutdown();
virtual bool setDataInternal() = 0;
@ -95,7 +95,7 @@ public:
bool setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam );
bool setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam );
static int LoadSaveDataThumbnailReturned(void *lpParam,std::uint8_t *thumbnailData,unsigned int thumbnailBytes);
static int setDataThread(void* lpParam);
@ -119,4 +119,3 @@ protected:
bool m_bTransferStarted;
};

View file

@ -146,9 +146,9 @@ Title needs to track this and report it as a property.
These times will be used to create timelines and understand durations.
This should be tracked independently of saved games (restoring a save should not reset the seconds since initialize)
*/
INT CTelemetryManager::GetSecondsSinceInitialize()
int CTelemetryManager::GetSecondsSinceInitialize()
{
return (INT)(app.getAppTime() - m_initialiseTime);
return static_cast<int>(app.getAppTime() - m_initialiseTime);
}
/*
@ -159,27 +159,27 @@ The intent is to allow teams to capture data on the highest level categories of
For example, a game mode could be the name of the specific mini game (eg: golf vs darts) or a specific multiplayer mode (eg: hoard vs beast.) ModeID = 0 means undefined or unknown.
The intent is to answer the question "How are players playing your game?"
*/
INT CTelemetryManager::GetMode(DWORD dwUserId)
int CTelemetryManager::GetMode(int userId)
{
INT mode = (INT)eTelem_ModeId_Undefined;
int mode = static_cast<int>(eTelem_ModeId_Undefined);
Minecraft *pMinecraft = Minecraft::GetInstance();
if( pMinecraft->localplayers[dwUserId] != NULL && pMinecraft->localplayers[dwUserId]->level != NULL && pMinecraft->localplayers[dwUserId]->level->getLevelData() != NULL )
if( pMinecraft->localplayers[userId] != NULL && pMinecraft->localplayers[userId]->level != NULL && pMinecraft->localplayers[userId]->level->getLevelData() != NULL )
{
GameType *gameType = pMinecraft->localplayers[dwUserId]->level->getLevelData()->getGameType();
GameType *gameType = pMinecraft->localplayers[userId]->level->getLevelData()->getGameType();
if (gameType->isSurvival())
{
mode = (INT)eTelem_ModeId_Survival;
mode = static_cast<int>(eTelem_ModeId_Survival);
}
else if (gameType->isCreative())
{
mode = (INT)eTelem_ModeId_Creative;
mode = static_cast<int>(eTelem_ModeId_Creative);
}
else
{
mode = (INT)eTelem_ModeId_Undefined;
mode = static_cast<int>(eTelem_ModeId_Undefined);
}
}
return mode;
@ -192,17 +192,17 @@ For titles that have sub-modes (Sports/Football).
Mode is always an indicator of "How is the player choosing to play my game?" so these do not have to be consecutive.
LevelIDs and SubLevelIDs can be reused as they will always be paired with a Mode/SubModeID, Mode should be unique - SubMode can be shared between modes.
*/
INT CTelemetryManager::GetSubMode(DWORD dwUserId)
int CTelemetryManager::GetSubMode(int userId)
{
INT subMode = (INT)eTelem_SubModeId_Undefined;
int subMode = static_cast<int>(eTelem_SubModeId_Undefined);
if(Minecraft::GetInstance()->isTutorial())
{
subMode = (INT)eTelem_SubModeId_Tutorial;
subMode = static_cast<int>(eTelem_SubModeId_Tutorial);
}
else
{
subMode = (INT)eTelem_SubModeId_Normal;
subMode = static_cast<int>(eTelem_SubModeId_Normal);
}
return subMode;
@ -216,11 +216,11 @@ The intent is that level start and ends do not occur more than every 2 minutes o
Levels are unique only within a given modeID - so you can have a ModeID =1, LevelID =1 and a different ModeID=2, LevelID = 1 indicate two completely different levels.
LevelID = 0 means undefined or unknown.
*/
INT CTelemetryManager::GetLevelId(DWORD dwUserId)
int CTelemetryManager::GetLevelId(int userId)
{
INT levelId = (INT)eTelem_LevelId_Undefined;
int levelId = static_cast<int>(eTelem_LevelId_Undefined);
levelId = (INT)eTelem_LevelId_PlayerGeneratedLevel;
levelId = static_cast<int>(eTelem_LevelId_PlayerGeneratedLevel);
return levelId;
}
@ -231,24 +231,24 @@ For titles that have sub-levels.
Level is always an indicator of "How far has the player progressed." so when possible these should be consecutive or at least monotonically increasing.
LevelIDs and SubLevelIDs can be reused as they will always be paired with a Mode/SubModeID
*/
INT CTelemetryManager::GetSubLevelId(DWORD dwUserId)
int CTelemetryManager::GetSubLevelId(int userId)
{
INT subLevelId = (INT)eTelem_SubLevelId_Undefined;
int subLevelId = static_cast<int>(eTelem_SubLevelId_Undefined);
Minecraft *pMinecraft = Minecraft::GetInstance();
if(pMinecraft->localplayers[dwUserId] != NULL)
if(pMinecraft->localplayers[userId] != NULL)
{
switch(pMinecraft->localplayers[dwUserId]->dimension)
switch(pMinecraft->localplayers[userId]->dimension)
{
case 0:
subLevelId = (INT)eTelem_SubLevelId_Overworld;
subLevelId = static_cast<int>(eTelem_SubLevelId_Overworld);
break;
case -1:
subLevelId = (INT)eTelem_SubLevelId_Nether;
subLevelId = static_cast<int>(eTelem_SubLevelId_Nether);
break;
case 1:
subLevelId = (INT)eTelem_SubLevelId_End;
subLevelId = static_cast<int>(eTelem_SubLevelId_End);
break;
};
}
@ -260,9 +260,9 @@ INT CTelemetryManager::GetSubLevelId(DWORD dwUserId)
Build version of the title, used to track changes in development as well as patches/title updates
Allows developer to separate out stats from different builds
*/
INT CTelemetryManager::GetTitleBuildId()
int CTelemetryManager::GetTitleBuildId()
{
return (INT)VER_PRODUCTBUILD;
return static_cast<int>(VER_PRODUCTBUILD);
}
/*
@ -270,32 +270,32 @@ Generated by the game every time LevelStart or LevelResume is called.
This should be a unique ID (can be sequential) within a session.
Helps differentiate level attempts when a play plays the same mode/level - especially with aggregated stats
*/
INT CTelemetryManager::GetLevelInstanceID()
int CTelemetryManager::GetLevelInstanceID()
{
return (INT)m_levelInstanceID;
return m_levelInstanceID;
}
/*
MultiplayerinstanceID is a title-generated value that is the same for all players in the same multiplayer session.
Link up players into a single multiplayer session ID.
*/
INT CTelemetryManager::GetMultiplayerInstanceID()
int CTelemetryManager::GetMultiplayerInstanceID()
{
return m_multiplayerInstanceID;
}
INT CTelemetryManager::GenerateMultiplayerInstanceId()
int CTelemetryManager::GenerateMultiplayerInstanceId()
{
#if defined(_DURANGO) || defined(_XBOX)
FILETIME SystemTimeAsFileTime;
GetSystemTimeAsFileTime( &SystemTimeAsFileTime );
return *((INT *)&SystemTimeAsFileTime.dwLowDateTime);
return static_cast<int>(SystemTimeAsFileTime.dwLowDateTime);
#else
return 0;
#endif
}
void CTelemetryManager::SetMultiplayerInstanceId(INT value)
void CTelemetryManager::SetMultiplayerInstanceId(int value)
{
m_multiplayerInstanceID = value;
}
@ -304,9 +304,9 @@ void CTelemetryManager::SetMultiplayerInstanceId(INT value)
Indicates whether the game is being played in single or multiplayer mode and whether multiplayer is being played locally or over live.
How social is your game? How do people play it?
*/
INT CTelemetryManager::GetSingleOrMultiplayer()
int CTelemetryManager::GetSingleOrMultiplayer()
{
INT singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Undefined;
int singleOrMultiplayer = static_cast<int>(eSen_SingleOrMultiplayer_Undefined);
// Unused
//eSen_SingleOrMultiplayer_Single_Player
@ -314,19 +314,19 @@ INT CTelemetryManager::GetSingleOrMultiplayer()
if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
{
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Single_Player;
singleOrMultiplayer = static_cast<int>(eSen_SingleOrMultiplayer_Single_Player);
}
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() == 0)
{
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Local;
singleOrMultiplayer = static_cast<int>(eSen_SingleOrMultiplayer_Multiplayer_Local);
}
else if(app.GetLocalPlayerCount() == 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
{
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Live;
singleOrMultiplayer = static_cast<int>(eSen_SingleOrMultiplayer_Multiplayer_Live);
}
else if(app.GetLocalPlayerCount() > 1 && g_NetworkManager.GetOnlinePlayerCount() > 0)
{
singleOrMultiplayer = (INT)eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live;
singleOrMultiplayer = static_cast<int>(eSen_SingleOrMultiplayer_Multiplayer_Both_Local_and_Live);
}
return singleOrMultiplayer;
@ -336,23 +336,23 @@ INT CTelemetryManager::GetSingleOrMultiplayer()
An in-game setting that differentiates the challenge imposed on the user.
Normalized to a standard 5-point scale. Are players changing the difficulty?
*/
INT CTelemetryManager::GetDifficultyLevel(INT diff)
int CTelemetryManager::GetDifficultyLevel(int diff)
{
INT difficultyLevel = (INT)eSen_DifficultyLevel_Undefined;
int difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Undefined);
switch(diff)
{
case 0:
difficultyLevel = (INT)eSen_DifficultyLevel_Easiest;
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Easiest);
break;
case 1:
difficultyLevel = (INT)eSen_DifficultyLevel_Easier;
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Easier);
break;
case 2:
difficultyLevel = (INT)eSen_DifficultyLevel_Normal;
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Normal);
break;
case 3:
difficultyLevel = (INT)eSen_DifficultyLevel_Harder;
difficultyLevel = static_cast<int>(eSen_DifficultyLevel_Harder);
break;
}
@ -366,17 +366,17 @@ INT CTelemetryManager::GetDifficultyLevel(INT diff)
Differentiates trial/demo from full purchased titles
Is this a full title or demo?
*/
INT CTelemetryManager::GetLicense()
int CTelemetryManager::GetLicense()
{
INT license = eSen_License_Undefined;
int license = eSen_License_Undefined;
if(ProfileManager.IsFullVersion())
{
license = (INT)eSen_License_Full_Purchased_Title;
license = static_cast<int>(eSen_License_Full_Purchased_Title);
}
else
{
license = (INT)eSen_License_Trial_or_Demo;
license = static_cast<int>(eSen_License_Trial_or_Demo);
}
return license;
}
@ -385,9 +385,9 @@ INT CTelemetryManager::GetLicense()
This is intended to capture whether players played using default control scheme or customized the control scheme.
Are players customizing your controls?
*/
INT CTelemetryManager::GetDefaultGameControls()
int CTelemetryManager::GetDefaultGameControls()
{
INT defaultGameControls = eSen_DefaultGameControls_Undefined;
int defaultGameControls = eSen_DefaultGameControls_Undefined;
// Unused
//eSen_DefaultGameControls_Custom_controls
@ -401,25 +401,25 @@ INT CTelemetryManager::GetDefaultGameControls()
Are players changing default audio settings?
This is intended to capture whether players are playing with or without volume and whether they make changes from the default audio settings.
*/
INT CTelemetryManager::GetAudioSettings(DWORD dwUserId)
int CTelemetryManager::GetAudioSettings(int userId)
{
INT audioSettings = (INT)eSen_AudioSettings_Undefined;
int audioSettings = static_cast<int>(eSen_AudioSettings_Undefined);
if(dwUserId == ProfileManager.GetPrimaryPad())
if(userId == ProfileManager.GetPrimaryPad())
{
BYTE volume = app.GetGameSettings(dwUserId,eGameSetting_SoundFXVolume);
unsigned char volume = app.GetGameSettings(userId, eGameSetting_SoundFXVolume);
if(volume == 0)
{
audioSettings = (INT)eSen_AudioSettings_Off;
audioSettings = static_cast<int>(eSen_AudioSettings_Off);
}
else if(volume == DEFAULT_VOLUME_LEVEL)
{
audioSettings = (INT)eSen_AudioSettings_On_Default;
audioSettings = static_cast<int>(eSen_AudioSettings_On_Default);
}
else
{
audioSettings = (INT)eSen_AudioSettings_On_CustomSetting;
audioSettings = static_cast<int>(eSen_AudioSettings_On_CustomSetting);
}
}
return audioSettings;
@ -431,7 +431,7 @@ For example, a performance metric could points earned, race time, total kills, e
This is entirely up to you and will help us understand how well the player performed, or how far the player progressed  in the level before exiting.
How far did users progress before failing/exiting the level?
*/
INT CTelemetryManager::GetLevelExitProgressStat1()
int CTelemetryManager::GetLevelExitProgressStat1()
{
// 4J Stu - Unused
return 0;
@ -443,7 +443,7 @@ For example, a performance metric could points earned, race time, total kills, e
This is entirely up to you and will help us understand how well the player performed, or how far the player progressed  in the level before exiting.
How far did users progress before failing/exiting the level?
*/
INT CTelemetryManager::GetLevelExitProgressStat2()
int CTelemetryManager::GetLevelExitProgressStat2()
{
// 4J Stu - Unused
return 0;

View file

@ -50,24 +50,24 @@ protected:
float m_fLevelStartTime[XUSER_MAX_COUNT];
INT m_multiplayerInstanceID;
DWORD m_levelInstanceID;
int m_multiplayerInstanceID;
int m_levelInstanceID;
// Helper functions to get the various common settings
INT GetSecondsSinceInitialize();
INT GetMode(DWORD dwUserId);
INT GetSubMode(DWORD dwUserId);
INT GetLevelId(DWORD dwUserId);
INT GetSubLevelId(DWORD dwUserId);
INT GetTitleBuildId();
INT GetLevelInstanceID();
INT GetSingleOrMultiplayer();
INT GetDifficultyLevel(INT diff);
INT GetLicense();
INT GetDefaultGameControls();
INT GetAudioSettings(DWORD dwUserId);
INT GetLevelExitProgressStat1();
INT GetLevelExitProgressStat2();
int GetSecondsSinceInitialize();
int GetMode(int userId);
int GetSubMode(int userId);
int GetLevelId(int userId);
int GetSubLevelId(int userId);
int GetTitleBuildId();
int GetLevelInstanceID();
int GetSingleOrMultiplayer();
int GetDifficultyLevel(int diff);
int GetLicense();
int GetDefaultGameControls();
int GetAudioSettings(int userId);
int GetLevelExitProgressStat1();
int GetLevelExitProgressStat2();
};
extern CTelemetryManager *TelemetryManager;

View file

@ -9,7 +9,7 @@
#include "../../Minecraft.Client/Network/ClientConnection.h"
#include "../../Minecraft.World/Headers/net.minecraft.network.packet.h"
ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount,
ChangeStateConstraint::ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount,
double x0, double y0, double z0, double x1, double y1, double z1, bool contains /*= true*/, bool changeGameMode /*= false*/, GameType *targetGameMode /*= 0*/ )
: TutorialConstraint( -1 )
{
@ -73,7 +73,7 @@ void ChangeStateConstraint::tick(int iPad)
bool inASourceState = false;
Minecraft *minecraft = Minecraft::GetInstance();
for(DWORD i = 0; i < m_sourceStatesCount; ++i)
for(std::size_t i = 0; i < m_sourceStatesCount; ++i)
{
if(m_sourceStates[i] == m_tutorial->getCurrentState())
{

View file

@ -3,6 +3,8 @@
#include "TutorialEnum.h"
#include "TutorialConstraint.h"
#include <cstddef>
class AABB;
class Tutorial;
class GameType;
@ -18,7 +20,7 @@ private:
eTutorial_State m_targetState;
eTutorial_State *m_sourceStates;
DWORD m_sourceStatesCount;
std::size_t m_sourceStatesCount;
bool m_bHasChanged;
eTutorial_State m_changedFromState;
@ -30,8 +32,8 @@ private:
public:
virtual ConstraintType getType() { return e_ConstraintChangeState; }
ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], DWORD sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL );
ChangeStateConstraint( Tutorial *tutorial, eTutorial_State targetState, eTutorial_State sourceStates[], std::size_t sourceStatesCount, double x0, double y0, double z0, double x1, double y1, double z1, bool contains = true, bool changeGameMode = false, GameType *targetGameMode = NULL );
~ChangeStateConstraint();
virtual void tick(int iPad);
};
};

View file

@ -6,6 +6,8 @@
#include "TutorialMessage.h"
#include "TutorialEnum.h"
#include <cstdint>
// #define TUTORIAL_HINT_DELAY_TIME 14000 // How long we should wait from displaying one hint to the next
// #define TUTORIAL_DISPLAY_MESSAGE_TIME 7000
// #define TUTORIAL_MINIMUM_DISPLAY_MESSAGE_TIME 2000
@ -93,8 +95,8 @@ protected:
//D3DXVECTOR3 m_OriginalPosition;
public:
DWORD lastMessageTime;
DWORD m_lastHintDisplayedTime;
std::uint32_t lastMessageTime;
std::uint32_t m_lastHintDisplayedTime;
private:
PopupMessageDetails *m_lastMessage;

View file

@ -1,14 +1,16 @@
#pragma once
#include <cstdint>
typedef struct {
WORD index;
DWORD diffsSize;
BYTE *diffs;
DWORD lastByteChanged;
std::uint16_t index;
std::uint32_t diffsSize;
std::uint8_t *diffs;
std::uint32_t lastByteChanged;
} TutorialDiff_Chunk;
typedef struct {
DWORD diffCount;
std::uint32_t diffCount;
TutorialDiff_Chunk *diffs;
} TutorialDiff_File;
@ -326,4 +328,4 @@ enum eTutorial_CompletionAction
e_Tutorial_Completion_Complete_State, // This will make the current tutorial state complete
e_Tutorial_Completion_Complete_State_Gameplay_Constraints, // This will make the current tutorial state complete, and move the delayed constraints to the gameplay state
e_Tutorial_Completion_Jump_To_Last_Task,
};
};

View file

@ -57,7 +57,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor
TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -75,7 +75,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor
// we need to ask if they are sure they want to overwrite the existing game
if(bSaveExists)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(), &IUIScene_PauseMenu::ExitGameAndSaveReturned, scene, app.GetStringTable(), NULL, 0, false);
@ -92,7 +92,7 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStor
else
{
// been a few requests for a confirm on exit without saving
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(), &IUIScene_PauseMenu::ExitGameDeclineSaveReturned, scene, app.GetStringTable(), NULL, 0, false);
@ -131,7 +131,7 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage
// has someone disconnected the ethernet here, causing the pause menu to shut?
if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()))
{
UINT uiIDA[3];
unsigned int uiIDA[3];
// you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then.
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
@ -173,7 +173,7 @@ int IUIScene_PauseMenu::ExitGameDeclineSaveReturned(void *pParam,int iPad,C4JSto
// has someone disconnected the ethernet here, causing the pause menu to shut?
if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()))
{
UINT uiIDA[3];
unsigned int uiIDA[3];
// you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then.
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
@ -212,7 +212,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,&app, app.GetStringTable(), NULL, 0, false);
}
@ -287,7 +287,7 @@ int IUIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4
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 };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
}
@ -494,7 +494,7 @@ void IUIScene_PauseMenu::_ExitWorld(void *lpParameter)
}
//pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// 4J Stu - Fix for #48669 - TU5: Code: Compliance: TCR #15: Incorrect/misleading messages after signing out a profile during online game session.
// If the primary player is signed out, then that is most likely the cause of the disconnection so don't display a message box. This will allow the message box requested by the libraries to be brought up
@ -594,7 +594,7 @@ void IUIScene_PauseMenu::_ExitWorld(void *lpParameter)
}
//pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( exitReasonTitleId, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
exitReasonStringId = -1;
@ -641,7 +641,7 @@ int IUIScene_PauseMenu::SaveGameDialogReturned(void *pParam,int iPad,C4JStorage:
if(result==C4JStorage::EMessage_ResultDecline)
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2, iPad,&IUIScene_PauseMenu::EnableAutosaveDialogReturned,pParam, app.GetStringTable(), NULL, 0, false);

View file

@ -233,7 +233,7 @@ void IUIScene_StartGame::UpdateCurrentTexturePack(int iSlot)
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION;
uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION;
@ -369,7 +369,7 @@ int IUIScene_StartGame::TexturePackDialogReturned(void *pParam,int iPad,C4JStora
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 };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
}

View file

@ -319,7 +319,7 @@ void UIScene_CreateWorldMenu::tick()
else
{
// continue offline?
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
// Give the player a warning about the texture pack missing
@ -373,7 +373,7 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool p
#if defined _XBOX_ONE
if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() )
{
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
#endif
@ -526,7 +526,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION;
//uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION;
@ -569,7 +569,7 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
// We need to allow people to use a trial texture pack if they are offline - we only need them online if they want to buy it.
/*
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
if(!ProfileManager.IsSignedInLive(m_iPad))
@ -601,12 +601,12 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow()
#if defined(_DURANGO) || defined(_WINDOWS64)
// trial pack warning
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
#elif defined __PS3__ || defined __ORBIS__ || defined(__PSVITA__)
// trial pack warning
UINT uiIDA[2];
unsigned int 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);
@ -830,14 +830,14 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
{
m_bIgnoreInput = false;
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
else
{
m_bIgnoreInput = true;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1] = IDS_CANCEL;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
@ -850,21 +850,21 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
if (ProfileManager.IsSignedInPSN(ProfileManager.GetPrimaryPad()))
{
// Signed in to PSN but not connected (no internet access)
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
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];
unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL,NULL, app.GetStringTable());
return;
}*/
#else
m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
return;
@ -906,7 +906,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
@ -917,7 +917,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
if(m_bGameModeSurvival != true)
@ -984,7 +984,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus);
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
@ -1033,7 +1033,7 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame()
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
@ -1276,14 +1276,14 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
{
pClass->m_bIgnoreInput = false;
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
else
{
pClass->m_bIgnoreInput=true;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1] = IDS_CANCEL;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_CreateWorldMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false);
@ -1291,7 +1291,7 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
return 0;
#else
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
return 0;
@ -1311,14 +1311,14 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void *pParam,bool bContinu
if( noUGC )
{
pClass->m_bIgnoreInput = false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
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
{
pClass->m_bIgnoreInput = false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
}
@ -1376,7 +1376,7 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
if(isClientSide && noUGC )
{
pClass->m_bIgnoreInput = false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
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);
}

View file

@ -102,7 +102,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId)
// is it the primary player exiting?
if(m_iPad==ProfileManager.GetPrimaryPad())
{
UINT uiIDA[3];
unsigned int uiIDA[3];
int playTime = -1;
if( pMinecraft->localplayers[m_iPad] != NULL )
{
@ -172,7 +172,7 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId)
ui.ReduceTrialTimerValue();
// exit the level
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable(), 0, 0, false);

View file

@ -354,7 +354,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
if(!ProfileManager.IsSignedInLive(iPad))
{
// get them to sign in to online
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_InGameInfoMenu::MustSignInReturnedPSN,this, app.GetStringTable());
@ -457,7 +457,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId)
// Only ops will hit this, can kick anyone not local and not local to the host
std::uint8_t *smallId = new std::uint8_t();
*smallId = m_players[currentSelection];
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;

View file

@ -453,7 +453,7 @@ void UIScene_InGameSaveManagementMenu::handlePress(F64 controlId, F64 childId)
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2,m_iPad,&UIScene_InGameSaveManagementMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,true);

View file

@ -206,7 +206,7 @@ void UIScene_JoinMenu::tick()
// Show a generic network error message, not always safe to assume the error was host quitting
// without bubbling more info up from the network manager so this is the best we can do
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
#ifdef _XBOX_ONE
ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_DISCONNECTED_SERVER_QUIT, uiIDA,1,m_iPad,ErrorDialogReturned,this, app.GetStringTable());
@ -442,7 +442,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
pClass->m_bIgnoreInput = false;
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
@ -450,7 +450,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
#endif
{
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -495,7 +495,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
pClass->setVisible( true );
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -532,7 +532,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
}
else
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
exitReasonStringId = -1;

View file

@ -549,7 +549,7 @@ void UIScene_LoadMenu::tick()
else
{
// continue offline?
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
// Give the player a warning about the texture pack missing
@ -606,7 +606,7 @@ void UIScene_LoadMenu::handleInput(int iPad, int key, bool repeat, bool pressed,
#if defined _XBOX_ONE
if ( pressed && controlHasFocus(m_checkboxOnline.getId()) && !m_checkboxOnline.IsEnabled() )
{
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
#endif
@ -730,7 +730,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION;
//uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION;
@ -773,7 +773,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
// We need to allow people to use a trial texture pack if they are offline - we only need them online if they want to buy it.
/*
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
if(!ProfileManager.IsSignedInLive(m_iPad))
@ -805,12 +805,12 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
#if defined(_WINDOWS64) || defined(_DURANGO)
// trial pack warning
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad,&TrialTexturePackWarningReturned,this,app.GetStringTable(),NULL,0,false);
#elif defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
// trial pack warning
UINT uiIDA[2];
unsigned int 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);
@ -838,7 +838,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
// Check if they have the Reset Nether flag set, and confirm they want to do this
if(m_MoreOptionsParams.bResetNether)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_DONT_RESET_NETHER;
uiIDA[1]=IDS_RESET_NETHER;
@ -998,7 +998,7 @@ void UIScene_LoadMenu::LaunchGame(void)
if( (m_bGameModeSurvival != true || m_bHasBeenInCreative) || m_MoreOptionsParams.bHostPrivileges)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
if(m_bGameModeSurvival != true || m_bHasBeenInCreative)
@ -1038,7 +1038,7 @@ void UIScene_LoadMenu::LaunchGame(void)
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this);
@ -1079,7 +1079,7 @@ void UIScene_LoadMenu::LaunchGame(void)
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this);
}
@ -1138,7 +1138,7 @@ int UIScene_LoadMenu::ConfirmLoadReturned(void *pParam,int iPad,C4JStorage::EMes
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this);
}
@ -1189,14 +1189,14 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
{
pClass->m_bIgnoreInput = false;
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
else
{
pClass->m_bIgnoreInput=true;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1] = IDS_CANCEL;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false);
@ -1204,7 +1204,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
return 0;
#else
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
return 0;
@ -1277,7 +1277,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false);
@ -1337,7 +1337,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_PLAY_OFFLINE;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, app.GetStringTable(),NULL,0,false);
@ -1355,7 +1355,7 @@ int UIScene_LoadMenu::LoadDataComplete(void *pParam)
pClass->m_bIgnoreInput=false;
// give the option to delete the save
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, pClass->m_iPad,&UIScene_LoadMenu::DeleteSaveDialogReturned,pClass, app.GetStringTable(),NULL,0,false);
@ -1381,7 +1381,7 @@ int UIScene_LoadMenu::LoadSaveDataReturned(void *pParam,bool bIsCorrupt, bool bI
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
// show the message that trophies are disabled
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_SAVEDATA_COPIED_TITLE, IDS_SAVEDATA_COPIED_TEXT, uiIDA, 1,
pClass->m_iPad,&UIScene_LoadMenu::TrophyDialogReturned,pClass, app.GetStringTable());
@ -1428,7 +1428,7 @@ int UIScene_LoadMenu::DeleteSaveDataReturned(void *pParam,bool bSuccess)
// 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not
void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, int localUsersMask)
{
INT saveOrCheckpointId = 0;
int saveOrCheckpointId = 0;
bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
TelemetryManager->RecordLevelResume(pClass->m_iPad, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, app.GetGameSettings(pClass->m_iPad,eGameSetting_Difficulty), app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount(), saveOrCheckpointId);
@ -1505,7 +1505,7 @@ void UIScene_LoadMenu::checkStateAndStartGame()
// Check if they have the Reset Nether flag set, and confirm they want to do this
if(m_MoreOptionsParams.bResetNether)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_DONT_RESET_NETHER;
uiIDA[1]=IDS_RESET_NETHER;
@ -1542,7 +1542,7 @@ void UIScene_LoadMenu::LoadLevelGen(LevelGenerationOptions *levelGen)
if(isClientSide && noUGC )
{
m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
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);
return;
@ -1669,14 +1669,14 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
{
pClass->m_bIgnoreInput = false;
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive if the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPadNotSignedInLive, NULL, NULL, app.GetStringTable());
}
else
{
pClass->m_bIgnoreInput=true;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1] = IDS_CANCEL;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPadNotSignedInLive, &UIScene_LoadMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false);
@ -1684,7 +1684,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
return 0;
#else
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
return 0;
@ -1705,7 +1705,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
{
pClass->m_bIgnoreInput = false;
pClass->setVisible( true );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
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);
}
@ -1713,7 +1713,7 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
{
pClass->m_bIgnoreInput = false;
pClass->setVisible( true );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(),NULL,0,false);
}

View file

@ -782,7 +782,7 @@ void UIScene_LoadOrJoinMenu::tick()
#ifdef _XBOX_ONE
if(g_NetworkManager.ShouldMessageForFullSession())
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -1012,7 +1012,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
int npAvailability = ProfileManager.getNPAvailability(iPad);
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
@ -1024,7 +1024,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
if(!ProfileManager.IsSignedInLive(iPad))
{
// get them to sign in to online
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(), &UIScene_LoadOrJoinMenu::MustSignInReturnedPSN, this, app.GetStringTable(),NULL,0,false);
@ -1067,7 +1067,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false);
@ -1076,7 +1076,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
if(StorageManager.EnoughSpaceForAMinSaveGame())
{
UINT uiIDA[4];
unsigned int uiIDA[4];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_TITLE_RENAMESAVE;
uiIDA[2]=IDS_TOOLTIPS_DELETESAVE;
@ -1098,7 +1098,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2,iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false);
@ -1299,7 +1299,7 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId)
if(pSaveInfo->thumbnailData == NULL && pSaveInfo->modifiedTime == 0) // no thumbnail data and time of zero and zero blocks useset for corrupt files
{
// give the option to delete the save
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,this, app.GetStringTable(),NULL,0,false);
@ -1417,7 +1417,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
{
// not allowed to join
#ifndef __PSVITA__
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// Not allowed to play online
ui.RequestMessageBox(IDS_ONLINE_GAME, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, m_iPad,NULL,this,app.GetStringTable(),NULL,0,false);
@ -1440,7 +1440,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
// If this is an online game but not all players are signed in to Live, stop!
else if (!isSignedInLive)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// Check if PSN is unavailable because of age restriction
@ -1472,7 +1472,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
iResult=sceNpCommerceDialogOpen(&param);
// UINT uiIDA[2];
// unsigned int uiIDA[2];
// uiIDA[0]=IDS_CONFIRM_OK;
// uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP;
// ui.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::PSPlusReturned,this, app.GetStringTable(),NULL,0,false);
@ -1515,7 +1515,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_TEXTUREPACK_FULLVERSION;
//uiIDA[1]=IDS_TEXTURE_PACK_TRIALVERSION;
@ -2133,7 +2133,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned,pClass, app.GetStringTable(),NULL,0,false);
@ -2143,7 +2143,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS
#ifdef SONY_REMOTE_STORAGE_UPLOAD
case C4JStorage::EMessage_ResultFourthOption: // upload to cloud
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -2154,7 +2154,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned(void *pParam,int iPad,C4JS
#if defined _XBOX_ONE || defined __ORBIS__
case C4JStorage::EMessage_ResultFourthOption: // copy save
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -2218,7 +2218,7 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned(void *pParam,int iPad,C4JS
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 };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
}
@ -2432,7 +2432,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter)
else
{
// no save available, inform the user about the functionality
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD, IDS_SAVE_TRANSFER_NOT_AVAILABLE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),RemoteSaveNotFoundCallback,pClass, app.GetStringTable(),NULL,0,false);
}
@ -2676,7 +2676,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter)
// if we've arrived here, the save has been created successfully
pClass->m_iState=e_SavesRepopulate;
pClass->updateTooltips();
UINT uiIDA[1];
unsigned int 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());
@ -2752,7 +2752,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void *lpParameter)
}
else
{
UINT uiIDA[1];
unsigned int 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());
pClass->m_eSaveTransferState = eSaveTransfer_Finished;
@ -2896,7 +2896,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc(void *lpParameter)
break;
case eSaveUpload_FileDataUploaded:
{
UINT uiIDA[1];
unsigned int 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());
pClass->m_eSaveUploadState = esaveUpload_Finished;
@ -2913,7 +2913,7 @@ int UIScene_LoadOrJoinMenu::UploadSonyCrossSaveThreadProc(void *lpParameter)
}
else
{
UINT uiIDA[1];
unsigned int 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());
pClass->m_eSaveUploadState = esaveUpload_Finished;
@ -2937,7 +2937,7 @@ void UIScene_LoadOrJoinMenu::SaveUploadReturned(void *lpParam, SonyRemoteStorage
if(pClass->m_saveTransferUploadCancelled)
{
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox( IDS_CANCEL_UPLOAD_TITLE, IDS_CANCEL_UPLOAD_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), CrossSaveUploadFinishedCallback, pClass, app.GetStringTable() );
pClass->m_eSaveUploadState=esaveUpload_Finished;
}
@ -3479,7 +3479,7 @@ int UIScene_LoadOrJoinMenu::CopySaveDataReturned(void *lpParam, bool success, C4
else
{
#ifdef __ORBIS__
UINT uiIDA[1];
unsigned int uiIDA[1];
// you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then.
uiIDA[0]=IDS_OK;

View file

@ -262,7 +262,7 @@ void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed,
case ACTION_MENU_X:
if(pressed && ProfileManager.IsFullVersion())
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS__NETWORK_PSN;
uiIDA[1]=IDS_NETWORK_ADHOC;
ui.RequestMessageBox(IDS_SELECT_NETWORK_MODE_TITLE, IDS_SELECT_NETWORK_MODE_TEXT, uiIDA, 2, XUSER_INDEX_ANY, &UIScene_MainMenu::SelectNetworkModeReturned,this);
@ -338,7 +338,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
case eControl_Exit:
if( ProfileManager.IsFullVersion() )
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CANCEL;
uiIDA[1]=IDS_OK;
ui.RequestMessageBox(IDS_WARNING_ARCADE_TITLE, IDS_WARNING_ARCADE_TEXT, uiIDA, 2, XUSER_INDEX_ANY,&UIScene_MainMenu::ExitGameReturned,this);
@ -384,7 +384,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
else
{
// Ask user to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, this, app.GetStringTable());
@ -681,7 +681,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void *pParam, bool bContinue, in
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
UINT uiIDA[1] = { IDS_OK };
unsigned int uiIDA[1] = { IDS_OK };
if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad()))
{
@ -879,7 +879,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
// 4J-JEV: We only need to update rich-presence if the sign-in status changes.
ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false);
UINT uiIDA[1] = { IDS_OK };
unsigned int uiIDA[1] = { IDS_OK };
// guests can't look at leaderboards
if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad()))
@ -903,7 +903,7 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void *pParam,bool bContinue,in
pClass->m_bIgnorePress=false;
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see leaderboards
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
#endif
@ -1087,7 +1087,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
return;
}
// UINT uiIDA[1];
// unsigned int uiIDA[1];
// uiIDA[0]=IDS_OK;
// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass);
}
@ -1095,7 +1095,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
// Check if PSN is unavailable because of age restriction
if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::PlayOfflineReturned, pClass, app.GetStringTable());
@ -1121,7 +1121,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
else
{
// Ask user to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass, app.GetStringTable());
@ -1174,7 +1174,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
}
}
// UINT uiIDA[1];
// unsigned int uiIDA[1];
// uiIDA[0]=IDS_OK;
// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass);
}
@ -1187,7 +1187,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
// Check if PSN is unavailable because of age restriction
if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, pClass, app.GetStringTable());
@ -1211,7 +1211,7 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards(vo
else
{
// Ask user to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
ui.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass, app.GetStringTable());
@ -1254,7 +1254,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
if(ProfileManager.IsGuest(iPad))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
m_bIgnorePress=false;
@ -1300,7 +1300,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
m_eAction=eAction_RunGamePSN;
// get them to sign in to online
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
@ -1320,7 +1320,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
m_eAction=eAction_RunGame;
// Signed in to PSN but not connected (no internet access)
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable());
}
@ -1348,7 +1348,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable());
}
@ -1356,7 +1356,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
{
m_eAction=eAction_RunGamePSN;
// Not signed in to PSN
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPad, &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
@ -1477,7 +1477,7 @@ void UIScene_MainMenu::RunPlayGame(int iPad)
void UIScene_MainMenu::RunLeaderboards(int iPad)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// guests can't look at leaderboards
@ -1490,7 +1490,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
#if defined __PS3__ || defined __PSVITA__
m_eAction=eAction_RunLeaderboardsPSN;
// get them to sign in to online
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable());
@ -1501,14 +1501,14 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
if (ProfileManager.IsSignedInPSN(iPad))
{
// Signed in to PSN but not connected (no internet access)
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
return;
@ -1521,14 +1521,14 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
return;
@ -1554,7 +1554,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
{
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see leaderboards
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable());
#endif
@ -1574,7 +1574,7 @@ void UIScene_MainMenu::RunLeaderboards(int iPad)
}
void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// Check if this means downloadable content
@ -1615,7 +1615,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
}
}
// UINT uiIDA[1];
// unsigned int uiIDA[1];
// uiIDA[0]=IDS_OK;
// ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,this);
return;
@ -1625,7 +1625,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
if (m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
{
m_bIgnorePress=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(), nullptr, this, app.GetStringTable());
@ -1659,7 +1659,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
m_bIgnorePress=false;
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see the store
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable());
#endif
@ -1708,7 +1708,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
#if defined(__PS3__) || defined(__PSVITA__)
m_eAction=eAction_RunUnlockOrDLCPSN;
// get them to sign in to online
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
//uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable());
@ -1721,20 +1721,20 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
return;
}
#else
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1);
#endif
@ -1753,7 +1753,7 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
#if defined(__PS3__) || defined(__PSVITA__)
m_eAction=eAction_RunUnlockOrDLCPSN;
// get them to sign in to online
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_MainMenu::MustSignInReturnedPSN,this, app.GetStringTable());
#elif defined __ORBIS__
@ -1765,20 +1765,20 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad)
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::MustSignInReturnedPSN, this, app.GetStringTable());
return;
}
#else
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1);
#endif
@ -1836,7 +1836,7 @@ void UIScene_MainMenu::tick()
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable());
}
@ -1872,7 +1872,7 @@ void UIScene_MainMenu::tick()
if(g_NetworkManager.ShouldMessageForFullSession())
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -1895,7 +1895,7 @@ void UIScene_MainMenu::tick()
m_eAction = eAction_RunGame;
// give the option of continuing offline
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION_PATCH_AVAILABLE, uiIDA, 1, ProfileManager.GetPrimaryPad(), &UIScene_MainMenu::PlayOfflineReturned, this, app.GetStringTable());
@ -1916,7 +1916,7 @@ void UIScene_MainMenu::tick()
void UIScene_MainMenu::RunAchievements(int iPad)
{
#if TO_BE_IMPLEMENTED
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// guests can't look at achievements
@ -1935,7 +1935,7 @@ void UIScene_MainMenu::RunHelpAndOptions(int iPad)
{
if(ProfileManager.IsGuest(iPad))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
}

View file

@ -426,7 +426,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
{
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
@ -437,20 +437,20 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
}
#else // __PS3__
// get them to sign in to online
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
#endif
@ -490,7 +490,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
case ACTION_MENU_RIGHT_SCROLL:
if( bDisplayBanTip )
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ACTION_BAN_LEVEL_TITLE, IDS_ACTION_BAN_LEVEL_DESCRIPTION, uiIDA, 2, iPad,&UIScene_PauseMenu::BanGameDialogReturned,this, app.GetStringTable(), NULL, 0, false);
@ -517,7 +517,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
break;
case BUTTON_PAUSE_LEADERBOARDS:
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
//4J Gordon: Being used for the leaderboards proper now
@ -539,7 +539,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
// Check if PSN is unavailable because of age restriction
if (errorCode == SCE_NP_ERROR_AGE_RESTRICTION)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable());
@ -551,7 +551,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
#if defined __PS3__ || __PSVITA__
// get them to sign in to online
m_eAction=eAction_ViewLeaderboardsPSN;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::MustSignInReturnedPSN,this, app.GetStringTable(), NULL, 0, false);
#elif defined(__ORBIS__)
@ -560,7 +560,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
{
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable());
}
@ -573,19 +573,19 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
// Id
assert(!ProfileManager.isConnectedToPSN(m_iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
}
#else
UINT uiIDA[1] = { IDS_OK };
unsigned int uiIDA[1] = { IDS_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, m_iPad);
#endif
}
@ -599,7 +599,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
{
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see leaderboards
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad,NULL,this, app.GetStringTable(), NULL, 0, false);
#endif
@ -625,7 +625,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
// guests can't look at achievements
if(ProfileManager.IsGuest(pNotifyPressData->UserIndex))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable(), NULL, 0, false);
}
@ -648,7 +648,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
// Check if it's the trial version
if(ProfileManager.IsFullVersion())
{
UINT uiIDA[3];
unsigned int uiIDA[3];
// is it the primary player exiting?
if(m_iPad==ProfileManager.GetPrimaryPad())
@ -750,7 +750,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
ui.ReduceTrialTimerValue();
// exit the level
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::ExitGameDialogReturned, dynamic_cast<IUIScene_PauseMenu*>(this), app.GetStringTable(), NULL, 0, false);
@ -790,7 +790,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
{
#if defined(__PS3__)
m_eAction=eAction_SaveGamePSN;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::MustSignInReturnedPSN,this, app.GetStringTable(), NULL, 0, false);
@ -800,7 +800,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
{
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable());
}
@ -811,14 +811,14 @@ void UIScene_PauseMenu::PerformActionSaveGame()
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(m_iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad, NULL, NULL, app.GetStringTable());
}
else
{
// Not signed in to PSN
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, this, app.GetStringTable(), NULL, 0, false);
}
@ -826,7 +826,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
}
else
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
ui.RequestMessageBox(IDS_UNLOCK_TITLE, IDS_UNLOCK_TOSAVE_TEXT, uiIDA, 2,m_iPad,&UIScene_PauseMenu::UnlockFullSaveReturned,this,app.GetStringTable(), NULL, 0, false);
@ -856,7 +856,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
// tell sentient about the upsell of the full version of the texture pack
TelemetryManager->RecordUpsellPresented(m_iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -884,7 +884,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
if(result == C4JStorage::ELoadGame_DeviceRemoved)
{
// this will be a tester trying to be clever
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_SELECTANEWDEVICE;
uiIDA[1]=IDS_NODEVICE_DECLINE;
@ -896,7 +896,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
#if defined(_XBOX_ONE) || defined(__ORBIS__)
if(!m_savesDisabled)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_DISABLE_AUTOSAVE, IDS_CONFIRM_DISABLE_AUTOSAVE, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::DisableAutosaveDialogReturned,this, app.GetStringTable(), NULL, 0, false);
@ -906,7 +906,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
// we need to ask if they are sure they want to overwrite the existing game
if(bSaveExists)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::SaveGameDialogReturned,this, app.GetStringTable(), NULL, 0, false);
@ -914,7 +914,7 @@ void UIScene_PauseMenu::PerformActionSaveGame()
else
{
#if defined(_XBOX_ONE) || defined(__ORBIS__)
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2, m_iPad,&IUIScene_PauseMenu::EnableAutosaveDialogReturned,this, app.GetStringTable(), NULL, 0, false);
@ -983,7 +983,7 @@ int UIScene_PauseMenu::UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,pClass, app.GetStringTable(), NULL, 0, false);
}
@ -1099,7 +1099,7 @@ int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void *pParam,bool bContin
if(bContinue==true)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// guests can't look at leaderboards
@ -1148,7 +1148,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION)
{
// 4J Stu - This is a bit messy and is due to the library incorrectly returning false for IsSignedInLive is the npAvailability isn't SCE_OK
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
@ -1159,19 +1159,19 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
// Signed in to PSN but not connected (no internet access)
assert(!ProfileManager.isConnectedToPSN(iPad));
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_OK;
ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable());
}
else
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT;
ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, pClass, app.GetStringTable(), NULL, 0, false);
}
#else // __PS3__
// You're not signed in to PSN!
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_PRO_NOTONLINE_ACCEPT;
uiIDA[1]=IDS_PRO_NOTONLINE_DECLINE;
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 2, iPad,&UIScene_PauseMenu::MustSignInReturnedPSN,pClass, app.GetStringTable(), NULL, 0, false);
@ -1185,7 +1185,7 @@ int UIScene_PauseMenu::WarningTrialTexturePackReturned(void *pParam,int iPad,C4J
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,pClass, app.GetStringTable(), NULL, 0, false);
}
@ -1264,7 +1264,7 @@ int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void *pParam,bool bContinue
ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL);
if(bContentRestricted)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,pClass, app.GetStringTable(), NULL, 0, false);
}
@ -1378,7 +1378,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -1396,7 +1396,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
// we need to ask if they are sure they want to overwrite the existing game
if(bSaveExists)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameAndSaveReturned, dynamic_cast<IUIScene_PauseMenu*>(pClass), app.GetStringTable(), NULL, 0, false);
@ -1413,7 +1413,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
else
{
// been a few requests for a confirm on exit without saving
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&IUIScene_PauseMenu::ExitGameDeclineSaveReturned, dynamic_cast<IUIScene_PauseMenu*>(pClass), app.GetStringTable(), NULL, 0, false);

View file

@ -303,7 +303,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr
#endif
// no
UINT uiIDA[1] = { IDS_OK };
unsigned int uiIDA[1] = { IDS_OK };
#ifdef __ORBIS__
// Check if PSN is unavailable because of age restriction
int npAvailability = ProfileManager.getNPAvailability(iPad);
@ -351,7 +351,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see the store
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad,NULL,this, app.GetStringTable(),NULL,0,false);
#endif
}
@ -364,7 +364,7 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
this->m_bIgnoreInput = true;
UINT uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL };
unsigned int uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL };
ui.RequestMessageBox(IDS_UNLOCK_DLC_TITLE, IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad,&UIScene_SkinSelectMenu::UnlockSkinReturned,this,app.GetStringTable(),NULL,0,false);
}
}
@ -617,7 +617,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
if(!m_currentPack->hasPurchasedFile( DLCManager::e_DLCType_Skin, skinFile->getPath() ))
{
// no
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// We need to upsell the full version
@ -660,7 +660,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
{
#if !(defined(_XBOX) || defined(_WIN64)) // 4J Stu - Temp to get the win build running, but so we check this for other platforms
// you can't see the store
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable(),NULL,0,false);
#endif
@ -675,7 +675,7 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
m_bIgnoreInput = true;
renableInputAfterOperation = false;
UINT uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL };
unsigned int uiIDA[2] = { IDS_CONFIRM_OK, IDS_CONFIRM_CANCEL };
ui.RequestMessageBox(IDS_UNLOCK_DLC_TITLE, IDS_UNLOCK_DLC_SKIN, uiIDA, 2, iPad,&UIScene_SkinSelectMenu::UnlockSkinReturned,this,app.GetStringTable(),NULL,0,false);
}
}
@ -1646,7 +1646,7 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
#elif defined(_DURANGO)
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad, NULL, NULL, app.GetStringTable() );
#endif

View file

@ -200,7 +200,7 @@ HRESULT CScene_ConnectingProgress::OnTimer( XUIMessageTimer *pTimer, BOOL& bHand
}
else
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
#ifdef _XBOX
StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());

View file

@ -16,41 +16,41 @@ void CXuiCtrl4JList::AddData( const LIST_ITEM_INFO& ItemInfo , int iSortListFrom
{
// need to allocate memory for the structure and its strings
// and remap the string pointers
DWORD dwBytes=0;
DWORD dwLen1=0;
DWORD dwLen2=0;
std::size_t totalBytes = 0;
std::size_t textBytes = 0;
std::size_t imageBytes = 0;
if(ItemInfo.pwszText)
{
dwLen1=(int)wcslen(ItemInfo.pwszText)*sizeof(WCHAR);
dwBytes+=dwLen1+sizeof(WCHAR);
textBytes = wcslen(ItemInfo.pwszText) * sizeof(WCHAR);
totalBytes += textBytes + sizeof(WCHAR);
}
if(ItemInfo.pwszImage)
{
dwLen2=(int)(wcslen(ItemInfo.pwszImage))*sizeof(WCHAR);
dwBytes+=dwLen2+sizeof(WCHAR);
imageBytes = wcslen(ItemInfo.pwszImage) * sizeof(WCHAR);
totalBytes += imageBytes + sizeof(WCHAR);
}
dwBytes+=sizeof( LIST_ITEM_INFO );
LIST_ITEM_INFO *pItemInfo = (LIST_ITEM_INFO *)new BYTE[dwBytes];
ZeroMemory(pItemInfo,dwBytes);
totalBytes += sizeof(LIST_ITEM_INFO);
LIST_ITEM_INFO *pItemInfo = reinterpret_cast<LIST_ITEM_INFO *>(new unsigned char[totalBytes]);
ZeroMemory(pItemInfo, totalBytes);
XMemCpy( pItemInfo, &ItemInfo, sizeof( LIST_ITEM_INFO ) );
if(dwLen1!=0)
if(textBytes != 0)
{
XMemCpy( &pItemInfo[1], ItemInfo.pwszText, dwLen1 );
XMemCpy( &pItemInfo[1], ItemInfo.pwszText, textBytes );
pItemInfo->pwszText=(LPCWSTR)&pItemInfo[1];
if(dwLen2!=0)
if(imageBytes != 0)
{
BYTE *pwszImage = ((BYTE *)&pItemInfo[1])+dwLen1+sizeof(WCHAR);
XMemCpy( pwszImage, ItemInfo.pwszImage, dwLen2 );
pItemInfo->pwszImage=(LPCWSTR)pwszImage;
unsigned char *imageText = reinterpret_cast<unsigned char *>(&pItemInfo[1]) + textBytes + sizeof(WCHAR);
XMemCpy( imageText, ItemInfo.pwszImage, imageBytes );
pItemInfo->pwszImage = reinterpret_cast<LPCWSTR>(imageText);
}
}
else if(dwLen2!=0)
else if(imageBytes != 0)
{
XMemCpy( &pItemInfo[1], ItemInfo.pwszImage, dwLen2 );
XMemCpy( &pItemInfo[1], ItemInfo.pwszImage, imageBytes );
pItemInfo->pwszImage=(LPCWSTR)&pItemInfo[1];
}
@ -162,9 +162,9 @@ int CXuiCtrl4JList::GetIndexByUserData(int iData)
return 0;
}
CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetData(DWORD dw)
CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetData(int index)
{
return *m_vListData[dw];
return *m_vListData[index];
}
CXuiCtrl4JList::LIST_ITEM_INFO& CXuiCtrl4JList::GetDataiData(int iData)
@ -356,14 +356,14 @@ HRESULT CXuiCtrl4JList::OnGetItemEnable(XUIMessageGetItemEnable *pGetItemEnableD
}
HRESULT CXuiCtrl4JList::SetBorder(DWORD dw,BOOL bShow)
HRESULT CXuiCtrl4JList::SetBorder(int index, bool show)
{
CXuiControl Control;
HXUIOBJ hVisual,hBorder;
GetItemControl(dw,&Control);
GetItemControl(index,&Control);
Control.GetVisual(&hVisual);
XuiElementGetChildById(hVisual,L"Border",&hBorder);
return XuiElementSetShow(hBorder,bShow);
return XuiElementSetShow(hBorder,show);
}
void CXuiCtrl4JList::SetSelectionChangedHandle(HXUIOBJ hObj)
@ -383,7 +383,7 @@ HRESULT CXuiCtrl4JList::OnDestroy()
{
XuiDestroyBrush( m_vListData[i]->hXuiBrush );
}
delete [] (BYTE *)m_vListData[i];
delete [] reinterpret_cast<unsigned char *>(m_vListData[i]);
}
}
return S_OK;
@ -402,4 +402,4 @@ HRESULT CXuiCtrl4JList::OnNotifySelChanged( HXUIOBJ hObjSource, XUINotifySelChan
bHandled = xuiMsg.bHandled;
}
return S_OK;
}
}

View file

@ -17,8 +17,8 @@ public:
LPCWSTR pwszText;
LPCWSTR pwszImage;
HXUIBRUSH hXuiBrush;
BOOL fChecked;
BOOL fEnabled;
bool fChecked;
bool fEnabled;
bool bIsDamaged; // damaged save
FILETIME fTime;
int iData; // user data
@ -40,10 +40,10 @@ public:
void UpdateGraphic(int iItem,HXUIBRUSH hXuiBrush );
void UpdateGraphic(FILETIME *pfTime,HXUIBRUSH hXuiBrush );
void UpdateGraphicFromiData(int iData,HXUIBRUSH hXuiBrush );
LIST_ITEM_INFO& GetData(DWORD dw);
LIST_ITEM_INFO& GetData(int index);
LIST_ITEM_INFO& GetData(FILETIME *pFileTime);
LIST_ITEM_INFO& GetDataiData(int iData);
HRESULT SetBorder(DWORD dw,BOOL bShow); // for a highlight around the current selected item in the controls layout
HRESULT SetBorder(int index, bool show); // for a highlight around the current selected item in the controls layout
void SetSelectionChangedHandle(HXUIOBJ hObj);
protected:

View file

@ -55,19 +55,19 @@ HRESULT CXuiCtrlCraftIngredientSlot::OnGetSourceText(XUIMessageGetSourceText *pG
return S_OK;
}
void CXuiCtrlCraftIngredientSlot::SetRedBox(BOOL bVal)
void CXuiCtrlCraftIngredientSlot::SetRedBox(bool show)
{
HRESULT hr=S_OK;
HXUIOBJ hObj,hObjChild;
hr=GetVisual(&hObj);
XuiElementGetChildById(hObj,L"BoxRed",&hObjChild);
XuiElementSetShow(hObjChild,bVal);
XuiElementSetShow(hObjChild,show);
XuiElementGetChildById(hObj,L"Exclaim",&hObjChild);
XuiElementSetShow(hObjChild,bVal);
XuiElementSetShow(hObjChild,show);
}
void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool isFoil, BOOL bShow)
void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool isFoil, bool bShow)
{
m_item = nullptr;
m_iID=iId;
@ -92,7 +92,7 @@ void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCo
XuiElementSetShow(m_hObj,bShow);
}
void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow)
void CXuiCtrlCraftIngredientSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow)
{
if(item == NULL) SetIcon(iPad, 0,0,0,0,0,false,false,bShow);
else
@ -120,4 +120,4 @@ void CXuiCtrlCraftIngredientSlot::SetDescription(LPCWSTR Desc)
XuiControlSetText(hObjChild,Desc);
XuiElementSetShow(hObjChild,Desc==NULL?FALSE:TRUE);
m_Desc=Desc;
}
}

View file

@ -14,9 +14,9 @@ public:
CXuiCtrlCraftIngredientSlot();
virtual ~CXuiCtrlCraftIngredientSlot() { };
void SetRedBox(BOOL bVal);
void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, BOOL bShow=TRUE);
void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE);
void SetRedBox(bool show);
void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, bool bShow=true);
void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow=true);
void SetDescription(LPCWSTR Desc);
protected:
@ -42,4 +42,4 @@ private:
bool m_isFoil;
LPCWSTR m_Desc;
bool m_isDirty;
};
};

View file

@ -32,7 +32,7 @@ HRESULT CXuiCtrlEnchantmentButton::OnInit(XUIMessageInit* pInitData, BOOL& rfHan
assert( parent != NULL );
VOID *pObj;
void *pObj;
XuiObjectFromHandle( parent, &pObj );
m_containerScene = (CXuiSceneEnchant *)pObj;
@ -87,4 +87,4 @@ HRESULT CXuiCtrlEnchantmentButton::OnGetSourceDataText(XUIMessageGetSourceText *
bHandled = TRUE;
return S_OK;
}
}

View file

@ -23,7 +23,7 @@
//-----------------------------------------------------------------------------
CXuiCtrlEnchantmentBook::CXuiCtrlEnchantmentBook() :
m_bDirty(FALSE),
m_bDirty(false),
m_fScale(1.0f),
m_fAlpha(1.0f)
{
@ -64,7 +64,7 @@ HRESULT CXuiCtrlEnchantmentBook::OnInit(XUIMessageInit* pInitData, BOOL& rfHandl
assert( parent != NULL );
VOID *pObj;
void *pObj;
XuiObjectFromHandle( parent, &pObj );
m_containerScene = (CXuiSceneEnchant *)pObj;
@ -343,4 +343,4 @@ void CXuiCtrlEnchantmentBook::tickBook()
flipA += (diff - flipA) * 0.9f;
flip = flip + flipA;
}
}

View file

@ -38,7 +38,7 @@ private:
float flip, oFlip, flipT, flipA;
float open, oOpen;
BOOL m_bDirty;
bool m_bDirty;
float m_fScale,m_fAlpha;
int m_iPad;
CXuiSceneEnchant *m_containerScene;
@ -48,4 +48,4 @@ private:
float m_fRawWidth,m_fRawHeight;
void tickBook();
};
};

View file

@ -42,7 +42,7 @@ HRESULT CXuiCtrlEnchantmentButtonText::OnInit(XUIMessageInit* pInitData, BOOL& r
assert( parent != NULL );
VOID *pObj;
void *pObj;
XuiObjectFromHandle( parent, &pObj );
m_parentControl = (CXuiCtrlEnchantmentButton *)pObj;
@ -182,4 +182,4 @@ std::wstring CXuiCtrlEnchantmentButtonText::EnchantmentNames::getRandomName()
word += words[random.nextInt(words.size())];
}
return word;
}
}

View file

@ -15,7 +15,7 @@
//-----------------------------------------------------------------------------
CXuiCtrlMinecraftPlayer::CXuiCtrlMinecraftPlayer() :
m_bDirty(FALSE),
m_bDirty(false),
m_fScale(1.0f),
m_fAlpha(1.0f)
{
@ -45,7 +45,7 @@ HRESULT CXuiCtrlMinecraftPlayer::OnInit(XUIMessageInit* pInitData, BOOL& rfHandl
assert( parent != NULL );
VOID *pObj;
void *pObj;
XuiObjectFromHandle( parent, &pObj );
m_containerScene = (CXuiSceneInventory *)pObj;
@ -187,4 +187,3 @@ HRESULT CXuiCtrlMinecraftPlayer::OnRender(XUIMessageRender *pRenderData, BOOL &b
}

View file

@ -31,7 +31,7 @@ protected:
HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled);
private:
BOOL m_bDirty;
bool m_bDirty;
float m_fScale,m_fAlpha;
int m_iPad;
CXuiSceneInventory *m_containerScene;
@ -39,4 +39,4 @@ private:
float m_fScreenWidth,m_fScreenHeight;
float m_fRawWidth,m_fRawHeight;
};
};

View file

@ -73,7 +73,7 @@ private:
bool bindTexture(const std::wstring& urlTexture, int backupTexture);
bool bindTexture(const std::wstring& urlTexture, const std::wstring& backupTexture);
BOOL m_bDirty;
bool m_bDirty;
float m_fScale,m_fAlpha;
std::wstring m_customTextureUrl;
@ -93,7 +93,7 @@ private:
float m_walkAnimPos;
bool m_bAutoRotate, m_bRotatingLeft;
BYTE m_rotateTick;
std::uint8_t m_rotateTick;
float m_fTargetRotation, m_fOriginalRotation;
int m_framesAnimatingRotation;
bool m_bAnimatingToFacing;
@ -103,4 +103,4 @@ private:
ESkinPreviewAnimations m_currentAnimation;
//std::vector<Model::SKIN_BOX *> *m_pvAdditionalBoxes;
std::vector<ModelPart *> *m_pvAdditionalModelParts;
};
};

View file

@ -73,7 +73,7 @@ CXuiCtrlMinecraftSlot::~CXuiCtrlMinecraftSlot()
delete m_pItemRenderer;
}
VOID CXuiCtrlMinecraftSlot::SetPassThroughDataAssociation(unsigned int iID, unsigned int iData)
void CXuiCtrlMinecraftSlot::SetPassThroughDataAssociation(unsigned int iID, unsigned int iData)
{
m_item = nullptr;
m_iPassThroughIdAssociation = iID;
@ -309,7 +309,7 @@ HRESULT CXuiCtrlMinecraftSlot::OnRender(XUIMessageRender *pRenderData, BOOL &bHa
}
void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil)
void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool bShow, bool isFoil)
{
m_item = nullptr;
m_iID=iId;
@ -343,7 +343,7 @@ void CXuiCtrlMinecraftSlot::SetIcon(int iPad, int iId,int iAuxVal, int iCount, i
XuiElementSetShow(m_hObj,bShow);
}
void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow)
void CXuiCtrlMinecraftSlot::SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow)
{
m_item = item;
m_isFoil = item->isFoil();

View file

@ -16,14 +16,14 @@ class CXuiCtrlMinecraftSlot : public CXuiControlImpl
public:
XUI_IMPLEMENT_CLASS(CXuiCtrlMinecraftSlot, L"CXuiCtrlMinecraftSlot", XUI_CLASS_LABEL)
VOID SetPassThroughDataAssociation(unsigned int iID, unsigned int iData);
void SetPassThroughDataAssociation(unsigned int iID, unsigned int iData);
CXuiCtrlMinecraftSlot();
virtual ~CXuiCtrlMinecraftSlot();
void renderGuiItem(Font *font, Textures *textures,ItemInstance *item, int x, int y);
void RenderItem();
void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,BOOL bShow, bool isFoil);
void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE);
void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha,bool bDecorations,bool bShow, bool isFoil);
void SetIcon(int iPad, std::shared_ptr<ItemInstance> item, int iScale, unsigned int uiAlpha,bool bDecorations, bool bShow=true);
protected:
@ -39,9 +39,9 @@ protected:
private:
std::shared_ptr<ItemInstance> m_item;
BOOL m_bDirty;
INT m_iPassThroughDataAssociation;
INT m_iPassThroughIdAssociation;
bool m_bDirty;
int m_iPassThroughDataAssociation;
int m_iPassThroughIdAssociation;
float m_fScale,m_fAlpha;
int m_iPad;
int m_iID;
@ -56,4 +56,4 @@ private:
ItemRenderer *m_pItemRenderer;
static LPCWSTR xzpIcons[15];
};
};

View file

@ -5,7 +5,7 @@
HRESULT CXuiCtrlSliderWrapper::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
{
VOID *pObj;
void *pObj;
HXUIOBJ hObjChild;
XuiElementGetChildById(m_hObj,L"FocusSink",&hObjChild);
@ -17,8 +17,8 @@ HRESULT CXuiCtrlSliderWrapper::OnInit( XUIMessageInit* pInitData, BOOL& bHandled
m_pSlider = (CXuiSlider *)pObj;
m_sliderActive = false;
m_bDisplayVal=true;
m_bPlaySound=false; // make this false to avoid a sound being played in the first setting of the slider value in a scene
m_bDisplayVal = true;
m_bPlaySound = false; // make this false to avoid a sound being played in the first setting of the slider value in a scene
XuiSetTimer( m_hObj,NO_SOUND_TIMER,50);
bHandled = TRUE;
return S_OK;
@ -66,7 +66,7 @@ HRESULT CXuiCtrlSliderWrapper::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINoti
if(m_bPlaySound)
{
m_bPlaySound=false;
m_bPlaySound = false;
CXuiSceneBase::PlayUISFX(eSFX_Scroll);
XuiSetTimer( m_hObj,NO_SOUND_TIMER,150);
}
@ -108,7 +108,7 @@ HRESULT CXuiCtrlSliderWrapper::SetValue( int nValue )
return S_OK;
}
HRESULT CXuiCtrlSliderWrapper::SetValueDisplay( BOOL bShow )
HRESULT CXuiCtrlSliderWrapper::SetValueDisplay(bool show)
{
CXuiCtrlSliderWrapper *pThis;
HXUIOBJ hVisual,hText;
@ -121,7 +121,7 @@ HRESULT CXuiCtrlSliderWrapper::SetValueDisplay( BOOL bShow )
if(hText!=NULL)
{
XuiElementSetShow(hText,bShow);
XuiElementSetShow(hText,show);
}
return S_OK;
@ -171,4 +171,4 @@ HRESULT CXuiCtrlSliderWrapper::SetRange( int nRangeMin, int nRangeMax)
return hr;
pThis->m_pSlider->SetRange(nRangeMin, nRangeMax);
return S_OK;
}
}

View file

@ -33,6 +33,6 @@ public:
HRESULT SetRange( int nRangeMin, int nRangeMax);
LPCWSTR GetText( );
HRESULT SetText(LPCWSTR text, int iDataAssoc=0 );
HRESULT SetValueDisplay( BOOL bShow );
HRESULT SetValueDisplay( bool show );
};
};

View file

@ -24,7 +24,7 @@ class CXuiCtrlSlotItemCtrlBase
{
private:
// 4J WESTY : Pointer Prototype : Added to support prototype only.
BOOL m_bSkipDefaultNavigation;
bool m_bSkipDefaultNavigation;
public:
// We define a lot of functions as virtual. These should be implemented to call the protected version by
@ -56,7 +56,7 @@ public:
int GetObjectCount( HXUIOBJ hObj );
// 4J WESTY : Pointer Prototype : Added to support prototype only.
void SetSkipsDefaultNavigation( BOOL bSkipDefaultNavigation ) { m_bSkipDefaultNavigation = bSkipDefaultNavigation; }
void SetSkipsDefaultNavigation( bool bSkipDefaultNavigation ) { m_bSkipDefaultNavigation = bSkipDefaultNavigation; }
// 4J WESTY : Pointer Prototype : Added to support prototype only.
int GetEmptyStackSpace( HXUIOBJ hObj ); // Returns number of items that can still be stacked into this slot.
@ -75,4 +75,4 @@ protected:
HRESULT OnControlNavigate(HXUIOBJ hObj, XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
HRESULT OnKeyDown(HXUIOBJ hObj, XUIMessageInput *pInputData, BOOL& bHandled);
};
};

View file

@ -224,8 +224,7 @@ void CXuiCtrlSlotList::Clicked()
void CXuiCtrlSlotList::GetCXuiCtrlSlotItem(int itemIndex, CXuiCtrlSlotItemListItem** CXuiCtrlSlotItem)
{
HXUIOBJ itemControl = this->GetItemControl(itemIndex);
VOID *pObj;
void *pObj;
XuiObjectFromHandle( itemControl, &pObj );
*CXuiCtrlSlotItem = (CXuiCtrlSlotItemListItem *)pObj;
}

View file

@ -27,10 +27,10 @@ protected:
HRESULT OnRender(XUIMessageRender *pRenderData, BOOL &rfHandled);
private:
BOOL m_bDirty;
bool m_bDirty;
float m_fScale,m_fAlpha;
float m_fScreenWidth,m_fScreenHeight;
float m_fRawWidth,m_fRawHeight;
};
};

View file

@ -20,7 +20,7 @@ typedef struct
int iDataBitField;
int iItemBitField;
LPCWSTR szPath;
BOOL bDirty;
bool bDirty;
}
CustomMessage_GetSlotItem_Struct;

View file

@ -37,7 +37,7 @@ HRESULT CScene_DLCMain::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
m_Timer.SetShow(FALSE);
m_bIgnoreInput=false;
VOID *pObj;
void *pObj;
XuiObjectFromHandle( xList, &pObj );
list = (CXuiCtrl4JList *) pObj;
@ -102,7 +102,7 @@ HRESULT CScene_DLCMain::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled)
{
if(ProfileManager.GetLiveConnectionStatus()!=XONLINE_S_LOGON_CONNECTION_ESTABLISHED)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.ClearDLCOffers();
@ -222,7 +222,7 @@ HRESULT CScene_DLCOffers::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
m_bIgnorePress=true;
VOID *pObj;
void *pObj;
m_hXuiBrush=NULL;
XuiObjectFromHandle( m_List, &pObj );
@ -262,7 +262,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly )
CXuiCtrl4JList::LIST_ITEM_INFO *pListInfo=NULL;
//XMARKETPLACE_CONTENTOFFER_INFO xOffer;
XMARKETPLACE_CURRENCY_CONTENTOFFER_INFO xOffer;
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
ZeroMemory(szResourceLocator,sizeof(WCHAR)*LOCATOR_SIZE);
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
@ -371,7 +371,7 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly )
// Bug 49249 - JPN: Code Defect: Missing Text: String 'Minecraft' is missing in contents download screen.
// Looks like we shouldn't be removing this text for Japanese, and probably Chinese & Korean
DWORD dwLanguage = XGetLanguage( );
unsigned int dwLanguage = XGetLanguage();
switch(dwLanguage)
{
case XC_LANGUAGE_KOREAN:
@ -450,7 +450,6 @@ HRESULT CScene_DLCOffers::GetDLCInfo( int iOfferC, bool bUpdateOnly )
if (dlc != NULL)
{
std::uint8_t *pData=NULL;
UINT uiSize=0;
unsigned int dwSize=0;
WCHAR *cString = dlc->wchBanner;
@ -703,7 +702,6 @@ HRESULT CScene_DLCOffers::OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelCha
if (dlc != NULL)
{
std::uint8_t *pImage=NULL;
UINT uiSize=0;
unsigned int dwSize=0;
WCHAR *cString = dlc->wchBanner;
@ -777,7 +775,7 @@ HRESULT CScene_DLCOffers::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled)
if(ProfileManager.GetLiveConnectionStatus()!=XONLINE_S_LOGON_CONNECTION_ESTABLISHED)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
m_pOffersList->RemoveAllData();

View file

@ -99,7 +99,7 @@ HRESULT CScene_Death::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNoti
// Check if it's the trial version
if(ProfileManager.IsFullVersion())
{
UINT uiIDA[3];
unsigned int uiIDA[3];
// is it the primary player exiting?
if(pNotifyPressData->UserIndex==ProfileManager.GetPrimaryPad())
@ -155,7 +155,7 @@ HRESULT CScene_Death::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNoti
CXuiSceneBase::ReduceTrialTimerValue();
// exit the level
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable());

View file

@ -35,7 +35,7 @@ private:
typedef struct
{
HXUIOBJ hXuiObj;
VOID *pvData;
void *pvData;
}
DEBUGDATA;

View file

@ -171,7 +171,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress
HXUIOBJ hScene;
HRESULT hr;
//const WCHAR XZP_SEPARATOR = L'#';
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
swprintf(szResourceLocator, LOCATOR_SIZE, L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/");
@ -189,7 +189,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress
HXUIOBJ hScene;
HRESULT hr;
//const WCHAR XZP_SEPARATOR = L'#';
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
swprintf(szResourceLocator, LOCATOR_SIZE, L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/");

View file

@ -242,7 +242,7 @@ HRESULT CScene_FullscreenProgress::OnTimer( XUIMessageTimer *pTimer, BOOL& bHand
pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );*/
//app.NavigateBack(m_CompletionData->iPad);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, IDS_CONNECTION_LOST_SERVER, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());

View file

@ -326,7 +326,7 @@ HRESULT CScene_HelpAndOptions::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHa
case VK_PAD_B:
case VK_ESCAPE:
BYTE userIndex = pInputData->UserIndex;
int userIndex = pInputData->UserIndex;
if( !app.IsPauseMenuDisplayed(userIndex) )
{
// If we are not from a pause menu, then we are from the main menu
@ -459,4 +459,4 @@ HRESULT CScene_HelpAndOptions::OnCustomMessage_Splitscreenplayer(bool bJoining,
{
bHandled=true;
return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining,false);
}
}

View file

@ -163,7 +163,7 @@ HRESULT CScene_Controls::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
}
// fill out the layouts list
VOID *pObj;
void *pObj;
XuiObjectFromHandle( m_SchemeList, &pObj );
m_pLayoutList = (CXuiCtrl4JList *)pObj;
CXuiCtrl4JList::LIST_ITEM_INFO ListInfo[3];
@ -196,10 +196,10 @@ HRESULT CScene_Controls::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
delete [] layoutString;
// Set check box initial states.
BOOL bInvertLook = app.GetGameSettings(m_iPad,eGameSetting_ControlInvertLook);
bool bInvertLook = app.GetGameSettings(m_iPad,eGameSetting_ControlInvertLook) != 0;
m_InvertLook.SetCheck( bInvertLook );
BOOL bSouthPaw = app.GetGameSettings(m_iPad,eGameSetting_ControlSouthPaw);
bool bSouthPaw = app.GetGameSettings(m_iPad,eGameSetting_ControlSouthPaw) != 0;
m_SouthPaw.SetCheck( bSouthPaw );
return S_OK;
@ -531,12 +531,12 @@ HRESULT CScene_Controls::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pN
// Handle check box changes.
if ( hObjPressed == m_InvertLook.m_hObj )
{
BOOL bIsChecked = m_InvertLook.IsChecked();
bool bIsChecked = m_InvertLook.IsChecked() != FALSE;
app.SetGameSettings(m_iPad,eGameSetting_ControlInvertLook,(unsigned char)( bIsChecked ) );
}
else if ( hObjPressed == m_SouthPaw.m_hObj )
{
BOOL bIsChecked = m_SouthPaw.IsChecked();
bool bIsChecked = m_SouthPaw.IsChecked() != FALSE;
app.SetGameSettings(m_iPad,eGameSetting_ControlSouthPaw,(unsigned char)( bIsChecked ) );
PositionAllText(m_iPad);
}

View file

@ -439,7 +439,7 @@ HRESULT CScene_Credits::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
HXUIOBJ text;
GetChildById( idString, &text );
VOID* pTextObj;
void *pTextObj;
XuiObjectFromHandle( text, &pTextObj );
m_aTextTypes[ i ].m_appTextElements[ j ] = (CXuiControl *)pTextObj;
m_aTextTypes[ i ].m_appTextElements[ j ]->SetShow( false );
@ -500,7 +500,6 @@ HRESULT CScene_Credits::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
HRESULT CScene_Credits::OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled)
{
// ignore any joypads other than the main
BYTE bFocusUser=XuiElementGetFocusUser(pControlNavigateData->hObjSource);
// get the user from the control
/*if(!=ProfileManager.GetLockedProfile())
{
@ -685,4 +684,4 @@ HRESULT CScene_Credits::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
bHandled = TRUE;
}
return S_OK;
}
}

View file

@ -37,10 +37,10 @@ HRESULT CScene_InGameInfo::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
}
DWORD playerCount = g_NetworkManager.GetPlayerCount();
int playerCount = g_NetworkManager.GetPlayerCount();
m_playersCount = 0;
for(DWORD i = 0; i < playerCount; ++i)
for(int i = 0; i < playerCount; ++i)
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
@ -209,9 +209,9 @@ HRESULT CScene_InGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
else if(selectedPlayer->IsLocal() != TRUE && selectedPlayer->IsSameSystem(g_NetworkManager.GetHostPlayer()) != TRUE)
{
// Only ops will hit this, can kick anyone not local and not local to the host
BYTE *smallId = new BYTE();
std::uint8_t *smallId = new std::uint8_t();
*smallId = m_players[playersList.GetCurSel()];
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -520,7 +520,7 @@ HRESULT CScene_InGameInfo::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL
int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
BYTE smallId = *(BYTE *)pParam;
std::uint8_t smallId = *static_cast<std::uint8_t *>(pParam);
delete pParam;
if(result==C4JStorage::EMessage_ResultAccept)
@ -534,4 +534,4 @@ int CScene_InGameInfo::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMes
}
return 0;
}
}

View file

@ -1,5 +1,7 @@
#pragma once
//using namespace std;
#include <cstdint>
#include "../media/xuiscene_ingameinfo.h"
#include "XUI_CustomMessages.h"
@ -74,7 +76,7 @@ private:
D3DXVECTOR3 m_OriginalPosition;
int m_playersCount;
BYTE m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
std::uint8_t m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
bool m_bIgnoreKeyPresses;
void updateTooltips();

View file

@ -300,9 +300,9 @@ HRESULT CScene_InGamePlayerOptions::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINoti
if( hObjPressed == m_buttonKick )
{
BYTE *smallId = new BYTE();
std::uint8_t *smallId = new std::uint8_t();
*smallId = m_networkSmallId;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -330,7 +330,7 @@ HRESULT CScene_InGamePlayerOptions::OnControlNavigate(XUIMessageControlNavigate
int CScene_InGamePlayerOptions::KickPlayerReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
BYTE smallId = *(BYTE *)pParam;
std::uint8_t smallId = *static_cast<std::uint8_t *>(pParam);
delete pParam;
if(result==C4JStorage::EMessage_ResultAccept)
@ -357,7 +357,7 @@ void CScene_InGamePlayerOptions::OnPlayerChanged(void *callbackParam, INetworkPl
HXUIOBJ hBackScene = scene->GetBackScene();
CScene_InGameInfo* infoScene;
VOID *pObj;
void *pObj;
XuiObjectFromHandle( hBackScene, &pObj );
infoScene = (CScene_InGameInfo *)pObj;
if(infoScene != NULL) CScene_InGameInfo::OnPlayerChanged(infoScene,pPlayer,leaving);
@ -496,4 +496,4 @@ void CScene_InGamePlayerOptions::resetCheatCheckboxes()
m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator
&& (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport) != 0) );
}
}
}

View file

@ -473,7 +473,7 @@ HRESULT CScene_Leaderboards::OnKeyDown(XUIMessageInput* pInputData, BOOL& bHandl
case VK_PAD_B:
case VK_ESCAPE:
{
BYTE userIndex = pInputData->UserIndex;
int userIndex = pInputData->UserIndex;
if( !app.IsPauseMenuDisplayed(userIndex) )
{
// If we are not from a pause menu, then we are from the main menu
@ -904,7 +904,7 @@ void CScene_Leaderboards::PopulateLeaderboard(bool noResults)
if(m_pHTitleIconSlots[0]==NULL)
{
VOID *pObj;
void *pObj;
HXUIOBJ button;
D3DXVECTOR3 vPos;

View file

@ -391,7 +391,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void)
if( (m_bGameModeSurvival != true || m_bHasBeenInCreative) || m_MoreOptionsParams.bHostPrivileges)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
if(m_bGameModeSurvival != true || m_bHasBeenInCreative)
@ -424,7 +424,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void)
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this);
@ -458,7 +458,7 @@ HRESULT CScene_LoadGameSettings::LaunchGame(void)
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,this);
}
@ -523,7 +523,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP
// tell sentient about the upsell of the full version of the skin pack
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
// Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
@ -584,7 +584,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP
if(m_pDLCPack && !m_pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
{
// no
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
if(!ProfileManager.IsSignedInLive(pNotifyPressData->UserIndex))
@ -612,7 +612,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP
// tell sentient about the upsell of the full version of the texture pack
TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -630,7 +630,7 @@ HRESULT CScene_LoadGameSettings::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyP
// Check if they have the Reset Nether flag set, and confirm they want to do this
if(m_MoreOptionsParams.bResetNether)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_DONT_RESET_NETHER;
uiIDA[1]=IDS_RESET_NETHER;
@ -720,7 +720,7 @@ int CScene_LoadGameSettings::ConfirmLoadReturned(void *pParam,int iPad,C4JStorag
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(pClass->m_iPad,false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, pClass->m_iPad,&CScene_LoadGameSettings::DeviceRemovedDialogReturned,pClass);
}
@ -847,7 +847,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -866,13 +866,13 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
{
pClass->SetShow( TRUE );
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
else
{
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
// No guest problems so we don't need to force a sign-in of players here
StartGameFromSave(pClass, dwLocalUsersMask);
@ -891,7 +891,7 @@ int CScene_LoadGameSettings::LoadSaveDataReturned(void *pParam,bool bContinue)
pClass->m_bIgnoreInput=false;
// give the option to delete the save
UINT uiIDA[2];
unsigned int 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,
@ -940,7 +940,7 @@ int CScene_LoadGameSettings::DeviceRemovedDialogReturned(void *pParam,int iPad,C
// 4J Stu - Shared functionality that is the same whether we needed a quadrant sign-in or not
void CScene_LoadGameSettings::StartGameFromSave(CScene_LoadGameSettings* pClass, DWORD dwLocalUsersMask)
{
INT saveOrCheckpointId = 0;
int saveOrCheckpointId = 0;
bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
TelemetryManager->RecordLevelResume(pClass->m_iPad, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, app.GetGameSettings(pClass->m_iPad,eGameSetting_Difficulty), app.GetLocalPlayerCount(), g_NetworkManager.GetOnlinePlayerCount(), saveOrCheckpointId);
@ -1007,7 +1007,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
// It's possible that the player has not signed in - they can back out
if(ProfileManager.IsSignedIn(iPad))
{
DWORD dwLocalUsersMask = 0;
unsigned int dwLocalUsersMask = 0;
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
bool noPrivileges = false;
@ -1034,7 +1034,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
pClass->SetShow( TRUE );
pClass->m_bIgnoreInput=false;
//pClass->m_bAbortSearch=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -1043,7 +1043,7 @@ int CScene_LoadGameSettings::StartGame_SignInReturned(void *pParam,bool bContinu
pClass->SetShow( TRUE );
pClass->m_bIgnoreInput=false;
//pClass->m_bAbortSearch=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -1340,7 +1340,7 @@ void CScene_LoadGameSettings::UpdateCurrentTexturePack()
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
// Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
@ -1397,7 +1397,7 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && m_MoreOptionsParams.bOnlineGame;
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -1416,14 +1416,14 @@ void CScene_LoadGameSettings::LoadLevelGen(LevelGenerationOptions *levelGen)
{
SetShow( TRUE );
m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
return;
}
}
DWORD dwLocalUsersMask = 0;
unsigned int dwLocalUsersMask = 0;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
// Load data from disc

View file

@ -68,7 +68,7 @@ HRESULT CScene_Main::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
CXuiSceneBase::ShowBackground( DEFAULT_XUI_MENU_USER, TRUE );
CXuiSceneBase::ShowLogo( DEFAULT_XUI_MENU_USER, TRUE );
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
// load from the .xzp file
@ -173,7 +173,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
else
{
// get them to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable());
@ -192,7 +192,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
// get them to sign in
//ProfileManager.RequestSignInUI(false, false, true,false,true, &CScene_Main::Leaderboards_SignInReturned, this);
// get them to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable());
@ -210,7 +210,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
// get them to sign in
//ProfileManager.RequestSignInUI(false, false, true,false,true,&CScene_Main::Achievements_SignInReturned,this );
// get them to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable());
@ -232,7 +232,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
// get them to sign in
//ProfileManager.RequestSignInUI(false, false, true,false,true,&CScene_Main::HelpAndOptions_SignInReturned,this );
// get them to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable());
@ -254,7 +254,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
else
{
// get them to sign in
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
StorageManager.RequestMessageBox(IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, pNotifyPressData->UserIndex,&CScene_Main::MustSignInReturned,this, app.GetStringTable());
@ -264,7 +264,7 @@ HRESULT CScene_Main::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotif
case BUTTON_EXITGAME:
if( ProfileManager.IsFullVersion() )
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CANCEL;
uiIDA[1]=IDS_OK;
StorageManager.RequestMessageBox(IDS_WARNING_ARCADE_TITLE, IDS_WARNING_ARCADE_TEXT, uiIDA, 2, XUSER_INDEX_ANY,&CScene_Main::ExitGameReturned,this);
@ -559,7 +559,7 @@ int CScene_Main::CreateLoad_SignInReturned(void *pParam,bool bContinue, int iPad
if(bContinue==true)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad()))
@ -727,7 +727,7 @@ int CScene_Main::Leaderboards_SignInReturned(void *pParam,bool bContinue,int iPa
if(bContinue==true)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// guests can't look at leaderboards
if(ProfileManager.IsGuest(ProfileManager.GetPrimaryPad()))
@ -945,7 +945,7 @@ void CScene_Main::RunPlayGame(int iPad)
if(ProfileManager.IsGuest(iPad))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
@ -1061,7 +1061,7 @@ HRESULT CScene_Main::OnTMSBanFileRetrieved()
void CScene_Main::RunLeaderboards(int iPad)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// guests can't look at leaderboards
@ -1084,7 +1084,7 @@ void CScene_Main::RunLeaderboards(int iPad)
}
void CScene_Main::RunAchievements(int iPad)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// guests can't look at achievements
@ -1101,7 +1101,7 @@ void CScene_Main::RunHelpAndOptions(int iPad)
{
if(ProfileManager.IsGuest(iPad))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
}
@ -1155,7 +1155,7 @@ HRESULT CScene_Main::OnTMSDLCFileRetrieved( )
void CScene_Main::RunUnlockOrDLC(int iPad)
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// Check if this means downloadable content
@ -1291,4 +1291,4 @@ HRESULT CScene_Main::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
}
return S_OK;
}
}

View file

@ -341,7 +341,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
{
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
// Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
@ -403,7 +403,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
if(m_pDLCPack && !m_pDLCPack->hasPurchasedFile( DLCManager::e_DLCType_Texture, L"" ))
{
// no
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
if(!ProfileManager.IsSignedInLive(pNotifyPressData->UserIndex))
@ -431,7 +431,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
// tell sentient about the upsell of the full version of the skin pack
TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// Give the player a warning about the trial version of the texture pack
@ -444,7 +444,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
if(m_bGameModeSurvival != true || m_MoreOptionsParams.bHostPrivileges)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
if(m_bGameModeSurvival != true)
@ -459,7 +459,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
else
{
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -483,7 +483,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPr
{
m_bIgnoreInput = false;
SetShow( TRUE );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -565,7 +565,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -586,7 +586,7 @@ int CScene_MultiGameCreate::WarningTrialTexturePackReturned(void *pParam,int iPa
if(isClientSide && noUGC )
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -628,7 +628,7 @@ HRESULT CScene_MultiGameCreate::OnNotifyValueChanged (HXUIOBJ hObjSource, XUINot
{
// Enable the done button when we have all of the necessary information
std::wstring wWorldName = m_EditWorldName.GetText();
BOOL bHasWorldName = ( wWorldName.length()!=0);
bool bHasWorldName = ( wWorldName.length()!=0);
m_NewWorld.SetEnable(bHasWorldName);
}
else if(hObjSource==m_SliderDifficulty.GetSlider() )
@ -761,7 +761,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -785,7 +785,7 @@ int CScene_MultiGameCreate::ConfirmCreateReturned(void *pParam,int iPad,C4JStora
{
pClass->m_bIgnoreInput = false;
pClass->SetShow( TRUE );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -815,7 +815,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
// It's possible that the player has not signed in - they can back out
if(ProfileManager.IsSignedIn(iPad))
{
DWORD dwLocalUsersMask = 0;
unsigned int dwLocalUsersMask = 0;
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame;
bool noPrivileges = false;
@ -842,7 +842,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
{
pClass->m_bIgnoreInput = false;
pClass->SetShow( TRUE );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -850,7 +850,7 @@ int CScene_MultiGameCreate::StartGame_SignInReturned(void *pParam,bool bContinue
{
pClass->m_bIgnoreInput = false;
pClass->SetShow( TRUE );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_HOST_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -889,7 +889,7 @@ void CScene_MultiGameCreate::CreateGame(CScene_MultiGameCreate* pClass, DWORD dw
// Make our next save default to the name of the level
StorageManager.SetSaveTitle((wchar_t *)wWorldName.c_str());
BOOL bHasSeed = (pClass->m_EditSeed.GetText() != NULL);
bool bHasSeed = (pClass->m_EditSeed.GetText() != NULL);
std::wstring wSeed;
if(bHasSeed)
@ -1186,7 +1186,7 @@ void CScene_MultiGameCreate::UpdateCurrentTexturePack()
TelemetryManager->RecordUpsellPresented(ProfileManager.GetPrimaryPad(), eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
// Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);

View file

@ -149,7 +149,7 @@ HRESULT CScene_MultiGameInfo::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPres
m_bIgnoreInput=true;
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -258,9 +258,9 @@ int CScene_MultiGameInfo::StartGame_SignInReturned(void *pParam,bool bContinue,
// Shared function to join the game that is the same whether we used the sign-in UI or not
void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
{
DWORD dwLocalUsersMask = 0;
unsigned int dwLocalUsersMask = 0;
bool noPrivileges = false;
DWORD dwSignedInUsers = 0;
unsigned int dwSignedInUsers = 0;
// if we're in SD mode, then only the primary player gets to play
if(RenderManager.IsHiDef())
@ -296,7 +296,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
{
pClass->SetShow( TRUE );
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL;
@ -309,7 +309,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
{
pClass->SetShow( TRUE );
pClass->m_bIgnoreInput=false;
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
}
@ -336,7 +336,7 @@ void CScene_MultiGameInfo::JoinGame(CScene_MultiGameInfo* pClass)
}
else
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox( IDS_CONNECTION_FAILED, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
exitReasonStringId = -1;
@ -389,4 +389,3 @@ HRESULT CScene_MultiGameInfo::OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled )
return S_OK;
}

View file

@ -48,7 +48,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
XuiControlSetText(m_SavesList,app.GetString(IDS_START_GAME));
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
constexpr int 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);
@ -93,7 +93,7 @@ HRESULT CScene_MultiGameJoinLoad::OnInit( XUIMessageInit* pInitData, BOOL& bHand
m_iSaveInfoC=0;
VOID *pObj;
void *pObj;
XuiObjectFromHandle( m_SavesList, &pObj );
m_pSavesList = (CXuiCtrl4JList *)pObj;
@ -455,7 +455,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
{
m_bIgnoreInput=true;
DWORD nIndex = m_pGamesList->GetCurSel();
int nIndex = m_pGamesList->GetCurSel();
if( m_pGamesList->GetItemCount() > 0 && nIndex < currentSessions.size() )
{
@ -489,7 +489,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[3];
unsigned int uiIDA[3];
// Need to check if the texture pack has both Full and Trial versions - we may do some as free ones, so only Full
DLC_INFO *pDLCInfo=app.GetDLCInfoForFullOfferID(ullOfferID_Full);
@ -576,7 +576,7 @@ HRESULT CScene_MultiGameJoinLoad::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotify
if(m_pSavesList->GetData(iIndex).bIsDamaged)
{
// give the option to delete the save
UINT uiIDA[2];
unsigned int 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, pNotifyPressData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable());
@ -645,7 +645,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
case VK_PAD_Y:
if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0)
{
DWORD nIndex = m_pGamesList->GetCurSel();
int nIndex = m_pGamesList->GetCurSel();
FriendSessionInfo *pSelectedSession = currentSessions.at( nIndex );
PlayerUID xuid = pSelectedSession->data.hostPlayerUID;
@ -659,10 +659,10 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
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();
int nIndex = m_pSavesList->GetCurSel();
m_iChangingSaveGameInfoIndex=m_pSavesList->GetData(nIndex).iIndex;
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_UPLOAD_SAVE;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -683,7 +683,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, pInputData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable());
@ -692,7 +692,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
{
if(StorageManager.EnoughSpaceForAMinSaveGame())
{
UINT uiIDA[3];
unsigned int uiIDA[3];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_TITLE_RENAMESAVE;
uiIDA[2]=IDS_TOOLTIPS_DELETESAVE;
@ -702,7 +702,7 @@ HRESULT CScene_MultiGameJoinLoad::OnKeyDown(XUIMessageInput* pInputData, BOOL& r
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, pInputData->UserIndex,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,this, app.GetStringTable());
@ -1133,7 +1133,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
return;
}
DWORD nIndex = -1;
int nIndex = -1;
FriendSessionInfo *pSelectedSession = NULL;
if(m_pGamesList->TreeHasFocus() && m_pGamesList->GetItemCount() > 0)
{
@ -1216,7 +1216,7 @@ void CScene_MultiGameJoinLoad::UpdateGamesList()
unsigned int xuiListSize = m_pGamesList->GetItemCount();
unsigned int filteredListSize = (unsigned int)currentSessions.size();
BOOL gamesListHasFocus = m_pGamesList->TreeHasFocus();
bool gamesListHasFocus = m_pGamesList->TreeHasFocus() != FALSE;
if(filteredListSize > 0)
{
@ -1790,7 +1790,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad());
// 4J Stu - If we only have one controller connected, then don't show the sign-in UI again
DWORD connectedControllers = 0;
int connectedControllers = 0;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
if( InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i) ) ++connectedControllers;
@ -1798,7 +1798,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
if(!isClientSide || connectedControllers == 1 || !RenderManager.IsHiDef())
{
DWORD dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
unsigned int dwLocalUsersMask = CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
// No guest problems so we don't need to force a sign-in of players here
StartGameFromSave(pClass, dwLocalUsersMask);
@ -1825,7 +1825,7 @@ int CScene_MultiGameJoinLoad::StartGame_SignInReturned(void *pParam,bool bContin
// It's possible that the player has not signed in - they can back out
if(ProfileManager.IsSignedIn(iPad))
{
DWORD dwLocalUsersMask = 0;
unsigned int dwLocalUsersMask = 0;
for(unsigned int index = 0; index < XUSER_MAX_COUNT; ++index)
{
@ -2249,7 +2249,7 @@ int CScene_MultiGameJoinLoad::SaveOptionsDialogReturned(void *pParam,int iPad,C4
{
// delete the save game
// Have to ask the player if they are sure they want to delete this game
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_TOOLTIPS_DELETESAVE, IDS_TEXT_DELETE_SAVE, uiIDA, 2, iPad,&CScene_MultiGameJoinLoad::DeleteSaveDialogReturned,pClass, app.GetStringTable());
@ -2301,7 +2301,7 @@ int CScene_MultiGameJoinLoad::LoadSaveDataReturned(void *pParam,bool bContinue)
pClass->m_bIgnoreInput=false;
// give the option to delete the save
UINT uiIDA[2];
unsigned int 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,
@ -2331,7 +2331,7 @@ int CScene_MultiGameJoinLoad::TransferComplete(void *pParam,int iPad, int iResul
{
// There was a transfer fail
// Display a dialog
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_SAVE_TRANSFER_TITLE, IDS_SAVE_TRANSFER_UPLOADFAILED, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,NULL,app.GetStringTable());
pClass->m_bTransferFail=true;
@ -2371,7 +2371,7 @@ int CScene_MultiGameJoinLoad::KeyboardReturned(void *pParam,bool bSet)
// disable saving
StorageManager.SetSaveDisabled(true);
StorageManager.SetSaveDeviceSelected(ProfileManager.GetPrimaryPad(),false);
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_STORAGEDEVICEPROBLEM_TITLE, IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad(),&CScene_MultiGameJoinLoad::DeviceRemovedDialogReturned,pClass);
}
@ -2512,7 +2512,7 @@ HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCInstalled()
HRESULT CScene_MultiGameJoinLoad::OnCustomMessage_DLCMountingComplete()
{
VOID *pObj;
void *pObj;
XuiObjectFromHandle( m_SavesList, &pObj );
m_pSavesList = (CXuiCtrl4JList *)pObj;
@ -2700,7 +2700,7 @@ bool CScene_MultiGameJoinLoad::GetSavesInfoCallback(LPVOID pParam,int iTotalSave
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
constexpr int 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);
@ -2753,7 +2753,7 @@ void CScene_MultiGameJoinLoad::CancelSaveUploadCallback(LPVOID lpParam)
// app.getRemoteStorage()->abort();
// pClass->m_eSaveUploadState = eSaveUpload_Idle;
UINT uiIDA[1] = { IDS_CONFIRM_OK };
unsigned int uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestMessageBox(IDS_XBONE_CANCEL_UPLOAD_TITLE, IDS_XBONE_CANCEL_UPLOAD_TEXT, uiIDA, 1, pClass->m_iPad, NULL, NULL, app.GetStringTable());
}

View file

@ -155,7 +155,7 @@ private:
std::vector<LevelGenerationOptions *> *m_generators;
JoinMenuInitData *m_initData;
UINT m_DefaultMinecraftIconSize;
unsigned int m_DefaultMinecraftIconSize;
PBYTE m_DefaultMinecraftIconData;
int *m_iConfigA; // track the texture packs that we don't have installed
int m_iTexturePacksNotInstalled;
@ -165,4 +165,4 @@ private:
bool m_bTransferComplete;
bool m_bTransferFail;
bool m_bSaveTransferInProgress;
};
};

View file

@ -197,7 +197,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
case BUTTON_PAUSE_LEADERBOARDS:
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
//4J Gordon: Being used for the leaderboards proper now
@ -220,7 +220,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
// guests can't look at achievements
if(ProfileManager.IsGuest(pNotifyPressData->UserIndex))
{
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
StorageManager.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1);
}
@ -263,7 +263,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
// tell sentient about the upsell of the full version of the texture pack
TelemetryManager->RecordUpsellPresented(pNotifyPressData->UserIndex, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -281,7 +281,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
if(result == C4JStorage::ELoadGame_DeviceRemoved)
{
// this will be a tester trying to be clever
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_SELECTANEWDEVICE;
uiIDA[1]=IDS_NODEVICE_DECLINE;
@ -292,7 +292,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
// we need to ask if they are sure they want to overwrite the existing game
if(bSaveExists)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::SaveGameDialogReturned,this, app.GetStringTable());
@ -311,7 +311,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
// Check if it's the trial version
if(ProfileManager.IsFullVersion())
{
UINT uiIDA[3];
unsigned int uiIDA[3];
// is it the primary player exiting?
if(pNotifyPressData->UserIndex==ProfileManager.GetPrimaryPad())
@ -384,7 +384,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
CXuiSceneBase::ReduceTrialTimerValue();
// exit the level
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME_PROGRESS_LOST, uiIDA, 2, pNotifyPressData->UserIndex,&UIScene_PauseMenu::ExitGameDialogReturned,this, app.GetStringTable());
@ -492,7 +492,7 @@ HRESULT UIScene_PauseMenu::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
case VK_PAD_RSHOULDER:
if( bDisplayBanTip )
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
StorageManager.RequestMessageBox(IDS_ACTION_BAN_LEVEL_TITLE, IDS_ACTION_BAN_LEVEL_DESCRIPTION, uiIDA, 2, pInputData->UserIndex,&UIScene_PauseMenu::BanGameDialogReturned,this, app.GetStringTable());
@ -832,7 +832,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
TelemetryManager->RecordUpsellPresented(iPad, eSet_UpsellID_Texture_DLC, ullOfferID_Full & 0xFFFFFFFF);
#endif
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -850,7 +850,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
// we need to ask if they are sure they want to overwrite the existing game
if(bSaveExists)
{
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::ExitGameAndSaveReturned,pClass, app.GetStringTable());
@ -864,7 +864,7 @@ int UIScene_PauseMenu::ExitGameSaveDialogReturned(void *pParam,int iPad,C4JStora
else
{
// been a few requests for a confirm on exit without saving
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;
ui.RequestMessageBox(IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, uiIDA, 2, ProfileManager.GetPrimaryPad(),&UIScene_PauseMenu::ExitGameDeclineSaveReturned, dynamic_cast<IUIScene_PauseMenu*>(pClass), app.GetStringTable());
@ -891,7 +891,7 @@ int UIScene_PauseMenu::ExitGameDeclineSaveReturned(void *pParam,int iPad,C4JStor
if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()))
{
IUIScene_PauseMenu* pClass = (IUIScene_PauseMenu*)pParam;
UINT uiIDA[3];
unsigned int uiIDA[3];
// you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then.
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
@ -928,7 +928,7 @@ int UIScene_PauseMenu::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage:
if(ui.IsPauseMenuDisplayed(ProfileManager.GetPrimaryPad()))
{
UIScene_PauseMenu* pClass = (UIScene_PauseMenu*)pParam;
UINT uiIDA[3];
unsigned int uiIDA[3];
// you cancelled the save on exit after choosing exit and save? You go back to the Exit choices then.
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_EXIT_GAME_SAVE;
@ -1100,7 +1100,7 @@ void UIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
}
//pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
// 4J Stu - Fix for #48669 - TU5: Code: Compliance: TCR #15: Incorrect/misleading messages after signing out a profile during online game session.
// If the primary player is signed out, then that is most likely the cause of the disconnection so don't display a message box. This will allow the message box requested by the libraries to be brought up
@ -1178,7 +1178,7 @@ void UIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
}
//pMinecraft->progressRenderer->progressStartNoAbort( exitReasonStringId );
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
ui.RequestMessageBox( exitReasonTitleId, exitReasonStringId, uiIDA,1,ProfileManager.GetPrimaryPad(),NULL,NULL, app.GetStringTable());
exitReasonStringId = -1;

View file

@ -23,7 +23,7 @@
#define PRESS_START_TIMER 0
CXuiSceneBase *CXuiSceneBase::Instance = NULL;
DWORD CXuiSceneBase::m_dwTrialTimerLimitSecs=DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME;
unsigned int CXuiSceneBase::m_trialTimerLimitSecs = DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME;
//----------------------------------------------------------------------------------
// Performs initialization tasks - retrieves controls.
//----------------------------------------------------------------------------------
@ -49,7 +49,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
{
for( unsigned int i = 0; i < BUTTONS_TOOLTIP_MAX; ++i )
{
m_visible[idx][ i ] = FALSE;
m_visible[idx][ i ] = false;
m_iCurrentTooltipTextID[idx][i]=-1;
hTooltipText[idx][i]=NULL;
hTooltipTextSmall[idx][i]=NULL;
@ -63,7 +63,7 @@ HRESULT CXuiSceneBase::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
m_bCrouching[idx]=false;
m_uiSelectedItemOpacityCountDown[idx] =0;
m_bossHealthVisible[idx] = FALSE;
m_bossHealthVisible[idx] = false;
switch(idx)
{
@ -368,14 +368,14 @@ void CXuiSceneBase::_TickAllBaseScenes()
m_pBossHealthProgress[i].SetRange(0, boss->getMaxHealth() );
m_pBossHealthProgress[i].SetValue( boss->getSynchedHealth() );
m_bossHealthVisible[i] = TRUE;
m_bossHealthVisible[i] = true;
_UpdateSelectedItemPos(i);
}
else if( m_bossHealthVisible[i] == TRUE)
else if(m_bossHealthVisible[i])
{
m_BossHealthGroup[i].SetShow(FALSE);
m_bossHealthVisible[i] = FALSE;
m_bossHealthVisible[i] = false;
_UpdateSelectedItemPos(i);
}
@ -388,7 +388,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
if( m_ticksWithNoBoss > 20 )
{
m_BossHealthGroup[i].SetShow(FALSE);
m_bossHealthVisible[i] = FALSE;
m_bossHealthVisible[i] = false;
_UpdateSelectedItemPos(i);
}
@ -481,12 +481,12 @@ void CXuiSceneBase::_TickAllBaseScenes()
}
}
HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, BOOL bVal )
HRESULT CXuiSceneBase::_SetEnableTooltips( unsigned int iPad, bool enabled )
{
for(int i=0;i<BUTTONS_TOOLTIP_MAX;i++)
{
//XuiElementSetShow(m_Buttons[iPad][i].m_hObj,bVal);
XuiControlSetEnable(m_Buttons[iPad][i].m_hObj,bVal);
//XuiElementSetShow(m_Buttons[iPad][i].m_hObj,enabled);
XuiControlSetEnable(m_Buttons[iPad][i].m_hObj,enabled);
}
return S_OK;
}
@ -711,9 +711,9 @@ HRESULT CXuiSceneBase::_ShowTooltip( unsigned int iPad, unsigned int tooltip, bo
return hr;
}
HRESULT CXuiSceneBase::_ShowSafeArea( BOOL bShow )
HRESULT CXuiSceneBase::_ShowSafeArea(bool show)
{
return m_SafeArea.SetShow(bShow);
return m_SafeArea.SetShow(show);
}
HRESULT CXuiSceneBase::_ShowOtherPlayersBaseScene(int iPad, bool show)
@ -771,13 +771,13 @@ HRESULT CXuiSceneBase::_EnableTooltip( unsigned int iPad, unsigned int tooltip,
return S_OK;
}
HRESULT CXuiSceneBase::_AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode)
HRESULT CXuiSceneBase::_AnimateKeyPress(unsigned int userIndex, unsigned int keyCode)
{
if(m_playerBaseScenePosition[userIndex] == e_BaseScene_NotSet)
{
userIndex = DEFAULT_XUI_MENU_USER;
}
switch(dwKeyCode)
switch(keyCode)
{
case VK_PAD_A:
m_Buttons[userIndex][BUTTON_TOOLTIP_A].Press();
@ -845,7 +845,7 @@ HRESULT CXuiSceneBase::_ShowSavingMessage( unsigned int iPad, C4JStorage::ESavin
return S_OK;
}
HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, bool show )
{
HRESULT hr;
Minecraft *pMinecraft=Minecraft::GetInstance();
@ -858,7 +858,7 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
hr=XuiElementGetChildById(hVisual,L"NightGroup",&hNight);
hr=XuiElementGetChildById(hVisual,L"DayGroup",&hDay);
if(bShow && pMinecraft->level!=NULL)
if(show && pMinecraft->level!=NULL)
{
__int64 i64TimeOfDay =0;
// are we in the Nether? - Leave the time as 0 if we are, so we show daylight
@ -884,19 +884,19 @@ HRESULT CXuiSceneBase::_ShowBackground( unsigned int iPad, BOOL bShow )
hr=XuiElementSetShow(hDay,TRUE);
}
}
hr=XuiElementSetShow(m_Background[iPad],bShow);
hr=XuiElementSetShow(m_Background[iPad],show);
return hr;
}
HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::_ShowDarkOverlay( unsigned int iPad, bool show )
{
return XuiElementSetShow(m_DarkOverlay[iPad],bShow);
return XuiElementSetShow(m_DarkOverlay[iPad],show);
}
HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::_ShowLogo( unsigned int iPad, bool show )
{
return XuiElementSetShow(m_Logo[iPad],bShow);
return XuiElementSetShow(m_Logo[iPad],show);
}
HRESULT CXuiSceneBase::_ShowPressStart(unsigned int iPad)
@ -966,9 +966,9 @@ HRESULT CXuiSceneBase::_UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
return S_OK;
}
HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(BOOL bVal)
HRESULT CXuiSceneBase::_ShowAutosaveCountdownTimer(bool show)
{
m_TrialTimer.SetShow(bVal);
m_TrialTimer.SetShow(show);
return S_OK;
}
@ -976,24 +976,24 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad)
{
WCHAR wcTime[20];
DWORD dwTimeTicks=(DWORD)app.getTrialTimer();
unsigned int trialTimeTicks = static_cast<unsigned int>(app.getTrialTimer());
if(dwTimeTicks>m_dwTrialTimerLimitSecs)
if(trialTimeTicks > m_trialTimerLimitSecs)
{
dwTimeTicks=m_dwTrialTimerLimitSecs;
trialTimeTicks = m_trialTimerLimitSecs;
}
dwTimeTicks=m_dwTrialTimerLimitSecs-dwTimeTicks;
trialTimeTicks = m_trialTimerLimitSecs - trialTimeTicks;
#ifndef _CONTENT_PACKAGE
if(true)
#else
// display the time - only if there's less than 3 minutes
if(dwTimeTicks<180)
if(trialTimeTicks < 180)
#endif
{
int iMins=dwTimeTicks/60;
int iSeconds=dwTimeTicks%60;
int iMins = trialTimeTicks / 60;
int iSeconds = trialTimeTicks % 60;
swprintf( wcTime, 20, L"%d:%02d",iMins,iSeconds);
m_TrialTimer.SetText(wcTime);
}
@ -1003,7 +1003,7 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad)
}
// are we out of time?
if(dwTimeTicks==0)
if(trialTimeTicks == 0)
{
// Trial over
app.SetAction(iPad,eAppAction_TrialOver);
@ -1014,19 +1014,19 @@ HRESULT CXuiSceneBase::_UpdateTrialTimer(unsigned int iPad)
void CXuiSceneBase::_ReduceTrialTimerValue()
{
DWORD dwTimeTicks=(int)app.getTrialTimer();
unsigned int trialTimeTicks = static_cast<unsigned int>(app.getTrialTimer());
if(dwTimeTicks>m_dwTrialTimerLimitSecs)
if(trialTimeTicks > m_trialTimerLimitSecs)
{
dwTimeTicks=m_dwTrialTimerLimitSecs;
trialTimeTicks = m_trialTimerLimitSecs;
}
m_dwTrialTimerLimitSecs-=dwTimeTicks;
m_trialTimerLimitSecs -= trialTimeTicks;
}
HRESULT CXuiSceneBase::_ShowTrialTimer(BOOL bVal)
HRESULT CXuiSceneBase::_ShowTrialTimer(bool show)
{
m_TrialTimer.SetShow(bVal);
m_TrialTimer.SetShow(show);
return S_OK;
}
@ -1595,7 +1595,7 @@ HRESULT CXuiSceneBase::_PlayUISFX(ESoundEffect eSound)
}
HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, BOOL bDisplay )
HRESULT CXuiSceneBase::_DisplayGamertag( unsigned int iPad, bool display )
{
if(app.DebugSettingsOn() && (app.GetGameSettingsDebugMask()&(1L<<eDebugSetting_DebugLeaderboards)))
@ -1622,10 +1622,10 @@ 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);
XuiElementSetShow(m_hGamerTagA[iPad],display);
// set the opacity of the gamertag
if((bDisplay==TRUE) &&(ProfileManager.GetLockedProfile()!=-1))
if(display && (ProfileManager.GetLockedProfile()!=-1))
{
unsigned char ucAlpha=app.GetGameSettings(ProfileManager.GetPrimaryPad(),eGameSetting_InterfaceOpacity);
float fVal;
@ -1870,11 +1870,11 @@ void CXuiSceneBase::TickAllBaseScenes()
}
}
HRESULT CXuiSceneBase::SetEnableTooltips( unsigned int iPad, BOOL bVal )
HRESULT CXuiSceneBase::SetEnableTooltips( unsigned int iPad, bool enabled )
{
if( CXuiSceneBase::Instance != NULL )
{
return CXuiSceneBase::Instance->_SetEnableTooltips(iPad, bVal );
return CXuiSceneBase::Instance->_SetEnableTooltips(iPad, enabled);
}
return S_OK;
}
@ -1906,11 +1906,11 @@ HRESULT CXuiSceneBase::ShowTooltip( unsigned int iPad, unsigned int tooltip, boo
return S_OK;
}
HRESULT CXuiSceneBase::ShowSafeArea( BOOL bShow )
HRESULT CXuiSceneBase::ShowSafeArea(bool show)
{
if( CXuiSceneBase::Instance != NULL )
{
return CXuiSceneBase::Instance->_ShowSafeArea(bShow );
return CXuiSceneBase::Instance->_ShowSafeArea(show);
}
return S_OK;
}
@ -1971,9 +1971,9 @@ HRESULT CXuiSceneBase::EnableTooltip( unsigned int iPad, unsigned int tooltip, b
return CXuiSceneBase::Instance->_EnableTooltip(iPad, tooltip, enable);
}
HRESULT CXuiSceneBase::AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode)
HRESULT CXuiSceneBase::AnimateKeyPress(unsigned int userIndex, unsigned int keyCode)
{
return CXuiSceneBase::Instance->_AnimateKeyPress(userIndex, dwKeyCode );
return CXuiSceneBase::Instance->_AnimateKeyPress(userIndex, keyCode);
}
HRESULT CXuiSceneBase::ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal )
@ -1986,19 +1986,19 @@ HRESULT CXuiSceneBase::ShowSavingMessage( unsigned int iPad, C4JStorage::ESaving
return S_OK;
}
HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::ShowBackground( unsigned int iPad, bool show )
{
return CXuiSceneBase::Instance->_ShowBackground(iPad, bShow );
return CXuiSceneBase::Instance->_ShowBackground(iPad, show);
}
HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::ShowDarkOverlay( unsigned int iPad, bool show )
{
return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, bShow );
return CXuiSceneBase::Instance->_ShowDarkOverlay(iPad, show);
}
HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, BOOL bShow )
HRESULT CXuiSceneBase::ShowLogo( unsigned int iPad, bool show )
{
return CXuiSceneBase::Instance->_ShowLogo(iPad, bShow );
return CXuiSceneBase::Instance->_ShowLogo(iPad, show);
}
HRESULT CXuiSceneBase::ShowPressStart(unsigned int iPad)
@ -2019,9 +2019,9 @@ HRESULT CXuiSceneBase::UpdateAutosaveCountdownTimer(unsigned int uiSeconds)
return S_OK;
}
HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(BOOL bVal)
HRESULT CXuiSceneBase::ShowAutosaveCountdownTimer(bool show)
{
CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(bVal);
CXuiSceneBase::Instance->_ShowAutosaveCountdownTimer(show);
return S_OK;
}
@ -2030,9 +2030,9 @@ HRESULT CXuiSceneBase::UpdateTrialTimer(unsigned int iPad)
CXuiSceneBase::Instance->_UpdateTrialTimer(iPad);
return S_OK;
}
HRESULT CXuiSceneBase::ShowTrialTimer(BOOL bVal)
HRESULT CXuiSceneBase::ShowTrialTimer(bool show)
{
CXuiSceneBase::Instance->_ShowTrialTimer(bVal);
CXuiSceneBase::Instance->_ShowTrialTimer(show);
return S_OK;
}
@ -2080,7 +2080,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions()
// If the game is not started (or is being held paused for a bit) then display all scenes fullscreen
if( pMinecraft == NULL )
{
for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx)
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
padPositions[idx] = e_BaseScene_Fullscreen;
}
@ -2093,7 +2093,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions()
padPositions[primaryPad] = e_BaseScene_Fullscreen;
// May need to turn off the player who just left
for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx)
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
DisplayGamertag(idx,FALSE);
}
@ -2103,7 +2103,7 @@ HRESULT CXuiSceneBase::UpdatePlayerBasePositions()
else
{
for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx)
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(pMinecraft->localplayers[idx] != NULL)
{
@ -2210,10 +2210,10 @@ void CXuiSceneBase::SetEmptyQuadrantLogo(int iScreenSection)
CXuiSceneBase::Instance->_SetEmptyQuadrantLogo(iPad,ePos);
}
HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, BOOL bDisplay )
HRESULT CXuiSceneBase::DisplayGamertag( unsigned int iPad, bool display )
{
CXuiSceneBase::Instance->_DisplayGamertag(iPad,bDisplay);
CXuiSceneBase::Instance->_DisplayGamertag(iPad, display);
return S_OK;
}
@ -2240,4 +2240,4 @@ void CXuiSceneBase::CreateBaseSceneInstance()
BOOL handled;
sceneBase->OnInit(NULL,handled);
}
#endif
#endif

View file

@ -109,8 +109,8 @@ protected:
CXuiControl m_selectedItemA[XUSER_MAX_COUNT];
CXuiControl m_selectedItemSmallA[XUSER_MAX_COUNT];
BOOL m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX];
BOOL m_bossHealthVisible[XUSER_MAX_COUNT];
bool m_visible[XUSER_MAX_COUNT][BUTTONS_TOOLTIP_MAX];
bool m_bossHealthVisible[XUSER_MAX_COUNT];
int m_iWrongTexturePackTickC;
// Message map. Here we tie messages to message handlers.
@ -337,33 +337,33 @@ public:
private:
void _TickAllBaseScenes();
HRESULT _SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID );
HRESULT _SetEnableTooltips( unsigned int iPad, BOOL bVal );
HRESULT _SetEnableTooltips( unsigned int iPad, bool enabled );
HRESULT _ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show );
HRESULT _SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB=true, bool bRB = true, bool bLS = true);
HRESULT _RefreshTooltips( unsigned int iPad);
HRESULT _EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable );
HRESULT _ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal );
HRESULT _ShowBackground( unsigned int iPad, BOOL bShow );
HRESULT _ShowDarkOverlay( unsigned int iPad, BOOL bShow );
HRESULT _ShowLogo( unsigned int iPad, BOOL bShow );
HRESULT _ShowBackground( unsigned int iPad, bool show );
HRESULT _ShowDarkOverlay( unsigned int iPad, bool show );
HRESULT _ShowLogo( unsigned int iPad, bool show );
HRESULT _ShowPressStart(unsigned int iPad);
HRESULT _UpdateAutosaveCountdownTimer(unsigned int uiSeconds);
HRESULT _ShowAutosaveCountdownTimer(BOOL bVal);
HRESULT _ShowAutosaveCountdownTimer(bool show);
HRESULT _UpdateTrialTimer(unsigned int iPad);
HRESULT _ShowTrialTimer(BOOL bVal);
HRESULT _ShowTrialTimer(bool show);
void _ReduceTrialTimerValue();
HRESULT _HidePressStart();
HRESULT _ShowSafeArea( BOOL bShow );
HRESULT _ShowSafeArea( bool show );
HRESULT _ShowOtherPlayersBaseScene(int iPad, bool show);
bool _PressStartPlaying(unsigned int iPad);
HRESULT _SetPlayerBaseScenePosition( unsigned int iPad, EBaseScenePosition position );
void _UpdateSelectedItemPos( unsigned int iPad);
EBaseScenePosition _GetPlayerBasePosition(int iPad);
HRESULT _AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode);
HRESULT _AnimateKeyPress(unsigned int userIndex, unsigned int keyCode);
HXUIOBJ _GetPlayerBaseScene(int iPad) {return m_BasePlayerScene[iPad].m_hObj;}
HRESULT _PlayUISFX(ESoundEffect eSound);
void _SetEmptyQuadrantLogo(int iPad,EBaseScenePosition ePos);
HRESULT _DisplayGamertag( unsigned int iPad, BOOL bDisplay );
HRESULT _DisplayGamertag( unsigned int iPad, bool display );
void _SetSelectedItem( unsigned int iPad, const std::wstring& name);
void _HideAllGameUIElements();
bool _GetBaseSceneSafeZone( unsigned int iPad, D3DXVECTOR2 &origin, float &width, float &height);
@ -381,30 +381,30 @@ private:
unsigned int m_uiSelectedItemOpacityCountDown[XUSER_MAX_COUNT];
public:
static DWORD m_dwTrialTimerLimitSecs;
static unsigned int m_trialTimerLimitSecs;
public:
static CXuiSceneBase *GetInstance() { return Instance; }
static void TickAllBaseScenes();
static HRESULT SetTooltipText( unsigned int iPad, unsigned int tooltip, int iTextID );
static HRESULT SetEnableTooltips( unsigned int iPad, BOOL bVal );
static HRESULT SetEnableTooltips( unsigned int iPad, bool enabled );
static HRESULT ShowTooltip( unsigned int iPad, unsigned int tooltip, bool show );
static HRESULT SetTooltips( unsigned int iPad, int iA, int iB=-1, int iX=-1, int iY=-1 , int iLT=-1, int iRT=-1, int iLB=-1, int iRB=-1, int iLS=-1, bool forceUpdate = false);
static HRESULT RefreshTooltips( unsigned int iPad);
static HRESULT EnableTooltip( unsigned int iPad, unsigned int tooltip, bool enable );
static HRESULT SetTooltipsEnabled( unsigned int iPad, bool bA = true, bool bB = true, bool bX = true, bool bY = true, bool bLT = true, bool bRT = true, bool bLB = true, bool bRB=true, bool bLS=true);
static HRESULT AnimateKeyPress(DWORD userIndex, DWORD dwKeyCode);
static HRESULT AnimateKeyPress(unsigned int userIndex, unsigned int keyCode);
static HRESULT ShowSavingMessage( unsigned int iPad, C4JStorage::ESavingMessage eVal);
static HRESULT ShowBackground( unsigned int iPad, BOOL bShow );
static HRESULT ShowDarkOverlay( unsigned int iPad, BOOL bShow );
static HRESULT ShowLogo( unsigned int iPad, BOOL bShow );
static HRESULT ShowBackground( unsigned int iPad, bool show );
static HRESULT ShowDarkOverlay( unsigned int iPad, bool show );
static HRESULT ShowLogo( unsigned int iPad, bool show );
static HRESULT UpdateAutosaveCountdownTimer(unsigned int uiSeconds);
static HRESULT ShowAutosaveCountdownTimer(BOOL bVal);
static HRESULT ShowAutosaveCountdownTimer(bool show);
static HRESULT UpdateTrialTimer(unsigned int iPad);
static HRESULT ShowTrialTimer(BOOL bVal);
static HRESULT ShowTrialTimer(bool show);
static void ReduceTrialTimerValue();
static HRESULT HidePressStart();
static HRESULT ShowSafeArea( BOOL bShow );
static HRESULT ShowSafeArea( bool show );
static HRESULT ShowOtherPlayersBaseScene(int iPad, bool show);
static HRESULT ShowPressStart(unsigned int iPad);
@ -419,7 +419,7 @@ public:
static HXUIOBJ GetPlayerBaseScene(int iPad);
static HRESULT PlayUISFX(ESoundEffect eSound);
static void SetEmptyQuadrantLogo(int iSection);
static HRESULT DisplayGamertag( unsigned int iPad, BOOL bDisplay );
static HRESULT DisplayGamertag( unsigned int iPad, bool display );
static void SetSelectedItem( unsigned int iPad, const std::wstring &name);
static void HideAllGameUIElements();

View file

@ -39,7 +39,7 @@ HRESULT CXuiSceneCraftingPanel::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
m_bIgnoreKeyPresses=true;
D3DXVECTOR3 vec;
VOID *pObj;
void *pObj;
CraftingPanelScreenInput* pCraftingPanelData = (CraftingPanelScreenInput*)pInitData->pvInitData;
m_iContainerType=pCraftingPanelData->iContainerType;
m_pPlayer=pCraftingPanelData->player;
@ -633,4 +633,4 @@ void CXuiSceneCraftingPanel::updateVSlotPositions(int iSlots, int i)
vec.x=m_vSlot0Pos.x + m_iCurrentSlotHIndex*m_fSlotSize;
vec.z=0.0f;
m_pVSlotsBrushImageControl[i]->SetPosition(&vec);
}
}

View file

@ -11,7 +11,7 @@
#include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h"
#include "XUI_Scene_Win.h"
BYTE CScene_Win::s_winUserIndex = 0;
std::uint8_t CScene_Win::s_winUserIndex = 0;
const float CScene_Win::AUTO_SCROLL_SPEED = 1.0f;
const float CScene_Win::PLAYER_SCROLL_SPEED = 3.0f;
@ -299,4 +299,4 @@ HRESULT CScene_Win::OnNavForward(XUIMessageNavForward *pNavForwardData, BOOL& bH
KillTimer(0);
return S_OK;
}
}

View file

@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
#include "../media/xuiscene_Win.h"
#include "XUI_CustomMessages.h"
@ -53,6 +55,6 @@ private:
void updateNoise();
public:
static BYTE s_winUserIndex;
static void setWinUserIndex(BYTE winUserIndex) { s_winUserIndex = winUserIndex; }
};
static std::uint8_t s_winUserIndex;
static void setWinUserIndex(std::uint8_t winUserIndex) { s_winUserIndex = winUserIndex; }
};

View file

@ -165,7 +165,7 @@ HRESULT CScene_SettingsAll::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
case BUTTON_ALL_RESETTODEFAULTS:
{
// check they really want to do this
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_CANCEL;
uiIDA[1]=IDS_CONFIRM_OK;

View file

@ -58,7 +58,7 @@ HRESULT CScene_SkinSelect::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
m_packRight.SetEnable(FALSE);
for(BYTE i = 0; i < sidePreviewControls; ++i)
for(int i = 0; i < sidePreviewControls; ++i)
{
//m_previewNextControl->SetAutoRotate(true);
m_previewNextControls[i]->SetFacing(CXuiCtrlMinecraftSkinPreview::e_SkinPreviewFacing_Left);
@ -244,7 +244,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
if(!m_currentPack->hasPurchasedFile( DLCManager::e_DLCType_Skin, skinFile->getPath() ))
{
// no
UINT uiIDA[1];
unsigned int uiIDA[1];
uiIDA[0]=IDS_OK;
// We need to upsell the full version
@ -278,7 +278,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
// tell sentient about the upsell of the full version of the skin pack
TelemetryManager->RecordUpsellPresented(pInputData->UserIndex, eSet_UpsellID_Skin_DLC, ullOfferID_Full & 0xFFFFFFFF);
UINT uiIDA[2];
unsigned int uiIDA[2];
uiIDA[0]=IDS_CONFIRM_OK;
uiIDA[1]=IDS_CONFIRM_CANCEL;
@ -403,7 +403,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
{
ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
CXuiSceneBase::PlayUISFX(eSFX_Scroll);
DWORD startingIndex = m_packIndex;
int startingIndex = m_packIndex;
m_packIndex = getPreviousPackIndex(m_packIndex);
if(startingIndex != m_packIndex)
{
@ -440,7 +440,7 @@ HRESULT CScene_SkinSelect::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
{
ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
CXuiSceneBase::PlayUISFX(eSFX_Scroll);
DWORD startingIndex = m_packIndex;
int startingIndex = m_packIndex;
m_packIndex = getNextPackIndex(m_packIndex);
if(startingIndex != m_packIndex)
{
@ -620,15 +620,16 @@ HRESULT CScene_SkinSelect::OnBasePositionChanged()
void CScene_SkinSelect::handleSkinIndexChanged()
{
BOOL showPrevious = FALSE, showNext = FALSE;
DWORD previousIndex = 0, nextIndex = 0;
bool showPrevious = false;
bool showNext = false;
int previousIndex = 0, nextIndex = 0;
std::wstring skinName = L"";
std::wstring skinOrigin = L"";
bool bSkinIsFree=false;
bool bLicensed=false;
DLCSkinFile *skinFile=NULL;
DLCPack *Pack=NULL;
BYTE sidePreviewControlsL,sidePreviewControlsR;
int sidePreviewControlsL,sidePreviewControlsR;
bool bNoSkinsToShow=false;
TEXTURE_NAME backupTexture = TN_MOB_CHAR;
@ -767,8 +768,8 @@ void CScene_SkinSelect::handleSkinIndexChanged()
m_previewControl->SetTexture(m_selectedSkinPath, backupTexture);
m_previewControl->SetCapeTexture(m_selectedCapePath);
showNext = TRUE;
showPrevious = TRUE;
showNext = true;
showPrevious = true;
nextIndex = getNextSkinIndex(m_skinIndex);
previousIndex = getPreviousSkinIndex(m_skinIndex);
@ -778,7 +779,7 @@ void CScene_SkinSelect::handleSkinIndexChanged()
wchar_t chars[256];
// turn off all displays
for(BYTE i = 0; i < sidePreviewControls; ++i)
for(int i = 0; i < sidePreviewControls; ++i)
{
m_previewNextControls[i]->SetShow(FALSE);
m_previewPreviousControls[i]->SetShow(FALSE);
@ -816,7 +817,7 @@ void CScene_SkinSelect::handleSkinIndexChanged()
sidePreviewControlsL=sidePreviewControlsR=sidePreviewControls;
}
for(BYTE i = 0; i < sidePreviewControlsR; ++i)
for(int i = 0; i < sidePreviewControlsR; ++i)
{
if(showNext)
{
@ -888,7 +889,7 @@ void CScene_SkinSelect::handleSkinIndexChanged()
for(BYTE i = 0; i < sidePreviewControlsL; ++i)
for(int i = 0; i < sidePreviewControlsL; ++i)
{
if(showPrevious)
{
@ -1017,11 +1018,11 @@ void CScene_SkinSelect::handlePackIndexChanged()
case SKIN_SELECT_PACK_DEFAULT:
if( !GET_IS_DLC_SKIN_FROM_BITMASK(m_originalSkinId) )
{
DWORD ugcSkinIndex = GET_UGC_SKIN_ID_FROM_BITMASK(m_originalSkinId);
DWORD defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId);
unsigned int ugcSkinIndex = GET_UGC_SKIN_ID_FROM_BITMASK(m_originalSkinId);
unsigned int defaultSkinIndex = GET_DEFAULT_SKIN_ID_FROM_BITMASK(m_originalSkinId);
if( ugcSkinIndex == 0 )
{
m_skinIndex = (EDefaultSkins) defaultSkinIndex;
m_skinIndex = static_cast<int>(defaultSkinIndex);
}
}
break;
@ -1176,7 +1177,7 @@ TEXTURE_NAME CScene_SkinSelect::getTextureId(int skinIndex)
return texture;
}
int CScene_SkinSelect::getNextSkinIndex(DWORD sourceIndex)
int CScene_SkinSelect::getNextSkinIndex(int sourceIndex)
{
int nextSkin = sourceIndex;
@ -1210,7 +1211,7 @@ int CScene_SkinSelect::getNextSkinIndex(DWORD sourceIndex)
return nextSkin;
}
int CScene_SkinSelect::getPreviousSkinIndex(DWORD sourceIndex)
int CScene_SkinSelect::getPreviousSkinIndex(int sourceIndex)
{
int previousSkin = sourceIndex;
switch(m_packIndex)
@ -1249,7 +1250,7 @@ int CScene_SkinSelect::getPreviousSkinIndex(DWORD sourceIndex)
return previousSkin;
}
int CScene_SkinSelect::getNextPackIndex(DWORD sourceIndex)
int CScene_SkinSelect::getNextPackIndex(int sourceIndex)
{
int nextPack = sourceIndex;
++nextPack;
@ -1261,7 +1262,7 @@ int CScene_SkinSelect::getNextPackIndex(DWORD sourceIndex)
return nextPack;
}
int CScene_SkinSelect::getPreviousPackIndex(DWORD sourceIndex)
int CScene_SkinSelect::getPreviousPackIndex(int sourceIndex)
{
int previousPack = sourceIndex;
if(previousPack == SKIN_SELECT_PACK_DEFAULT)

View file

@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
#include "../media/xuiscene_skinselect.h"
#include "XUI_CustomMessages.h"
#include "../../Minecraft.World/Util/Definitions.h"
@ -15,7 +17,7 @@ private:
static WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
// 4J Stu - How many to show on each side of the main control
static const BYTE sidePreviewControls = 4;
static constexpr int sidePreviewControls = 4;
enum ESkinSelectNavigation
{
@ -112,10 +114,10 @@ protected:
std::wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath;
std::vector<SKIN_BOX *> *m_vAdditionalSkinBoxes;
//std::vector<ModelPart *> *m_vAdditionalModelParts;
DWORD m_originalSkinId;
std::uint32_t m_originalSkinId;
DLCPack *m_currentPack;
DWORD m_packIndex, m_skinIndex;
int m_packIndex, m_skinIndex;
public:
// Define the class. The class name must match the ClassOverride property
@ -129,11 +131,11 @@ private:
void updateCurrentFocus();
TEXTURE_NAME getTextureId(int skinIndex);
int getNextSkinIndex(DWORD sourceIndex);
int getPreviousSkinIndex(DWORD sourceIndex);
int getNextSkinIndex(int sourceIndex);
int getPreviousSkinIndex(int sourceIndex);
int getNextPackIndex(DWORD sourceIndex);
int getPreviousPackIndex(DWORD sourceIndex);
int getNextPackIndex(int sourceIndex);
int getPreviousPackIndex(int sourceIndex);
void updateClipping();
@ -143,7 +145,7 @@ private:
bool m_bSlidingSkins, m_bAnimatingMove;
DWORD currentPackCount;
int currentPackCount;
ESkinSelectNavigation m_currentNavigation;
bool m_bIgnoreInput;

View file

@ -51,7 +51,7 @@ HRESULT CScene_SocialPost::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
m_EditCaption.SetCaretPosition((int)wCaption.length());
m_EditDesc.SetCaretPosition((int)wDesc.length());
BOOL bHasAllText = /*( wTitle.length()!=0) && */(wCaption.length()!=0) && (wDesc.length()!=0);
bool bHasAllText = /*( wTitle.length()!=0) && */(wCaption.length()!=0) && (wDesc.length()!=0);
m_OK.SetEnable(bHasAllText);
@ -78,7 +78,7 @@ std::wstring wDesc = m_EditDesc.GetText();
std::wstring wCaption = m_EditCaption.GetText();
std::wstring wDesc = m_EditDesc.GetText();
BOOL bHasAllText = /*( wTitle.length()!=0) &&*/ (wCaption.length()!=0) && (wDesc.length()!=0);
bool bHasAllText = /*( wTitle.length()!=0) &&*/ (wCaption.length()!=0) && (wDesc.length()!=0);
m_OK.SetEnable(bHasAllText);
}
@ -144,4 +144,4 @@ HRESULT CScene_SocialPost::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL
{
bHandled=true;
return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining,false);
}
}

View file

@ -44,10 +44,10 @@ HRESULT CScene_Teleport::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
}
DWORD playerCount = g_NetworkManager.GetPlayerCount();
int playerCount = g_NetworkManager.GetPlayerCount();
m_playersCount = 0;
for(DWORD i = 0; i < playerCount; ++i)
for(int i = 0; i < playerCount; ++i)
{
INetworkPlayer *player = g_NetworkManager.GetPlayerByIndex( i );
@ -309,4 +309,4 @@ HRESULT CScene_Teleport::OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL&
{
bHandled=true;
return app.AdjustSplitscreenScene_PlayerChanged(m_hObj,&m_OriginalPosition,m_iPad,bJoining);
}
}

View file

@ -1,5 +1,7 @@
#pragma once
//using namespace std;
#include <cstdint>
#include "../media/xuiscene_teleportmenu.h"
#include "XUI_CustomMessages.h"
@ -60,5 +62,5 @@ private:
bool m_teleportToPlayer;
int m_playersCount;
BYTE m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
std::uint8_t m_players[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
};

View file

@ -24,7 +24,7 @@ HRESULT CScene_TransferToXboxOne::OnInit( XUIMessageInit* pInitData, BOOL& bHand
m_bIgnoreInput=false;
MapChildControls();
VOID *pObj;
void *pObj;
XuiObjectFromHandle( m_SavesSlotList, &pObj );
m_pSavesSlotList = (CXuiCtrl4JList *)pObj;
@ -566,4 +566,3 @@ HRESULT CScene_TransferToXboxOne::OnNotifyKillFocus(HXUIOBJ hObjSource, XUINotif
return S_OK;
}

View file

@ -79,8 +79,8 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible)
HXUICLASS brewingClass = XuiFindClass( L"CXuiSceneBrewingStand" );
HXUICLASS anvilClass = XuiFindClass( L"CXuiSceneAnvil" );
HXUICLASS tradingClass = XuiFindClass( L"CXuiSceneTrading" );
BOOL isCraftingScene = XuiClassDerivesFrom( sceneClass, craftingClass );
BOOL isCreativeScene = XuiClassDerivesFrom( sceneClass, creativeInventoryClass );
bool isCraftingScene = XuiClassDerivesFrom( sceneClass, craftingClass ) != FALSE;
bool isCreativeScene = XuiClassDerivesFrom( sceneClass, creativeInventoryClass ) != FALSE;
switch(Minecraft::GetInstance()->localplayers[m_iPad]->m_iScreenSection)
{
@ -115,7 +115,7 @@ void CScene_TutorialPopup::UpdateInteractScenePosition(bool visible)
XuiClassDerivesFrom( sceneClass, anvilClass ) ||
XuiClassDerivesFrom( sceneClass, tradingClass ) ||
isCreativeScene ||
isCraftingScene == TRUE )
isCraftingScene )
{
XuiElementGetTimeline( m_interactScene->m_hObj, &timeline);
if(visible)
@ -194,7 +194,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR
D3DXVECTOR3 titlePos;
hr = XuiElementGetPosition( m_title, &titlePos );
BOOL titleShowAtStart = m_title.IsShown();
bool titleShowAtStart = m_title.IsShown() != FALSE;
if( title != NULL && title[0] != 0 )
{
m_title.SetText( title );
@ -205,7 +205,7 @@ HRESULT CScene_TutorialPopup::_SetDescription(CXuiScene *interactScene, LPCWSTR
m_title.SetText( L"" );
m_title.SetShow(FALSE);
}
BOOL titleShowAtEnd = m_title.IsShown();
bool titleShowAtEnd = m_title.IsShown() != FALSE;
if(titleShowAtStart != titleShowAtEnd)
{
float fHeight, fWidth, fTitleHeight, fDescHeight, fDescWidth;
@ -284,7 +284,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
{
std::wstring temp(desc);
BOOL iconShowAtStart = m_pCraftingPic->IsShown();
bool iconShowAtStart = m_pCraftingPic->IsShown() != FALSE;
if( icon != TUTORIAL_NO_ICON )
{
@ -411,7 +411,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
}
}
BOOL iconShowAtEnd = m_pCraftingPic->IsShown();
bool iconShowAtEnd = m_pCraftingPic->IsShown() != FALSE;
if(iconShowAtStart != iconShowAtEnd)
{
float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth;
@ -439,7 +439,7 @@ std::wstring CScene_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil,
std::wstring CScene_TutorialPopup::_SetImage(std::wstring &desc)
{
BOOL imageShowAtStart = m_image.IsShown();
bool imageShowAtStart = m_image.IsShown() != FALSE;
std::wstring openTag(L"{*IMAGE*}");
std::wstring closeTag(L"{*/IMAGE*}");
@ -464,7 +464,7 @@ std::wstring CScene_TutorialPopup::_SetImage(std::wstring &desc)
m_image.SetShow( FALSE );
}
BOOL imageShowAtEnd = m_image.IsShown();
bool imageShowAtEnd = m_image.IsShown() != FALSE;
if(imageShowAtStart != imageShowAtEnd)
{
float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth;
@ -600,4 +600,4 @@ bool CScene_TutorialPopup::IsSceneVisible(int iPad)
isVisible = pThis->_IsSceneVisible();
}
return isVisible;
}
}

View file

@ -9,7 +9,7 @@ bool SonyCommerce_Orbis::m_bCommerceInitialised = false;
// SceNpCommerce2SessionInfo SonyCommerce_Orbis::m_sessionInfo;
SonyCommerce_Orbis::State SonyCommerce_Orbis::m_state = e_state_noSession;
int SonyCommerce_Orbis::m_errorCode = 0;
LPVOID SonyCommerce_Orbis::m_callbackParam = NULL;
void* SonyCommerce_Orbis::m_callbackParam = NULL;
void* SonyCommerce_Orbis::m_receiveBuffer = NULL;
SonyCommerce_Orbis::Event SonyCommerce_Orbis::m_event;
@ -29,7 +29,7 @@ SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_callbackFunc = NULL;
bool SonyCommerce_Orbis::m_bUpgradingTrial = false;
SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_trialUpgradeCallbackFunc;
LPVOID SonyCommerce_Orbis::m_trialUpgradeCallbackParam;
void* SonyCommerce_Orbis::m_trialUpgradeCallbackParam;
CRITICAL_SECTION SonyCommerce_Orbis::m_queueLock;
@ -73,7 +73,7 @@ void SonyCommerce_Orbis::Init()
void SonyCommerce_Orbis::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion)
void SonyCommerce_Orbis::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion)
{
ProfileManager.SetFullVersion(bFullVersion);
if(ProfileManager.IsFullVersion())
@ -498,7 +498,7 @@ int SonyCommerce_Orbis::downloadList_game(DownloadListInputParams &params)
return ret;
}
void SonyCommerce_Orbis::UpgradeTrialCallback2(LPVOID lpParam,int err)
void SonyCommerce_Orbis::UpgradeTrialCallback2(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err);
@ -512,7 +512,7 @@ void SonyCommerce_Orbis::UpgradeTrialCallback2(LPVOID lpParam,int err)
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
}
void SonyCommerce_Orbis::UpgradeTrialCallback1(LPVOID lpParam,int err)
void SonyCommerce_Orbis::UpgradeTrialCallback1(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err);
@ -551,7 +551,7 @@ void SonyCommerce_UpgradeTrial()
app.UpgradeTrial();
}
void SonyCommerce_Orbis::UpgradeTrial(CallbackFunc cb, LPVOID lpParam)
void SonyCommerce_Orbis::UpgradeTrial(CallbackFunc cb, void* lpParam)
{
m_trialUpgradeCallbackFunc = cb;
m_trialUpgradeCallbackParam = lpParam;
@ -1130,7 +1130,7 @@ int SonyCommerce_Orbis::commerceEnd()
return ret;
}
void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, void* lpParam )
{
// 4J-PB - reset any previous error code
// I had this happen when I was offline on Vita, and accepted the PSN sign-in
@ -1172,7 +1172,7 @@ void SonyCommerce_Orbis::CloseSession()
//Shutdown();
}
void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1182,7 +1182,7 @@ void SonyCommerce_Orbis::GetProductList( CallbackFunc cb, LPVOID lpParam, std::v
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1194,7 +1194,7 @@ void SonyCommerce_Orbis::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam
}
// 4J-PB - fill out the long description and the price for the product
void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1204,7 +1204,7 @@ void SonyCommerce_Orbis::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam
m_messageQueue.push(e_message_commerceAddDetailedProductInfo);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId )
void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1214,7 +1214,7 @@ void SonyCommerce_Orbis::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Categ
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Orbis::Checkout( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1224,7 +1224,7 @@ void SonyCommerce_Orbis::Checkout( CallbackFunc cb, LPVOID lpParam, const char*
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1234,7 +1234,7 @@ void SonyCommerce_Orbis::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpPar
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1243,7 +1243,7 @@ void SonyCommerce_Orbis::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const c
m_messageQueue.push(e_message_commerceCheckout_Game);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Orbis::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Orbis::DownloadAlreadyPurchased_Game( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1267,7 +1267,7 @@ std::vector<SonyCommerce::ProductInfo> g_productInfo;
SonyCommerce::CategoryInfo g_categoryInfo2;
SonyCommerce::ProductInfoDetailed g_productInfoDetailed;
void testCallback(LPVOID lpParam, int error_code)
void testCallback(void* lpParam, int error_code)
{
app.DebugPrintf("Callback hit, error 0x%08x\n", error_code);
}
@ -1311,4 +1311,4 @@ void SonyCommerce_Orbis::Test()
}
}
*/
*/

View file

@ -81,7 +81,7 @@ class SonyCommerce_Orbis : public SonyCommerce
// static SceNpCommerce2SessionInfo m_sessionInfo;
static State m_state;
static int m_errorCode;
static LPVOID m_callbackParam;
static void* m_callbackParam;
static Event m_event;
static Message m_message;
// static uint32_t m_requestID;
@ -100,7 +100,7 @@ class SonyCommerce_Orbis : public SonyCommerce
static bool m_bUpgradingTrial;
static C4JThread* m_tickThread;
static CallbackFunc m_trialUpgradeCallbackFunc;
static LPVOID m_trialUpgradeCallbackParam;
static void* m_trialUpgradeCallbackParam;
static CRITICAL_SECTION m_queueLock;
static void runCallback()
@ -112,7 +112,7 @@ class SonyCommerce_Orbis : public SonyCommerce
func(m_callbackParam, m_errorCode);
m_errorCode = SCE_OK;
}
static void setCallback(CallbackFunc cb,LPVOID lpParam)
static void setCallback(CallbackFunc cb, void* lpParam)
{
assert(m_callbackFunc == NULL);
m_callbackFunc = cb;
@ -142,8 +142,8 @@ class SonyCommerce_Orbis : public SonyCommerce
static int downloadList(DownloadListInputParams &params);
static int checkout_game(CheckoutInputParams &params);
static int downloadList_game(DownloadListInputParams &params);
static void UpgradeTrialCallback1(LPVOID lpParam,int err);
static void UpgradeTrialCallback2(LPVOID lpParam,int err);
static void UpgradeTrialCallback1(void* lpParam,int err);
static void UpgradeTrialCallback2(void* lpParam,int err);
static void Delete();
static void copyCategoryInfo(CategoryInfo *pInfo, sce::Toolkit::NP::CategoryInfo *pNPInfo);
static void copyProductList(std::vector<ProductInfo>* pProductList, std::vector<sce::Toolkit::NP::ProductInfo>* pNPProductList);
@ -160,22 +160,22 @@ class SonyCommerce_Orbis : public SonyCommerce
static void Init();
static int Shutdown();
static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion);
static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion);
public:
virtual void CreateSession(CallbackFunc cb, LPVOID lpParam);
virtual void CreateSession(CallbackFunc cb, void* lpParam);
virtual void CloseSession();
virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam);
virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void UpgradeTrial(CallbackFunc cb, void* lpParam);
virtual void CheckForTrialUpgradeKey();
virtual bool LicenseChecked();

View file

@ -141,7 +141,7 @@ void SonyRemoteStorage_Orbis::internalCallback(const SceRemoteStorageEvent event
}
}
bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, void* lpParam)
{
int ret = 0;
@ -248,7 +248,7 @@ bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Orbis::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Orbis::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam)
{
m_callbackFunc = cb;
m_callbackParam = lpParam;
@ -287,7 +287,7 @@ void SonyRemoteStorage_Orbis::abort()
}
bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, void* lpParam )
{
assert(0);
return false;
@ -328,7 +328,7 @@ bool SonyRemoteStorage_Orbis::setData( PSAVE_INFO info, CallbackFunc cb, LPVOID
// }
}
bool SonyRemoteStorage_Orbis::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage_Orbis::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam )
{
m_callbackFunc = cb;
m_callbackParam = lpParam;

View file

@ -8,11 +8,11 @@ class SonyRemoteStorage_Orbis : public SonyRemoteStorage
public:
virtual bool init(CallbackFunc cb, LPVOID lpParam);
virtual bool setData(PSAVE_INFO info, CallbackFunc cb, LPVOID lpParam);
virtual bool init(CallbackFunc cb, void* lpParam);
virtual bool setData(PSAVE_INFO info, CallbackFunc cb, void* lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam);
virtual void abort();
virtual bool setDataInternal(){ assert(0); }
@ -39,4 +39,3 @@ private:
void runCallback();
};

View file

@ -9,7 +9,7 @@ bool SonyCommerce_PS3::m_bCommerceInitialised = false;
SceNpCommerce2SessionInfo SonyCommerce_PS3::m_sessionInfo;
SonyCommerce_PS3::State SonyCommerce_PS3::m_state = e_state_noSession;
int SonyCommerce_PS3::m_errorCode = 0;
LPVOID SonyCommerce_PS3::m_callbackParam = NULL;
void* SonyCommerce_PS3::m_callbackParam = NULL;
void* SonyCommerce_PS3::m_receiveBuffer = NULL;
SonyCommerce_PS3::Event SonyCommerce_PS3::m_event;
@ -29,7 +29,7 @@ sys_memory_container_t SonyCommerce_PS3::m_memContainer = SYS_MEMORY_CONTAIN
bool SonyCommerce_PS3::m_bUpgradingTrial = false;
SonyCommerce_PS3::CallbackFunc SonyCommerce_PS3::m_trialUpgradeCallbackFunc;
LPVOID SonyCommerce_PS3::m_trialUpgradeCallbackParam;
void* SonyCommerce_PS3::m_trialUpgradeCallbackParam;
CRITICAL_SECTION SonyCommerce_PS3::m_queueLock;
@ -81,7 +81,7 @@ void SonyCommerce_PS3::Init()
void SonyCommerce_PS3::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion)
void SonyCommerce_PS3::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion)
{
ProfileManager.SetFullVersion(bFullVersion);
if(ProfileManager.IsFullVersion())
@ -806,7 +806,7 @@ int SonyCommerce_PS3::downloadList(DownloadListInputParams &params)
return CELL_OK;
}
void SonyCommerce_PS3::UpgradeTrialCallback2(LPVOID lpParam,int err)
void SonyCommerce_PS3::UpgradeTrialCallback2(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err);
@ -820,7 +820,7 @@ void SonyCommerce_PS3::UpgradeTrialCallback2(LPVOID lpParam,int err)
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
}
void SonyCommerce_PS3::UpgradeTrialCallback1(LPVOID lpParam,int err)
void SonyCommerce_PS3::UpgradeTrialCallback1(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err);
@ -856,7 +856,7 @@ void SonyCommerce_UpgradeTrial()
app.UpgradeTrial();
}
void SonyCommerce_PS3::UpgradeTrial(CallbackFunc cb, LPVOID lpParam)
void SonyCommerce_PS3::UpgradeTrial(CallbackFunc cb, void* lpParam)
{
m_trialUpgradeCallbackFunc = cb;
m_trialUpgradeCallbackParam = lpParam;
@ -1396,7 +1396,7 @@ int SonyCommerce_PS3::commerceEnd()
return ret;
}
void SonyCommerce_PS3::CreateSession( CallbackFunc cb, LPVOID lpParam )
void SonyCommerce_PS3::CreateSession( CallbackFunc cb, void* lpParam )
{
// 4J-PB - reset any previous error code
// I had this happen when I was offline on Vita, and accepted the PSN sign-in
@ -1427,7 +1427,7 @@ void SonyCommerce_PS3::CloseSession()
Shutdown();
}
void SonyCommerce_PS3::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
void SonyCommerce_PS3::GetProductList( CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1437,7 +1437,7 @@ void SonyCommerce_PS3::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vec
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1449,7 +1449,7 @@ void SonyCommerce_PS3::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam,
}
// 4J-PB - fill out the long description and the price for the product
void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1459,7 +1459,7 @@ void SonyCommerce_PS3::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam,
m_messageQueue.push(e_message_commerceAddDetailedProductInfo);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId )
void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1469,7 +1469,7 @@ void SonyCommerce_PS3::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Categor
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_PS3::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_PS3::Checkout( CallbackFunc cb, void* lpParam, const char* skuID )
{
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
{
@ -1490,7 +1490,7 @@ void SonyCommerce_PS3::Checkout( CallbackFunc cb, LPVOID lpParam, const char* sk
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID )
{
if(m_memContainer != SYS_MEMORY_CONTAINER_ID_INVALID)
return;
@ -1510,4 +1510,3 @@ void SonyCommerce_PS3::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam
}

View file

@ -88,7 +88,7 @@ class SonyCommerce_PS3 : public SonyCommerce
static SceNpCommerce2SessionInfo m_sessionInfo;
static State m_state;
static int m_errorCode;
static LPVOID m_callbackParam;
static void* m_callbackParam;
static Event m_event;
static Message m_message;
// static uint32_t m_requestID;
@ -107,7 +107,7 @@ class SonyCommerce_PS3 : public SonyCommerce
static bool m_bUpgradingTrial;
static C4JThread* m_tickThread;
static CallbackFunc m_trialUpgradeCallbackFunc;
static LPVOID m_trialUpgradeCallbackParam;
static void* m_trialUpgradeCallbackParam;
static CRITICAL_SECTION m_queueLock;
static void runCallback()
@ -119,7 +119,7 @@ class SonyCommerce_PS3 : public SonyCommerce
func(m_callbackParam, m_errorCode);
m_errorCode = CELL_OK;
}
static void setCallback(CallbackFunc cb,LPVOID lpParam)
static void setCallback(CallbackFunc cb, void* lpParam)
{
assert(m_callbackFunc == NULL);
m_callbackFunc = cb;
@ -147,8 +147,8 @@ class SonyCommerce_PS3 : public SonyCommerce
static int addDetailedProductInfo(ProductInfo *info, const char *productId, char *categoryId);
static int checkout(CheckoutInputParams &params);
static int downloadList(DownloadListInputParams &params);
static void UpgradeTrialCallback1(LPVOID lpParam,int err);
static void UpgradeTrialCallback2(LPVOID lpParam,int err);
static void UpgradeTrialCallback1(void* lpParam,int err);
static void UpgradeTrialCallback2(void* lpParam,int err);
static void Delete();
@ -160,20 +160,20 @@ class SonyCommerce_PS3 : public SonyCommerce
static void Init();
static int Shutdown();
static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion);
static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion);
public:
virtual void CreateSession(CallbackFunc cb, LPVOID lpParam);
virtual void CreateSession(CallbackFunc cb, void* lpParam);
virtual void CloseSession();
virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam);
virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void UpgradeTrial(CallbackFunc cb, void* lpParam);
virtual void CheckForTrialUpgradeKey();
virtual bool LicenseChecked();

View file

@ -200,7 +200,7 @@ void SonyRemoteStorage_PS3::internalCallback(const SceRemoteStorageEvent event,
}
}
bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_PS3::init(CallbackFunc cb, void* lpParam)
{
m_callbackFunc = cb;
m_callbackParam = lpParam;
@ -270,7 +270,7 @@ bool SonyRemoteStorage_PS3::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_PS3::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam)
{
m_callbackFunc = cb;
m_callbackParam = lpParam;
@ -392,7 +392,7 @@ bool SonyRemoteStorage_PS3::setDataInternal()
}
}
bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage_PS3::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam )
{
m_callbackFunc = cb;
m_callbackParam = lpParam;
@ -429,7 +429,7 @@ void SonyRemoteStorage_PS3::runCallback()
m_lastErrorCode = ERROR_SUCCESS;
}
int SonyRemoteStorage_PS3::SaveCompressCallback(LPVOID lpParam,bool bRes)
int SonyRemoteStorage_PS3::SaveCompressCallback(void* lpParam,bool bRes)
{
SonyRemoteStorage_PS3* pRS = (SonyRemoteStorage_PS3*)lpParam;
pRS->m_compressedSaveState = e_state_Idle;
@ -516,4 +516,3 @@ void SonyRemoteStorage_PS3::CompressSaveData()
app.DebugPrintf("done\n");
assert(m_compressedSaveState == e_state_Idle);
}

View file

@ -8,10 +8,10 @@ class SonyRemoteStorage_PS3 : public SonyRemoteStorage
public:
virtual bool init(CallbackFunc cb, LPVOID lpParam);
virtual bool init(CallbackFunc cb, void* lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam);
virtual void abort();
virtual bool setDataInternal();
@ -56,9 +56,8 @@ private:
virtual void runCallback();
static int SaveCompressCallback(LPVOID lpParam,bool bRes);
static int SaveCompressCallback(void* lpParam,bool bRes);
static int LoadCompressCallback(void *pParam,bool bIsCorrupt, bool bIsOwner);
};

View file

@ -10,7 +10,7 @@ bool SonyCommerce_Vita::m_bCommerceInitialised = false;
// SceNpCommerce2SessionInfo SonyCommerce_Vita::m_sessionInfo;
SonyCommerce_Vita::State SonyCommerce_Vita::m_state = e_state_noSession;
int SonyCommerce_Vita::m_errorCode = 0;
LPVOID SonyCommerce_Vita::m_callbackParam = NULL;
void* SonyCommerce_Vita::m_callbackParam = NULL;
void* SonyCommerce_Vita::m_receiveBuffer = NULL;
SonyCommerce_Vita::Event SonyCommerce_Vita::m_event;
@ -30,7 +30,7 @@ SonyCommerce_Vita::CallbackFunc SonyCommerce_Vita::m_callbackFunc = NULL;
bool SonyCommerce_Vita::m_bUpgradingTrial = false;
SonyCommerce_Vita::CallbackFunc SonyCommerce_Vita::m_trialUpgradeCallbackFunc;
LPVOID SonyCommerce_Vita::m_trialUpgradeCallbackParam;
void* SonyCommerce_Vita::m_trialUpgradeCallbackParam;
CRITICAL_SECTION SonyCommerce_Vita::m_queueLock;
@ -84,7 +84,7 @@ void SonyCommerce_Vita::Init()
void SonyCommerce_Vita::CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion)
void SonyCommerce_Vita::CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion)
{
ProfileManager.SetFullVersion(bFullVersion);
if(ProfileManager.IsFullVersion())
@ -126,7 +126,7 @@ int SonyCommerce_Vita::Shutdown()
return ret;
}
void SonyCommerce_Vita::InstallContentCallback(LPVOID lpParam,int err)
void SonyCommerce_Vita::InstallContentCallback(void* lpParam,int err)
{
m_iClearDLCCountdown = 30;
m_bInstallingContent = false;
@ -582,7 +582,7 @@ int SonyCommerce_Vita::installContent()
}
void SonyCommerce_Vita::UpgradeTrialCallback2(LPVOID lpParam,int err)
void SonyCommerce_Vita::UpgradeTrialCallback2(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback2 : err : 0x%08x\n", err);
@ -596,7 +596,7 @@ void SonyCommerce_Vita::UpgradeTrialCallback2(LPVOID lpParam,int err)
m_trialUpgradeCallbackFunc(m_trialUpgradeCallbackParam, m_errorCode);
}
void SonyCommerce_Vita::UpgradeTrialCallback1(LPVOID lpParam,int err)
void SonyCommerce_Vita::UpgradeTrialCallback1(void* lpParam,int err)
{
SonyCommerce* pCommerce = (SonyCommerce*)lpParam;
app.DebugPrintf(4,"SonyCommerce_UpgradeTrialCallback1 : err : 0x%08x\n", err);
@ -632,7 +632,7 @@ void SonyCommerce_UpgradeTrial()
app.UpgradeTrial();
}
void SonyCommerce_Vita::UpgradeTrial(CallbackFunc cb, LPVOID lpParam)
void SonyCommerce_Vita::UpgradeTrial(CallbackFunc cb, void* lpParam)
{
m_trialUpgradeCallbackFunc = cb;
m_trialUpgradeCallbackParam = lpParam;
@ -1304,7 +1304,7 @@ int SonyCommerce_Vita::commerceEnd()
return ret;
}
void SonyCommerce_Vita::CreateSession( CallbackFunc cb, LPVOID lpParam )
void SonyCommerce_Vita::CreateSession( CallbackFunc cb, void* lpParam )
{
// 4J-PB - reset any previous error code
// I had this happen when I was offline on Vita, and accepted the PSN sign-in
@ -1343,7 +1343,7 @@ void SonyCommerce_Vita::CloseSession()
Shutdown();
}
void SonyCommerce_Vita::GetProductList( CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
void SonyCommerce_Vita::GetProductList( CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId)
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1353,7 +1353,7 @@ void SonyCommerce_Vita::GetProductList( CallbackFunc cb, LPVOID lpParam, std::ve
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1365,7 +1365,7 @@ void SonyCommerce_Vita::GetDetailedProductInfo( CallbackFunc cb, LPVOID lpParam,
}
// 4J-PB - fill out the long description and the price for the product
void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1375,7 +1375,7 @@ void SonyCommerce_Vita::AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam,
m_messageQueue.push(e_message_commerceAddDetailedProductInfo);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId )
void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1385,7 +1385,7 @@ void SonyCommerce_Vita::GetCategoryInfo( CallbackFunc cb, LPVOID lpParam, Catego
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo )
void SonyCommerce_Vita::Checkout( CallbackFunc cb, void* lpParam, ProductInfo* productInfo )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1399,12 +1399,12 @@ void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, ProductInfo*
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::Checkout( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Vita::Checkout( CallbackFunc cb, void* lpParam, const char* skuID )
{
assert(0);
}
void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1414,7 +1414,7 @@ void SonyCommerce_Vita::DownloadAlreadyPurchased( CallbackFunc cb, LPVOID lpPara
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1423,7 +1423,7 @@ void SonyCommerce_Vita::Checkout_Game( CallbackFunc cb, LPVOID lpParam, const ch
m_messageQueue.push(e_message_commerceCheckout_Game);
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID lpParam, const char* skuID )
void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, void* lpParam, const char* skuID )
{
EnterCriticalSection(&m_queueLock);
setCallback(cb,lpParam);
@ -1433,7 +1433,7 @@ void SonyCommerce_Vita::DownloadAlreadyPurchased_Game( CallbackFunc cb, LPVOID l
LeaveCriticalSection(&m_queueLock);
}
void SonyCommerce_Vita::InstallContent( CallbackFunc cb, LPVOID lpParam )
void SonyCommerce_Vita::InstallContent( CallbackFunc cb, void* lpParam )
{
if(m_callbackFunc == NULL && m_messageQueue.size() == 0) // wait till other processes have finished
{
@ -1472,7 +1472,7 @@ std::vector<SonyCommerce::ProductInfo> g_productInfo;
SonyCommerce::CategoryInfo g_categoryInfo2;
SonyCommerce::ProductInfoDetailed g_productInfoDetailed;
void testCallback(LPVOID lpParam, int error_code)
void testCallback(void* lpParam, int error_code)
{
app.DebugPrintf("Callback hit, error 0x%08x\n", error_code);
}
@ -1516,4 +1516,4 @@ void SonyCommerce_Vita::Test()
}
}
*/
*/

View file

@ -88,7 +88,7 @@ class SonyCommerce_Vita : public SonyCommerce
// static SceNpCommerce2SessionInfo m_sessionInfo;
static State m_state;
static int m_errorCode;
static LPVOID m_callbackParam;
static void* m_callbackParam;
static Event m_event;
static Message m_message;
// static uint32_t m_requestID;
@ -107,7 +107,7 @@ class SonyCommerce_Vita : public SonyCommerce
static bool m_bUpgradingTrial;
static C4JThread* m_tickThread;
static CallbackFunc m_trialUpgradeCallbackFunc;
static LPVOID m_trialUpgradeCallbackParam;
static void* m_trialUpgradeCallbackParam;
static CRITICAL_SECTION m_queueLock;
static bool m_bLicenseInstalled;
static bool m_bDownloadsPending;
@ -126,7 +126,7 @@ class SonyCommerce_Vita : public SonyCommerce
func(m_callbackParam, m_errorCode);
m_errorCode = SCE_OK;
}
static void setCallback(CallbackFunc cb,LPVOID lpParam)
static void setCallback(CallbackFunc cb, void* lpParam)
{
assert(m_callbackFunc == NULL);
m_callbackFunc = cb;
@ -158,14 +158,14 @@ class SonyCommerce_Vita : public SonyCommerce
static int checkout_game(CheckoutInputParams &params);
static int downloadList_game(DownloadListInputParams &params);
static int installContent();
static void UpgradeTrialCallback1(LPVOID lpParam,int err);
static void UpgradeTrialCallback2(LPVOID lpParam,int err);
static void UpgradeTrialCallback1(void* lpParam,int err);
static void UpgradeTrialCallback2(void* lpParam,int err);
static void Delete();
static void copyCategoryInfo(CategoryInfo *pInfo, sce::Toolkit::NP::CategoryInfo *pNPInfo);
static void copyProductList(std::vector<ProductInfo>* pProductList, std::vector<sce::Toolkit::NP::ProductInfo>* pNPProductList);
static void copyDetailedProductInfo(ProductInfoDetailed *pInfo, sce::Toolkit::NP::ProductInfoDetailed* pNPInfo);
static void copyAddDetailedProductInfo(ProductInfo *pInfo, sce::Toolkit::NP::ProductInfoDetailed* pNPInfo);
static void InstallContentCallback(LPVOID lpParam,int err);
static void InstallContentCallback(void* lpParam,int err);
static int commerceEnd();
// static int upgradeTrial();
@ -176,25 +176,25 @@ class SonyCommerce_Vita : public SonyCommerce
static void Init();
static int Shutdown();
static void CheckForTrialUpgradeKey_Callback(LPVOID param, bool bFullVersion);
static void CheckForTrialUpgradeKey_Callback(void* param, bool bFullVersion);
public:
static void checkBackgroundDownloadStatus();
virtual void CreateSession(CallbackFunc cb, LPVOID lpParam);
virtual void CreateSession(CallbackFunc cb, void* lpParam);
virtual void CloseSession();
virtual void GetCategoryInfo(CallbackFunc cb, LPVOID lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, LPVOID lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, LPVOID lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void Checkout(CallbackFunc cb, LPVOID lpParam, ProductInfo* productInfo);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void Checkout_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, LPVOID lpParam, const char* skuID);
static void InstallContent(CallbackFunc cb, LPVOID lpParam);
virtual void UpgradeTrial(CallbackFunc cb, LPVOID lpParam);
virtual void GetCategoryInfo(CallbackFunc cb, void* lpParam, CategoryInfo *info, const char *categoryId);
virtual void GetProductList(CallbackFunc cb, void* lpParam, std::vector<ProductInfo>* productList, const char *categoryId);
virtual void GetDetailedProductInfo(CallbackFunc cb, void* lpParam, ProductInfoDetailed* productInfoDetailed, const char *productId, const char *categoryId);
virtual void AddDetailedProductInfo( CallbackFunc cb, void* lpParam, ProductInfo* productInfo, const char *productId, const char *categoryId );
virtual void Checkout(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void Checkout(CallbackFunc cb, void* lpParam, ProductInfo* productInfo);
virtual void DownloadAlreadyPurchased(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void Checkout_Game(CallbackFunc cb, void* lpParam, const char* skuID);
virtual void DownloadAlreadyPurchased_Game(CallbackFunc cb, void* lpParam, const char* skuID);
static void InstallContent(CallbackFunc cb, void* lpParam);
virtual void UpgradeTrial(CallbackFunc cb, void* lpParam);
virtual void CheckForTrialUpgradeKey();
virtual bool LicenseChecked();

View file

@ -140,7 +140,7 @@ void SonyRemoteStorage_Vita::internalCallback(const SceRemoteStorageEvent event,
}
}
bool SonyRemoteStorage_Vita::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Vita::init(CallbackFunc cb, void* lpParam)
{
int ret = 0;
int reqId = 0;
@ -242,7 +242,7 @@ bool SonyRemoteStorage_Vita::init(CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Vita::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam)
bool SonyRemoteStorage_Vita::getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam)
{
m_callbackFunc = cb;
m_callbackParam = lpParam;
@ -360,7 +360,7 @@ bool SonyRemoteStorage_Vita::setDataInternal()
}
bool SonyRemoteStorage_Vita::getData( const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam )
bool SonyRemoteStorage_Vita::getData( const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam )
{
m_callbackFunc = cb;
m_callbackParam = lpParam;

View file

@ -8,10 +8,10 @@ class SonyRemoteStorage_Vita : public SonyRemoteStorage
public:
virtual bool init(CallbackFunc cb, LPVOID lpParam);
virtual bool init(CallbackFunc cb, void* lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, LPVOID lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, LPVOID lpParam);
virtual bool getRemoteFileInfo(SceRemoteStorageStatus* pInfo, CallbackFunc cb, void* lpParam);
virtual bool getData(const char* remotePath, const char* localPath, CallbackFunc cb, void* lpParam);
virtual void abort();
virtual bool setDataInternal();
@ -40,4 +40,3 @@ private:
};

View file

@ -1298,10 +1298,11 @@ void CPlatformNetworkManagerXbox::SearchForGames()
return;
}
DWORD sessionIDCount = std::min( XSESSION_SEARCH_MAX_IDS, friendsSessions[m_lastSearchPad].size() );
unsigned int sessionIDCount = static_cast<unsigned int>(std::min<std::size_t>(XSESSION_SEARCH_MAX_IDS, friendsSessions[m_lastSearchPad].size()));
DWORD xboxSessionIDCount = sessionIDCount;
SessionID *sessionIDList = new SessionID[sessionIDCount];
for(DWORD i = 0; i < sessionIDCount; ++i)
for(unsigned int i = 0; i < sessionIDCount; ++i)
{
sessionIDList[i] = friendsSessions[m_lastSearchPad].at(i)->sessionId;
}
@ -1313,7 +1314,7 @@ void CPlatformNetworkManagerXbox::SearchForGames()
// size.
dwStatus = XSessionSearchByIds(
sessionIDCount,
xboxSessionIDCount,
sessionIDList,
g_NetworkManager.GetPrimaryPad(),
&cbResults, // Pass in the address of the size variable
@ -1344,7 +1345,7 @@ void CPlatformNetworkManagerXbox::SearchForGames()
// this time use the modified buffer size and a pointer to a buffer that
// matches it.
dwStatus = XSessionSearchByIds(
sessionIDCount,
xboxSessionIDCount,
sessionIDList,
g_NetworkManager.GetPrimaryPad(),
&cbResults, // Pass in the address of the size variable
@ -1388,12 +1389,13 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
{
SearchForGamesData *threadData = (SearchForGamesData *)lpParameter;
DWORD sessionIDCount = threadData->sessionIDCount;
unsigned int sessionIDCount = threadData->sessionIDCount;
DWORD xboxSessionIDCount = sessionIDCount;
XOVERLAPPED *pOverlapped = threadData->pOverlapped;
DWORD dwStatus = ERROR_SUCCESS;
DWORD cbResults = sessionIDCount;
DWORD cbResults = xboxSessionIDCount;
XSESSION_SEARCHRESULT_HEADER *pSearchResults = (XSESSION_SEARCHRESULT_HEADER *)threadData->searchBuffer;
while( !XHasOverlappedIoCompleted(pOverlapped) )
@ -1415,7 +1417,7 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
const XNKEY *QoSxnkey[XSESSION_SEARCH_MAX_IDS];// = new XNKEY*[sessionIDCount];
for(DWORD i = 0; i < pSearchResults->dwSearchResults; ++i)
for(unsigned int i = 0; i < pSearchResults->dwSearchResults; ++i)
{
QoSxnaddr[i] = &pSearchResults->pResults[i].info.hostAddress;
QoSxnkid[i] = &pSearchResults->pResults[i].info.sessionID;

View file

@ -22,9 +22,11 @@ const float PistonBaseTile::PLATFORM_THICKNESS = 4.0f;
namespace {
#if defined(_WIN32)
inline void* PistonTlsGetValue(DWORD key) { return TlsGetValue(key); }
inline void* PistonTlsGetValue(PistonBaseTile::TlsKey key) {
return TlsGetValue(key);
}
inline void PistonTlsSetValue(DWORD key, void* value) {
inline void PistonTlsSetValue(PistonBaseTile::TlsKey key, void* value) {
TlsSetValue(key, value);
}
#else
@ -45,9 +47,9 @@ inline void PistonTlsSetValue(pthread_key_t key, void* value) {
} // namespace
#if defined(_WIN32)
DWORD PistonBaseTile::tlsIdx = TlsAlloc();
PistonBaseTile::TlsKey PistonBaseTile::tlsIdx = TlsAlloc();
#else
pthread_key_t PistonBaseTile::tlsIdx = CreatePistonTlsKey();
PistonBaseTile::TlsKey PistonBaseTile::tlsIdx = CreatePistonTlsKey();
#endif
// 4J - NOTE - this ignoreUpdate stuff has been removed from the java version,

View file

@ -1,5 +1,6 @@
#pragma once
#include "Tile.h"
#include <cstdint>
#if !defined(_WIN32)
#include <pthread.h>
@ -7,6 +8,12 @@
class PistonBaseTile : public Tile {
public:
#if defined(_WIN32)
using TlsKey = std::uint32_t;
#else
using TlsKey = pthread_key_t;
#endif
static const int EXTENDED_BIT = 8;
static const int UNDEFINED_FACING = 7;
@ -28,11 +35,7 @@ private:
Icon* iconBack;
Icon* iconPlatform;
#if defined(_WIN32)
static DWORD tlsIdx;
#else
static pthread_key_t tlsIdx;
#endif
static TlsKey tlsIdx;
// 4J - was just a static but implemented with TLS for our version
static bool ignoreUpdate();
static void ignoreUpdate(bool set);

View file

@ -11,9 +11,11 @@
namespace {
#if defined(_WIN32)
inline void* TheEndPortalTlsGetValue(DWORD key) { return TlsGetValue(key); }
inline void* TheEndPortalTlsGetValue(TheEndPortal::TlsKey key) {
return TlsGetValue(key);
}
inline void TheEndPortalTlsSetValue(DWORD key, void* value) {
inline void TheEndPortalTlsSetValue(TheEndPortal::TlsKey key, void* value) {
TlsSetValue(key, value);
}
#else
@ -34,9 +36,9 @@ inline void TheEndPortalTlsSetValue(pthread_key_t key, void* value) {
} // namespace
#if defined(_WIN32)
DWORD TheEndPortal::tlsIdx = TlsAlloc();
TheEndPortal::TlsKey TheEndPortal::tlsIdx = TlsAlloc();
#else
pthread_key_t TheEndPortal::tlsIdx = CreateTheEndPortalTlsKey();
TheEndPortal::TlsKey TheEndPortal::tlsIdx = CreateTheEndPortalTlsKey();
#endif
// 4J - allowAnywhere is a static in java, implementing as TLS here to make

View file

@ -1,5 +1,6 @@
#pragma once
#include "TileEntities/EntityTile.h"
#include <cstdint>
#if !defined(_WIN32)
#include <pthread.h>
@ -8,10 +9,11 @@
class TheEndPortal : public EntityTile {
public:
#if defined(_WIN32)
static DWORD tlsIdx;
using TlsKey = std::uint32_t;
#else
static pthread_key_t tlsIdx;
using TlsKey = pthread_key_t;
#endif
static TlsKey tlsIdx;
// 4J - was just a static but implemented with TLS for our version
static bool allowAnywhere();
static void allowAnywhere(bool set);

View file

@ -18,9 +18,11 @@
namespace {
#if defined(_WIN32)
inline void* TileTlsGetValue(DWORD key) { return TlsGetValue(key); }
inline void* TileTlsGetValue(Tile::TlsKey key) { return TlsGetValue(key); }
inline void TileTlsSetValue(DWORD key, void* value) { TlsSetValue(key, value); }
inline void TileTlsSetValue(Tile::TlsKey key, void* value) {
TlsSetValue(key, value);
}
#else
pthread_key_t CreateTileTlsKey() {
pthread_key_t key;
@ -227,9 +229,9 @@ Tile* Tile::stairs_quartz = NULL;
Tile* Tile::woolCarpet = NULL;
#if defined(_WIN32)
DWORD Tile::tlsIdxShape = TlsAlloc();
Tile::TlsKey Tile::tlsIdxShape = TlsAlloc();
#else
pthread_key_t Tile::tlsIdxShape = CreateTileTlsKey();
Tile::TlsKey Tile::tlsIdxShape = CreateTileTlsKey();
#endif
Tile::ThreadStorage::ThreadStorage() {

View file

@ -3,6 +3,7 @@
#include "../Util/Vec3.h"
#include "../Util/Definitions.h"
#include "../Util/SoundTypes.h"
#include <cstdint>
#if !defined(_WIN32)
#include <pthread.h>
#endif
@ -49,6 +50,12 @@ class Tile {
friend class WallTile;
protected:
#if defined(_WIN32)
using TlsKey = std::uint32_t;
#else
using TlsKey = pthread_key_t;
#endif
// 4J added so we can have separate shapes for different threads
class ThreadStorage {
public:
@ -56,11 +63,7 @@ protected:
int tileId;
ThreadStorage();
};
#if defined(_WIN32)
static DWORD tlsIdxShape;
#else
static pthread_key_t tlsIdxShape;
#endif
static TlsKey tlsIdxShape;
public:
// Each new thread that needs to use Vec3 pools will need to call one of the
// following 2 functions, to either create its own local storage, or share

View file

@ -25,9 +25,9 @@
namespace {
#if defined(_WIN32)
inline void* EntityTlsGetValue(DWORD key) { return TlsGetValue(key); }
inline void* EntityTlsGetValue(Entity::TlsKey key) { return TlsGetValue(key); }
inline void EntityTlsSetValue(DWORD key, void* value) {
inline void EntityTlsSetValue(Entity::TlsKey key, void* value) {
TlsSetValue(key, value);
}
#else
@ -52,9 +52,9 @@ int Entity::entityCounter =
2048; // 4J - changed initialiser to 2048, as we are using range 0 - 2047
// as special unique smaller ids for things that need network tracked
#if defined(_WIN32)
DWORD Entity::tlsIdx = TlsAlloc();
Entity::TlsKey Entity::tlsIdx = TlsAlloc();
#else
pthread_key_t Entity::tlsIdx = CreateEntityTlsKey();
Entity::TlsKey Entity::tlsIdx = CreateEntityTlsKey();
#endif
// 4J - added getSmallId & freeSmallId methods

Some files were not shown because too many files have changed in this diff Show more