mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-24 03:02:56 +00:00
Remove WinAPI small-id types from XUI player flows
This commit is contained in:
parent
1e789f55a5
commit
99d63ce7ec
|
|
@ -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,7 +209,7 @@ 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()];
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ 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;
|
||||
unsigned int uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_OK;
|
||||
|
|
@ -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)
|
||||
|
|
@ -496,4 +496,4 @@ void CScene_InGamePlayerOptions::resetCheatCheckboxes()
|
|||
m_checkboxes[eControl_CheatTeleport].SetCheck( isModerator
|
||||
&& (Player::getPlayerGamePrivilege(m_playerPrivileges, Player::ePlayerGamePrivilege_CanTeleport) != 0) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue