replace all windows api types
This commit is contained in:
@@ -43,9 +43,9 @@
|
||||
#include "SoundTypes.h"
|
||||
#include "TexturePackRepository.h"
|
||||
#ifdef _XBOX
|
||||
#include "Common/XUI\XUI_Scene_Trading.h"
|
||||
#include "Common/XUI/XUI_Scene_Trading.h"
|
||||
#else
|
||||
#include "Common/UI\UI.h"
|
||||
#include "Common/UI/UI.h"
|
||||
#endif
|
||||
#ifdef __PS3__
|
||||
#include "PS3/Network/SonyVoiceChat.h"
|
||||
@@ -197,8 +197,8 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
|
||||
if(iUserID!=-1)
|
||||
{
|
||||
BYTE *pBuffer=NULL;
|
||||
DWORD dwSize=0;
|
||||
uint8_t *pBuffer=NULL;
|
||||
unsigned long dwSize=0;
|
||||
bool bRes;
|
||||
|
||||
// if there's a special skin or cloak for this player, add it in
|
||||
@@ -305,7 +305,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
//minecraft->setScreen(new ReceivingLevelScreen(this));
|
||||
minecraft->player->entityId = packet->clientVersion;
|
||||
|
||||
BYTE networkSmallId = getSocket()->getSmallId();
|
||||
uint8_t networkSmallId = getSocket()->getSmallId();
|
||||
app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges);
|
||||
minecraft->player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges);
|
||||
|
||||
@@ -375,7 +375,7 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
player->setCustomCape( app.GetPlayerCapeId(m_userIndex) );
|
||||
|
||||
|
||||
BYTE networkSmallId = getSocket()->getSmallId();
|
||||
uint8_t networkSmallId = getSocket()->getSmallId();
|
||||
app.UpdatePlayerInfo(networkSmallId, packet->m_playerIndex, packet->m_uiGamePrivileges);
|
||||
player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_All, packet->m_uiGamePrivileges);
|
||||
|
||||
@@ -1163,7 +1163,7 @@ void ClientConnection::onDisconnect(DisconnectPacket::eDisconnectReason reason,
|
||||
m_userIndex == ProfileManager.GetPrimaryPad() &&
|
||||
!MinecraftServer::saveOnExitAnswered() )
|
||||
{
|
||||
UINT uiIDA[1];
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
ui.RequestMessageBox(IDS_EXITING_GAME, IDS_GENERIC_ERROR, uiIDA, 1, ProfileManager.GetPrimaryPad(),&ClientConnection::HostDisconnectReturned,NULL, app.GetStringTable());
|
||||
}
|
||||
@@ -1610,11 +1610,11 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
// printf("Client: handlePreLogin\n");
|
||||
#if 1
|
||||
// 4J - Check that we can play with all the players already in the game who have Friends-Only UGC set
|
||||
BOOL canPlay = true;
|
||||
BOOL canPlayLocal = true;
|
||||
BOOL isAtLeastOneFriend = g_NetworkManager.IsHost();
|
||||
BOOL isFriendsWithHost = true;
|
||||
BOOL cantPlayContentRestricted = false;
|
||||
bool canPlay = true;
|
||||
bool canPlayLocal = true;
|
||||
bool isAtLeastOneFriend = g_NetworkManager.IsHost();
|
||||
bool isFriendsWithHost = true;
|
||||
bool cantPlayContentRestricted = false;
|
||||
|
||||
if(!g_NetworkManager.IsHost())
|
||||
{
|
||||
@@ -1633,7 +1633,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
{
|
||||
if(m_userIndex == ProfileManager.GetPrimaryPad() )
|
||||
{
|
||||
for(DWORD idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
for(unsigned long idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if(ProfileManager.IsSignedIn(m_userIndex) && ProfileManager.IsGuest(idx))
|
||||
{
|
||||
@@ -1650,8 +1650,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
if( playerXuid != INVALID_XUID )
|
||||
{
|
||||
// Is this user friends with the host player?
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
bool result;
|
||||
unsigned long error;
|
||||
error = XUserAreUsersFriends(idx,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL);
|
||||
if(error == ERROR_SUCCESS && result != true)
|
||||
{
|
||||
@@ -1680,8 +1680,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
if( playerXuid != INVALID_XUID )
|
||||
{
|
||||
// Is this user friends with the host player?
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
bool result;
|
||||
unsigned long error;
|
||||
error = XUserAreUsersFriends(m_userIndex,&packet->m_playerXuids[packet->m_hostIndex],1,&result,NULL);
|
||||
if(error == ERROR_SUCCESS && result != true)
|
||||
{
|
||||
@@ -1695,10 +1695,10 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
|
||||
if( canPlay )
|
||||
{
|
||||
for(DWORD i = 0; i < packet->m_dwPlayerCount; ++i)
|
||||
for(unsigned long i = 0; i < packet->m_dwPlayerCount; ++i)
|
||||
{
|
||||
bool localPlayer = false;
|
||||
for(DWORD idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
for(unsigned long idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if( ProfileManager.IsSignedInLive(idx) )
|
||||
{
|
||||
@@ -1728,9 +1728,9 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
// Local players are implied friends
|
||||
if( isAtLeastOneFriend != true )
|
||||
{
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
for(DWORD idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
bool result;
|
||||
unsigned long error;
|
||||
for(unsigned long idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if( ProfileManager.IsSignedIn(idx) && !ProfileManager.IsGuest(idx) )
|
||||
{
|
||||
@@ -1756,9 +1756,9 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
bool thisQuadrantOnly = true;
|
||||
if( m_userIndex == ProfileManager.GetPrimaryPad() ) thisQuadrantOnly = false;
|
||||
|
||||
BOOL result;
|
||||
DWORD error;
|
||||
for(DWORD idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
bool result;
|
||||
unsigned long error;
|
||||
for(unsigned long idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
if( (!thisQuadrantOnly || m_userIndex == idx) && ProfileManager.IsSignedIn(idx) && !ProfileManager.IsGuest(idx) )
|
||||
{
|
||||
@@ -1978,7 +1978,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
else if(cantPlayContentRestricted) reason = DisconnectPacket::eDisconnect_ContentRestricted_Single_Local;
|
||||
|
||||
app.DebugPrintf("Exiting player %d on handling Pre-Login packet due UGC privileges: %d\n", m_userIndex, reason);
|
||||
UINT uiIDA[1];
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
if(!isFriendsWithHost) ui.RequestMessageBox( IDS_CANTJOIN_TITLE, IDS_NOTALLOWED_FRIENDSOFFRIENDS, uiIDA,1,m_userIndex,NULL,NULL, app.GetStringTable());
|
||||
else ui.RequestMessageBox( IDS_CANTJOIN_TITLE, IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL, uiIDA,1,m_userIndex,NULL,NULL, app.GetStringTable());
|
||||
@@ -2047,7 +2047,7 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
|
||||
// All other players we use their offline XUID so that they can play the game offline
|
||||
ProfileManager.GetXUID(m_userIndex,&offlineXUID,false);
|
||||
}
|
||||
BOOL allAllowed, friendsAllowed;
|
||||
bool allAllowed, friendsAllowed;
|
||||
ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed);
|
||||
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=true && friendsAllowed==true),
|
||||
packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex ))));
|
||||
@@ -2229,8 +2229,8 @@ void ClientConnection::handleTexture(shared_ptr<TexturePacket> packet)
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
wprintf(L"Client received request for custom texture %ls\n",packet->textureName.c_str());
|
||||
#endif
|
||||
PBYTE pbData=NULL;
|
||||
DWORD dwBytes=0;
|
||||
uint8_t* pbData=NULL;
|
||||
unsigned long dwBytes=0;
|
||||
app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes);
|
||||
|
||||
if(dwBytes!=0)
|
||||
@@ -2261,8 +2261,8 @@ void ClientConnection::handleTextureAndGeometry(shared_ptr<TextureAndGeometryPac
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
wprintf(L"Client received request for custom texture and geometry %ls\n",packet->textureName.c_str());
|
||||
#endif
|
||||
PBYTE pbData=NULL;
|
||||
DWORD dwBytes=0;
|
||||
uint8_t* pbData=NULL;
|
||||
unsigned long dwBytes=0;
|
||||
app.GetMemFileDetails(packet->textureName,&pbData,&dwBytes);
|
||||
DLCSkinFile *pDLCSkinFile = app.m_dlcManager.getSkinFile(packet->textureName);
|
||||
|
||||
@@ -2871,7 +2871,7 @@ void ClientConnection::handleGameEvent(shared_ptr<GameEventPacket> gameEventPack
|
||||
}
|
||||
else if (event == GameEventPacket::WIN_GAME)
|
||||
{
|
||||
ui.SetWinUserIndex( (BYTE)gameEventPacket->param );
|
||||
ui.SetWinUserIndex( (uint8_t)gameEventPacket->param );
|
||||
|
||||
#ifdef _XBOX
|
||||
|
||||
@@ -3166,7 +3166,7 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
|
||||
if( XuiClassDerivesFrom( objClass, thisClass ) )
|
||||
{
|
||||
CXuiSceneTrading *screen;
|
||||
HRESULT hr = XuiObjectFromHandle(scene, (void **) &screen);
|
||||
int hr = XuiObjectFromHandle(scene, (void **) &screen);
|
||||
if (FAILED(hr)) return;
|
||||
trader = screen->getMerchant();
|
||||
}
|
||||
@@ -3231,7 +3231,7 @@ void ClientConnection::handleUpdateProgress(shared_ptr<UpdateProgressPacket> pac
|
||||
|
||||
void ClientConnection::handleUpdateGameRuleProgressPacket(shared_ptr<UpdateGameRuleProgressPacket> packet)
|
||||
{
|
||||
LPCWSTR string = app.GetGameRulesString(packet->m_messageId);
|
||||
const wchar_t* string = app.GetGameRulesString(packet->m_messageId);
|
||||
if(string != NULL)
|
||||
{
|
||||
wstring message(string);
|
||||
@@ -3279,7 +3279,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E
|
||||
// we need to ask if they are sure they want to overwrite the existing game
|
||||
if(bSaveExists && StorageManager.GetSaveDisabled())
|
||||
{
|
||||
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(),&ClientConnection::ExitGameAndSaveReturned,NULL, app.GetStringTable());
|
||||
@@ -3294,7 +3294,7 @@ int ClientConnection::HostDisconnectReturned(void *pParam,int iPad,C4JStorage::E
|
||||
// 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(),&ClientConnection::ExitGameAndSaveReturned,NULL, app.GetStringTable());
|
||||
@@ -3318,7 +3318,7 @@ int ClientConnection::ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultDecline)
|
||||
{
|
||||
//INT saveOrCheckpointId = 0;
|
||||
//int saveOrCheckpointId = 0;
|
||||
//bool validSave = StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId);
|
||||
//SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), saveOrCheckpointId);
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
|
||||
Reference in New Issue
Block a user