Remove AUTO_VAR macro and _toString function (#592)

This commit is contained in:
void_17
2026-03-06 02:11:18 +07:00
committed by GitHub
parent 7d6658fe5b
commit 55231bb8d3
294 changed files with 5067 additions and 5773 deletions

View File

@@ -13,7 +13,7 @@ XUI_FontRenderer::XUI_FontRenderer()
ZeroMemory(m_loadedFontData, sizeof(XUI_FontData*) * eFontData_MAX);
//XuiFontSetRenderer(this);
//Minecraft *pMinecraft=Minecraft::GetInstance();
//ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys);
@@ -113,8 +113,8 @@ VOID XUI_FontRenderer::ReleaseFont( HFONTOBJ hFont )
xuiFont->DecRefCount();
if (xuiFont->refCount <= 0)
{
AUTO_VAR(it, m_loadedFonts[xuiFont->m_iFontData].find(xuiFont->m_fScaleFactor) );
if (it != m_loadedFonts[xuiFont->m_iFontData].end()) m_loadedFonts[xuiFont->m_iFontData].erase(it);
auto it = m_loadedFonts[xuiFont->m_iFontData].find(xuiFont->m_fScaleFactor);
if (it != m_loadedFonts[xuiFont->m_iFontData].end()) m_loadedFonts[xuiFont->m_iFontData].erase(it);
delete hFont;
}
}
@@ -175,7 +175,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
if(!RenderManager.IsHiDef())
{
if(RenderManager.IsWidescreen())
{
{
float fScaleX, fScaleY;
font->GetScaleFactors(&fScaleX,&fScaleY);
int iScaleX=fScaleX;
@@ -230,8 +230,8 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
matrixCopy[14] = floor(matrixCopy[14] + 0.5f);
matrixCopy[15] = 1.0f;
glMultMatrixf(matrixCopy);
float lineXPos = 0.0f;
float lineYPos = 0.0f;
DWORD colour = 0;
@@ -262,7 +262,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
lineXPos = pCharData[i].x;
colour = pCharData[i].dwColor;
style = pCharData[i].dwStyle;
while(i < dwCount && pCharData[i].y == lineYPos)
{
string.push_back(pCharData[i].wch);
@@ -300,7 +300,7 @@ HRESULT XUI_FontRenderer::DrawCharsToDevice( HFONTOBJ hFont, CharData * pCharDat
g_pD3DDevice->SetRenderState(D3DRS_HALFPIXELOFFSET, FALSE);
glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
XuiRenderRestoreState(hDC);
return( S_OK );

View File

@@ -48,7 +48,7 @@ VOID CPlatformNetworkManagerXbox::NotifyStateChanged(
else if( NewState == QNET_STATE_IDLE && OldState == QNET_STATE_SESSION_JOINING )
{
// 4J-PB - now and then we get ERROR_DEVICE_REMOVED when qnet says
// " Couldn't join, removed from session!" or
// " Couldn't join, removed from session!" or
//[qnet]: Received data change notification from partially connected player!
//[qnet]: Couldn't join, removed from session!
// instead of a QNET_E_SESSION_FULL as should be reported
@@ -150,8 +150,8 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
{
// Do we already have a primary player for this system?
bool systemHasPrimaryPlayer = false;
for(AUTO_VAR(it, m_machineQNetPrimaryPlayers.begin()); it < m_machineQNetPrimaryPlayers.end(); ++it)
{
for (auto it = m_machineQNetPrimaryPlayers.begin(); it < m_machineQNetPrimaryPlayers.end(); ++it)
{
IQNetPlayer *pQNetPrimaryPlayer = *it;
if( pQNetPlayer->IsSameSystem(pQNetPrimaryPlayer) )
{
@@ -164,7 +164,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
}
}
g_NetworkManager.PlayerJoining( networkPlayer );
if( createFakeSocket == true && !m_bHostChanged )
{
g_NetworkManager.CreateSocket( networkPlayer, localPlayer );
@@ -184,7 +184,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerJoined(
g_NetworkManager.UpdateAndSetGameSessionData();
SystemFlagAddPlayer( networkPlayer );
}
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(playerChangedCallback[idx] != NULL)
@@ -255,8 +255,8 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
break;
}
}
AUTO_VAR(it, find( m_machineQNetPrimaryPlayers.begin(), m_machineQNetPrimaryPlayers.end(), pQNetPlayer));
if( it != m_machineQNetPrimaryPlayers.end() )
auto it = find(m_machineQNetPrimaryPlayers.begin(), m_machineQNetPrimaryPlayers.end(), pQNetPlayer);
if( it != m_machineQNetPrimaryPlayers.end() )
{
m_machineQNetPrimaryPlayers.erase( it );
}
@@ -271,7 +271,7 @@ VOID CPlatformNetworkManagerXbox::NotifyPlayerLeaving(
}
g_NetworkManager.PlayerLeaving( networkPlayer );
for( int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
if(playerChangedCallback[idx] != NULL)
@@ -334,7 +334,7 @@ VOID CPlatformNetworkManagerXbox::NotifyDataReceived(
dwDataSize,
pPlayerFrom->GetGamertag(),
apPlayersTo[ dwPlayer ]->GetGamertag());
}
*/
@@ -434,7 +434,7 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
{
playerChangedCallback[ i ] = NULL;
}
HRESULT hr;
int iResult;
DWORD dwResult;
@@ -475,7 +475,7 @@ bool CPlatformNetworkManagerXbox::Initialise(CGameNetworkManager *pGameNetworkMa
m_pIQNet->SetOpt( QNET_OPTION_INVITES_ALLOWED, &enableInv, sizeof BOOL );
BOOL enablePres = FALSE;
m_pIQNet->SetOpt( QNET_OPTION_PRESENCE_JOIN_MODE, &enablePres, sizeof BOOL );
// We DO NOT want QNet to handle XN_SYS_SIGNINCHANGED but so far everything else should be fine
// We DO WANT QNet to handle XN_LIVE_INVITE_ACCEPTED at a minimum
// Receive all types that QNet needs, and filter out the specific ones we don't want later
@@ -526,8 +526,8 @@ int CPlatformNetworkManagerXbox::CorrectErrorIDS(int IDS)
bool CPlatformNetworkManagerXbox::isSystemPrimaryPlayer(IQNetPlayer *pQNetPlayer)
{
bool playerIsSystemPrimary = false;
for(AUTO_VAR(it, m_machineQNetPrimaryPlayers.begin()); it < m_machineQNetPrimaryPlayers.end(); ++it)
{
for (auto it = m_machineQNetPrimaryPlayers.begin(); it < m_machineQNetPrimaryPlayers.end(); ++it)
{
IQNetPlayer *pQNetPrimaryPlayer = *it;
if( pQNetPrimaryPlayer == pQNetPlayer )
{
@@ -548,7 +548,7 @@ void CPlatformNetworkManagerXbox::DoWork()
m_notificationListener,
0, // Any notification
&dwNotifyId,
&ulpNotifyParam)
&ulpNotifyParam)
)
{
@@ -655,7 +655,7 @@ bool CPlatformNetworkManagerXbox::IsInStatsEnabledSession()
DWORD dataSize = sizeof(QNET_LIVE_STATS_MODE);
QNET_LIVE_STATS_MODE statsMode;
m_pIQNet->GetOpt(QNET_OPTION_LIVE_STATS_MODE, &statsMode , &dataSize );
// Use QNET_LIVE_STATS_MODE_AUTO if there is another way to check if stats are enabled or not
bool statsEnabled = statsMode == QNET_LIVE_STATS_MODE_ENABLED;
return m_pIQNet->GetState() != QNET_STATE_IDLE && statsEnabled;
@@ -778,7 +778,7 @@ void CPlatformNetworkManagerXbox::_HostGame(int usersMask, unsigned char publicS
if(publicSlots==1 && privateSlots==0)
privateSlots = 1;
//printf("Hosting game with %d public slots and %d private slots\n", publicSlots, privateSlots);
//printf("Hosting game with %d public slots and %d private slots\n", publicSlots, privateSlots);
BOOL enableJip = FALSE;
m_pIQNet->SetOpt( QNET_OPTION_JOIN_IN_PROGRESS_ALLOWED, &enableJip, sizeof BOOL );
@@ -838,10 +838,10 @@ int CPlatformNetworkManagerXbox::JoinGame(FriendSessionInfo *searchResult, int l
localUsersMask, // dwUserMask
&searchResultCopy ); // pSearchResult
if( FAILED( hr ) )
{
app.DebugPrintf( "Failed joining game (err = 0x%08x)!\n", hr );
app.DebugPrintf( "Failed joining game (err = 0x%08x)!\n", hr );
}
switch( hr )
@@ -906,7 +906,7 @@ void CPlatformNetworkManagerXbox::UnRegisterPlayerChangedCallback(int iPad, void
void CPlatformNetworkManagerXbox::HandleSignInChange()
{
return;
return;
}
bool CPlatformNetworkManagerXbox::_RunNetworkGame()
@@ -1099,8 +1099,8 @@ bool CPlatformNetworkManagerXbox::SystemFlagGet(INetworkPlayer *pNetworkPlayer,
wstring CPlatformNetworkManagerXbox::GatherStats()
{
return L"Queue messages: " + _toString(((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_MESSAGES ) )
+ L" Queue bytes: " + _toString( ((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_BYTES ) );
return L"Queue messages: " + std::to_wstring(((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_MESSAGES ) )
+ L" Queue bytes: " + std::to_wstring( ((NetworkPlayerXbox *)GetHostPlayer())->GetQNetPlayer()->GetSendQueueSize( NULL, QNET_GETSENDQUEUESIZE_BYTES ) );
}
wstring CPlatformNetworkManagerXbox::GatherRTTStats()
@@ -1136,7 +1136,7 @@ void CPlatformNetworkManagerXbox::TickSearch()
{
delete m_pCurrentSearchResults[m_lastSearchPad];
m_pCurrentSearchResults[m_lastSearchPad] = NULL;
}
}
m_pCurrentSearchResults[m_lastSearchPad] = m_pSearchResults[m_lastSearchPad];
m_pSearchResults[m_lastSearchPad] = NULL;
@@ -1174,17 +1174,17 @@ void CPlatformNetworkManagerXbox::SearchForGames()
m_bSearchPending = true;
m_bSearchResultsReady = false;
for(AUTO_VAR(it, friendsSessions[m_lastSearchPad].begin()); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
for (auto it = friendsSessions[m_lastSearchPad].begin(); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
delete (*it);
}
friendsSessions[m_lastSearchPad].clear();
friendsSessions[m_lastSearchPad].clear();
if( m_pSearchResults[m_lastSearchPad] != NULL )
{
delete m_pSearchResults[m_lastSearchPad];
m_pSearchResults[m_lastSearchPad] = NULL;
}
}
if( m_pQoSResult[m_lastSearchPad] != NULL )
{
XNetQosRelease(m_pQoSResult[m_lastSearchPad]);
@@ -1202,15 +1202,15 @@ void CPlatformNetworkManagerXbox::SearchForGames()
{
for(unsigned int i = 0; i<partyUserList.dwUserCount; i++)
{
if(
if(
( (partyUserList.Users[i].dwFlags & XPARTY_USER_ISLOCAL ) != XPARTY_USER_ISLOCAL ) &&
( (partyUserList.Users[i].dwFlags & XPARTY_USER_ISINGAMESESSION) == XPARTY_USER_ISINGAMESESSION ) &&
partyUserList.Users[i].dwTitleId == TITLEID_MINECRAFT
)
{
bool sessionAlreadyAdded = false;
for(AUTO_VAR(it, friendsSessions[m_lastSearchPad].begin()); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
for (auto it = friendsSessions[m_lastSearchPad].begin(); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
FriendSessionInfo *current = *it;
if( memcmp( &partyUserList.Users[i].SessionInfo.sessionID, &current->sessionId, sizeof(SessionID) ) == 0 )
{
@@ -1268,8 +1268,8 @@ void CPlatformNetworkManagerXbox::SearchForGames()
//printf("Valid game to join\n");
bool sessionAlreadyAdded = false;
for(AUTO_VAR(it, friendsSessions[m_lastSearchPad].begin()); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
for (auto it = friendsSessions[m_lastSearchPad].begin(); it < friendsSessions[m_lastSearchPad].end(); ++it)
{
FriendSessionInfo *current = *it;
if( memcmp( &friends[i].sessionID, &current->sessionId, sizeof(SessionID) ) == 0 )
{
@@ -1426,10 +1426,10 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
HANDLE QoSLookupHandle = CreateEvent(NULL, false, false, NULL);
*threadData->ppQos = new XNQOS();
INT iRet = XNetQosLookup(
pSearchResults->dwSearchResults, // Number of remote Xbox 360 consoles to probe
QoSxnaddr, // Array of pointers to XNADDR structures
QoSxnaddr, // Array of pointers to XNADDR structures
QoSxnkid, // Array of pointers to XNKID structures that contain session IDs for the remote Xbox 360 consoles
QoSxnkey, // Array of pointers to XNKEY structures that contain key-exchange keys for the remote Xbox 360 consoles
0, // Number of security gateways to probe
@@ -1440,7 +1440,7 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
0, // Flags
QoSLookupHandle, // Event handle
threadData->ppQos ); // Pointer to a pointer to an XNQOS structure that receives the results from the QoS probes
if( 0 != iRet )
{
app.DebugPrintf( "XNetQosLookup failed with error 0x%08x", iRet);
@@ -1448,9 +1448,9 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
}
else
{
//m_bQoSTesting = TRUE;
// Wait for results to all complete. cxnqosPending will eventually hit zero.
// Pause thread waiting for QosLookup events to be triggered.
while ( (*threadData->ppQos)->cxnqosPending != 0 )
@@ -1458,7 +1458,7 @@ int CPlatformNetworkManagerXbox::SearchForGamesThreadProc( void* lpParameter )
// 4J Stu - We could wait for INFINITE if we weren't watching for the kill flag
WaitForSingleObject(QoSLookupHandle, 100);
}
// Close handle
CloseHandle( QoSLookupHandle );
@@ -1487,15 +1487,15 @@ vector<FriendSessionInfo *> *CPlatformNetworkManagerXbox::GetSessionList(int iPa
for( DWORD dwResult = 0; dwResult < m_currentSearchResultsCount[iPad]; dwResult++ )
{
pSearchResult = &m_pCurrentSearchResults[iPad]->pResults[dwResult];
// No room for us, so ignore it
// 4J Stu - pSearchResult should never be NULL, but just in case...
if(pSearchResult == NULL || pSearchResult->dwOpenPublicSlots < localPlayers) continue;
bool foundSession = false;
FriendSessionInfo *sessionInfo = NULL;
AUTO_VAR(itFriendSession, friendsSessions[iPad].begin());
for(itFriendSession = friendsSessions[iPad].begin(); itFriendSession < friendsSessions[iPad].end(); ++itFriendSession)
auto itFriendSession = friendsSessions[iPad].begin();
for(itFriendSession = friendsSessions[iPad].begin(); itFriendSession < friendsSessions[iPad].end(); ++itFriendSession)
{
sessionInfo = *itFriendSession;
if(memcmp( &pSearchResult->info.sessionID, &sessionInfo->sessionId, sizeof(SessionID) ) == 0 && (!partyOnly || (partyOnly && sessionInfo->hasPartyMember) ) )
@@ -1628,7 +1628,7 @@ bool CPlatformNetworkManagerXbox::GetGameSessionInfo(int iPad, SessionID session
else
{
swprintf(sessionInfo->displayLabel,app.GetString(IDS_GAME_HOST_NAME_UNKNOWN));
}
}
sessionInfo->displayLabelLength = wcslen( sessionInfo->displayLabel );
// If this host wasn't disabled use this one.
@@ -1705,7 +1705,7 @@ INetworkPlayer *CPlatformNetworkManagerXbox::getNetworkPlayer(IQNetPlayer *pQNet
INetworkPlayer *CPlatformNetworkManagerXbox::GetLocalPlayerByUserIndex(int userIndex )
{
return getNetworkPlayer(m_pIQNet->GetLocalPlayerByUserIndex(userIndex));
return getNetworkPlayer(m_pIQNet->GetLocalPlayerByUserIndex(userIndex));
}
INetworkPlayer *CPlatformNetworkManagerXbox::GetPlayerByIndex(int playerIndex)

View File

@@ -7,7 +7,7 @@
#include "..\Common\XUI\XUI_NewUpdateMessage.h"
#include "..\Common\XUI\XUI_HelpAndOptions.h"
#include "..\Common\XUI\XUI_TextEntry.h"
#include "..\Common\XUI\XUI_HelpHowToPlay.h"
#include "..\Common\XUI\XUI_HelpHowToPlay.h"
#include "..\Common\XUI\XUI_HowToPlayMenu.h"
#include "..\Common\XUI\XUI_HelpControls.h"
#include "..\Common\XUI\XUI_TextEntry.h"
@@ -117,7 +117,7 @@
#include "..\Common\XUI\XUI_NewUpdateMessage.h"
#include "..\Common\XUI\XUI_HelpAndOptions.h"
#include "..\Common\XUI\XUI_TextEntry.h"
#include "..\Common\XUI\XUI_HelpHowToPlay.h"
#include "..\Common\XUI\XUI_HelpHowToPlay.h"
#include "..\Common\XUI\XUI_HowToPlayMenu.h"
#include "..\Common\XUI\XUI_HelpControls.h"
#include "..\Common\XUI\XUI_TextEntry.h"
@@ -212,7 +212,7 @@ WCHAR *CConsoleMinecraftApp::wchSceneA[]=
L"xuiscene_intro",
L"xuiscene_savemessage",
L"xuiscene_main",
L"xuiscene_fullscreenprogress",
L"xuiscene_fullscreenprogress",
L"xuiscene_pause",
L"xuiscene_craftingpanel_2x2",
L"xuiscene_craftingpanel_3x3",
@@ -224,7 +224,7 @@ WCHAR *CConsoleMinecraftApp::wchSceneA[]=
L"xuiscene_debug",
L"xuiScene_DebugTips",
L"xuiscene_helpandoptions",
L"xuiscene_howtoplay",
L"xuiscene_howtoplay",
L"xuiscene_howtoplay_menu",
L"xuiscene_controls",
L"xuiscene_settings_options",
@@ -288,7 +288,7 @@ CConsoleMinecraftApp::CConsoleMinecraftApp() : CMinecraftApp()
m_dwXuidsFileSize=0;
ZeroMemory(m_ScreenshotBuffer,sizeof(LPD3DXBUFFER)*XUSER_MAX_COUNT);
m_ThumbnailBuffer=NULL;
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
debugOverlayCreated = false;
#endif
@@ -361,7 +361,7 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
hr = CScene_NewUpdateMessage::Register();
if( FAILED( hr ) ) return hr;
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
hr = CScene_DebugItemEditor::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_DebugTips::Register();
@@ -388,7 +388,7 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
if( FAILED( hr ) ) return hr;
hr = CScene_HelpAndOptions::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_HowToPlay::Register();
hr = CScene_HowToPlay::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_HowToPlayMenu::Register();
if( FAILED( hr ) ) return hr;
@@ -430,7 +430,7 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
hr = CXuiCtrlSlotItemListItem::Register();
if( FAILED( hr ) ) return hr;
hr = CXuiSceneContainer::Register();
if( FAILED( hr ) ) return hr;
if( FAILED( hr ) ) return hr;
hr = CXuiSceneFurnace::Register();
if( FAILED( hr ) ) return hr;
hr = CXuiSceneInventory::Register();
@@ -442,9 +442,9 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
hr = CScene_FullscreenProgress::Register();
if( FAILED( hr ) ) return hr;
hr = CXuiCtrlLoadingProgress::Register();
if( FAILED( hr ) ) return hr;
if( FAILED( hr ) ) return hr;
hr = CXuiCtrlMinecraftSlot::Register();
if( FAILED( hr ) ) return hr;
if( FAILED( hr ) ) return hr;
hr = CXuiCtrlMinecraftPlayer::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_Death::Register();
@@ -472,7 +472,7 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
hr = CScene_InGameInfo::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_ConnectingProgress::Register();
if( FAILED( hr ) ) return hr;
if( FAILED( hr ) ) return hr;
hr = CXuiSceneBasePlayer::Register();
if( FAILED( hr ) ) return hr;
hr = CScene_DLCOffers::Register();
@@ -525,7 +525,7 @@ HRESULT CConsoleMinecraftApp::RegisterXuiClasses()
if( FAILED( hr) ) return hr;
hr = CScene_Teleport::Register();
if( FAILED( hr) ) return hr;
hr = CXuiCtrl4JIcon::Register();
if( FAILED( hr ) ) return hr;
@@ -554,7 +554,7 @@ HRESULT CConsoleMinecraftApp::UnregisterXuiClasses()
CScene_DebugSchematicCreator::Unregister();
CScene_DebugSetCamera::Unregister();
#endif
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
CScene_DebugItemEditor::Unregister();
CScene_DebugTips::Unregister();
CScene_DebugOverlay::Unregister();
@@ -618,12 +618,12 @@ HRESULT CConsoleMinecraftApp::UnregisterXuiClasses()
CScene_Credits::Unregister();
CScene_Leaderboards::Unregister();
CScene_Controls::Unregister();
CScene_HowToPlay::Unregister();
CScene_HowToPlay::Unregister();
CScene_HowToPlayMenu::Unregister();
CScene_HelpAndOptions::Unregister();
CScene_Main::Unregister();
CScene_Debug::Unregister();
CScene_Intro::Unregister();
CScene_Intro::Unregister();
CScene_SaveMessage::Unregister();
CScene_Reinstall::Unregister();
CScene_DLCMain::Unregister();
@@ -673,7 +673,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
OverrideFontRenderer(true);
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
HRESULT hr;
@@ -759,7 +759,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
}
if(bOverrideLanguage==false)
{
{
switch(dwLanguage)
{
case XC_LANGUAGE_ENGLISH:
@@ -893,7 +893,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
// // dump out the text
// int iStringC=0;
// LPCWSTR lpTempString;
//
//
// while((lpTempString=StringTable.Lookup(iStringC))!=NULL)
// {
// DebugPrintf("STRING %d = ",iStringC);
@@ -948,7 +948,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
WCHAR szResourceLocator[ LOCATOR_SIZE ];
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
HXUIOBJ hScene;
HRESULT hr = XuiSceneCreate(szResourceLocator,app.GetSceneName(eUIComponent_Chat, true,false), &idx, &hScene);
HRESULT hr = XuiSceneCreate(szResourceLocator,app.GetSceneName(eUIComponent_Chat, true,false), &idx, &hScene);
if( FAILED(hr) ) app.FatalLoadError();
hr = XuiSceneNavigateForward(m_hCurrentChatScene[idx], FALSE, hScene, idx);
@@ -987,7 +987,7 @@ HRESULT CConsoleMinecraftApp::LoadXuiResources()
HRESULT CConsoleMinecraftApp::RegisterFont(eFont eFontLanguage,eFont eFontFallback, bool bSetAsDefault)
{
HRESULT hr=S_OK;
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
@@ -997,7 +997,7 @@ HRESULT CConsoleMinecraftApp::RegisterFont(eFont eFontLanguage,eFont eFontFallba
BOOL isMemoryResource;
hr = XuiResourceOpenNoLoc(szResourceLocator, &fontTempResource, &isMemoryResource);
if( FAILED(hr) ) app.FatalLoadError();
XuiResourceClose(fontTempResource);
XuiResourceClose(fontTempResource);
if(bSetAsDefault)
{
@@ -1112,7 +1112,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadXuidsFile(void *pParam,int iPad, int
xmlParser.ParseXMLBuffer((CHAR *)pFileData->pbData,pFileData->dwSize);
delete [] pFileData->pbData;
delete [] pFileData;
}
}
// change the state to the next action
pClass->SetTMSAction(iPad,(eTMSAction)iUserData);
@@ -1157,7 +1157,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadConfigFile(void *pParam,int iPad, in
xmlParser.ParseXMLBuffer((CHAR *)pFileData->pbData,pFileData->dwSize);
delete [] pFileData->pbData;
delete [] pFileData;
}
}
// change the state to the next action
pClass->SetTMSAction(iPad,(eTMSAction)iUserData);
@@ -1214,7 +1214,7 @@ bool CConsoleMinecraftApp::TMSPP_ReadBannedList(int iPad,eTMSAction NextAction)
int CConsoleMinecraftApp::Callback_TMSPPReadBannedList(void *pParam,int iPad, int iUserData, C4JStorage::PTMSPP_FILEDATA pFileData,LPCSTR szFilename)
{
app.DebugPrintf("CConsoleMinecraftApp::Callback_TMSPPReadBannedList\n");
CConsoleMinecraftApp* pClass = (CConsoleMinecraftApp*)pParam;
if(pFileData)
@@ -1235,7 +1235,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadBannedList(void *pParam,int iPad, in
delete [] pFileData;
}
ui.HandleTMSBanFileRetrieved(iPad);
// change the state to the next action
pClass->SetTMSAction(iPad,(eTMSAction)iUserData);
@@ -1303,7 +1303,7 @@ int CConsoleMinecraftApp::Callback_TMSPPReadDLCFile(void *pParam,int iPad, int i
}
ui.HandleTMSDLCFileRetrieved(iPad);
// change the state to the next action
pClass->SetTMSAction(iPad,(eTMSAction)iUserData);
@@ -1379,7 +1379,7 @@ int CConsoleMinecraftApp::CallbackBannedListFileFromTMS(LPVOID lpParam, WCHAR *w
}
app.SetTMSAction(iPad,(eTMSAction)iAction);
ui.HandleTMSBanFileRetrieved(iPad);
return 0;
@@ -1485,7 +1485,7 @@ void CConsoleMinecraftApp::GetScreenshot(int iPad,PBYTE *pbData,DWORD *pdwSize)
}
}
#ifdef _DEBUG_MENUS_ENABLED
#ifdef _DEBUG_MENUS_ENABLED
void CConsoleMinecraftApp::EnableDebugOverlay(bool enable,int iPad)
{
HRESULT hr = S_OK;
@@ -1494,7 +1494,7 @@ void CConsoleMinecraftApp::EnableDebugOverlay(bool enable,int iPad)
{
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
@@ -1505,7 +1505,7 @@ void CConsoleMinecraftApp::EnableDebugOverlay(bool enable,int iPad)
debugOverlayCreated = true;
}
if(enable)
{
{
XuiElementSetUserFocus(m_hDebugOverlay, iPad);
}
else
@@ -1596,9 +1596,8 @@ bool CConsoleMinecraftApp::IsSceneInStack(int iPad, EUIScene eScene)
// If the game isn't running treat as user 0, otherwise map index directly from pad
if( ( iPad != 255 ) && ( iPad >= 0 ) ) idx = iPad;
}
AUTO_VAR(itEnd, m_sceneStack[idx].end());
for (AUTO_VAR(it, m_sceneStack[idx].begin()); it != itEnd; it++)
//for(auto it = m_sceneStack[iPad].begin(), end = m_sceneStack[iPad].end(); it != end; ++it)
auto itEnd = m_sceneStack[idx].end();
for (auto it = m_sceneStack[idx].begin(); it != itEnd; it++)
{
if(it->first == eScene)
{
@@ -1614,7 +1613,7 @@ WCHAR *CConsoleMinecraftApp::GetSceneName(EUIScene eScene,bool bAppendToName,boo
{
wcscpy(m_SceneName,wchSceneA[eScene]);
if(bAppendToName)
{
{
if(RenderManager.IsHiDef())
{
if(bSplitscreenScene)
@@ -1624,7 +1623,7 @@ WCHAR *CConsoleMinecraftApp::GetSceneName(EUIScene eScene,bool bAppendToName,boo
}
else
{
// if it's low def, but widescreen, then use the small scenes
// if it's low def, but widescreen, then use the small scenes
if(!RenderManager.IsWidescreen())
{
wcscat(m_SceneName,L"_480");
@@ -1695,7 +1694,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
HXUIOBJ hScene;
HRESULT hr;
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
@@ -1780,7 +1779,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
XuiElementSetScale(hScene,&test);
#endif
if( eScene == eUIComponent_TutorialPopup )
if( eScene == eUIComponent_TutorialPopup )
{
hr = XuiSceneNavigateForward(m_hCurrentTutorialScene[iPad], FALSE, hScene, XUSER_INDEX_NONE);
if (FAILED(hr))
@@ -1841,7 +1840,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
{
case eUIScene_PauseMenu:
{
m_bPauseMenuDisplayed[iPad] = true;
m_bPauseMenuDisplayed[iPad] = true;
Minecraft *pMinecraft = Minecraft::GetInstance();
if(pMinecraft != NULL && pMinecraft->localgameModes[iPad] != NULL )
@@ -1851,7 +1850,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
// This just allows it to be shown
gameMode->getTutorial()->showTutorialPopup(false);
}
}
}
break;
case eUIScene_Crafting2x2Menu:
case eUIScene_Crafting3x3Menu:
@@ -1869,7 +1868,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
// Intentional fall-through
case eUIScene_DeathMenu:
case eUIScene_FullscreenProgress:
case eUIScene_FullscreenProgress:
case eUIScene_SignEntryMenu:
case eUIScene_EndPoem:
m_bIgnoreAutosaveMenuDisplayed[iPad] = true;
@@ -1878,7 +1877,7 @@ HRESULT CConsoleMinecraftApp::NavigateToScene(int iPad,EUIScene eScene, void *in
switch(eScene)
{
case eUIScene_FullscreenProgress:
case eUIScene_FullscreenProgress:
case eUIScene_EndPoem:
m_bIgnorePlayerJoinMenuDisplayed[iPad] = true;
break;
@@ -1992,7 +1991,7 @@ HRESULT CConsoleMinecraftApp::CloseXuiScenes(int iPad, bool forceUsePad /*= fals
SetMenuDisplayed(iPad,false);
// Hide the tutorial popup for this player
if(m_bGameStarted)
if(m_bGameStarted)
{
CScene_TutorialPopup::SetSceneVisible(iPad,FALSE);
}
@@ -2011,9 +2010,9 @@ HRESULT CConsoleMinecraftApp::CloseXuiScenes(int iPad, bool forceUsePad /*= fals
if(g_NetworkManager.GetPlayerCount()>1)
{
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
{
if(pMinecraft->localplayers[i])
{
{
if(g_NetworkManager.IsLocalGame())
{
ProfileManager.SetCurrentGameActivity(i,CONTEXT_PRESENCE_MULTIPLAYEROFFLINE,false);
@@ -2064,7 +2063,7 @@ HRESULT CConsoleMinecraftApp::CloseAllPlayersXuiScenes()
for(unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx)
{
CloseXuiScenes(idx, true);
ReloadChatScene(idx, false, true);
ReloadChatScene(idx, false, true);
ReloadHudScene(idx, false, true);
}
@@ -2083,7 +2082,7 @@ HRESULT CConsoleMinecraftApp::CloseXuiScenesAndNavigateToScene(int iPad,EUIScene
}
hr=XuiSceneNavigateBackToFirst(m_hCurrentScene[idx],iPad);
m_hCurrentScene[idx]=m_hFirstScene[idx];
m_hCurrentScene[idx]=m_hFirstScene[idx];
m_sceneStack[idx].clear();
CXuiSceneBase::ShowBackground(iPad, FALSE );
@@ -2280,7 +2279,7 @@ void CConsoleMinecraftApp::ReloadChatScene(int iPad, bool bJoining /*= false*/,
textXOffset = 0;
sceneWidth = XUI_BASE_SCENE_WIDTH_HALF;
break;
default:
default:
textXOffset = SAFEZONE_HALF_WIDTH;
break;
}
@@ -2342,12 +2341,12 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
// move the scene down
vec.y+=fSafeZoneY;
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
// move the scene left
// move the scene left
if(bAdjustXForSafeArea) vec.x-=fSafeZoneX;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -2382,7 +2381,7 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
XuiElementGetPosition(hScene,pvOriginalPosition);
vec=*pvOriginalPosition;
if( pMinecraft->localplayers[iPad] != NULL )
{
switch( pMinecraft->localplayers[iPad]->m_iScreenSection)
@@ -2393,7 +2392,7 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
// 4J-PB - don't adjust things in horizontal splitscreen
//vec.x+=fXAdjust;
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
// 4J-PB - don't adjust things in horizontal splitscreen
//vec.x+=fXAdjust;
break;
@@ -2401,7 +2400,7 @@ void CConsoleMinecraftApp::AdjustSplitscreenScene(HXUIOBJ hScene,D3DXVECTOR3 *pv
vec.x+=fXAdjust;
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
// move the scene left
// move the scene left
vec.x-=fSafeZoneX-fXAdjust;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -2462,12 +2461,12 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
// move the scene down
vec.y+=fSafeZoneY;
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
case C4JRender::VIEWPORT_TYPE_SPLIT_BOTTOM:
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_LEFT:
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
// move the scene left
// move the scene left
if(bAdjustXForSafeArea) vec.x-=fSafeZoneX;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -2486,7 +2485,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
// move the scene left
if(bAdjustXForSafeArea) vec.x-=fSafeZoneX;
break;
}
}
XuiElementSetPosition(hScene,&vec);
}
@@ -2531,7 +2530,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
vec.x+=fXAdjust;
break;
case C4JRender::VIEWPORT_TYPE_SPLIT_RIGHT:
// move the scene left
// move the scene left
vec.x-=fSafeZoneX-fXAdjust;
break;
case C4JRender::VIEWPORT_TYPE_QUADRANT_TOP_LEFT:
@@ -2552,7 +2551,7 @@ HRESULT CConsoleMinecraftApp::AdjustSplitscreenScene_PlayerChanged(HXUIOBJ hScen
// move the scene left
vec.x-=fSafeZoneX-fXAdjust;
break;
}
}
XuiElementSetPosition(hScene,&vec);
}
@@ -2668,7 +2667,7 @@ void CConsoleMinecraftApp::FatalLoadError(void)
aStrings[2] = L"Sair do Jogo";
}
break;
case XC_LANGUAGE_TCHINESE:
case XC_LANGUAGE_TCHINESE:
aStrings[0] = L"載入錯誤";
aStrings[1] = L"無法載入 Minecraft: Xbox 360 Edition因此無法繼續。";
aStrings[2] = L"離開遊戲";
@@ -2742,7 +2741,7 @@ int CConsoleMinecraftApp::RetrieveTMSFileListIndex(WCHAR *wchTMSFile)
iIndex++;
}
wTemp[iIndex]=0;
for(int i=0;i<MAX_EXTENSION_TYPES;i++)
{
if(wcscmp(&wchTMSFile[iIndex+1],wchExt[i])==0)
@@ -2764,7 +2763,7 @@ int CConsoleMinecraftApp::LoadLocalTMSFile(WCHAR *wchTMSFile, eFileExtensionType
int CConsoleMinecraftApp::LoadLocalTMSFile(WCHAR *wchTMSFile)
{
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
WCHAR szResourceLocator[ LOCATOR_SIZE ];
HRESULT hr;
int iTMSFileIndex;
@@ -2821,14 +2820,14 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"SPM", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"SPI", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"SPG", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
//themes
{ L"ThSt", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"ThIr", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"ThGo", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"ThDi", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
{ L"ThAw", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0},
//gamerpics
{ L"GPAn", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPCo", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
@@ -2841,16 +2840,16 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"GPMF", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPMM", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPSE", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPOr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPMi", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPMB", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPBr", eFileExtensionType_PNG , eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPM1", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPM2", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
{ L"GPM3", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0},
//avatar items
{ L"AH_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AH_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
@@ -2865,7 +2864,7 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"AH_0011", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AH_0012", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AH_0013", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AT_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AT_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AT_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
@@ -2892,7 +2891,7 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"AT_0024", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AT_0025", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AT_0026", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0002", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0003", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
@@ -2910,7 +2909,7 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"AP_0016", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0017", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0018", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0019", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0020", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0021", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
@@ -2926,9 +2925,9 @@ TMS_FILE CConsoleMinecraftApp::TMSFileA[TMS_COUNT] =
{ L"AP_0031", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0032", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AP_0033", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"AA_0001", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0 , 0 },
// Mash-up Packs
{ L"MPMA", eFileExtensionType_PNG, eTMSFileType_MinecraftStore, NULL, 0, 0 },
{ L"MPMA", eFileExtensionType_DAT, eTMSFileType_TexturePack, NULL, 0, 1024 },
@@ -2989,7 +2988,7 @@ void CConsoleMinecraftApp::GetFileFromTPD(eTPDFileType eType,PBYTE pbData,DWORD
uiDecompSize=*(unsigned int *)pbPos;
uiCompSize=((unsigned int *)pbPos)[1];
// second is the icon
// second is the icon
if(eType==eTPDFileType_Icon)
{
*pdwBytes= uiDecompSize;
@@ -3008,7 +3007,7 @@ void CConsoleMinecraftApp::GetFileFromTPD(eTPDFileType eType,PBYTE pbData,DWORD
uiDecompSize=*(unsigned int *)pbPos;
uiCompSize=((unsigned int *)pbPos)[1];
// third is the comparison
// third is the comparison
if(eType==eTPDFileType_Comparison)
{
*pdwBytes= uiDecompSize;
@@ -3024,11 +3023,11 @@ void CConsoleMinecraftApp::GetFileFromTPD(eTPDFileType eType,PBYTE pbData,DWORD
LPCWSTR CConsoleMinecraftApp::GetString(int iID)
{
{
return StringTable.Lookup(iID);
}
CXuiStringTable *CConsoleMinecraftApp::GetStringTable()
{
CXuiStringTable *CConsoleMinecraftApp::GetStringTable()
{
return &StringTable;
}