diff --git a/Minecraft.Client/GameState/Options.cpp b/Minecraft.Client/GameState/Options.cpp index e8e24827d..63ae52ba8 100644 --- a/Minecraft.Client/GameState/Options.cpp +++ b/Minecraft.Client/GameState/Options.cpp @@ -198,7 +198,7 @@ void Options::setKey(int i, int key) { void Options::set(const Options::Option* item, float fVal) { if (item == Option::MUSIC) { music = fVal; -#ifdef _XBOX +#if 0 minecraft->soundEngine->updateMusicVolume(fVal * 2.0f); #else minecraft->soundEngine->updateMusicVolume(fVal); @@ -206,7 +206,7 @@ void Options::set(const Options::Option* item, float fVal) { } if (item == Option::SOUND) { sound = fVal; -#ifdef _XBOX +#if 0 minecraft->soundEngine->updateSoundEffectVolume(fVal * 2.0f); #else minecraft->soundEngine->updateSoundEffectVolume(fVal); diff --git a/Minecraft.Client/GameState/StatsCounter.cpp b/Minecraft.Client/GameState/StatsCounter.cpp index b5c01e738..e646d480a 100644 --- a/Minecraft.Client/GameState/StatsCounter.cpp +++ b/Minecraft.Client/GameState/StatsCounter.cpp @@ -28,7 +28,7 @@ StatsCounter::StatsCounter() { void StatsCounter::award(Stat* stat, unsigned int difficulty, unsigned int count) { -#ifndef _DURANGO +#if 1 if (stat->isAchievement()) difficulty = 0; StatsMap::iterator val = stats.find(stat); @@ -98,7 +98,7 @@ void StatsCounter::tick(int player) { // 4J-JEV, we don't want to write leaderboards in the middle of a game. // EDIT: Yes we do, people were not ending their games properly and not // updating scores. - // #ifndef __PS3__ + // #if 1 if (flushCounter > 0) { --flushCounter; if (flushCounter == 0) flushLeaderboards(); @@ -112,7 +112,7 @@ void StatsCounter::clear() { } void StatsCounter::parse(void* data) { -#ifndef _DURANGO +#if 1 // 4J-PB - If this is the trial game, let's just make sure all the stats are // empty 4J-PB - removing - someone can have the full game, and then remove // it and go back to the trial @@ -181,7 +181,7 @@ void StatsCounter::parse(void* data) { } void StatsCounter::save(int player, bool force) { -#ifndef _DURANGO +#if 1 // 4J-PB - If this is the trial game, don't save any stats if (!ProfileManager.IsFullVersion()) { return; @@ -198,8 +198,8 @@ void StatsCounter::save(int player, bool force) { sizeof(GAME_SETTINGS))); // Retrieve the data pointer from the profile -#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || \ - defined __PSVITA__) +#if (0 || 0 || 0 || \ + 0) std::uint8_t* pbData = reinterpret_cast( StorageManager.GetGameDefinedProfileData(player)); #else @@ -260,8 +260,8 @@ void StatsCounter::save(int player, bool force) { } } -#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || \ - defined __PSVITA__) +#if (0 || 0 || 0 || \ + 0) StorageManager.WriteToProfile(player, true, force); #else ProfileManager.WriteToProfile(player, true, force); @@ -271,7 +271,7 @@ void StatsCounter::save(int player, bool force) { #endif } -#ifdef _XBOX +#if 0 void StatsCounter::setLeaderboardProperty(XUSER_PROPERTY* prop, std::uint32_t id, unsigned int value) { @@ -291,7 +291,7 @@ void StatsCounter::setLeaderboardRating(XUSER_PROPERTY* prop, LONGLONG value) { #endif void StatsCounter::flushLeaderboards() { -#ifndef _DURANGO +#if 1 if (LeaderboardManager::Instance()->OpenSession()) { writeStats(); LeaderboardManager::Instance()->FlushStats(); @@ -309,7 +309,7 @@ void StatsCounter::flushLeaderboards() { } void StatsCounter::saveLeaderboards() { -#ifndef _DURANGO +#if 1 // 4J-PB - If this is the trial game, no writing leaderboards if (!ProfileManager.IsFullVersion()) { return; @@ -332,7 +332,7 @@ void StatsCounter::saveLeaderboards() { } void StatsCounter::writeStats() { -#ifndef _DURANGO +#if 1 // 4J-PB - If this is the trial game, no writing if (!ProfileManager.IsFullVersion()) { return; @@ -342,7 +342,7 @@ void StatsCounter::writeStats() { int viewCount = 0; int iPad = ProfileManager.GetLockedProfile(); -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 LeaderboardManager::RegisterScore* scores = new LeaderboardManager::RegisterScore[24]; @@ -884,7 +884,7 @@ void StatsCounter::writeStats() { delete[] scores; } -#elif defined _XBOX +#elif 0 LONGLONG rating; @@ -1782,11 +1782,11 @@ void StatsCounter::writeStats() { } } #endif // Xbox -#endif // ndef _DURANGO +#endif // ndef 0 } void StatsCounter::setupStatBoards() { -#ifndef _DURANGO +#if 1 statBoards.insert( std::make_pair(Stats::killsZombie, LEADERBOARD_KILLS_PEACEFUL)); statBoards.insert( @@ -1845,7 +1845,7 @@ void StatsCounter::setupStatBoards() { } bool StatsCounter::isLargeStat(Stat* stat) { -#ifndef _DURANGO +#if 1 Stat*** end = &LARGE_STATS[LARGE_STATS_COUNT]; for (Stat*** iter = LARGE_STATS; iter != end; ++iter) if ((*(*iter))->id == stat->id) return true; @@ -1876,7 +1876,7 @@ void StatsCounter::dumpStatsToTTY() { #define DEBUG_ENABLE_CLEAR_LEADERBOARDS void StatsCounter::WipeLeaderboards() { -#if defined DEBUG_ENABLE_CLEAR_LEADERBOARDS && defined _XBOX +#if defined DEBUG_ENABLE_CLEAR_LEADERBOARDS && 0 if (DEBUG_CLEAR_LEADERBOARDS & LEADERBOARD_KILLS_EASY) XUserResetStatsViewAllUsers(STATS_VIEW_KILLS_EASY, NULL); diff --git a/Minecraft.Client/GameState/StatsCounter.h b/Minecraft.Client/GameState/StatsCounter.h index b02a09ad2..e76fb0d12 100644 --- a/Minecraft.Client/GameState/StatsCounter.h +++ b/Minecraft.Client/GameState/StatsCounter.h @@ -90,7 +90,7 @@ private: bool isLargeStat(Stat* stat); void dumpStatsToTTY(); -#ifdef _XBOX +#if 0 static void setLeaderboardProperty(XUSER_PROPERTY* prop, std::uint32_t id, unsigned int value); static void setLeaderboardRating(XUSER_PROPERTY* prop, LONGLONG value); diff --git a/Minecraft.Client/Level/MultiPlayerLevel.cpp b/Minecraft.Client/Level/MultiPlayerLevel.cpp index 5f87af715..cddae1c89 100644 --- a/Minecraft.Client/Level/MultiPlayerLevel.cpp +++ b/Minecraft.Client/Level/MultiPlayerLevel.cpp @@ -391,7 +391,7 @@ void MultiPlayerLevel::tickTiles() { PIXEndNamedEvent(); PIXBeginNamedEvent(0, "Ticking client side tiles"); -#ifdef __PSVITA__ +#if 0 // AP - see CustomSet.h for and explanation for (int i = 0; i < chunksToPoll.end(); i += 1) { ChunkPos cp = chunksToPoll.get(i); diff --git a/Minecraft.Client/Level/ServerLevel.cpp b/Minecraft.Client/Level/ServerLevel.cpp index daab0d8c8..8e45766d0 100644 --- a/Minecraft.Client/Level/ServerLevel.cpp +++ b/Minecraft.Client/Level/ServerLevel.cpp @@ -62,7 +62,7 @@ void ServerLevel::staticCtor() { m_updateThread = new C4JThread(runUpdate, NULL, "Tile update"); m_updateThread->SetProcessor(CPU_CORE_TILE_UPDATE); -#ifdef __ORBIS__ +#if 0 m_updateThread->SetPriority( THREAD_PRIORITY_BELOW_NORMAL); // On Orbis, this core is also used for // Matching 2, and that priority of that @@ -488,7 +488,7 @@ void ServerLevel::tickTiles() { if (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_RegularLightning)) prob = 100; -#ifdef __PSVITA__ +#if 0 // AP - see CustomSet.h for and explanation for (int i = 0; i < chunksToPoll.end(); i += 1) { ChunkPos cp = chunksToPoll.get(i); @@ -955,7 +955,7 @@ void ServerLevel::save(bool force, ProgressListener* progressListener, if (progressListener != NULL) progressListener->progressStage(IDS_PROGRESS_SAVING_CHUNKS); -#if defined(_XBOX_ONE) || defined(__ORBIS__) +#if 0 || 0 // Our autosave is a minimal save. All the chunks are saves by the constant // save process if (bAutosave) { @@ -1569,9 +1569,9 @@ int ServerLevel::runUpdate(void* lpParam) { LeaveCriticalSection(&m_updateCS[iLev]); } PIXEndNamedEvent(); -#ifdef __PS3__ +#if 0 Sleep(10); -#endif //__PS3__ +#endif //0 } ShutdownManager::HasFinished(ShutdownManager::eRunUpdateThread); diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index c9f817601..e55b474a1 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -340,7 +340,7 @@ public: void delayTextureReload(); static int64_t currentTimeMillis(); -#ifdef _DURANGO +#if 0 static void inGameSignInCheckAllPrivilegesCallback(void* lpParam, bool hasPrivileges, int iPad); @@ -395,7 +395,7 @@ public: unsigned int getCurrentTexturePackId(); ColourTable* getColourTable(); -#if defined __ORBIS__ +#if 0 static int MustSignInReturnedPSN(void* pParam, int iPad, C4JStorage::EMessageResult result); #endif diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h index 7b7793775..3db062c22 100644 --- a/Minecraft.Client/MinecraftServer.h +++ b/Minecraft.Client/MinecraftServer.h @@ -22,8 +22,8 @@ class CommandDispatcher; #define MINECRAFT_SERVER_SLOW_QUEUE_DELAY 250 -#if defined _XBOX_ONE || defined _XBOX || defined __ORBIS__ || \ - defined __PS3__ || defined __PSVITA__ +#if 0 || 0 || 0 || \ + 0 || 0 #define _ACK_CHUNK_SEND_THROTTLING #endif diff --git a/Minecraft.Client/Network/ClientConnection.cpp b/Minecraft.Client/Network/ClientConnection.cpp index 95f3be4c1..9f8316c40 100644 --- a/Minecraft.Client/Network/ClientConnection.cpp +++ b/Minecraft.Client/Network/ClientConnection.cpp @@ -46,12 +46,12 @@ #include "../ClientConstants.h" #include "../../Minecraft.World/Util/SoundTypes.h" #include "../Textures/Packs/TexturePackRepository.h" -#ifndef _XBOX +#if 1 #include "../Platform/Common/UI/UI.h" #endif #include "../Textures/Packs/DLCTexturePack.h" -#ifdef _DURANGO +#if 0 #include "../../Minecraft.World/Stats/DurangoStats.h" #include "../../Minecraft.World/Stats/GenericStats.h" #endif @@ -197,7 +197,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) { // check the file is not already in bRes = app.IsFileInMemoryTextures(wstr); if (!bRes) { -#ifdef _XBOX +#if 0 C4JStorage::ETMSStatus eTMSStatus; eTMSStatus = StorageManager.ReadTMSFile( iUserID, C4JStorage::eGlobalStorage_Title, @@ -219,7 +219,7 @@ void ClientConnection::handleLogin(std::shared_ptr packet) { // check the file is not already in bRes = app.IsFileInMemoryTextures(wstr); if (!bRes) { -#ifdef _XBOX +#if 0 C4JStorage::ETMSStatus eTMSStatus; eTMSStatus = StorageManager.ReadTMSFile( iUserID, C4JStorage::eGlobalStorage_Title, @@ -805,7 +805,7 @@ void ClientConnection::handleAddPlayer( player->yHeadRot = packet->yHeadRot * 360 / 256.0f; player->setXuid(packet->xuid); -#ifdef _DURANGO +#if 0 // On Durango request player display name from network manager INetworkPlayer* networkPlayer = g_NetworkManager.GetPlayerByXuid(player->getXuid()); @@ -1893,7 +1893,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { } } -#ifdef _XBOX +#if 0 if (!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends)) { if (m_userIndex == ProfileManager.GetPrimaryPad()) { @@ -2036,7 +2036,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { isAtLeastOneFriend = true; cantPlayContentRestricted = false; -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__) +#if (0 || 0 || 0) if (!g_NetworkManager.IsHost() && !app.GetGameHostOption(eGameHostOption_FriendsOfFriends)) { @@ -2046,7 +2046,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { m_userIndex, true, &bChatRestricted, NULL, NULL); // Chat restricted orbis players can still play online -#ifndef __ORBIS__ +#if 1 canPlay = !bChatRestricted; #endif @@ -2054,9 +2054,9 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { // Is this user friends with the host player? bool isFriend = true; unsigned int friendCount = 0; -#ifdef __PS3__ +#if 0 int ret = sceNpBasicGetFriendListEntryCount(&friendCount); -#elif defined __PSVITA__ +#elif 0 sce::Toolkit::NP::Utilities::Future friendList; int ret = -1; @@ -2072,7 +2072,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { } } } -#else // __ORBIS__ +#else // 0 sce::Toolkit::NP::Utilities::Future friendList; @@ -2097,7 +2097,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { isFriend = false; SceNpId npid; for (unsigned int i = 0; i < friendCount; i++) { -#ifdef __PS3__ +#if 0 ret = sceNpBasicGetFriendListEntry(i, &npid); #else npid = friendList.get()->at(i).npid; @@ -2141,7 +2141,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { } // Chat restricted orbis players can still play online -#ifndef __ORBIS__ +#if 1 canPlayLocal = !bChatRestricted; #endif @@ -2150,7 +2150,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { #endif -#ifdef _XBOX_ONE +#if 0 if (!g_NetworkManager.IsHost() && m_userIndex == ProfileManager.GetPrimaryPad()) { long long startTime = System::currentTimeMillis(); @@ -2214,11 +2214,11 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { } #endif -#endif // _XBOX +#endif // 0 if (!canPlay || !canPlayLocal || !isAtLeastOneFriend || cantPlayContentRestricted) { -#ifndef __PS3__ +#if 1 DisconnectPacket::eDisconnectReason reason = DisconnectPacket::eDisconnect_NoUGC_Remote; #else @@ -2302,7 +2302,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { packet->m_texturePackId); // 4J-PB - we need to upsell the texture pack to the player -#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ +#if 0 || 0 || 0 app.SetAction(m_userIndex, eAppAction_TexturePackRequired); #endif // Let the player go into the game, and we'll check that they @@ -2322,7 +2322,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { // use their online one ProfileManager.GetXUID(m_userIndex, &onlineXUID, true); } -#ifdef __PSVITA__ +#if 0 if (CGameNetworkManager::usingAdhocMode() && onlineXUID.getOnlineID()[0] == 0) { // player doesn't have an online UID, set it from the player name @@ -2332,7 +2332,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr packet) { // On PS3, all non-signed in players (even guests) can get a useful // offlineXUID -#if !(defined __PS3__ || defined _DURANGO) +#if !(0 || 0) if (!ProfileManager.IsGuest(m_userIndex)) #endif { @@ -2837,7 +2837,7 @@ void ClientConnection::handleRespawn(std::shared_ptr packet) { minecraft->setScreen(new ReceivingLevelScreen(this)); // minecraft->addPendingLocalConnection(m_userIndex, this); -#ifdef _XBOX +#if 0 TelemetryManager->RecordLevelStart( m_userIndex, eSen_FriendOrMatch_Playing_With_Invited_Friends, eSen_CompeteOrCoop_Coop_and_Competitive, @@ -3337,7 +3337,7 @@ void ClientConnection::handleGameEvent( } else if (event == GameEventPacket::WIN_GAME) { ui.SetWinUserIndex(static_cast(gameEventPacket->param)); -#ifdef _XBOX +#if 0 // turn off the gamertags in splitscreen for the primary player, since // they are about to be made fullscreen @@ -3707,7 +3707,7 @@ void ClientConnection::handleCustomPayload( ->containerMenu->containerId) { std::shared_ptr trader = nullptr; -#ifdef _XBOX +#if 0 HXUIOBJ scene = app.GetCurrentScene(m_userIndex); HXUICLASS thisClass = XuiFindClass(L"CXuiSceneTrading"); HXUICLASS objClass = XuiGetObjectClass(scene); @@ -3817,7 +3817,7 @@ int ClientConnection::HostDisconnectReturned( } } -#if defined(_XBOX_ONE) || defined(__ORBIS__) +#if 0 || 0 // Give the player the option to save their game // does the save exist? bool bSaveExists; @@ -3851,7 +3851,7 @@ int ClientConnection::HostDisconnectReturned( } else #endif { -#if defined(_XBOX_ONE) || defined(__ORBIS__) +#if 0 || 0 StorageManager.SetSaveDisabled(false); #endif MinecraftServer::getInstance()->setSaveOnExit(true); @@ -3871,7 +3871,7 @@ int ClientConnection::ExitGameAndSaveReturned( // StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); // SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), // saveOrCheckpointId); -#if defined(_XBOX_ONE) || defined(__ORBIS__) +#if 0 || 0 StorageManager.SetSaveDisabled(false); #endif MinecraftServer::getInstance()->setSaveOnExit(true); @@ -3885,7 +3885,7 @@ int ClientConnection::ExitGameAndSaveReturned( // std::wstring ClientConnection::GetDisplayNameByGamertag(std::wstring gamertag) { -#ifdef _DURANGO +#if 0 std::wstring displayName = g_NetworkManager.GetDisplayNameByGamertag(gamertag); return displayName; diff --git a/Minecraft.Client/Network/MultiPlayerChunkCache.cpp b/Minecraft.Client/Network/MultiPlayerChunkCache.cpp index 8a95be10f..e20b87291 100644 --- a/Minecraft.Client/Network/MultiPlayerChunkCache.cpp +++ b/Minecraft.Client/Network/MultiPlayerChunkCache.cpp @@ -210,7 +210,7 @@ LevelChunk* MultiPlayerChunkCache::create(int x, int z) { if (InterlockedCompareExchangeRelease((LONG*)&cache[idx], (LONG)chunk, (LONG)lastChunk) == (LONG)lastChunk) -#endif // _DURANGO +#endif // 0 { // If we're sharing with the server, we'll need to calculate our // heightmap now, which isn't shared. If we aren't sharing with the diff --git a/Minecraft.Client/Network/PendingConnection.cpp b/Minecraft.Client/Network/PendingConnection.cpp index 08e1bb031..5658a5163 100644 --- a/Minecraft.Client/Network/PendingConnection.cpp +++ b/Minecraft.Client/Network/PendingConnection.cpp @@ -15,7 +15,7 @@ #include "../../Minecraft.World/Headers/net.minecraft.world.item.h" #include "../../Minecraft.World/Util/SharedConstants.h" #include "../GameState/Settings.h" -// #ifdef __PS3__ +// #if 0 // #include "PS3/Network/NetworkPlayerSony.h" // #endif diff --git a/Minecraft.Client/Network/PlayerList.cpp b/Minecraft.Client/Network/PlayerList.cpp index eb865d909..ef32cc865 100644 --- a/Minecraft.Client/Network/PlayerList.cpp +++ b/Minecraft.Client/Network/PlayerList.cpp @@ -38,7 +38,7 @@ PlayerList::PlayerList(MinecraftServer* server) { overrideGameMode = NULL; allowCheatsForAllPlayers = false; -#ifdef __PSVITA__ +#if 0 viewDistance = 3; #elif defined _LARGE_WORLDS viewDistance = 16; @@ -85,7 +85,7 @@ void PlayerList::placeNewPlayer(Connection* connection, player->setPlayerGamePrivilege(Player::ePlayerGamePrivilege_HOST, 1); } -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 // PS3 networking library doesn't automatically assign PlayerUIDs to the // network players for anything remote, so need to tell it what to set from // the data in this packet now @@ -1045,7 +1045,7 @@ void PlayerList::tick() { g_NetworkManager.GetPlayerBySmallId(smallId); if (selectedPlayer != NULL) { if (selectedPlayer->IsLocal() != TRUE) { - // #ifdef _XBOX + // #if 0 PlayerUID xuid = selectedPlayer->GetUID(); // Kick this player from the game std::shared_ptr player = nullptr; diff --git a/Minecraft.Client/Network/ServerChunkCache.cpp b/Minecraft.Client/Network/ServerChunkCache.cpp index a8b5b78c0..79fdca861 100644 --- a/Minecraft.Client/Network/ServerChunkCache.cpp +++ b/Minecraft.Client/Network/ServerChunkCache.cpp @@ -166,7 +166,7 @@ LevelChunk* ServerChunkCache::create( if (InterlockedCompareExchangeRelease((LONG*)&cache[idx], (LONG)chunk, (LONG)lastChunk) == (LONG)lastChunk) -#endif // _DURANGO +#endif // 0 { // Successfully updated the cache EnterCriticalSection(&m_csLoadCreate); @@ -276,9 +276,9 @@ LevelChunk* ServerChunkCache::create( } } -#ifdef __PS3__ +#if 0 Sleep(1); -#endif // __PS3__ +#endif // 0 return chunk; } diff --git a/Minecraft.Client/Platform/Extrax64Stubs.cpp b/Minecraft.Client/Platform/Extrax64Stubs.cpp index 4b698f46b..a86ed4a7c 100644 --- a/Minecraft.Client/Platform/Extrax64Stubs.cpp +++ b/Minecraft.Client/Platform/Extrax64Stubs.cpp @@ -1,20 +1,20 @@ #include "stdafx.h" -#ifndef __PS3__ +#if 1 //#include -#endif // __PS3__ +#endif // 0 -#ifdef __PS3__ +#if 0 #include "../GameState/StatsCounter.h" #include #include -#elif defined _DURANGO +#elif 0 #include "../GameState/StatsCounter.h" #elif defined _WINDOWS64 #include "../Platform/Windows64/Sentient/SentientManager.h" #include "../GameState/StatsCounter.h" #include "../Platform/Windows64/Social/SocialManager.h" #include "../Platform/Windows64/Sentient/DynamicConfigurations.h" -#elif defined __PSVITA__ +#elif 0 #include "../GameState/StatsCounter.h" #include #elif defined __linux__ @@ -27,19 +27,19 @@ #include "../GameState/StatsCounter.h" #endif -#if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) +#if !0 && !0 && !0 #ifdef _WINDOWS64 //C4JStorage StorageManager; C_4JProfile ProfileManager; #endif -#endif // __PS3__ +#endif // 0 CSentientManager SentientManager; #ifndef __linux__ // On Linux this global shadows the project's StringTable class name in unity builds CXuiStringTable StringTable; #endif -#if !defined(_XBOX_ONE) && !defined(__linux__) +#if !0 && !defined(__linux__) ATG::XMLParser::XMLParser() {} ATG::XMLParser::~XMLParser() {} HRESULT ATG::XMLParser::ParseXMLBuffer( CONST CHAR* strBuffer, UINT uBufferSize ) { return S_OK; } @@ -64,7 +64,7 @@ DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA *pContentData, void XShowAchievementsUI(int i) {} DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; } -#ifndef _DURANGO +#if 1 void PIXAddNamedCounter(int a, const char *b, ...) {} //#define PS3_USE_PIX_EVENTS //#define PS4_USE_PIX_EVENTS @@ -91,7 +91,7 @@ void PIXBeginNamedEvent(int a, const char *b, ...) va_end(args); #endif } -#if 0//__PSVITA__ +#if 0//0 if( PixDepth < 64 ) { char buf[512]; @@ -113,7 +113,7 @@ void PIXEndNamedEvent() snPopMarker(); // RenderManager.EndEvent(); #endif -#if 0//__PSVITA__ +#if 0//0 if( PixDepth <= 64 ) { sceRazorCpuPopMarker(); @@ -159,14 +159,14 @@ void PIXSetMarkerDeprecated(int a, char *b, ...) {} // int D3DXBUFFER::GetBufferSize() { return 0; } // void D3DXBUFFER::Release() {} -// #ifdef _DURANGO +// #if 0 // void GetLocalTime(SYSTEMTIME *time) {} // #endif bool IsEqualXUID(PlayerUID a, PlayerUID b) { -#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) || defined(_DURANGO) +#if 0 || 0 || 0 || 0 return (a == b); #else return false; @@ -231,9 +231,9 @@ void IQNet::EndGame() { _bQNetStubGameRunning = false; } DWORD MinecraftDynamicConfigurations::GetTrialTime() { return DYNAMIC_CONFIG_DEFAULT_TRIAL_TIME; } void XSetThreadProcessor(HANDLE a, int b) {} -// #if !(defined __PS3__) && !(defined __ORBIS__) +// #if !(0) && !(0) // BOOL XCloseHandle(HANDLE a) { return CloseHandle(a); } -// #endif // __PS3__ +// #endif // 0 DWORD XUserGetSigninInfo( DWORD dwUserIndex, @@ -251,7 +251,7 @@ HRESULT CXuiStringTable::Load(LPCWSTR szId) { return S_OK; } DWORD XUserAreUsersFriends( DWORD dwUserIndex, PPlayerUID pXuids, DWORD dwXuidCount, PBOOL pfResult, void *pOverlapped) { return 0; } -#if defined __ORBIS__ || defined __PS3__ || defined _XBOX_ONE +#if 0 || 0 || 0 #else HRESULT XMemDecompress( XMEMDECOMPRESSION_CONTEXT Context, @@ -370,8 +370,8 @@ void XMemDestroyDecompressionContext(XMEMDECOMPRESSION_CONTEXT Context) } #endif -//#ifndef __PS3__ -#if !(defined _DURANGO || defined __PS3__ || defined __ORBIS__ || defined __PSVITA__) +//#if 1 +#if !(0 || 0 || 0 || 0) DWORD XGetLanguage() { return 1; } DWORD XGetLocale() { return 0; } DWORD XEnableGuestSignin(BOOL fEnable) { return 0; } @@ -465,7 +465,7 @@ bool C_4JProfile::AreXUIDSEqual(PlayerUID xuid1,PlayerUID xuid2) { return fal bool C_4JProfile::XUIDIsGuest(PlayerUID xuid) { return false; } bool C_4JProfile::AllowedToPlayMultiplayer(int iProf) { return true; } -#if defined(__ORBIS__) +#if 0 bool C_4JProfile::GetChatAndContentRestrictions(int iPad, bool thisQuadrantOnly, bool *pbChatRestricted,bool *pbContentRestricted,int *piAge) { if(pbChatRestricted) *pbChatRestricted = false; @@ -482,7 +482,7 @@ bool C_4JProfile::GetProfileAvatar(int iPad,int( *Func)(void *lpParam,std::ui void C_4JProfile::CancelProfileAvatarRequest() {} int C_4JProfile::GetPrimaryPad() { return 0; } void C_4JProfile::SetPrimaryPad(int iPad) {} -#ifdef _DURANGO +#if 0 char fakeGamerTag[32] = "PlayerName"; void SetFakeGamertag(char *name){ strcpy_s(fakeGamerTag, name); } char* C_4JProfile::GetGamertag(int iPad){ return fakeGamerTag; } @@ -602,7 +602,7 @@ struct PTMSPP_FILEDATA; C4JStorage::ETMSStatus C4JStorage::TMSPP_ReadFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FILETYPEVAL eFileTypeVal,LPCSTR szFilename,int( *Func)(LPVOID,int,int,PTMSPP_FILEDATA, LPCSTR)/*=NULL*/,LPVOID lpParam/*=NULL*/, int iUserData/*=0*/) {return C4JStorage::ETMSStatus_Idle;} #endif // _WINDOWS64 -#endif // __PS3__ +#endif // 0 /////////////////////////////////////////////////////// Sentient manager diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 852dbb58c..e21321923 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -88,7 +88,7 @@ static void sigsegv_handler(int sig) { #define NUM_PROFILE_VALUES 5 #define NUM_PROFILE_SETTINGS 4 DWORD dwProfileSettingsA[NUM_PROFILE_VALUES] = { -#ifdef _XBOX +#if 0 XPROFILE_OPTION_CONTROLLER_VIBRATION, XPROFILE_GAMER_YAXIS_INVERSION, XPROFILE_GAMER_CONTROL_SENSITIVITY, diff --git a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h index 2b8df12de..1c45d7c8d 100644 --- a/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h +++ b/Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h @@ -309,7 +309,7 @@ public: void StoreTMSPathName(WCHAR *pwchName=NULL); // TMS++ -#ifdef _XBOX +#if 0 C4JStorage::ETMSStatus WriteTMSFile(int iPad,C4JStorage::eGlobalStorage eStorageFacility,C4JStorage::eTMS_FileType eFileType,CHAR *pchFilePath,CHAR *pchBuffer,DWORD dwBufferSize,TMSCLIENT_CALLBACK Func,LPVOID lpParam); HRESULT GetUserQuotaInfo(int iPad,TMSCLIENT_CALLBACK Func,LPVOID lpParam); #endif diff --git a/Minecraft.Client/Platform/Windows64/Social/SocialManager.h b/Minecraft.Client/Platform/Windows64/Social/SocialManager.h index cad278fe3..3d34d1e30 100644 --- a/Minecraft.Client/Platform/Windows64/Social/SocialManager.h +++ b/Minecraft.Client/Platform/Windows64/Social/SocialManager.h @@ -70,7 +70,7 @@ private: // Social post preview image struct. XSOCIAL_PREVIEWIMAGE m_PostPreviewImage; -#ifdef _XBOX +#if 0 // Social post image params. XSOCIAL_IMAGEPOSTPARAMS m_PostImageParams; diff --git a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp index b8e20ccd1..c4df29142 100644 --- a/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Platform/Windows64/Windows64_Minecraft.cpp @@ -56,7 +56,7 @@ uint16_t ui16GlobalText[256]; #define NUM_PROFILE_VALUES 5 #define NUM_PROFILE_SETTINGS 4 DWORD dwProfileSettingsA[NUM_PROFILE_VALUES] = { -#ifdef _XBOX +#if 0 XPROFILE_OPTION_CONTROLLER_VIBRATION, XPROFILE_GAMER_YAXIS_INVERSION, XPROFILE_GAMER_CONTROL_SENSITIVITY, diff --git a/Minecraft.Client/Platform/stubs.cpp b/Minecraft.Client/Platform/stubs.cpp index 97620df18..d0cc963f6 100644 --- a/Minecraft.Client/Platform/stubs.cpp +++ b/Minecraft.Client/Platform/stubs.cpp @@ -111,7 +111,7 @@ void glTexGeni(int,int,int) { } -#ifdef _XBOX +#if 0 // 4J Stu - Added these to stop us needing to pull in loads of media libraries just to use Qnet #include DWORD XCamInitialize(){ return 0; } diff --git a/Minecraft.Client/Player/LocalPlayer.cpp b/Minecraft.Client/Player/LocalPlayer.cpp index dbb47eaf1..9be2a1850 100644 --- a/Minecraft.Client/Player/LocalPlayer.cpp +++ b/Minecraft.Client/Player/LocalPlayer.cpp @@ -53,7 +53,7 @@ #include "../GameState/Options.h" #include "../../Minecraft.World/Level/Dimensions/Dimension.h" -#ifndef _DURANGO +#if 1 #include "../../Minecraft.World/Stats/CommonStats.h" #endif @@ -761,7 +761,7 @@ void LocalPlayer::displayClientMessage(int messageId) { } void LocalPlayer::awardStat(Stat* stat, byteArray param) { -#ifdef _DURANGO +#if 0 // 4J-JEV: Maybe we want to fine tune this later? #TODO if (!ProfileManager.IsGuest(GetXboxPad()) && app.CanRecordStatsAndAchievements() && ProfileManager.IsFullVersion()) { @@ -908,7 +908,7 @@ void LocalPlayer::awardStat(Stat* stat, byteArray param) { } } -#ifdef _XBOX +#if 0 // AWARD: Have we killed 10 creepers? if (pStats->getTotalValue(GenericStats::killsCreeper()) >= 10) { awardStat(GenericStats::kill10Creepers(), diff --git a/Minecraft.Client/Player/ServerPlayer.cpp b/Minecraft.Client/Player/ServerPlayer.cpp index 43562a96f..5f9ceedfd 100644 --- a/Minecraft.Client/Player/ServerPlayer.cpp +++ b/Minecraft.Client/Player/ServerPlayer.cpp @@ -374,7 +374,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) { if (dontDelayChunks || (canSendToPlayer && -#ifdef _XBOX_ONE +#if 0 // The network manager on xbox one doesn't currently split // data into slow & fast queues - since we can only measure // both together then bytes provides a better metric than @@ -382,7 +382,7 @@ void ServerPlayer::doChunkSendingTick(bool dontDelayChunks) { // queueing too much up (g_NetworkManager.GetHostPlayer()->GetSendQueueSizeBytes( NULL, true) < 8192) && -#elif defined _XBOX +#elif 0 (g_NetworkManager.GetHostPlayer() ->GetSendQueueSizeMessages(NULL, true) < 4) && #else @@ -1332,7 +1332,7 @@ void ServerPlayer::awardStat(Stat* stat, byteArray param) { } if (!stat->awardLocallyOnly) { -#ifndef _DURANGO +#if 1 int count = *((int*)param.data); delete[] param.data; diff --git a/Minecraft.Client/Rendering/Camera.cpp b/Minecraft.Client/Rendering/Camera.cpp index 0b77091af..c50b0bdb8 100644 --- a/Minecraft.Client/Rendering/Camera.cpp +++ b/Minecraft.Client/Rendering/Camera.cpp @@ -48,7 +48,7 @@ zPlayerOffs = position->get(2); memcpy(&_modelview, modelview->_getDataPointer(), 64); memcpy(&_proj, projection->_getDataPointer(), 64); -#if (defined __ORBIS__) || (defined __PSVITA__) +#if (0) || (0) _modelview = transpose(_modelview); _proj = transpose(_proj); _final = _modelview * _proj; @@ -56,7 +56,7 @@ zPlayerOffs = position->get(2); xPlayerOffs = _invert.getElem(0, 3) / _invert.getElem(3, 3); yPlayerOffs = _invert.getElem(1, 3) / _invert.getElem(3, 3); zPlayerOffs = _invert.getElem(2, 3) / _invert.getElem(3, 3); -#elif defined __PS3__ +#elif 0 _modelview = transpose(_modelview); _proj = transpose(_proj); _final = _modelview * _proj; diff --git a/Minecraft.Client/Rendering/Chunk.cpp b/Minecraft.Client/Rendering/Chunk.cpp index a3d2f1669..721efd4b2 100644 --- a/Minecraft.Client/Rendering/Chunk.cpp +++ b/Minecraft.Client/Rendering/Chunk.cpp @@ -8,7 +8,7 @@ #include "../../Minecraft.World/Headers/net.minecraft.world.level.tile.entity.h" #include "LevelRenderer.h" -#ifdef __PS3__ +#if 0 #endif int Chunk::updates = 0; @@ -125,7 +125,7 @@ void Chunk::setPos(int x, int y, int z) { // other than the ones in the stack itself have been made dirty. levelRenderer->setGlobalChunkFlag(x, y, z, level, LevelRenderer::CHUNK_FLAG_DIRTY); -#ifdef _XBOX +#if 0 PIXSetMarker(0, "Non-stack event pushed"); #else PIXSetMarkerDeprecated(0, "Non-stack event pushed"); @@ -165,10 +165,10 @@ void Chunk::makeCopyForRebuild(Chunk* source) { void Chunk::rebuild() { PIXBeginNamedEvent(0, "Rebuilding chunk %d, %d, %d", x, y, z); -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE rebuild_SPU(); return; -#endif // __PS3__ +#endif // 0 // if (!dirty) return; PIXBeginNamedEvent(0, "Rebuild section A"); @@ -238,7 +238,7 @@ void Chunk::rebuild() { // that calls to Region::getTile can grab data more quickly from this array // rather than calling CompressedTileStorage. On the Vita the total thread // time spent in Region::getTile went from 20% to 4%. -#ifdef __PSVITA__ +#if 0 int xc = x >> 4; int zc = z >> 4; ((Region*)region)->setCachedTiles(tileIds, xc, zc); @@ -452,7 +452,7 @@ void Chunk::rebuild() { } } -#ifdef __PSVITA__ +#if 0 if (currentLayer == 0) { levelRenderer->clearGlobalChunkFlag( this->x, this->y, this->z, level, @@ -461,7 +461,7 @@ void Chunk::rebuild() { #endif if (started) { -#ifdef __PSVITA__ +#if 0 // AP - make sure we don't attempt to render chunks without cutout // geometry if (t->getCutOutFound()) { @@ -646,7 +646,7 @@ void Chunk::rebuild() { return; } -#ifdef __PS3__ +#if 0 ChunkRebuildData g_rebuildDataIn __attribute__((__aligned__(16))); ChunkRebuildData g_rebuildDataOut __attribute__((__aligned__(16))); TileCompressData_SPU g_tileCompressDataIn __attribute__((__aligned__(16))); diff --git a/Minecraft.Client/Rendering/Chunk.h b/Minecraft.Client/Rendering/Chunk.h index 379b258ba..8e9a10209 100644 --- a/Minecraft.Client/Rendering/Chunk.h +++ b/Minecraft.Client/Rendering/Chunk.h @@ -73,9 +73,9 @@ private: public: void makeCopyForRebuild(Chunk* source); void rebuild(); -#ifdef __PS3__ +#if 0 void rebuild_SPU(); -#endif // __PS3__ +#endif // 0 float distanceToSqr(std::shared_ptr player) const; float squishedDistanceToSqr(std::shared_ptr player); void reset(); diff --git a/Minecraft.Client/Rendering/EntityRenderers/EnchantTableRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/EnchantTableRenderer.cpp index 2c416d899..274f89ef3 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/EnchantTableRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/EnchantTableRenderer.cpp @@ -18,7 +18,7 @@ void EnchantTableRenderer::render(std::shared_ptr _table, double x, std::shared_ptr table = std::dynamic_pointer_cast(_table); -#ifdef __PSVITA__ +#if 0 // AP - the book pages are made with 0 depth so the front and back polys are // at the same location. This can cause z-fighting if culling is disabled // which can sometimes happen depending on what object was last seen so make diff --git a/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.cpp index fb42045de..746790862 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.cpp @@ -86,7 +86,7 @@ void EnderDragonRenderer::renderModel(std::shared_ptr _mob, glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4f(1, 0, 0, 0.5f); -#ifdef __PSVITA__ +#if 0 // AP - not sure that the usecompiled flag is supposed to be false. This // makes it really slow on vita. Making it true still seems to look the // same @@ -268,7 +268,7 @@ int EnderDragonRenderer::prepareArmor(std::shared_ptr _mob, // back on the renderer) However we do want it off for other platforms that // don't force it on in the render lib CBuff handling Several texture packs // have fully transparent bits that break if this is off -#ifdef _XBOX +#if 0 glDisable(GL_ALPHA_TEST); #endif glBlendFunc(GL_ONE, GL_ONE); diff --git a/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.h b/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.h index 4377bd158..b2e597cc1 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.h +++ b/Minecraft.Client/Rendering/EntityRenderers/EnderDragonRenderer.h @@ -1,7 +1,7 @@ #pragma once #include "MobRenderer.h" -#ifdef _XBOX +#if 0 class EnderDragon; #endif class DragonModel; diff --git a/Minecraft.Client/Rendering/EntityRenderers/EnderManRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/EnderManRenderer.cpp index 351181f16..ca84cd398 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/EnderManRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/EnderManRenderer.cpp @@ -93,7 +93,7 @@ int EndermanRenderer::prepareArmor(std::shared_ptr _mob, // back on the renderer) However we do want it off for other platforms that // don't force it on in the render lib CBuff handling Several texture packs // have fully transparent bits that break if this is off -#ifdef _XBOX +#if 0 glDisable(GL_ALPHA_TEST); #endif glBlendFunc(GL_ONE, GL_ONE); diff --git a/Minecraft.Client/Rendering/EntityRenderers/ItemInHandRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/ItemInHandRenderer.cpp index 7503821aa..a740abd8b 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/ItemInHandRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/ItemInHandRenderer.cpp @@ -588,7 +588,7 @@ void ItemInHandRenderer::render(float a) { glPushMatrix(); float d = 0.8f; -#if defined __ORBIS__ || defined __PS3__ +#if 0 || 0 static const float swingPowFactor = 1.0f; #else static const float swingPowFactor = diff --git a/Minecraft.Client/Rendering/EntityRenderers/ItemRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/ItemRenderer.cpp index bf94c18ab..fb0366bf5 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/ItemRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/ItemRenderer.cpp @@ -12,7 +12,7 @@ #include "../../GameState/Options.h" #include "../../Textures/TextureAtlas.h" -#ifdef _XBOX +#if 0 extern IDirect3DDevice9* g_pD3DDevice; #endif @@ -41,7 +41,7 @@ ResourceLocation* ItemRenderer::getTextureLocation(int iconType) { if (iconType == Icon::TYPE_TERRAIN) { return &TextureAtlas::LOCATION_BLOCKS; // L"/terrain.png")); } else { -#ifdef _XBOX +#if 0 // 4J - make sure we've got linear sampling on minification here as // non-mipmapped things like this currently default to having point // sampling, which makes very small icons render rather badly @@ -430,7 +430,7 @@ void ItemRenderer::renderGuiItem(Font* font, Textures* textures, } else { textures->bindTexture( &TextureAtlas::LOCATION_ITEMS); // L"/gui/items.png")); -#ifdef _XBOX +#if 0 // 4J - make sure we've got // linear sampling on // minification here as diff --git a/Minecraft.Client/Rendering/EntityRenderers/LivingEntityRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/LivingEntityRenderer.cpp index d2183890e..f5f4cbf3c 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/LivingEntityRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/LivingEntityRenderer.cpp @@ -511,7 +511,7 @@ void LivingEntityRenderer::renderNameTag(std::shared_ptr mob, if (app.isXuidDeadmau5(player->getXuid())) offs = -10; -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 // Check we have all the font characters for this player name switch (player->GetPlayerNameValidState()) { case Player::ePlayerNameValid_NotSet: diff --git a/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp index 499312663..358e2b7d9 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp @@ -21,7 +21,7 @@ const unsigned int PlayerRenderer::s_nametagColors[MINECRAFT_NET_MAX_PLAYERS] = 0xff33cc33, // GREEN 0xffcc3333, // RED 0xff3333cc, // BLUE -#ifndef __PSVITA__ // only 4 player on Vita +#if 1 // only 4 player on Vita 0xffcc33cc, // PINK 0xffcc6633, // ORANGE 0xffcccc33, // YELLOW diff --git a/Minecraft.Client/Rendering/EntityRenderers/SpiderRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/SpiderRenderer.cpp index 5f05ed823..a61231bdb 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/SpiderRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/SpiderRenderer.cpp @@ -33,7 +33,7 @@ int SpiderRenderer::prepareArmor(std::shared_ptr _spider, // back on the renderer) However we do want it off for other platforms that // don't force it on in the render lib CBuff handling Several texture packs // have fully transparent bits that break if this is off -#ifdef _XBOX +#if 0 glDisable(GL_ALPHA_TEST); #endif // 4J - changes brought forward from 1.8.2 diff --git a/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.cpp b/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.cpp index e78b97a3d..a50aa3513 100644 --- a/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.cpp +++ b/Minecraft.Client/Rendering/EntityRenderers/TileRenderer.cpp @@ -182,7 +182,7 @@ void TileRenderer::setFixedTexture(Icon* fixedTexture) { void TileRenderer::clearFixedTexture() { this->fixedTexture = NULL; } bool TileRenderer::hasFixedTexture() { -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Pass on the Alpha Cut out flag // to the tesselator if (fixedTexture) { @@ -7120,7 +7120,7 @@ void TileRenderer::renderFaceDown(Tile* tt, double x, double y, double z, double z1 = z + tileShapeZ1; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x0), (float)(y0), (float)(z1), (float)(u10), (float)(v10), c1r, c1g, c1b, tc1, (float)(x0), @@ -7239,7 +7239,7 @@ void TileRenderer::renderFaceUp(Tile* tt, double x, double y, double z, double z1 = z + tileShapeZ1; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x1), (float)(y1), (float)(z1), (float)(u11), (float)(v11), c1r, c1g, c1b, tc1, (float)(x1), @@ -7363,7 +7363,7 @@ void TileRenderer::renderNorth(Tile* tt, double x, double y, double z, double z0 = z + tileShapeZ0; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x0), (float)(y1), (float)(z0), (float)(u01), (float)(v01), c1r, c1g, c1b, tc1, (float)(x1), @@ -7487,7 +7487,7 @@ void TileRenderer::renderSouth(Tile* tt, double x, double y, double z, double z1 = z + tileShapeZ1; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x0), (float)(y1), (float)(z1), (float)(u00), (float)(v00), c1r, c1g, c1b, tc1, (float)(x0), @@ -7611,7 +7611,7 @@ void TileRenderer::renderWest(Tile* tt, double x, double y, double z, double z1 = z + tileShapeZ1; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x0), (float)(y1), (float)(z1), (float)(u01), (float)(v01), c1r, c1g, c1b, tc1, (float)(x0), @@ -7735,7 +7735,7 @@ void TileRenderer::renderEast(Tile* tt, double x, double y, double z, double z1 = z + tileShapeZ1; if (applyAmbienceOcclusion) { -#ifdef __PSVITA__ +#if 0 if (t->getCompactVertices()) { t->tileQuad((float)(x1), (float)(y0), (float)(z1), (float)(u10), (float)(v10), c1r, c1g, c1b, tc1, (float)(x1), @@ -8390,7 +8390,7 @@ Icon* TileRenderer::getTextureOrMissing(Icon* icon) { if (icon == NULL) return minecraft->textures->getMissingIcon(Icon::TYPE_TERRAIN); -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Pass on the Alpha Cut out flag // to the tesselator Tesselator* t = Tesselator::getInstance(); diff --git a/Minecraft.Client/Rendering/GameRenderer.cpp b/Minecraft.Client/Rendering/GameRenderer.cpp index 90fd6c691..7db01fb45 100644 --- a/Minecraft.Client/Rendering/GameRenderer.cpp +++ b/Minecraft.Client/Rendering/GameRenderer.cpp @@ -158,7 +158,7 @@ GameRenderer::GameRenderer(Minecraft* mc) { // per level to support split screen } delete img; -#ifdef __PS3__ +#if 0 // we're using the RSX now to upload textures to vram, so we need the main // ram textures allocated from io space for (int i = 0; i < NUM_LIGHT_TEXTURES; i++) @@ -176,9 +176,9 @@ GameRenderer::GameRenderer(Minecraft* mc) { InitializeCriticalSection(&m_csDeleteStack); m_updateThread = new C4JThread(runUpdate, NULL, "Chunk update"); -#ifdef __PS3__ +#if 0 m_updateThread->SetPriority(THREAD_PRIORITY_ABOVE_NORMAL); -#endif // __PS3__ +#endif // 0 m_updateThread->SetProcessor(CPU_CORE_CHUNK_UPDATE); m_updateThread->Run(); #endif @@ -967,9 +967,9 @@ void GameRenderer::updateLightTexture(float a) { int g = (int)(_g * 255); int b = (int)(_b * 255); -#if (defined _DURANGO || defined _WIN64 || __PSVITA__ || __linux__) +#if (0 || defined _WIN64 || 0 || __linux__) lightPixels[j][i] = alpha << 24 | b << 16 | g << 8 | r; -#elif (defined _XBOX || defined __ORBIS__) +#elif (0 || 0) lightPixels[j][i] = alpha << 24 | r << 16 | g << 8 | b; #else lightPixels[j][i] = r << 24 | g << 16 | b << 8 | alpha; @@ -1204,7 +1204,7 @@ int GameRenderer::runUpdate(void* lpParam) { #endif void GameRenderer::EnableUpdateThread() { - // #ifdef __PS3__ // MGH - disable the update on PS3 for now + // #if 0 // MGH - disable the update on PS3 for now // return; // #endif #ifdef MULTITHREAD_ENABLE @@ -1218,7 +1218,7 @@ void GameRenderer::EnableUpdateThread() { } void GameRenderer::DisableUpdateThread() { - // #ifdef __PS3__ // MGH - disable the update on PS3 for now + // #if 0 // MGH - disable the update on PS3 for now // return; // #endif #ifdef MULTITHREAD_ENABLE @@ -1374,7 +1374,7 @@ void GameRenderer::renderLevel(float a, int64_t until) { cameraPos->y = cameraPosTemp->y; cameraPos->z = cameraPosTemp->z; levelRenderer->renderEntities(cameraPos, frustum, a); -#ifdef __PSVITA__ +#if 0 // AP - make sure we're using the Alpha cut out effect for particles glEnable(GL_ALPHA_TEST); #endif @@ -1740,7 +1740,7 @@ void GameRenderer::renderSnowAndRain(float a) { float br = 1; t->offset(-xo * 1, -yo * 1, -zo * 1); -#ifdef __PSVITA__ +#if 0 // AP - this will set up the 4 vertices in half the time float Alpha = ((1 - dd * dd) * 0.5f + 0.5f) * rainLevel; int tex2 = @@ -1788,7 +1788,7 @@ void GameRenderer::renderSnowAndRain(float a) { float dd = (float)sqrt(xd * xd + zd * zd) / r; float br = 1; t->offset(-xo * 1, -yo * 1, -zo * 1); -#ifdef __PSVITA__ +#if 0 // AP - this will set up the 4 vertices in half the time float Alpha = ((1 - dd * dd) * 0.3f + 0.5f) * rainLevel; int tex2 = diff --git a/Minecraft.Client/Rendering/LevelRenderer.cpp b/Minecraft.Client/Rendering/LevelRenderer.cpp index 648a9dc74..fea5954c0 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.cpp +++ b/Minecraft.Client/Rendering/LevelRenderer.cpp @@ -63,7 +63,7 @@ // #define DISABLE_SPU_CODE -#ifdef __PS3__ +#if 0 static LevelRenderer_cull_DataIn g_cullDataIn[4] __attribute__((__aligned__(16))); static LevelRenderer_FindNearestChunk_DataIn g_findNearestChunkDataIn @@ -274,12 +274,12 @@ LevelRenderer::LevelRenderer(Minecraft* mc, Textures* textures) { destroyedTileManager = new DestroyedTileManager(); dirtyChunksLockFreeStack.Initialize(); -#ifdef __PS3__ +#if 0 m_jobPort_CullSPU = new C4JSpursJobQueue::Port("C4JSpursJob_LevelRenderer_cull"); m_jobPort_FindNearestChunk = new C4JSpursJobQueue::Port( "C4JSpursJob_LevelRenderer_FindNearestChunk"); -#endif // __PS3__ +#endif // 0 } void LevelRenderer::renderStars() { @@ -439,7 +439,7 @@ void LevelRenderer::allChanged(int playerIndex) { int dist = (int)sqrtf((float)PLAYER_RENDER_AREA / (float)activePlayers()); // AP - poor little Vita just can't cope with such a big area -#ifdef __PSVITA__ +#if 0 dist = 10; #endif @@ -775,7 +775,7 @@ int LevelRenderer::render(std::shared_ptr player, int layer, return count; } -#ifdef __PSVITA__ +#if 0 #include // this is need to sort the chunks by depth @@ -806,13 +806,13 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) { glPushMatrix(); glTranslatef((float)-xOff, (float)-yOff, (float)-zOff); -#ifdef __PSVITA__ +#if 0 // AP - also set the camera position so we can work out if a chunk is fogged // or not RenderManager.SetCameraPosition((float)-xOff, (float)-yOff, (float)-zOff); #endif -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE // pre- calc'd on the SPU int count = 0; waitForCull_SPU(); @@ -827,9 +827,9 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) { g_cullDataIn[playerIndex].listArray_layer1, count); } -#else // __PS3__ +#else // 0 -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. First render all the non-alpha // cut outs glDisable(GL_ALPHA_TEST); @@ -859,7 +859,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) { count++; } -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Now we render all the alpha cut // outs glEnable(GL_ALPHA_TEST); @@ -892,7 +892,7 @@ int LevelRenderer::renderChunks(int from, int to, int layer, double alpha) { RenderManager.StateSetForceLOD(-1); // AP - back to normal mipmapping #endif -#endif // __PS3__ +#endif // 0 glPopMatrix(); mc->gameRenderer->turnOffLightLayer( @@ -1052,7 +1052,7 @@ void LevelRenderer::renderSky(float alpha) { glDepthMask(false); -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. glDisable(GL_ALPHA_TEST); #endif @@ -1171,7 +1171,7 @@ void LevelRenderer::renderSky(float alpha) { glEnable(GL_ALPHA_TEST); glEnable(GL_FOG); -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. glDisable(GL_ALPHA_TEST); #endif @@ -1245,7 +1245,7 @@ void LevelRenderer::renderSky(float alpha) { } void LevelRenderer::renderHaloRing(float alpha) { -#if !defined(__PS3__) && !defined(__ORBIS__) && !defined(__PSVITA__) +#if !0 && !0 && !0 if (!mc->level->dimension->isNaturalDimension()) return; glDisable(GL_ALPHA_TEST); @@ -1978,7 +1978,7 @@ bool LevelRenderer::updateDirtyChunks() { if (dirtyChunkPresent) { lastDirtyChunkFound = System::currentTimeMillis(); PIXBeginNamedEvent(0, "Finding nearest chunk\n"); -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE // find the nearest chunk with a spu task, copy all the data over here // for uploading to SPU g_findNearestChunkDataIn.numGlobalChunks = getGlobalChunkCount(); @@ -2030,7 +2030,7 @@ bool LevelRenderer::updateDirtyChunks() { m_jobPort_FindNearestChunk->waitForCompletion(); nearChunk = (ClipChunk*)g_findNearestChunkDataIn.nearChunk; veryNearCount = g_findNearestChunkDataIn.veryNearCount; -#else // __PS3__ +#else // 0 #ifdef _LARGE_WORLDS int maxNearestChunks = MAX_CONCURRENT_CHUNK_REBUILDS; @@ -2180,7 +2180,7 @@ bool LevelRenderer::updateDirtyChunks() { } // app.DebugPrintf("[%d,%d,%d]\n",nearestClipChunks.empty(),considered,wouldBeNearButEmpty); } -#endif // __PS3__ +#endif // 0 PIXEndNamedEvent(); } @@ -2316,9 +2316,9 @@ bool LevelRenderer::updateDirtyChunks() { dirtyChunkPresent = false; } LeaveCriticalSection(&m_csDirtyChunks); -#ifdef __PS3__ +#if 0 Sleep(5); -#endif // __PS3__ +#endif // 0 return false; } @@ -2398,7 +2398,7 @@ void LevelRenderer::renderDestroyAnimation(Tesselator* t, glEnable(GL_ALPHA_TEST); t->begin(); -#ifdef __PSVITA__ +#if 0 // AP : fix for bug 4952. No amount of polygon offset will push this // close enough to be seen above the second tile layer when looking // straight down so just add on a little bit of y to fix this. hacky @@ -2603,7 +2603,7 @@ void LevelRenderer::setDirty(int x0, int y0, int z0, int x1, int y1, int z1, (int*)(intptr_t)(uintptr_t)(index + 2)); #endif -#ifdef _XBOX +#if 0 PIXSetMarker(0, "Setting chunk %d %d %d dirty", x * 16, y * 16, z * 16); #else @@ -2675,7 +2675,7 @@ bool inline clip(float* bb, float* frustum) { return true; } -#ifdef __PS3__ +#if 0 int g_listArray_layer0[4][LevelRenderer_cull_DataIn::sc_listSize] __attribute__((__aligned__(16))); // 8000 int g_listArray_layer1[4][LevelRenderer_cull_DataIn::sc_listSize] @@ -2754,15 +2754,15 @@ void LevelRenderer::waitForCull_SPU() { int playerIndex = mc->player->GetXboxPad(); // 4J added m_bSPUCullStarted[playerIndex] = false; } -#endif // __PS3__ +#endif // 0 void LevelRenderer::cull(Culler* culler, float a) { int playerIndex = mc->player->GetXboxPad(); // 4J added -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE cull_SPU(playerIndex, culler, a); return; -#endif // __PS3__ +#endif // 0 FrustumCuller* fc = (FrustumCuller*)culler; FrustumData* fd = fc->frustum; @@ -4017,7 +4017,7 @@ void LevelRenderer::staticCtor() { rebuildThreads[i]->SetProcessor(CPU_CORE_CHUNK_REBUILD_A); else if ((i % 3) == 1) { rebuildThreads[i]->SetProcessor(CPU_CORE_CHUNK_REBUILD_B); -#ifdef __ORBIS__ +#if 0 rebuildThreads[i]->SetPriority( THREAD_PRIORITY_BELOW_NORMAL); // On Orbis, this core is also // used for Matching 2, and that diff --git a/Minecraft.Client/Rendering/LevelRenderer.h b/Minecraft.Client/Rendering/LevelRenderer.h index c04ae2ea4..4740cd039 100644 --- a/Minecraft.Client/Rendering/LevelRenderer.h +++ b/Minecraft.Client/Rendering/LevelRenderer.h @@ -29,7 +29,7 @@ class Tesselator; // I've added another chunk flag to mark a chunk critical so it swipes a bit // from the reference count value (goes to 3 bits to 2). This works on Vita // because it doesn't have split screen reference counting. -#ifdef __PSVITA__ +#if 0 #define _CRITICAL_CHUNKS #endif @@ -51,16 +51,16 @@ public: static const int CHUNK_SIZE = 16; #endif static const int CHUNK_Y_COUNT = Level::maxBuildHeight / CHUNK_SIZE; -#if (defined _XBOX_ONE || defined _WINDOWS64) +#if (0 || defined _WINDOWS64) static const int MAX_COMMANDBUFFER_ALLOCATIONS = 512 * 1024 * 1024; // 4J - added -#elif defined __ORBIS__ +#elif 0 static const int MAX_COMMANDBUFFER_ALLOCATIONS = 448 * 1024 * 1024; // 4J - added - hard limit is 512 so giving a lot of headroom // here for fragmentation (have seen 16MB lost to fragmentation // in multiplayer crash dump before) -#elif defined __PS3__ +#elif 0 static const int MAX_COMMANDBUFFER_ALLOCATIONS = 110 * 1024 * 1024; // 4J - added #else @@ -123,13 +123,13 @@ public: void setTilesDirty(int x0, int y0, int z0, int x1, int y1, int z1, Level* level); // 4J - added level param -#ifdef __PS3__ +#if 0 void cull_SPU(int playerIndex, Culler* culler, float a); void waitForCull_SPU(); C4JSpursJobQueue::Port* m_jobPort_CullSPU; C4JSpursJobQueue::Port* m_jobPort_FindNearestChunk; bool m_bSPUCullStarted[4]; -#endif // __PS3__ +#endif // 0 void cull(Culler* culler, float a); void playStreamingMusic(const std::wstring& name, int x, int y, int z); void playSound(int iSound, double x, double y, double z, float volume, diff --git a/Minecraft.Client/Rendering/Minimap.cpp b/Minecraft.Client/Rendering/Minimap.cpp index bf8c61b2a..3d1ff5657 100644 --- a/Minecraft.Client/Rendering/Minimap.cpp +++ b/Minecraft.Client/Rendering/Minimap.cpp @@ -8,7 +8,7 @@ #include "../../Minecraft.World/Headers/net.minecraft.world.level.saveddata.h" #include "../../Minecraft.World/Headers/net.minecraft.world.level.material.h" -#ifdef __ORBIS__ +#if 0 short Minimap::LUT[256]; // 4J added #else int Minimap::LUT[256]; // 4J added @@ -17,13 +17,13 @@ bool Minimap::genLUT = true; // 4J added Minimap::Minimap(Font* font, Options* options, Textures* textures, bool optimised) { -#ifdef __PS3__ +#if 0 // we're using the RSX now to upload textures to vram, so we need the main // ram textures allocated from io space this->pixels = intArray((int*)RenderManager.allocIOMem(w * h * sizeof(int)), 16 * 16); -#elif defined __ORBIS__ +#elif 0 this->pixels = shortArray(w * h); #else this->pixels = intArray(w * h); @@ -31,7 +31,7 @@ Minimap::Minimap(Font* font, Options* options, Textures* textures, this->options = options; this->font = font; BufferedImage* img = new BufferedImage(w, h, BufferedImage::TYPE_INT_ARGB); -#ifdef __ORBIS__ +#if 0 mapTexture = textures->getTexture(img, C4JRender::TEXTURE_FORMAT_RxGyBzAw5551, false); // 4J - make sure we aren't mipmapping as @@ -65,7 +65,7 @@ void Minimap::reloadColours() { { if (i / 4 == 0) { // 4J - changed byte order to save having to reorder later -#ifdef __ORBIS__ +#if 0 LUT[i] = 0; #else LUT[i] = (((i + i / w) & 1) * 8 + 16); @@ -85,11 +85,11 @@ void Minimap::reloadColours() { int b = ((color) & 0xff) * br / 255; // 4J - changed byte order to save having to reorder later -#if (defined _DURANGO || defined _WIN64 || __PSVITA__ || __linux__) +#if (0 || defined _WIN64 || 0 || __linux__) LUT[i] = 255 << 24 | b << 16 | g << 8 | r; -#elif defined _XBOX +#elif 0 LUT[i] = 255 << 24 | r << 16 | g << 8 | b; -#elif defined __ORBIS__ +#elif 0 r >>= 3; g >>= 3; b >>= 3; @@ -139,7 +139,7 @@ void Minimap::render(std::shared_ptr player, Textures* textures, // 4J - moved to -0.02 to stop z fighting ( was -0.01) // AP - Vita still has issues so push it a bit more float Offset = -0.02f; -#ifdef __PSVITA__ +#if 0 Offset = -0.03f; #endif t->vertexUV((float)(x + 0 + vo), (float)(y + h - vo), (float)(Offset), diff --git a/Minecraft.Client/Rendering/Minimap.h b/Minecraft.Client/Rendering/Minimap.h index 5ff83c5aa..27893363f 100644 --- a/Minecraft.Client/Rendering/Minimap.h +++ b/Minecraft.Client/Rendering/Minimap.h @@ -10,7 +10,7 @@ class Minimap { private: static const int w = MapItem::IMAGE_WIDTH; static const int h = MapItem::IMAGE_HEIGHT; -#ifdef __ORBIS__ +#if 0 static short LUT[256]; // 4J added #else static int LUT[256]; // 4J added @@ -18,7 +18,7 @@ private: static bool genLUT; // 4J added int renderCount; // 4J added bool m_optimised; // 4J Added -#ifdef __ORBIS__ +#if 0 shortArray pixels; #else intArray pixels; diff --git a/Minecraft.Client/Rendering/Particles/FireworksParticles.cpp b/Minecraft.Client/Rendering/Particles/FireworksParticles.cpp index bf7f029fb..c1426980c 100644 --- a/Minecraft.Client/Rendering/Particles/FireworksParticles.cpp +++ b/Minecraft.Client/Rendering/Particles/FireworksParticles.cpp @@ -309,7 +309,7 @@ FireworksParticles::FireworksSparkParticle::FireworksSparkParticle( size *= 0.75f; lifetime = 48 + random->nextInt(12); -#ifdef __PSVITA__ +#if 0 noPhysics = true; // 4J - optimisation, these are just too slow on Vita to // be running with physics on #else diff --git a/Minecraft.Client/Rendering/Particles/Particle.cpp b/Minecraft.Client/Rendering/Particles/Particle.cpp index bbcadfb69..19e7def16 100644 --- a/Minecraft.Client/Rendering/Particles/Particle.cpp +++ b/Minecraft.Client/Rendering/Particles/Particle.cpp @@ -148,7 +148,7 @@ void Particle::render(Tesselator* t, float a, float xa, float ya, float za, br = getBrightness(a); } -#ifdef __PSVITA__ +#if 0 // AP - this will set up the 4 vertices in half the time. t->tileParticleQuad((float)(x - xa * r - xa2 * r), (float)(y - ya * r), (float)(z - za * r - za2 * r), (float)(u1), (float)(v1), diff --git a/Minecraft.Client/Rendering/Tesselator.cpp b/Minecraft.Client/Rendering/Tesselator.cpp index 8642b3d04..a8e153562 100644 --- a/Minecraft.Client/Rendering/Tesselator.cpp +++ b/Minecraft.Client/Rendering/Tesselator.cpp @@ -73,7 +73,7 @@ Tesselator::Tesselator(int size) { ARBVertexBufferObject::glGenBuffersARB(vboIds); } -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Use this to defer primitives // that use icons with alpha alphaCutOutEnabled = false; @@ -93,7 +93,7 @@ void Tesselator::end() { // if (!tesselating) throw new IllegalStateException("Not tesselating!"); // // 4J - removed tesselating = false; -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Check both counts for valid // vertices if (vertices > 0 || vertices2 > 0) @@ -115,7 +115,7 @@ void Tesselator::end() { *pColData = 0x00000000; pColData += 8; } -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Check both counts for // valid vertices pColData = (unsigned int*)_array2->data; @@ -128,7 +128,7 @@ void Tesselator::end() { } if (mode == GL_QUADS && TRIANGLE_MODE) { // glDrawArrays(GL_TRIANGLES, 0, vertices); // 4J - changed for xbox -#ifdef _XBOX +#if 0 RenderManager.DrawVertices( D3DPT_TRIANGLELIST, vertices, _array->data, useCompactFormat360 @@ -152,7 +152,7 @@ void Tesselator::end() { // For compact vertices, the vertexCount has to be calculated from the amount of // data written, as we insert extra fake vertices to encode supplementary data // for more awkward quads that have non axis aligned UVs (eg flowing lava/water) -#ifdef _XBOX +#if 0 int vertexCount = vertices; if (useCompactFormat360) { vertexCount = p / 2; @@ -176,7 +176,7 @@ void Tesselator::end() { #else int vertexCount = vertices; if (useCompactFormat360) { -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Render non-cut out // stuff first then send the cut out stuff if (vertexCount) { @@ -230,7 +230,7 @@ void Tesselator::clear() { p = 0; count = 0; -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Clear the cut out variables vertices2 = 0; p2 = 0; @@ -258,7 +258,7 @@ bool Tesselator::setMipmapEnable(bool enable) { return prev; } -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Use this to defer primitives that // use icons with alpha void Tesselator::setAlphaCutOut(bool enable) { alphaCutOutEnabled = enable; } @@ -495,7 +495,7 @@ void Tesselator::packCompactQuad() { } } -#ifdef __PSVITA__ +#if 0 void Tesselator::tileQuad(float x1, float y1, float z1, float u1, float v1, float r1, float g1, float b1, int tex1, float x2, float y2, float z2, float u2, float v2, float r2, @@ -778,7 +778,7 @@ void Tesselator::vertex(float x, float y, float z) { if (useCompactFormat360) { unsigned int ucol = (unsigned int)col; -#ifdef _XBOX +#if 0 // Pack as 4:4:4 RGB_ unsigned short packedcol = (((col & 0xf0000000) >> 16) | ((col & 0x00f00000) >> 12) | @@ -805,7 +805,7 @@ void Tesselator::vertex(float x, float y, float z) { ipackedcol -= 32768; // -32768 to 32767 range ipackedcol &= 0xffff; -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. This will choose the correct // data buffer depending on cut out enabled std::int16_t* pShortData; @@ -819,7 +819,7 @@ void Tesselator::vertex(float x, float y, float z) { #endif -#ifdef __PS3__ +#if 0 float tex2U = ((std::int16_t*)&_tex2)[1] + 8; float tex2V = ((std::int16_t*)&_tex2)[0] + 8; float colVal1 = ((col & 0xff000000) >> 24) / 256.0f; @@ -858,7 +858,7 @@ void Tesselator::vertex(float x, float y, float z) { packLinuxLightmapCoords(_tex2, u2, v2); logLinuxPackedLightmapCoords("compact", _tex2, u2, v2); #endif -#if defined _XBOX_ONE || defined __ORBIS__ +#if 0 || 0 // Optimisation - pack the second UVs into a single short (they could // actually go in a byte), which frees up a short to store the x offset // for this chunk in the vertex itself. This means that when rendering @@ -871,7 +871,7 @@ void Tesselator::vertex(float x, float y, float z) { pShortData[7] = v2; #endif -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. This will choose the correct // data buffer depending on cut out enabled if (!alphaCutOutEnabled) { @@ -887,7 +887,7 @@ void Tesselator::vertex(float x, float y, float z) { #endif -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Increase the correct // vertices depending on cut out enabled if (!alphaCutOutEnabled) { @@ -900,7 +900,7 @@ void Tesselator::vertex(float x, float y, float z) { vertices++; #endif -#ifdef _XBOX +#if 0 if (vertices % 4 == 0 && ((p >= size - 8 * 2) || ((p / 2) >= @@ -908,7 +908,7 @@ void Tesselator::vertex(float x, float y, float z) { // the end of a quad to catch it #else -#ifdef __PSVITA__ +#if 0 // Max 65535 verts in D3D, so 65532 is the last point at the end of a // quad to catch it if ((!alphaCutOutEnabled && vertices % 4 == 0 && @@ -962,12 +962,12 @@ void Tesselator::vertex(float x, float y, float z) { _array->data[p + 6] = _normal; } if (hasTexture2) { -#ifdef _XBOX +#if 0 _array->data[p + 7] = ((_tex2 >> 16) & 0xffff) | (_tex2 << 16); #else // 4jcraft: we will be lighting the blocks right in here -#if defined(__PS3__) || defined(__linux__) -#ifdef __PS3__ +#if 0 || defined(__linux__) +#if 0 std::int16_t tex2U = ((std::int16_t*)&_tex2)[1] + 8; std::int16_t tex2V = ((std::int16_t*)&_tex2)[0] + 8; #else @@ -1020,7 +1020,7 @@ void Tesselator::color(int c, int alpha) { void Tesselator::noColor() { _noColor = true; } -#ifdef __PS3__ +#if 0 std::uint32_t _ConvertF32toX11Y11Z10N(float x, float y, float z) { // 11111111111 X 0x000007FF // 1111111111100000000000 Y 0x003FF800 @@ -1078,14 +1078,14 @@ std::uint32_t _ConvertF32toX11Y11Z10N(float x, float y, float z) { const std::uint32_t xyz = uX | uY | uZ; return xyz; } -#endif // __PS3__ +#endif // 0 void Tesselator::normal(float x, float y, float z) { hasNormal = true; -#ifdef __PS3__ +#if 0 _normal = _ConvertF32toX11Y11Z10N(x, y, z); -#elif __PSVITA__ +#elif 0 // AP - casting a negative value to 'byte' on Vita results in zero. changed // to a signed 8 value std::int8_t xx = (std::int8_t)(x * 127); @@ -1119,7 +1119,7 @@ void Tesselator::addOffset(float x, float y, float z) { } bool Tesselator::hasMaxVertices() { -#ifdef __ORBIS__ +#if 0 // On PS4, the way we push data to the command buffer has a maximum size of // a single command packet of 2^16 bytes, and the effective maximum size // will be slightly less than that due to packet headers and padding. diff --git a/Minecraft.Client/Rendering/Tesselator.h b/Minecraft.Client/Rendering/Tesselator.h index 0e8d7e577..78b291db3 100644 --- a/Minecraft.Client/Rendering/Tesselator.h +++ b/Minecraft.Client/Rendering/Tesselator.h @@ -73,7 +73,7 @@ private: unsigned int m_t2[4]; void packCompactQuad(); -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Use this to defer primitives // that use icons with alpha bool alphaCutOutEnabled; @@ -147,7 +147,7 @@ public: bool setMipmapEnable(bool enable); // 4J added bool hasMaxVertices(); // 4J Added -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Use this to defer primitives // that use icons with alpha void setAlphaCutOut(bool enable); diff --git a/Minecraft.Client/Rendering/glWrapper.cpp b/Minecraft.Client/Rendering/glWrapper.cpp index c1a3628ef..19eb96d5e 100644 --- a/Minecraft.Client/Rendering/glWrapper.cpp +++ b/Minecraft.Client/Rendering/glWrapper.cpp @@ -57,7 +57,7 @@ int glGenLists(int count) { return RenderManager.CBuffCreate(count); } void glNewList(int index, int mode) { RenderManager.CBuffStart(index); } void glEndList(int vertexCount) { -#ifdef _XBOX +#if 0 RenderManager.CBuffEnd(vertexCount); #else RenderManager.CBuffEnd(); @@ -75,7 +75,7 @@ void glCallLists(IntBuffer* ib) { void glClear(int flags) { RenderManager.Clear(flags); } void glClearColor(float r, float g, float b, float a) { -#ifdef _XBOX +#if 0 int ir = (int)(r * 255.0f); if (ir < 0) ir = 0; if (ir > 255) ir = 255; @@ -208,7 +208,7 @@ void glAlphaFunc(int func, float param) { } void glDepthFunc(int func) { -#ifdef _XBOX +#if 0 RenderManager.StateSetDepthFunc(func); #else RenderManager.StateSetDepthFunc(func); @@ -220,7 +220,7 @@ void glTexParameteri(int target, int param, int value) { } void glPolygonOffset(float factor, float units) { -#ifdef __PS3__ +#if 0 RenderManager.StateSetDepthSlopeAndBias(factor, units); #else // DirectX specifies these offsets in z buffer 0 to 1 sort of range, whereas diff --git a/Minecraft.Client/Textures/BufferedImage.cpp b/Minecraft.Client/Textures/BufferedImage.cpp index 5509ea360..d6eafaac9 100644 --- a/Minecraft.Client/Textures/BufferedImage.cpp +++ b/Minecraft.Client/Textures/BufferedImage.cpp @@ -4,7 +4,7 @@ #include "../../Minecraft.World/Util/ArrayWithLength.h" #include "BufferedImage.h" -#ifdef _XBOX +#if 0 typedef struct { unsigned int filesz; unsigned short creator1; @@ -54,7 +54,7 @@ BufferedImage::BufferedImage(const std::wstring& File, wDrive = drive; if (wDrive.empty()) { -#ifdef _XBOX +#if 0 if (bTitleUpdateTexture) { // Make the content package point to to the UPDATE: drive is needed #ifdef _TU_BUILD @@ -68,7 +68,7 @@ BufferedImage::BufferedImage(const std::wstring& File, } #else -#ifdef __PS3__ +#if 0 char* pchUsrDir; if (app.GetBootedFromDiscPatch()) { @@ -86,7 +86,7 @@ BufferedImage::BufferedImage(const std::wstring& File, } else { wDrive = wstr + L"/Common/"; } -#elif __PSVITA__ +#elif 0 /*char *pchUsrDir=getUsrDirPath(); diff --git a/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp b/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp index e778edc18..abd49c931 100644 --- a/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/AbstractTexturePack.cpp @@ -36,7 +36,7 @@ std::wstring AbstractTexturePack::trim(std::wstring line) { } void AbstractTexturePack::loadIcon() { -#ifdef _XBOX +#if 0 // 4J Stu - Temporary only constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string @@ -53,7 +53,7 @@ void AbstractTexturePack::loadIcon() { } void AbstractTexturePack::loadComparison() { -#ifdef _XBOX +#if 0 // 4J Stu - Temporary only constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string @@ -214,7 +214,7 @@ BufferedImage* AbstractTexturePack::getImageResource( } void AbstractTexturePack::loadDefaultUI() { -#ifdef _XBOX +#if 0 // load from the .xzp file const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); @@ -243,7 +243,7 @@ void AbstractTexturePack::loadColourTable() { void AbstractTexturePack::loadDefaultColourTable() { // Load the file -#ifdef __PS3__ +#if 0 // need to check if it's a BD build, so pass in the name File coloursFile( AbstractTexturePack::getPath( @@ -273,7 +273,7 @@ void AbstractTexturePack::loadDefaultColourTable() { } void AbstractTexturePack::loadDefaultHTMLColourTable() { -#ifdef _XBOX +#if 0 // load from the .xzp file const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL); @@ -313,7 +313,7 @@ void AbstractTexturePack::loadDefaultHTMLColourTable() { #endif } -#ifdef _XBOX +#if 0 void AbstractTexturePack::loadHTMLColourTableFromXuiScene(HXUIOBJ hObj) { HXUIOBJ child; HRESULT hr = XuiElementGetFirstChild(hObj, &child); @@ -345,7 +345,7 @@ void AbstractTexturePack::loadHTMLColourTableFromXuiScene(HXUIOBJ hObj) { void AbstractTexturePack::loadUI() { loadColourTable(); -#ifdef _XBOX +#if 0 CXuiSceneBase::GetInstance()->SkinChanged( CXuiSceneBase::GetInstance()->m_hObj); #endif diff --git a/Minecraft.Client/Textures/Packs/AbstractTexturePack.h b/Minecraft.Client/Textures/Packs/AbstractTexturePack.h index b633ff31b..072a1123a 100644 --- a/Minecraft.Client/Textures/Packs/AbstractTexturePack.h +++ b/Minecraft.Client/Textures/Packs/AbstractTexturePack.h @@ -78,7 +78,7 @@ protected: void loadDefaultUI(); void loadDefaultColourTable(); void loadDefaultHTMLColourTable(); -#ifdef _XBOX +#if 0 void loadHTMLColourTableFromXuiScene(HXUIOBJ hObj); #endif diff --git a/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp b/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp index 902bd8e08..8750a5f57 100644 --- a/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/DLCTexturePack.cpp @@ -15,7 +15,7 @@ #include #include -#if defined _XBOX || defined _WINDOWS64 +#if 0 || defined _WINDOWS64 #include "../../Platform/Common/XML/ATGXmlParser.h" #include "../../Platform/Common/XML/xmlFilesCallback.h" #endif @@ -65,7 +65,7 @@ DLCTexturePack::DLCTexturePack(std::uint32_t id, DLCPack* pack, m_stringTable = NULL; -#ifdef _XBOX +#if 0 m_pStreamedWaveBank = NULL; m_pSoundBank = NULL; #endif @@ -211,7 +211,7 @@ void DLCTexturePack::loadColourTable() { } // Load the text colours -#ifdef _XBOX +#if 0 if (m_dlcDataPack != NULL && m_dlcDataPack->doesPackContainFile(DLCManager::e_DLCType_UIData, L"TexturePack.xzp")) { @@ -267,7 +267,7 @@ void DLCTexturePack::loadData() { int mountIndex = m_dlcInfoPack->GetDLCMountIndex(); if (mountIndex > -1) { -#ifdef _DURANGO +#if 0 if (StorageManager.MountInstalledDLC(ProfileManager.GetPrimaryPad(), mountIndex, &DLCTexturePack::packMounted, this, @@ -334,7 +334,7 @@ int DLCTexturePack::packMounted(void* pParam, int iPad, std::uint32_t dwErr, // Load the UI data if (texturePack->m_dlcDataPack != NULL) { -#ifdef _XBOX +#if 0 File xzpPath( getFilePath(texturePack->m_dlcInfoPack->GetPackID(), std::wstring(L"TexturePack.xzp"))); @@ -419,7 +419,7 @@ int DLCTexturePack::packMounted(void* pParam, int iPad, std::uint32_t dwErr, } // any audio data? -#ifdef _XBOX +#if 0 File audioXSBPath( getFilePath(texturePack->m_dlcInfoPack->GetPackID(), std::wstring(L"MashUp.xsb"))); @@ -473,7 +473,7 @@ int DLCTexturePack::packMounted(void* pParam, int iPad, std::uint32_t dwErr, // 4J-PB - we need to leave the texture pack mounted if it contained // streaming audio if (texturePack->hasAudio() == false) { -#ifdef _XBOX +#if 0 StorageManager.UnmountInstalledDLC("TPACK"); #endif } @@ -488,7 +488,7 @@ int DLCTexturePack::packMounted(void* pParam, int iPad, std::uint32_t dwErr, } void DLCTexturePack::loadUI() { -#ifdef _XBOX +#if 0 // Syntax: "memory://" + Address + "," + Size + "#" + File // L"memory://0123ABCD,21A3#skin_default.xur" @@ -529,9 +529,9 @@ void DLCTexturePack::loadUI() { } AbstractTexturePack::loadUI(); -#ifndef _XBOX +#if 1 if (hasAudio() == false && !ui.IsReloadingSkin()) { -#ifdef _DURANGO +#if 0 StorageManager.UnmountInstalledDLC(L"TPACK"); #else StorageManager.UnmountInstalledDLC("TPACK"); @@ -543,7 +543,7 @@ void DLCTexturePack::loadUI() { void DLCTexturePack::unloadUI() { // Unload skin if (bUILoaded) { -#ifdef _XBOX +#if 0 XuiFreeVisuals(L"TexturePack"); XuiFreeVisuals(L""); CXuiSceneBase::GetInstance()->SetVisualPrefix(L""); diff --git a/Minecraft.Client/Textures/Packs/DLCTexturePack.h b/Minecraft.Client/Textures/Packs/DLCTexturePack.h index 536907784..bcdd0b9d3 100644 --- a/Minecraft.Client/Textures/Packs/DLCTexturePack.h +++ b/Minecraft.Client/Textures/Packs/DLCTexturePack.h @@ -35,7 +35,7 @@ public: } // Added for sound banks with MashUp packs -#ifdef _XBOX +#if 0 IXACT3WaveBank* m_pStreamedWaveBank; IXACT3SoundBank* m_pSoundBank; #endif diff --git a/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp b/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp index e1a92faef..7c67804ee 100644 --- a/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/DefaultTexturePack.cpp @@ -13,7 +13,7 @@ DefaultTexturePack::DefaultTexturePack() } void DefaultTexturePack::loadIcon() { -#ifdef _XBOX +#if 0 // 4J Stu - Temporary only constexpr int LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string @@ -52,14 +52,14 @@ InputStream* DefaultTexturePack::getResourceImplementation( { std::wstring wDrive = L""; // Make the content package point to to the UPDATE: drive is needed -#ifdef _XBOX +#if 0 #ifdef _TU_BUILD wDrive = L"UPDATE:\\res"; #else wDrive = L"GAME:\\res\\TitleUpdate\\res"; #endif -#elif __PS3__ +#elif 0 char* pchUsrDir; if (app.GetBootedFromDiscPatch()) { @@ -81,7 +81,7 @@ InputStream* DefaultTexturePack::getResourceImplementation( std::wstring wstr(pchUsrDir, pchUsrDir + strlen(pchUsrDir)); wDrive = wstr + L"\\Common\\res\\TitleUpdate\\res"; -#elif __PSVITA__ +#elif 0 /* char *pchUsrDir=getUsrDirPath(); @@ -112,7 +112,7 @@ void DefaultTexturePack::loadUI() { } void DefaultTexturePack::unloadUI() { -#ifdef _XBOX +#if 0 // Unload skin XuiFreeVisuals(L"TexturePack"); XuiFreeVisuals(L""); diff --git a/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp b/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp index c6f09ab26..a2c92685c 100644 --- a/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/FolderTexturePack.cpp @@ -26,7 +26,7 @@ InputStream* FolderTexturePack::getResourceImplementation( std::wstring wDrive = L""; // Make the content package point to to the UPDATE: drive is needed -#ifdef _XBOX +#if 0 wDrive = L"GAME:\\DummyTexturePack\\res"; #else wDrive = L"Common\\DummyTexturePack\\res"; @@ -61,7 +61,7 @@ bool FolderTexturePack::isTerrainUpdateCompatible() { std::wstring FolderTexturePack::getPath(bool bTitleUpdateTexture /*= false*/, const char* pchBDPatchFilename) { std::wstring wDrive; -#ifdef _XBOX +#if 0 wDrive = L"GAME:\\" + file->getPath() + L"\\"; #else wDrive = L"Common\\" + file->getPath() + L"\\"; @@ -70,7 +70,7 @@ std::wstring FolderTexturePack::getPath(bool bTitleUpdateTexture /*= false*/, } void FolderTexturePack::loadUI() { -#ifdef _XBOX +#if 0 //"file://" + Drive + PathToXZP + "#" + PathInsideXZP // L"file://game:/ui.xzp#skin_default.xur" @@ -96,7 +96,7 @@ void FolderTexturePack::loadUI() { } void FolderTexturePack::unloadUI() { -#ifdef _XBOX +#if 0 // Unload skin if (bUILoaded) { XuiFreeVisuals(L"TexturePack"); diff --git a/Minecraft.Client/Textures/Packs/TexturePack.cpp b/Minecraft.Client/Textures/Packs/TexturePack.cpp index 0e834fd22..a9b3fe690 100644 --- a/Minecraft.Client/Textures/Packs/TexturePack.cpp +++ b/Minecraft.Client/Textures/Packs/TexturePack.cpp @@ -4,7 +4,7 @@ std::wstring TexturePack::getPath(bool bTitleUpdateTexture /*= false*/, const char* pchBDPatchFileName /*= NULL*/) { std::wstring wDrive; -#ifdef _XBOX +#if 0 if (bTitleUpdateTexture) { // Make the content package point to to the UPDATE: drive is needed #ifdef _TU_BUILD @@ -18,7 +18,7 @@ std::wstring TexturePack::getPath(bool bTitleUpdateTexture /*= false*/, } #else -#ifdef __PS3__ +#if 0 // 4J-PB - we need to check for a BD patch - this is going to be an issue // for full DLC texture packs (Halloween) @@ -46,7 +46,7 @@ std::wstring TexturePack::getPath(bool bTitleUpdateTexture /*= false*/, } } -#elif __PSVITA__ +#elif 0 char* pchUsrDir = ""; // getUsrDirPath(); std::wstring wstr(pchUsrDir, pchUsrDir + strlen(pchUsrDir)); diff --git a/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp b/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp index 892e025d2..5636dfe78 100644 --- a/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp +++ b/Minecraft.Client/Textures/Packs/TexturePackRepository.cpp @@ -43,7 +43,7 @@ void TexturePackRepository::addDebugPacks() { // DEFAULT_TEXTURE_PACK); texturePacks->push_back(m_dummyTexturePack); // cacheById[m_dummyTexturePack->getId()] = m_dummyTexturePack; -#ifdef _XBOX +#if 0 File packedTestFile(L"GAME:\\DummyTexturePack\\TexturePack.pck"); if (packedTestFile.exists()) { DLCPack* pack = app.m_dlcManager.getPack(L"DLCTestPack"); @@ -73,7 +73,7 @@ void TexturePackRepository::addDebugPacks() { } } -#endif // _XBOX +#endif // 0 #endif // _CONTENT_PACKAGE } diff --git a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp index 120583c4b..f4be6d313 100644 --- a/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp +++ b/Minecraft.Client/Textures/Stitching/PreStitchedTextureMap.cpp @@ -92,7 +92,7 @@ void PreStitchedTextureMap::stitch() { std::wstring drive = L""; // 4J-PB - need to check for BD patched files -#ifdef __PS3__ +#if 0 const char* pchName = wstringtofilename(filename); if (app.GetBootedFromDiscPatch() && app.IsFileInPatchList(pchName)) { if (texturePack->hasFile(L"res/" + filename, false)) { @@ -157,7 +157,7 @@ void PreStitchedTextureMap::stitch() { stitchResult->writeAsPNG(L"debug.stitched_" + name + L".png"); stitchResult->updateOnGPU(); -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita so we mark which icons actually // require it DWORD* data = (DWORD*)this->getStitchedTexture()->getData()->getBuffer(); diff --git a/Minecraft.Client/Textures/Texture.cpp b/Minecraft.Client/Textures/Texture.cpp index 5cd1fbbdd..fc078dc56 100644 --- a/Minecraft.Client/Textures/Texture.cpp +++ b/Minecraft.Client/Textures/Texture.cpp @@ -4,7 +4,7 @@ #include "TextureManager.h" #include "Texture.h" -#ifdef __PS3__ +#if 0 #include "PS3/SPU_Tasks/Texture_blit/Texture_blit.h" #include "C4JSpursJob.h" static const int sc_maxTextureBlits = 256; @@ -13,7 +13,7 @@ static Texture_blit_DataIn g_textureBlitDataIn[sc_maxTextureBlits] static int g_currentTexBlit = 0; C4JSpursJobQueue::Port* g_texBlitJobQueuePort; // #define DISABLE_SPU_CODE -#endif //__PS3__ +#endif //0 #define MAX_MIP_LEVELS 5 @@ -27,7 +27,7 @@ Texture::Texture(const std::wstring& name, int mode, int width, int height, void Texture::_init(const std::wstring& name, int mode, int width, int height, int depth, int wrapMode, int format, int minFilter, int magFilter, bool mipMap) { -#ifdef __PS3__ +#if 0 if (g_texBlitJobQueuePort == NULL) g_texBlitJobQueuePort = new C4JSpursJobQueue::Port("C4JSpursJob_Texture_blit"); @@ -80,7 +80,7 @@ void Texture::_init(const std::wstring& name, int mode, int width, int height, if (m_iMipLevels > MAX_MIP_LEVELS) m_iMipLevels = MAX_MIP_LEVELS; } -#ifdef __PSVITA__ +#if 0 // vita doesn't have a mipmap conditional shader because it's too slow so // make sure this texture don't look awful at the lower mips if (name == L"terrain") { @@ -116,7 +116,7 @@ void Texture::_init(const std::wstring& name, int mode, int width, int height, for (int index = 0; index < tempBytes.length; index++) { tempBytes[index] = 0; } -#ifdef __PS3__ +#if 0 data[0] = new ByteBuffer_IO(tempBytes.length); #else data[0] = ByteBuffer::allocateDirect(tempBytes.length); @@ -137,11 +137,11 @@ void Texture::_init(const std::wstring& name, int mode, int width, int height, tempBytes[index] = 0; } -#ifdef __PS3__ +#if 0 data[level] = new ByteBuffer_IO(tempBytes.length); #else data[level] = ByteBuffer::allocateDirect(tempBytes.length); -#endif // __PS3__ +#endif // 0 data[level]->clear(); data[level]->put(tempBytes); data[level]->position(0)->limit(tempBytes.length); @@ -376,7 +376,7 @@ void Texture::blit(int x, int y, Texture* source, bool rotated) { data[level]->position(0); srcBuffer->position(0); -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE if (g_texBlitJobQueuePort->hasCompleted()) { // all outstanding blits have completed, so reset to the start of // the blit list @@ -404,7 +404,7 @@ void Texture::blit(int x, int y, Texture* source, bool rotated) { g_texBlitJobQueuePort->submitJob(&blitJob); // p.waitForCompletion(); -#elif __PSVITA__ +#elif 0 unsigned int* src = (unsigned int*)srcBuffer->getBuffer(); unsigned int* dst = (unsigned int*)data[level]->getBuffer(); @@ -476,7 +476,7 @@ void Texture::transferFromBuffer(intArray buffer) { //} // 4jcraft - move pos out of loops data[0]->clear(); - // #ifdef __PS3__ + // #if 0 // int byteRemapRGBA[] = { 3, 0, 1, 2 }; // int byteRemapBGRA[] = { 3, 2, 1, 0 }; // #else @@ -549,11 +549,11 @@ void Texture::transferFromImage(BufferedImage* image) { return; } -// #ifdef __PS3__ +// #if 0 // int byteRemapRGBA[] = { 0, 1, 2, 3 }; // int byteRemapBGRA[] = { 2, 1, 0, 3 }; // #else -#ifdef _XBOX +#if 0 int byteRemapRGBA[] = {0, 1, 2, 3}; #else int byteRemapRGBA[] = {3, 0, 1, 2}; @@ -593,7 +593,7 @@ void Texture::transferFromImage(BufferedImage* image) { } MemSect(51); -#ifdef __PS3__ +#if 0 data[0] = new ByteBuffer_IO(tempBytes.length); #else data[0] = ByteBuffer::allocateDirect(tempBytes.length); @@ -647,7 +647,7 @@ void Texture::transferFromImage(BufferedImage* image) { ((x * 2 + 1) + (y * 2 + 1) * ow) * 4); int c3 = data[level - 1]->getInt( ((x * 2 + 0) + (y * 2 + 1) * ow) * 4); -#ifndef _XBOX +#if 1 // 4J - convert our RGBA texels to ARGB that crispBlend // is expecting 4jcraft, added uint cast to pervent // shift of neg int @@ -684,7 +684,7 @@ void Texture::transferFromImage(BufferedImage* image) { } MemSect(51); -#ifdef __PS3__ +#if 0 data[level] = new ByteBuffer_IO(tempBytes.length); #else data[level] = ByteBuffer::allocateDirect(tempBytes.length); @@ -795,7 +795,7 @@ void Texture::updateOnGPU() { if (!m_bInitialised) { RenderManager.TextureSetTextureLevels(m_iMipLevels); // 4J added -#ifdef __PSVITA__ +#if 0 // AP - replace the dynamic ram buffer to one that points to a newly // allocated video ram texture buffer. This means we don't have to // memcpy the ram based buffer to it any more inside @@ -817,7 +817,7 @@ void Texture::updateOnGPU() { int levelWidth = width >> level; int levelHeight = height >> level; -#ifdef __PSVITA__ +#if 0 // AP - replace the dynamic ram buffer to one that points to a // newly allocated video ram texture buffer. This means we don't // have to memcpy the ram based buffer to it any more inside @@ -840,7 +840,7 @@ void Texture::updateOnGPU() { m_bInitialised = true; } else { -#ifdef _XBOX +#if 0 RenderManager.TextureDataUpdate(data[0]->getBuffer(), 0); #else RenderManager.TextureDataUpdate(0, 0, width, height, @@ -853,7 +853,7 @@ void Texture::updateOnGPU() { int levelWidth = width >> level; int levelHeight = height >> level; -#ifdef _XBOX +#if 0 RenderManager.TextureDataUpdate(data[level]->getBuffer(), level); #else diff --git a/Minecraft.Client/Textures/Texture.h b/Minecraft.Client/Textures/Texture.h index b7f3a749e..b626cbe86 100644 --- a/Minecraft.Client/Textures/Texture.h +++ b/Minecraft.Client/Textures/Texture.h @@ -4,7 +4,7 @@ class Rect2i; class ByteBuffer; class BufferedImage; -#ifdef __PS3__ +#if 0 class ByteBuffer_IO; #endif @@ -58,7 +58,7 @@ private: bool immediateUpdate; bool updated; int m_iMipLevels; -#ifdef __PS3__ +#if 0 ByteBuffer_IO* data[10]; #else ByteBuffer* data[10]; // Arrays for mipmaps - NULL if not used diff --git a/Minecraft.Client/Textures/TextureManager.cpp b/Minecraft.Client/Textures/TextureManager.cpp index dad941290..49521079c 100644 --- a/Minecraft.Client/Textures/TextureManager.cpp +++ b/Minecraft.Client/Textures/TextureManager.cpp @@ -88,7 +88,7 @@ std::vector* TextureManager::createTextures( if (texturePack->hasFile(L"res/" + filename, false)) { drive = texturePack->getPath(true); } else { -#ifdef __PS3__ +#if 0 if (app.GetBootedFromDiscPatch()) { const char* pchTextureName = wstringtofilename(filename); char* pchUsrDir = app.GetBDUsrDirPath(pchTextureName); diff --git a/Minecraft.Client/Textures/Textures.cpp b/Minecraft.Client/Textures/Textures.cpp index d80099cca..ce5e4145c 100644 --- a/Minecraft.Client/Textures/Textures.cpp +++ b/Minecraft.Client/Textures/Textures.cpp @@ -384,7 +384,7 @@ int Textures::loadTexture(int idx) { // renderer that map the single 8-bit channel to RGBA differently. void Textures::setTextureFormat(const std::wstring& resourceName) { // 4J Stu - These texture formats are not currently in the render header -#ifdef _XBOX +#if 0 if (resourceName == L"/environment/clouds.png") { TEXTURE_FORMAT = C4JRender::TEXTURE_FORMAT_R1G1B1Ax; } else if (resourceName == L"%blur%/misc/pumpkinblur.png") { @@ -701,7 +701,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) { int g = (rawPixels[i] >> 8) & 0xff; int b = (rawPixels[i]) & 0xff; -#ifdef _XBOX +#if 0 newPixels[i * 4 + 0] = (uint8_t)a; newPixels[i * 4 + 1] = (uint8_t)r; newPixels[i * 4 + 2] = (uint8_t)g; @@ -753,7 +753,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) { // rather than generating if possible if (img->getData(level)) { memcpy(tempData, img->getData(level), ww * hh * 4); -#ifndef _XBOX +#if 1 // Swap ARGB to RGBA for (int i = 0; i < ww * hh; i++) { tempData[i] = (tempData[i] >> 24) | (tempData[i] << 8); @@ -770,7 +770,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) { ((x * 2 + 1) + (y * 2 + 1) * ow) * 4); int c3 = pixels->getInt( ((x * 2 + 0) + (y * 2 + 1) * ow) * 4); -#ifndef _XBOX +#if 1 // 4J - convert our RGBA texels to ARGB that crispBlend // is expecting 4jcraft, added uint cast to pervent // shift of neg int @@ -786,7 +786,7 @@ void Textures::loadTexture(BufferedImage* img, int id, bool blur, bool clamp) { int col = Texture::crispBlend(Texture::crispBlend(c0, c1), Texture::crispBlend(c2, c3)); -#ifndef _XBOX +#if 1 // 4J - and back from ARGB -> RGBA col = ((unsigned int)col << 8) | ((col >> 24) & 0xff); #endif @@ -892,7 +892,7 @@ void Textures::replaceTexture(intArray rawPixels, int w, int h, int id) { // New // glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL12.GL_BGRA, // GL12.GL_UNSIGNED_INT_8_8_8_8_REV, pixels); -#ifdef _XBOX +#if 0 RenderManager.TextureDataUpdate(pixels->getBuffer(), 0); #else RenderManager.TextureDataUpdate(0, 0, w, h, pixels->getBuffer(), 0); @@ -932,7 +932,7 @@ void Textures::replaceTextureDirect(intArray rawPixels, int w, int h, int id) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); -#ifdef _XBOX +#if 0 RenderManager.TextureDataUpdate(rawPixels.data, 0); #else RenderManager.TextureDataUpdate(0, 0, w, h, rawPixels.data, 0); @@ -969,7 +969,7 @@ void Textures::replaceTextureDirect(shortArray rawPixels, int w, int h, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); -#ifdef _XBOX +#if 0 RenderManager.TextureDataUpdate(rawPixels.data, 0); #else RenderManager.TextureDataUpdate(0, 0, w, h, rawPixels.data, 0); @@ -1336,7 +1336,7 @@ BufferedImage* Textures::readImage( drive); // new BufferedImage(name,false,isTu,drive); } else { const char* pchName = wstringtofilename(name); -#ifdef __PS3__ +#if 0 if (app.GetBootedFromDiscPatch() && app.IsFileInPatchList(pchName)) { char* pchUsrDir = app.GetBDUsrDirPath(pchName); std::wstring wstr(pchUsrDir, pchUsrDir + strlen(pchUsrDir)); diff --git a/Minecraft.Client/UI/Font.cpp b/Minecraft.Client/UI/Font.cpp index 190c5cdad..68dd58c1d 100644 --- a/Minecraft.Client/UI/Font.cpp +++ b/Minecraft.Client/UI/Font.cpp @@ -113,7 +113,7 @@ Font::Font(Options* options, const std::wstring& name, Textures* textures, } } -#ifndef _XBOX +#if 1 // 4J Stu - This dtor clashes with one in xui! We never delete these anyway so // take it out for now. Can go back when we have got rid of XUI Font::~Font() { delete[] charWidths; } diff --git a/Minecraft.Client/UI/Font.h b/Minecraft.Client/UI/Font.h index 24de389a1..c8e53ec7f 100644 --- a/Minecraft.Client/UI/Font.h +++ b/Minecraft.Client/UI/Font.h @@ -36,7 +36,7 @@ public: bool enforceUnicode, ResourceLocation* textureLocation, int cols, int rows, int charWidth, int charHeight, unsigned short charMap[] = NULL); -#ifndef _XBOX +#if 1 // 4J Stu - This dtor clashes with one in xui! We never delete these anyway // so take it out for now. Can go back when we have got rid of XUI ~Font(); diff --git a/Minecraft.Client/UI/Gui.cpp b/Minecraft.Client/UI/Gui.cpp index 8d9d12071..5004a892a 100644 --- a/Minecraft.Client/UI/Gui.cpp +++ b/Minecraft.Client/UI/Gui.cpp @@ -739,7 +739,7 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse) { int xo = iSafezoneXHalf + 10; int yo = iSafezoneTopYHalf + 10; -#ifdef __PSVITA__ +#if 0 // align directly with corners, there are no safe zones on vita xo = 10; yo = 10; @@ -1403,7 +1403,7 @@ void Gui::addMessage(const std::wstring& _string, int iPad, } else { maximumChars = 55; } -#ifdef __PSVITA__ +#if 0 maximumChars = 90; #endif switch (XGetLanguage()) { @@ -1415,7 +1415,7 @@ void Gui::addMessage(const std::wstring& _string, int iPad, } else { maximumChars = 35; } -#ifdef __PSVITA__ +#if 0 maximumChars = 55; #endif break; diff --git a/Minecraft.Client/Utils/ArchiveFile.cpp b/Minecraft.Client/Utils/ArchiveFile.cpp index 972912f19..6064181f7 100644 --- a/Minecraft.Client/Utils/ArchiveFile.cpp +++ b/Minecraft.Client/Utils/ArchiveFile.cpp @@ -44,7 +44,7 @@ ArchiveFile::ArchiveFile(File file) { FileInputStream fis(file); -#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64 +#if 0 || 0 || defined _WINDOWS64 byteArray readArray(file.length()); fis.read(readArray, 0, file.length()); @@ -60,7 +60,7 @@ ArchiveFile::ArchiveFile(File file) { dis.close(); fis.close(); -#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64 +#if 0 || 0 || defined _WINDOWS64 bais.reset(); #endif app.DebugPrintf("Finished loading archive file\n"); @@ -101,7 +101,7 @@ byteArray ArchiveFile::getFile(const std::wstring& filename) { } else { PMetaData data = it->second; -#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64 +#if 0 || 0 || defined _WINDOWS64 out = byteArray(data->filesize); memcpy(out.data, m_cachedData + data->ptr, data->filesize); diff --git a/Minecraft.Client/Utils/StringTable.h b/Minecraft.Client/Utils/StringTable.h index 8b970bacf..6eac0020e 100644 --- a/Minecraft.Client/Utils/StringTable.h +++ b/Minecraft.Client/Utils/StringTable.h @@ -2,9 +2,9 @@ #include -#if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__ +#if 0 || 0 || 0 #define LOCALE_COUNT 21 -#elif defined _XBOX_ONE +#elif 0 #define LOCALE_COUNT 19 #else #define LOCALE_COUNT 11 @@ -33,7 +33,7 @@ public: // eLocale_TradChinese, // eLocale_Portuguese, // eLocale_Brazilian, - // #if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__ + // #if 0 || 0 || 0 // eLocale_Russian, // eLocale_Dutch, // eLocale_Finish, @@ -44,7 +44,7 @@ public: // eLocale_Turkish, // eLocale_LatinAmericanSpanish, // eLocale_Greek, - // #elif defined _XBOX_ONE || defined _XBOX + // #elif 0 || 0 // eLocale_British, // eLocale_Irish, // eLocale_Australian, diff --git a/Minecraft.World/AI/Attributes/Attribute.h b/Minecraft.World/AI/Attributes/Attribute.h index 3087fdd92..30626db6c 100644 --- a/Minecraft.World/AI/Attributes/Attribute.h +++ b/Minecraft.World/AI/Attributes/Attribute.h @@ -65,7 +65,7 @@ protected: static const int AttributeNames[]; }; -#ifdef __ORBIS__ +#if 0 typedef std::unordered_map> attrAttrModMap; #else diff --git a/Minecraft.World/AI/Attributes/BaseAttributeMap.h b/Minecraft.World/AI/Attributes/BaseAttributeMap.h index a10501aae..cf3af2b48 100644 --- a/Minecraft.World/AI/Attributes/BaseAttributeMap.h +++ b/Minecraft.World/AI/Attributes/BaseAttributeMap.h @@ -5,7 +5,7 @@ class ModifiableAttributeInstance; class BaseAttributeMap { protected: // unordered_map attributesByObject; -#ifdef __ORBIS__ +#if 0 std::unordered_map > attributesById; #else diff --git a/Minecraft.World/Blocks/FireTile.cpp b/Minecraft.World/Blocks/FireTile.cpp index 8b5d45b51..2afcaf985 100644 --- a/Minecraft.World/Blocks/FireTile.cpp +++ b/Minecraft.World/Blocks/FireTile.cpp @@ -345,7 +345,7 @@ void FireTile::registerIcons(IconRegister* iconRegister) { } Icon* FireTile::getTextureLayer(int layer) { -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Set the Alpha Cut out flag Tesselator* t = Tesselator::getInstance(); t->setAlphaCutOut(true); diff --git a/Minecraft.World/Blocks/GrassTile.cpp b/Minecraft.World/Blocks/GrassTile.cpp index 01f95c9a7..ce23457b2 100644 --- a/Minecraft.World/Blocks/GrassTile.cpp +++ b/Minecraft.World/Blocks/GrassTile.cpp @@ -110,7 +110,7 @@ int GrassTile::getResource(int data, Random* random, int playerBonusLevel) { } Icon* GrassTile::getSideTextureOverlay() { -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Because of the way grass sides // are treated as special case we need to set the alpha flag here this would // normally happen in TileRenderer::getTextureOrMissing diff --git a/Minecraft.World/Blocks/MobSpawner.cpp b/Minecraft.World/Blocks/MobSpawner.cpp index 61bbf1292..84b67fb6b 100644 --- a/Minecraft.World/Blocks/MobSpawner.cpp +++ b/Minecraft.World/Blocks/MobSpawner.cpp @@ -32,7 +32,7 @@ TilePos MobSpawner::getRandomPosWithin(Level* level, int cx, int cz) { return TilePos(x, y, z); } -#ifdef __PSVITA__ +#if 0 // AP - See CustomMap.h for an explanation of this CustomMap MobSpawner::chunksToPoll; #else @@ -129,7 +129,7 @@ const int MobSpawner::tick(ServerLevel* level, bool spawnEnemies, std::shared_ptr player = level->players[i]; xx[i] = Mth::floor(player->x / 16); zz[i] = Mth::floor(player->z / 16); -#ifdef __PSVITA__ +#if 0 chunksToPoll.insert(ChunkPos(xx[i], zz[i]), false); #else chunksToPoll.insert( @@ -146,7 +146,7 @@ const int MobSpawner::tick(ServerLevel* level, bool spawnEnemies, // player, then always store with a flag of false so that if it // was at the edge of another player, then this will remove that if (!edgeChunk) { -#ifdef __PSVITA__ +#if 0 chunksToPoll.insert(ChunkPos((xx[i] - r) + l, (zz[i] - r)), false); chunksToPoll.insert(ChunkPos((xx[i] + r), (zz[i] - r) + l), @@ -166,7 +166,7 @@ const int MobSpawner::tick(ServerLevel* level, bool spawnEnemies, ChunkPos((xx[i] - r), (zz[i] + r) - l), false)); #endif } else { -#ifdef __PSVITA__ +#if 0 ChunkPos cp = ChunkPos((xx[i] - r) + l, (zz[i] - r)); if (chunksToPoll.find(cp)) chunksToPoll.insert(cp, true); cp = ChunkPos((xx[i] + r), (zz[i] - r) + l); @@ -230,7 +230,7 @@ const int MobSpawner::tick(ServerLevel* level, bool spawnEnemies, continue; } -#ifdef __PSVITA__ +#if 0 for (int i = 0; i < chunksToPoll.end(); i += 1) { SCustomMapNode* it = chunksToPoll.get(i); #else @@ -435,7 +435,7 @@ bool MobSpawner::isSpawnPositionOk(MobCategory* category, Level* level, int x, // can happen on another thread if (!level->hasChunkAt(x, y, z)) return false; -#ifdef __PSVITA__ +#if 0 // AP - added this for Vita. Make sure a new spawn point has 2 chunks around // it. This will make sure monsters don't keep getting spawned on the edge // preventing other new monsters from being spawned diff --git a/Minecraft.World/Blocks/MobSpawner.h b/Minecraft.World/Blocks/MobSpawner.h index 0c6c03f88..a596fa8a0 100644 --- a/Minecraft.World/Blocks/MobSpawner.h +++ b/Minecraft.World/Blocks/MobSpawner.h @@ -13,7 +13,7 @@ protected: static TilePos getRandomPosWithin(Level* level, int cx, int cz); private: -#ifdef __PSVITA__ +#if 0 // AP - See CustomMap.h for an explanation of this static CustomMap chunksToPoll; #else diff --git a/Minecraft.World/Blocks/RedStoneDustTile.cpp b/Minecraft.World/Blocks/RedStoneDustTile.cpp index f4e3ce074..55eb72b92 100644 --- a/Minecraft.World/Blocks/RedStoneDustTile.cpp +++ b/Minecraft.World/Blocks/RedStoneDustTile.cpp @@ -419,7 +419,7 @@ void RedStoneDustTile::registerIcons(IconRegister* iconRegister) { } Icon* RedStoneDustTile::getTexture(const std::wstring& name) { -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita. Set the Alpha Cut out flag Tesselator* t = Tesselator::getInstance(); t->setAlphaCutOut(true); diff --git a/Minecraft.World/Blocks/Tile.cpp b/Minecraft.World/Blocks/Tile.cpp index 73dc4a523..71fe2db82 100644 --- a/Minecraft.World/Blocks/Tile.cpp +++ b/Minecraft.World/Blocks/Tile.cpp @@ -2590,7 +2590,7 @@ int Tile::SoundType::getPlaceSound() const { return iPlaceSound; } 4J: These are necessary on the PS3. (and 4 and Vita). */ -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || \ +#if (0 || 0 || 0 || \ defined __linux__) const int Tile::stone_Id; const int Tile::grass_Id; diff --git a/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp b/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp index 26988d536..e1e874da2 100644 --- a/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp +++ b/Minecraft.World/Blocks/TileEntities/SignTileEntity.cpp @@ -33,7 +33,7 @@ SignTileEntity::SignTileEntity() : TileEntity() { SignTileEntity::~SignTileEntity() { // TODO ORBIS_STUBBED; -#ifndef __ORBIS__ +#if 1 // 4J-PB - we don't need to verify strings anymore - // InputManager.CancelQueuedVerifyStrings(&SignTileEntity::StringVerifyCallback,(LPVOID)this); #endif @@ -125,7 +125,7 @@ void SignTileEntity::setChanged() { } } // at this point, we can ask the online string verifier if our sign -text is ok #ifdef __ORBIS__ m_bVerified=true; #else +text is ok #if 0 m_bVerified=true; #else if(!InputManager.VerifyStrings((WCHAR**)&wcMessages,MAX_SIGN_LINES,&SignTileEntity::StringVerifyCallback,(LPVOID)this)) { diff --git a/Minecraft.World/Commands/CommandDispatcher.h b/Minecraft.World/Commands/CommandDispatcher.h index 82019d213..187535e74 100644 --- a/Minecraft.World/Commands/CommandDispatcher.h +++ b/Minecraft.World/Commands/CommandDispatcher.h @@ -5,7 +5,7 @@ class CommandSender; class CommandDispatcher { private: -#ifdef __ORBIS__ +#if 0 std::unordered_map> commandsById; #else std::unordered_map commandsById; diff --git a/Minecraft.World/Containers/ContainerMenu.cpp b/Minecraft.World/Containers/ContainerMenu.cpp index 0218ecf2d..cea5f497f 100644 --- a/Minecraft.World/Containers/ContainerMenu.cpp +++ b/Minecraft.World/Containers/ContainerMenu.cpp @@ -98,7 +98,7 @@ std::shared_ptr ContainerMenu::clicked( // 4J-JEV: This check performed on XboxOne servers, for other platforms // check here. -#ifndef _DURANGO +#if 1 StatsCounter* sc = Minecraft::GetInstance()->stats[localPlayer->GetXboxPad()]; int minedCount = diff --git a/Minecraft.World/Containers/FurnaceResultSlot.cpp b/Minecraft.World/Containers/FurnaceResultSlot.cpp index 3c81acceb..ccabdac99 100644 --- a/Minecraft.World/Containers/FurnaceResultSlot.cpp +++ b/Minecraft.World/Containers/FurnaceResultSlot.cpp @@ -72,7 +72,7 @@ void FurnaceResultSlot::checkTakeAchievements( } } -#ifdef _DURANGO +#if 0 if (!player->level->isClientSide && removeCount > 0) { player->awardStat( GenericStats::itemsSmelted(carried->id), diff --git a/Minecraft.World/Entities/LivingEntity.cpp b/Minecraft.World/Entities/LivingEntity.cpp index e795f18cf..c52d94acf 100644 --- a/Minecraft.World/Entities/LivingEntity.cpp +++ b/Minecraft.World/Entities/LivingEntity.cpp @@ -1218,7 +1218,7 @@ void LivingEntity::jumpFromGround() { } void LivingEntity::travel(float xa, float ya) { -#ifdef __PSVITA__ +#if 0 // AP - dynamic_pointer_cast is a non-trivial call Player* thisPlayer = NULL; if (this->instanceof(eTYPE_PLAYER)) { diff --git a/Minecraft.World/Entities/TamableAnimal.cpp b/Minecraft.World/Entities/TamableAnimal.cpp index 371ad62ba..f0230333f 100644 --- a/Minecraft.World/Entities/TamableAnimal.cpp +++ b/Minecraft.World/Entities/TamableAnimal.cpp @@ -22,7 +22,7 @@ void TamableAnimal::defineSynchedData() { void TamableAnimal::addAdditonalSaveData(CompoundTag* tag) { Animal::addAdditonalSaveData(tag); -#ifdef _XBOX_ONE +#if 0 // 4J Stu Added from later Java version to remove owners from save transfer // saves. We will probably want this on other platforms in the future if (getOwnerUUID().empty()) { @@ -42,7 +42,7 @@ void TamableAnimal::addAdditonalSaveData(CompoundTag* tag) { void TamableAnimal::readAdditionalSaveData(CompoundTag* tag) { Animal::readAdditionalSaveData(tag); -#ifdef _XBOX_ONE +#if 0 // 4J Stu Added from later Java version to remove owners from save transfer // saves. We will probably want this on other platforms in the future std::wstring owner = L""; diff --git a/Minecraft.World/IO/Files/ConsoleSaveFile.h b/Minecraft.World/IO/Files/ConsoleSaveFile.h index 0f9481ade..556ced99f 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFile.h +++ b/Minecraft.World/IO/Files/ConsoleSaveFile.h @@ -40,13 +40,13 @@ public: virtual std::vector* getRegionFilesByDimension( unsigned int dimensionIndex) = 0; -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 virtual std::wstring getPlayerDataFilenameForLoad( const PlayerUID& pUID) = 0; virtual std::wstring getPlayerDataFilenameForSave( const PlayerUID& pUID) = 0; virtual std::vector* getValidPlayerDatFiles() = 0; -#endif //__PS3__ +#endif //0 virtual int getSaveVersion() = 0; virtual int getOriginalSaveVersion() = 0; diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileConverter.cpp b/Minecraft.World/IO/Files/ConsoleSaveFileConverter.cpp index 644c62f7d..6c2defe58 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileConverter.cpp +++ b/Minecraft.World/IO/Files/ConsoleSaveFileConverter.cpp @@ -80,7 +80,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile* sourceSave, } // MGH added - find any player data files and copy them across -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 std::vector* playerFiles = sourceSave->getValidPlayerDatFiles(); #else std::vector* playerFiles = @@ -91,7 +91,7 @@ void ConsoleSaveFileConverter::ConvertSave(ConsoleSaveFile* sourceSave, for (int fileIdx = 0; fileIdx < playerFiles->size(); fileIdx++) { ConsoleSavePath sourcePlayerDatPath( playerFiles->at(fileIdx)->data.filename); -#ifdef _XBOX_ONE +#if 0 // 4J Stu - As the XUIDs on X360 and X1 are different, we don't want // to transfer these over. However as the first player file should // be the owner of the save, we can move their data over to the diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h b/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h index 60f381289..10e7cec40 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h +++ b/Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h @@ -17,7 +17,7 @@ private: static const unsigned int CSF_PAGE_SIZE = 64 * 1024; static const unsigned int MAX_PAGE_COUNT = 32 * 1024; // 2GB virtual allocation -#elif defined(__PS3__) +#elif 0 static const unsigned int CSF_PAGE_SIZE = 1024 * 1024; static const unsigned int MAX_PAGE_COUNT = 64; #else @@ -32,8 +32,8 @@ private: void MoveDataBeyond(FileEntry* file, unsigned int nNumberOfBytesToWrite); public: -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || \ - defined _DURANGO || defined _WINDOWS64) +#if (0 || 0 || 0 || \ + 0 || defined _WINDOWS64) static int SaveSaveDataCallback(void* lpParam, bool bRes); #endif ConsoleSaveFileOriginal(const std::wstring& fileName, @@ -79,11 +79,11 @@ public: virtual std::vector* getRegionFilesByDimension( unsigned int dimensionIndex); -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 virtual std::wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID); virtual std::wstring getPlayerDataFilenameForSave(const PlayerUID& pUID); virtual std::vector* getValidPlayerDatFiles(); -#endif //__PS3__ +#endif //0 virtual int getSaveVersion(); virtual int getOriginalSaveVersion(); diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp index 00690c559..29207911a 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp +++ b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.cpp @@ -541,9 +541,9 @@ ConsoleSaveFileSplit::~ConsoleSaveFileSplit() { pagesCommitted = 0; // Make sure we don't have any thumbnail data still waiting round - we can't // need it now we've destroyed the save file anyway -#if defined _XBOX +#if 0 app.GetSaveThumbnail(NULL, NULL); -#elif defined __PS3__ +#elif 0 app.GetSaveThumbnail(NULL, NULL, NULL, NULL); #endif @@ -976,7 +976,7 @@ void ConsoleSaveFileSplit::tick() { totalDirtyBytes += it->second->fileEntry->getFileSize(); } } -#ifdef _DURANGO +#if 0 PIXReportCounter(L"Dirty regions", (float)totalDirty); PIXReportCounter(L"Dirty MB", (float)totalDirtyBytes / (1024 * 1024)); PIXReportCounter(L"Dirty oldest age", @@ -1282,14 +1282,14 @@ bool ConsoleSaveFileSplit::doesFileExist(ConsoleSavePath file) { void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) { LockSaveAccess(); -#ifdef _XBOX_ONE +#if 0 MinecraftServer* server = MinecraftServer::getInstance(); #endif // The storage manage might potentially be busy doing a sub-file write // initiated from the tick. Wait until this is totally processed. while (StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle) { -#ifdef _XBOX_ONE +#if 0 if (server && server->IsSuspending()) { // If the server is mid-suspend we need to tick the storage manager // ourselves @@ -1387,9 +1387,9 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) { std::uint8_t* pbDataSaveImage = NULL; unsigned int dwDataSizeSaveImage = 0; -#if (defined _XBOX || defined _DURANGO) +#if (0 || 0) app.GetSaveThumbnail(&pbThumbnailData, &dwThumbnailDataSize); -#elif (defined __PS3__ || defined __ORBIS__) +#elif (0 || 0) app.GetSaveThumbnail(&pbThumbnailData, &dwThumbnailDataSize, &pbDataSaveImage, &dwDataSizeSaveImage); #endif @@ -1546,7 +1546,7 @@ std::vector* ConsoleSaveFileSplit::getRegionFilesByDimension( return files; } -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 std::wstring ConsoleSaveFileSplit::getPlayerDataFilenameForLoad( const PlayerUID& pUID) { return header.getPlayerDataFilenameForLoad(pUID); diff --git a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h index b0b6c755f..8847c2f99 100644 --- a/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h +++ b/Minecraft.World/IO/Files/ConsoleSaveFileSplit.h @@ -145,11 +145,11 @@ public: virtual std::vector* getRegionFilesByDimension( unsigned int dimensionIndex); -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 virtual std::wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID); virtual std::wstring getPlayerDataFilenameForSave(const PlayerUID& pUID); virtual std::vector* getValidPlayerDatFiles(); -#endif //__PS3__ +#endif //0 virtual int getSaveVersion(); virtual int getOriginalSaveVersion(); diff --git a/Minecraft.World/IO/Files/FileHeader.cpp b/Minecraft.World/IO/Files/FileHeader.cpp index dccee366b..07c627488 100644 --- a/Minecraft.World/IO/Files/FileHeader.cpp +++ b/Minecraft.World/IO/Files/FileHeader.cpp @@ -76,7 +76,7 @@ void FileHeader::WriteHeader(void* saveMem) { // Write the offset of the header // assert(numberOfBytesWritten == 4); int* begin = (int*)saveMem; -#ifdef __PSVITA__ +#if 0 VirtualCopyTo(begin, &headerOffset, sizeof(headerOffset)); #else *begin = headerOffset; @@ -84,7 +84,7 @@ void FileHeader::WriteHeader(void* saveMem) { // Write the size of the header // assert(numberOfBytesWritten == 4); -#ifdef __PSVITA__ +#if 0 VirtualCopyTo(begin + 1, &headerSize, sizeof(headerSize)); #else *(begin + 1) = headerSize; @@ -92,7 +92,7 @@ void FileHeader::WriteHeader(void* saveMem) { short* versions = (short*)(begin + 2); // Write the original version number -#ifdef __PSVITA__ +#if 0 VirtualCopyTo(versions, &m_originalSaveVersion, sizeof(m_originalSaveVersion)); #else @@ -103,7 +103,7 @@ void FileHeader::WriteHeader(void* saveMem) { short versionNumber = SAVE_FILE_VERSION_NUMBER; // assert(numberOfBytesWritten == 4); //*(begin + 2) = versionNumber; -#ifdef __PSVITA__ +#if 0 VirtualCopyTo(versions + 1, &versionNumber, sizeof(versionNumber)); #else *(versions + 1) = versionNumber; @@ -128,7 +128,7 @@ void FileHeader::WriteHeader(void* saveMem) { // fileTable[i]->data.filename, fileTable[i]->data.startOffset, // fileTable[i]->data.length, fileTable[i]->data.startOffset + // fileTable[i]->data.length); -#ifdef __PSVITA__ +#if 0 VirtualCopyTo((void*)headerPosition, &fileTable[i]->data, sizeof(FileEntrySaveData)); #else @@ -168,7 +168,7 @@ void FileHeader::ReadHeader( // Read the offset of the header // assert(numberOfBytesRead == 4); int* begin = (int*)saveMem; -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&headerOffset, begin, sizeof(headerOffset)); #else headerOffset = *begin; @@ -177,7 +177,7 @@ void FileHeader::ReadHeader( // Read the size of the header // assert(numberOfBytesRead == 4); -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&headerSize, begin + 1, sizeof(headerSize)); #else headerSize = *(begin + 1); @@ -186,7 +186,7 @@ void FileHeader::ReadHeader( short* versions = (short*)(begin + 2); // Read the original save version number -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&m_originalSaveVersion, versions, sizeof(m_originalSaveVersion)); #else @@ -196,7 +196,7 @@ void FileHeader::ReadHeader( // Read the save version number // m_saveVersion = *(begin + 2); -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&m_saveVersion, versions + 1, sizeof(m_saveVersion)); #else m_saveVersion = *(versions + 1); @@ -244,7 +244,7 @@ void FileHeader::ReadHeader( FileEntry* entry = new FileEntry(); // assert(numberOfBytesRead == sizeof(FileEntrySaveData)); -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&entry->data, fesdHeaderPosition, sizeof(FileEntrySaveData)); #else @@ -289,7 +289,7 @@ void FileHeader::ReadHeader( FileEntry* entry = new FileEntry(); // assert(numberOfBytesRead == sizeof(FileEntrySaveData)); -#ifdef __PSVITA__ +#if 0 VirtualCopyFrom(&entry->data, headerPosition, sizeof(FileEntrySaveDataV1)); #else @@ -387,7 +387,7 @@ std::vector* FileHeader::getFilesWithPrefix( return files; } -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 static bool isHexChar(wchar_t wc) { if (wc >= L'0' && wc <= L'9') return true; @@ -519,7 +519,7 @@ std::vector* FileHeader::getDatFilesWithOnlineID( wcscat(onlineIDW, L".dat"); -#ifdef __ORBIS__ +#if 0 onlineIDSize = wcslen(onlineIDW); #else static const int onlineIDStart = 24; // 24 characters into the filename @@ -532,7 +532,7 @@ std::vector* FileHeader::getDatFilesWithOnlineID( wcstombs(tempStr, filenameOnly, 128); app.DebugPrintf("file : %s\n", tempStr); -#ifdef __ORBIS__ +#if 0 int onlineIDStart = wcslen(filenameOnly) - onlineIDSize; if (onlineIDStart > 0) #else @@ -621,7 +621,7 @@ std::vector* FileHeader::getDatFilesWithPrimaryUser() { if (files) sort(files->begin(), files->end(), FileEntry::newestFirst); return files; } -#endif // __PS3__ || __ORBIS__ +#endif // 0 || 0 ByteOrder FileHeader::getEndian(ESavePlatform plat) { ByteOrder platEndian; diff --git a/Minecraft.World/IO/Files/FileHeader.h b/Minecraft.World/IO/Files/FileHeader.h index 94f14cf57..7ba61e91a 100644 --- a/Minecraft.World/IO/Files/FileHeader.h +++ b/Minecraft.World/IO/Files/FileHeader.h @@ -58,15 +58,15 @@ enum ESavePlatform { SAVE_FILE_PLATFORM_PSVITA = MAKE_FOURCC('P', 'S', 'V', '_'), SAVE_FILE_PLATFORM_WIN64 = MAKE_FOURCC('W', 'I', 'N', '_'), -#if defined _XBOX +#if 0 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_X360 -#elif defined _DURANGO +#elif 0 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_XBONE -#elif defined __PS3__ +#elif 0 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PS3 -#elif defined __ORBIS__ +#elif 0 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PS4 -#elif defined __PSVITA__ +#elif 0 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_PSVITA #elif defined _WINDOWS64 SAVE_FILE_PLATFORM_LOCAL = SAVE_FILE_PLATFORM_WIN64 @@ -161,7 +161,7 @@ private: std::vector fileTable; ESavePlatform m_savePlatform; ByteOrder m_saveEndian; -#if defined(__PS3__) || defined(_XBOX) +#if 0 || 0 static const ByteOrder m_localEndian = BIGENDIAN; #else static const ByteOrder m_localEndian = LITTLEENDIAN; @@ -197,7 +197,7 @@ protected: std::vector* getValidPlayerDatFiles(); -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 std::wstring getPlayerDataFilenameForLoad(const PlayerUID& pUID); std::wstring getPlayerDataFilenameForSave(const PlayerUID& pUID); std::vector* getDatFilesWithOnlineID(const PlayerUID& pUID); diff --git a/Minecraft.World/IO/Streams/ByteBuffer.cpp b/Minecraft.World/IO/Streams/ByteBuffer.cpp index a9c842735..67cd23495 100644 --- a/Minecraft.World/IO/Streams/ByteBuffer.cpp +++ b/Minecraft.World/IO/Streams/ByteBuffer.cpp @@ -429,7 +429,7 @@ FloatBuffer* ByteBuffer::asFloatBuffer() { (float*)(buffer + m_position)); } -#ifdef __PS3__ +#if 0 // we're using the RSX now to upload textures to vram, so we need th main ram // textures allocated from io space ByteBuffer_IO::ByteBuffer_IO(unsigned int capacity) @@ -442,4 +442,4 @@ ByteBuffer_IO::~ByteBuffer_IO() { // delete buffer; RenderManager.freeIOMem(buffer); } -#endif // __PS3__ +#endif // 0 diff --git a/Minecraft.World/IO/Streams/ByteBuffer.h b/Minecraft.World/IO/Streams/ByteBuffer.h index 7b7cc6626..9d0a201d2 100644 --- a/Minecraft.World/IO/Streams/ByteBuffer.h +++ b/Minecraft.World/IO/Streams/ByteBuffer.h @@ -42,7 +42,7 @@ public: FloatBuffer* asFloatBuffer(); }; -#ifdef __PS3__ +#if 0 // we're using the RSX now to upload textures to vram, so we need th main ram // textures allocated from io space class ByteBuffer_IO : public ByteBuffer { @@ -51,4 +51,4 @@ public: ~ByteBuffer_IO(); }; -#endif // __PS3__ \ No newline at end of file +#endif // 0 \ No newline at end of file diff --git a/Minecraft.World/IO/Streams/Compression.cpp b/Minecraft.World/IO/Streams/Compression.cpp index 761477974..46f2fa3b6 100644 --- a/Minecraft.World/IO/Streams/Compression.cpp +++ b/Minecraft.World/IO/Streams/Compression.cpp @@ -1,6 +1,6 @@ #include "../../Platform/stdafx.h" #include "Compression.h" -#if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || \ +#if 0 || 0 || 0 || \ defined _WIN64 || defined __linux__ // zconf.h defines "typedef unsigned char Byte" which conflicts with the // project's "class Byte" from BasicTypeContainers.h (via stdafx.h). @@ -247,14 +247,14 @@ HRESULT Compression::Compress(void* pDestination, unsigned int* pDestSize, void* pSource, unsigned int SrcSize) { // Using zlib for x64 compression - 360 is using native 360 compression and // PS3 a stubbed non-compressing version of this -#if defined __ORBIS__ || defined _DURANGO || defined _WIN64 || \ - defined __PSVITA__ || defined __linux__ +#if 0 || 0 || defined _WIN64 || \ + 0 || defined __linux__ SIZE_T destSize = (SIZE_T)(*pDestSize); int res = ::compress((Bytef*)pDestination, (uLongf*)&destSize, (Bytef*)pSource, SrcSize); *pDestSize = (unsigned int)destSize; return ((res == Z_OK) ? S_OK : -1); -#elif defined __PS3__ +#elif 0 std::uint32_t destSize = (std::uint32_t)(*pDestSize); bool res = EdgeZLib::Compress(pDestination, &destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; @@ -281,14 +281,14 @@ HRESULT Compression::Decompress(void* pDestination, unsigned int* pDestSize, // Using zlib for x64 compression - 360 is using native 360 compression and // PS3 a stubbed non-compressing version of this -#if defined __ORBIS__ || defined _DURANGO || defined _WIN64 || \ - defined __PSVITA__ || defined __linux__ +#if 0 || 0 || defined _WIN64 || \ + 0 || defined __linux__ SIZE_T destSize = (SIZE_T)(*pDestSize); int res = ::uncompress((Bytef*)pDestination, (uLongf*)&destSize, (Bytef*)pSource, SrcSize); *pDestSize = (unsigned int)destSize; return ((res == Z_OK) ? S_OK : -1); -#elif defined __PS3__ +#elif 0 std::uint32_t destSize = (std::uint32_t)(*pDestSize); bool res = EdgeZLib::Decompress(pDestination, &destSize, pSource, SrcSize); *pDestSize = (unsigned int)destSize; @@ -304,7 +304,7 @@ HRESULT Compression::Decompress(void* pDestination, unsigned int* pDestSize, // MGH - same as VirtualDecompress in PSVitaStubs, but for use on other // platforms (so no virtual mem stuff) -#ifndef _XBOX +#if 1 void Compression::VitaVirtualDecompress( void* pDestination, unsigned int* pDestSize, void* pSource, unsigned int SrcSize) // (LPVOID buf, SIZE_T dwSize, LPVOID dst) @@ -347,7 +347,7 @@ HRESULT Compression::DecompressWithType(void* pDestination, *pDestSize = SrcSize; return S_OK; case eCompressionType_LZXRLE: { -#if (defined _XBOX || defined _DURANGO || defined _WIN64) +#if (0 || 0 || defined _WIN64) SIZE_T destSize = (SIZE_T)(*pDestSize); HRESULT res = XMemDecompress(decompressionContext, pDestination, (SIZE_T*)&destSize, pSource, SrcSize); @@ -358,7 +358,7 @@ HRESULT Compression::DecompressWithType(void* pDestination, #endif } break; case eCompressionType_ZLIBRLE: -#if (defined __ORBIS__ || defined __PS3__ || defined _DURANGO || \ +#if (0 || 0 || 0 || \ defined _WIN64 || defined __linux__) if (pDestination != NULL) return ::uncompress( @@ -371,7 +371,7 @@ HRESULT Compression::DecompressWithType(void* pDestination, break; #endif case eCompressionType_PS3ZLIB: -#if (defined __ORBIS__ || defined __PSVITA__ || defined _DURANGO || \ +#if (0 || 0 || 0 || \ defined _WIN64) // Note that we're missing the normal zlib header and footer so // we'll use inflate to decompress the payload and skip all the CRC @@ -441,7 +441,7 @@ HRESULT Compression::DecompressWithType(void* pDestination, Compression::Compression() { // Using zlib for x64 compression - 360 is using native 360 compression and // PS3 a stubbed non-compressing version of this -#if !(defined __ORBIS__ || defined __PS3__) +#if !(0 || 0) // The default parameters for compression context allocated about 6.5MB, // reducing the partition size here from the default 512KB to 128KB brings // this down to about 3MB @@ -456,9 +456,9 @@ Compression::Compression() { &decompressionContext); #endif -#if defined _XBOX +#if 0 m_localDecompressType = eCompressionType_LZXRLE; -#elif defined __PS3__ +#elif 0 m_localDecompressType = eCompressionType_PS3ZLIB; #else m_localDecompressType = eCompressionType_ZLIBRLE; @@ -470,7 +470,7 @@ Compression::Compression() { } Compression::~Compression() { -#if !(defined __ORBIS__ || defined __PS3__ || defined __PSVITA__) +#if !(0 || 0 || 0) XMemDestroyCompressionContext(compressionContext); XMemDestroyDecompressionContext(decompressionContext); diff --git a/Minecraft.World/IO/Streams/Compression.h b/Minecraft.World/IO/Streams/Compression.h index 354cc210a..6a134af23 100644 --- a/Minecraft.World/IO/Streams/Compression.h +++ b/Minecraft.World/IO/Streams/Compression.h @@ -47,7 +47,7 @@ public: void* pSource, unsigned int SrcSize); HRESULT DecompressRLE(void* pDestination, unsigned int* pDestSize, void* pSource, unsigned int SrcSize); -#ifndef _XBOX +#if 1 static void VitaVirtualDecompress(void* pDestination, unsigned int* pDestSize, void* pSource, unsigned int SrcSize); @@ -67,7 +67,7 @@ private: HRESULT DecompressWithType(void* pDestination, unsigned int* pDestSize, void* pSource, unsigned int SrcSize); -#if defined __ORBIS__ || defined __PS3__ +#if 0 || 0 #else XMEMCOMPRESSION_CONTEXT compressionContext; XMEMDECOMPRESSION_CONTEXT decompressionContext; @@ -84,10 +84,10 @@ private: // extern Compression gCompression; -#if defined __ORBIS__ || defined _DURANGO || defined _WIN64 || \ - defined __PSVITA__ || defined __linux__ +#if 0 || 0 || defined _WIN64 || \ + 0 || defined __linux__ #define APPROPRIATE_COMPRESSION_TYPE Compression::eCompressionType_ZLIBRLE -#elif defined __PS3__ +#elif 0 #define APPROPRIATE_COMPRESSION_TYPE Compression::eCompressionType_PS3ZLIB #else #define APPROPRIATE_COMPRESSION_TYPE Compression::eCompressionType_LZXRLE diff --git a/Minecraft.World/IO/Streams/DataInputStream.cpp b/Minecraft.World/IO/Streams/DataInputStream.cpp index 4bae236db..a5c080000 100644 --- a/Minecraft.World/IO/Streams/DataInputStream.cpp +++ b/Minecraft.World/IO/Streams/DataInputStream.cpp @@ -590,10 +590,10 @@ int DataInputStream::readUTFChar() { // 4J Added PlayerUID DataInputStream::readPlayerUID() { PlayerUID returnValue; -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 for (int idPos = 0; idPos < sizeof(PlayerUID); idPos++) ((char*)&returnValue)[idPos] = readByte(); -#elif defined(_DURANGO) +#elif 0 returnValue = readUTF(); #else returnValue = readLong(); diff --git a/Minecraft.World/IO/Streams/DataOutputStream.cpp b/Minecraft.World/IO/Streams/DataOutputStream.cpp index 78b63e8c4..1a93a3479 100644 --- a/Minecraft.World/IO/Streams/DataOutputStream.cpp +++ b/Minecraft.World/IO/Streams/DataOutputStream.cpp @@ -255,10 +255,10 @@ void DataOutputStream::writeUTF(const std::wstring& str) { // 4J Added void DataOutputStream::writePlayerUID(PlayerUID player) { -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 for (int idPos = 0; idPos < sizeof(PlayerUID); idPos++) writeByte(((char*)&player)[idPos]); -#elif defined(_DURANGO) +#elif 0 writeUTF(player.toString()); #else writeLong(player); diff --git a/Minecraft.World/Items/ClockItem.cpp b/Minecraft.World/Items/ClockItem.cpp index cb73ebc5f..0cfa425a5 100644 --- a/Minecraft.World/Items/ClockItem.cpp +++ b/Minecraft.World/Items/ClockItem.cpp @@ -4,7 +4,7 @@ #include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h" #include "../Headers/net.minecraft.world.h" -#ifdef __PSVITA__ +#if 0 const std::wstring ClockItem::TEXTURE_PLAYER_ICON[XUSER_MAX_COUNT] = { L"clockP0"}; #else diff --git a/Minecraft.World/Items/CompassItem.cpp b/Minecraft.World/Items/CompassItem.cpp index d66e3197b..5c0306579 100644 --- a/Minecraft.World/Items/CompassItem.cpp +++ b/Minecraft.World/Items/CompassItem.cpp @@ -4,7 +4,7 @@ #include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h" #include "../Headers/net.minecraft.world.h" -#ifdef __PSVITA__ +#if 0 const std::wstring CompassItem::TEXTURE_PLAYER_ICON[XUSER_MAX_COUNT] = { L"compassP0"}; #else diff --git a/Minecraft.World/Items/FoodItem.cpp b/Minecraft.World/Items/FoodItem.cpp index 372424aea..45d6ea314 100644 --- a/Minecraft.World/Items/FoodItem.cpp +++ b/Minecraft.World/Items/FoodItem.cpp @@ -77,7 +77,7 @@ std::shared_ptr FoodItem::use( // 4J : WESTY : Other award ... eating cooked pork chop. // 4J-JEV: This is just for an avatar award on the xbox. -#ifdef _XBOX +#if 0 if (instance->getItem() == Item::porkChop_cooked) { player->awardStat(GenericStats::eatPorkChop(), GenericStats::param_eatPorkChop()); diff --git a/Minecraft.World/Items/Item.cpp b/Minecraft.World/Items/Item.cpp index 401aa4e1e..c1bf2666c 100644 --- a/Minecraft.World/Items/Item.cpp +++ b/Minecraft.World/Items/Item.cpp @@ -1645,7 +1645,7 @@ attrAttrModMap* Item::getDefaultAttributeModifiers() { 4J: These are necesary on the PS3. (and 4 and Vita). */ -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || \ +#if (0 || 0 || 0 || \ defined __linux__) const int Item::shovel_iron_Id; const int Item::pickAxe_iron_Id; diff --git a/Minecraft.World/Level/CustomLevelSource.cpp b/Minecraft.World/Level/CustomLevelSource.cpp index de97afca9..540b5f237 100644 --- a/Minecraft.World/Level/CustomLevelSource.cpp +++ b/Minecraft.World/Level/CustomLevelSource.cpp @@ -38,7 +38,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed, DWORD error = GetLastError(); assert(false); } else { -#ifdef _DURANGO +#if 0 __debugbreak(); // TODO DWORD bytesRead, dwFileSize = 0; #else @@ -77,7 +77,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed, memset(m_waterheightOverride.data, level->seaLevel, m_waterheightOverride.length); } else { -#ifdef _DURANGO +#if 0 __debugbreak(); // TODO DWORD bytesRead, dwFileSize = 0; #else diff --git a/Minecraft.World/Level/Level.cpp b/Minecraft.World/Level/Level.cpp index 82bf28208..7d35e54cc 100644 --- a/Minecraft.World/Level/Level.cpp +++ b/Minecraft.World/Level/Level.cpp @@ -2272,7 +2272,7 @@ void Level::tick(std::shared_ptr e, bool actual) { int xc = Mth::floor(e->x); int zc = Mth::floor(e->z); int r = 32; -#ifdef __PSVITA__ +#if 0 // AP - make sure the dragon ticks all the time, even when there aren't any // chunks. if (actual && e->GetType() != eTYPE_ENDERDRAGON && @@ -2290,7 +2290,7 @@ void Level::tick(std::shared_ptr e, bool actual) { e->yRotO = e->yRot; e->xRotO = e->xRot; -#ifdef __PSVITA__ +#if 0 // AP - make sure the dragon ticks all the time, even when there aren't any // chunks. if (actual && (e->GetType() == eTYPE_ENDERDRAGON || e->inChunk)) @@ -3012,7 +3012,7 @@ void Level::tickClientSideTiles(int xo, int zo, LevelChunk* lc) { player->distanceToSqr(x + 0.5, y + 0.5, z + 0.5) > 2 * 2) { // 4J-PB - Fixed issue with cave audio event having 2 sounds at // 192k -#ifdef _XBOX +#if 0 this->playSound(x + 0.5, y + 0.5, z + 0.5, eSoundType_AMBIENT_CAVE_CAVE2, 0.7f, 0.8f + random->nextFloat() * 0.2f); @@ -3432,7 +3432,7 @@ std::vector >* Level::getEntities( int zc0 = Mth::floor((bb->z0 - 2) / 16); int zc1 = Mth::floor((bb->z1 + 2) / 16); -#ifdef __PSVITA__ +#if 0 #ifdef _ENTITIES_RW_SECTION // AP - RW critical sections are expensive so enter it here so we only have // to call it once instead of X times @@ -3450,7 +3450,7 @@ std::vector >* Level::getEntities( } MemSect(0); -#ifdef __PSVITA__ +#if 0 #ifdef _ENTITIES_RW_SECTION LeaveCriticalRWSection(&LevelChunk::m_csEntities, false); #else @@ -3475,7 +3475,7 @@ std::vector >* Level::getEntitiesOfClass( std::vector >* es = new std::vector >(); -#ifdef __PSVITA__ +#if 0 #ifdef _ENTITIES_RW_SECTION // AP - RW critical sections are expensive so enter it here so we only have // to call it once instead of X times @@ -3494,7 +3494,7 @@ std::vector >* Level::getEntitiesOfClass( } } -#ifdef __PSVITA__ +#if 0 #ifdef _ENTITIES_RW_SECTION LeaveCriticalRWSection(&LevelChunk::m_csEntities, false); #else diff --git a/Minecraft.World/Level/Level.h b/Minecraft.World/Level/Level.h index 6d21c8e72..599a86dcc 100644 --- a/Minecraft.World/Level/Level.h +++ b/Minecraft.World/Level/Level.h @@ -447,7 +447,7 @@ public: void toggleDownfall(); protected: -#ifdef __PSVITA__ +#if 0 // AP - See CustomSet.h for an explanation of this CustomSet chunksToPoll; #else diff --git a/Minecraft.World/Level/LevelChunk.cpp b/Minecraft.World/Level/LevelChunk.cpp index d6b3f2f72..618e78fac 100644 --- a/Minecraft.World/Level/LevelChunk.cpp +++ b/Minecraft.World/Level/LevelChunk.cpp @@ -481,7 +481,7 @@ int LevelChunk::getHighestSectionPosition() { void LevelChunk::recalcBlockLights() {} void LevelChunk::recalcHeightmapOnly() { -#ifdef __PSVITA__ +#if 0 // AP - lets fetch ALL the chunk data at the same time for a good speed up byteArray blockData = byteArray(Level::CHUNK_TILE_COUNT); getBlockData(blockData); @@ -497,7 +497,7 @@ void LevelChunk::recalcHeightmapOnly() { int y = Level::maxBuildHeight - 1; // int p = x << level->depthBitsPlusFour | z << // level->depthBits; // 4J - removed -#ifdef __PSVITA__ +#if 0 int Index = ((unsigned)x << 11) + ((unsigned)z << 7); int offset = Level::COMPRESSED_CHUNK_SECTION_TILES; y = 127; @@ -546,13 +546,13 @@ void LevelChunk::recalcHeightmapOnly() { this->minHeight = min; this->setUnsaved(true); -#ifdef __PSVITA__ +#if 0 delete blockData.data; #endif } void LevelChunk::recalcHeightmap() { -#ifdef __PSVITA__ +#if 0 // AP - lets fetch ALL the chunk data at the same time for a good speed up byteArray blockData = byteArray(Level::CHUNK_TILE_COUNT); getBlockData(blockData); @@ -566,7 +566,7 @@ void LevelChunk::recalcHeightmap() { // int p = x << level->depthBitsPlusFour | z << // level->depthBits; // 4J - removed -#ifdef __PSVITA__ +#if 0 int Index = ((unsigned)x << 11) + ((unsigned)z << 7); int offset = Level::COMPRESSED_CHUNK_SECTION_TILES; y = 127; @@ -615,7 +615,7 @@ void LevelChunk::recalcHeightmap() { if (!level->dimension->hasCeiling) { int br = Level::MAX_BRIGHTNESS; int yy = Level::maxBuildHeight - 1; -#ifdef __PSVITA__ +#if 0 int offset = Level::COMPRESSED_CHUNK_SECTION_TILES; SparseLightStorage* skyLight = upperSkyLight; yy = 127; @@ -685,7 +685,7 @@ void LevelChunk::recalcHeightmap() { this->setUnsaved(true); -#ifdef __PSVITA__ +#if 0 delete blockData.data; #endif } @@ -1320,7 +1320,7 @@ void LevelChunk::removeEntity(std::shared_ptr e, int yc) { // 4J - we don't want storage creeping up here as thinkgs move round the // world accumulating up spare space MemSect(31); -#ifdef __PS3__ +#if 0 // MGH - have to sort this C++11 code static bool bShowMsg = true; if (bShowMsg) { @@ -1676,7 +1676,7 @@ void LevelChunk::getEntities(std::shared_ptr except, AABB* bb, if (yc0 < 0) yc0 = 0; if (yc1 >= ENTITY_BLOCKS_LENGTH) yc1 = ENTITY_BLOCKS_LENGTH - 1; -#ifndef __PSVITA__ +#if 1 // AP - RW critical sections are expensive so enter once in // Level::getEntities EnterCriticalSection(&m_csEntities); @@ -1704,7 +1704,7 @@ void LevelChunk::getEntities(std::shared_ptr except, AABB* bb, } } } -#ifndef __PSVITA__ +#if 1 LeaveCriticalSection(&m_csEntities); #endif } @@ -1726,7 +1726,7 @@ void LevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB* bb, yc1 = 0; } -#ifndef __PSVITA__ +#if 1 // AP - RW critical sections are expensive so enter once in // Level::getEntitiesOfClass EnterCriticalSection(&m_csEntities); @@ -1770,7 +1770,7 @@ void LevelChunk::getEntitiesOfClass(const std::type_info& ec, AABB* bb, // baseClass.isAssignableFrom(e.getClass()) } } -#ifndef __PSVITA__ +#if 1 LeaveCriticalSection(&m_csEntities); #endif } diff --git a/Minecraft.World/Level/LevelChunk.h b/Minecraft.World/Level/LevelChunk.h index 0bb5b236b..22d0255ea 100644 --- a/Minecraft.World/Level/LevelChunk.h +++ b/Minecraft.World/Level/LevelChunk.h @@ -17,7 +17,7 @@ class EntitySelector; #define SHARING_ENABLED class TileCompressData_SPU; -#if 0 //__PSVITA__ +#if 0 //0 #define _ENTITIES_RW_SECTION #endif diff --git a/Minecraft.World/Level/RandomLevelSource.cpp b/Minecraft.World/Level/RandomLevelSource.cpp index e07566aaa..cfcd0cb85 100644 --- a/Minecraft.World/Level/RandomLevelSource.cpp +++ b/Minecraft.World/Level/RandomLevelSource.cpp @@ -10,7 +10,7 @@ #include "../Headers/net.minecraft.world.entity.h" #include "RandomLevelSource.h" -#ifdef __PS3__ +#if 0 static PerlinNoise_DataIn g_lperlinNoise1_SPU __attribute__((__aligned__(16))); static PerlinNoise_DataIn g_lperlinNoise2_SPU __attribute__((__aligned__(16))); static PerlinNoise_DataIn g_perlinNoise1_SPU __attribute__((__aligned__(16))); @@ -564,7 +564,7 @@ doubleArray RandomLevelSource::getHeights(doubleArray buffer, int x, int y, 0, 500.0); } -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE C4JSpursJobQueue::Port port("C4JSpursJob_PerlinNoise"); C4JSpursJob_PerlinNoise perlinJob1(&g_scaleNoise_SPU); C4JSpursJob_PerlinNoise perlinJob2(&g_depthNoise_SPU); diff --git a/Minecraft.World/Level/Storage/ChunkStorageProfileDecorator.cpp b/Minecraft.World/Level/Storage/ChunkStorageProfileDecorator.cpp index 214db3000..983d6fe90 100644 --- a/Minecraft.World/Level/Storage/ChunkStorageProfileDecorator.cpp +++ b/Minecraft.World/Level/Storage/ChunkStorageProfileDecorator.cpp @@ -41,7 +41,7 @@ void ChunkStorageProfilerDecorator::tick() { if (counter > 500) { if (loadCount > 0) { #ifndef _CONTENT_PACKAGE -#ifdef __PSVITA__ +#if 0 sprintf(buf, "Average load time: %f (%lld)", 0.000001 * (double)timeSpentLoading / (double)loadCount, loadCount); @@ -59,7 +59,7 @@ void ChunkStorageProfilerDecorator::tick() { } if (saveCount > 0) { #ifndef _CONTENT_PACKAGE -#ifdef __PSVITA__ +#if 0 sprintf(buf, "Average save time: %f (%lld)", 0.000001 * (double)timeSpentSaving / (double)loadCount, loadCount); diff --git a/Minecraft.World/Level/Storage/CompressedTileStorage.cpp b/Minecraft.World/Level/Storage/CompressedTileStorage.cpp index cbc60d761..a7750056f 100644 --- a/Minecraft.World/Level/Storage/CompressedTileStorage.cpp +++ b/Minecraft.World/Level/Storage/CompressedTileStorage.cpp @@ -1,17 +1,17 @@ #include "../../Platform/stdafx.h" #include "CompressedTileStorage.h" -#ifdef __PSVITA__ +#if 0 #define PSVITA_PRECOMPUTED_TABLE #endif -#ifdef __PS3__ +#if 0 static const int sc_maxCompressTiles = 64; static CompressedTileStorage_compress_dataIn g_compressTileDataIn[sc_maxCompressTiles] __attribute__((__aligned__(16))); static int g_currentCompressTiles = 0; // #define DISABLE_SPU_CODE -#endif //__PS3__ +#endif //0 // Note: See header for an overview of this class @@ -113,7 +113,7 @@ CompressedTileStorage::CompressedTileStorage(bool isEmpty) { // Empty and already compressed, so we only need 1K. Rounding up to nearest // 4096 bytes for allocation -#ifdef __PS3__ +#if 0 // XPhysicalAlloc just maps to malloc on PS3, so allocate the smallest // amount indicesAndData = (unsigned char*)XPhysicalAlloc(1024, MAXULONG_PTR, 4096, @@ -121,7 +121,7 @@ CompressedTileStorage::CompressedTileStorage(bool isEmpty) { #else indicesAndData = (unsigned char*)XPhysicalAlloc(4096, MAXULONG_PTR, 4096, PAGE_READWRITE); -#endif //__PS3__ +#endif //0 unsigned short* indices = (unsigned short*)indicesAndData; // unsigned char *data = indicesAndData + 1024; @@ -301,7 +301,7 @@ void CompressedTileStorage::setData(byteArray dataIn, unsigned int inOffset) { // and require no storage. Store flags for each tile type used in an // array of 4 64-bit flags. -#ifdef __PSVITA__ +#if 0 // AP - Vita isn't so great at shifting 64bits. The top biggest CPU time // sink after profiling is __ashldi3 (64bit shift) at 3% Let's use 32bit // instead @@ -836,7 +836,7 @@ void CompressedTileStorage::tick() { deleteQueueIndex = (deleteQueueIndex + 1) % 3; } -#ifdef __PS3__ +#if 0 void CompressedTileStorage::compress_SPU(int upgradeBlock /*=-1*/) { EnterCriticalSection(&cs_write); static unsigned char compBuffer[32768 + 4096] @@ -872,7 +872,7 @@ void CompressedTileStorage::compress_SPU(int upgradeBlock /*=-1*/) { // ( if > -1 ), which is changed to be the next-most-accomodating storage from // its current state void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) { -#if defined __PS3__ && !defined DISABLE_SPU_CODE +#if 0 && !defined DISABLE_SPU_CODE compress_SPU(upgradeBlock); return; #endif @@ -951,7 +951,7 @@ void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) { // compress any further and require no storage. Store flags for // each tile type used in an array of 4 64-bit flags. -#ifdef __PSVITA__ +#if 0 // AP - Vita isn't so great at shifting 64bits. The top biggest // CPU time sink after profiling is __ashldi3 (64bit shift) at // 3% lets use 32bit values instead @@ -1076,7 +1076,7 @@ void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) { PAGE_READWRITE); //(unsigned char *)malloc( memToAlloc ); if (newIndicesAndData == NULL) { DWORD lastError = GetLastError(); -#ifndef _DURANGO +#if 1 MEMORYSTATUS memStatus; GlobalMemoryStatus(&memStatus); __debugbreak(); @@ -1181,7 +1181,7 @@ void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) { // And finally repack unsigned char ucMappings[256] = {0}; -#ifdef __PSVITA__ +#if 0 memset(ucMappings, 255, 256); #else for (int j = 0; j < 256; j++) { diff --git a/Minecraft.World/Level/Storage/CompressedTileStorage.h b/Minecraft.World/Level/Storage/CompressedTileStorage.h index e288c8bb5..d5ff85c53 100644 --- a/Minecraft.World/Level/Storage/CompressedTileStorage.h +++ b/Minecraft.World/Level/Storage/CompressedTileStorage.h @@ -147,7 +147,7 @@ public: static void staticCtor(); void compress(int upgradeBlock = -1); -#ifdef __PS3__ +#if 0 void compress_SPU(int upgradeBlock = -1); #endif diff --git a/Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp b/Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp index 9c173e02a..65cd7e4b2 100644 --- a/Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp +++ b/Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp @@ -15,7 +15,7 @@ const std::wstring DirectoryLevelStorage::sc_szPlayerDir(L"players/"); _MapDataMappings::_MapDataMappings() { -#ifndef _DURANGO +#if 1 ZeroMemory(xuids, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA); #endif ZeroMemory(dimensions, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 4)); @@ -76,7 +76,7 @@ void _MapDataMappings::setMapping(int id, PlayerUID xuid, int dimension) { // Old version the only used 1 bit for dimension indexing _MapDataMappings_old::_MapDataMappings_old() { -#ifndef _DURANGO +#if 1 ZeroMemory(xuids, sizeof(PlayerUID) * MAXIMUM_MAP_SAVE_DATA); #endif ZeroMemory(dimensions, sizeof(uint8_t) * (MAXIMUM_MAP_SAVE_DATA / 8)); @@ -238,7 +238,7 @@ LevelData* DirectoryLevelStorage::prepareLevel() { unsigned int NumberOfBytesRead; FileEntry* fileEntry = getSaveFile()->createFile(mapFile); -#ifdef __PS3__ +#if 0 // 4J Stu - This version changed happened before initial release if (getSaveFile()->getSaveVersion() < SAVE_FILE_VERSION_CHANGE_MAP_DATA_MAPPING_SIZE) { @@ -248,7 +248,7 @@ LevelData* DirectoryLevelStorage::prepareLevel() { // Save a new, blank version saveMapIdLookup(); } else -#elif defined(_DURANGO) +#elif 0 // 4J Stu - This version changed happened before initial release if (getSaveFile()->getSaveVersion() < SAVE_FILE_VERSION_DURANGO_CHANGE_MAP_DATA_MAPPING_SIZE) { @@ -384,7 +384,7 @@ void DirectoryLevelStorage::saveLevelData(LevelData* levelData) { void DirectoryLevelStorage::save(std::shared_ptr player) { // 4J Jev, removed try/catch. PlayerUID playerXuid = player->getXuid(); -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 if (playerXuid != INVALID_XUID) #else if (playerXuid != INVALID_XUID && !player->isGuest()) @@ -392,10 +392,10 @@ void DirectoryLevelStorage::save(std::shared_ptr player) { { CompoundTag* tag = new CompoundTag(); player->saveWithoutId(tag); -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 ConsoleSavePath realFile = ConsoleSavePath( m_saveFile->getPlayerDataFilenameForSave(playerXuid).c_str()); -#elif defined(_DURANGO) +#elif 0 ConsoleSavePath realFile = ConsoleSavePath( playerDir.getName() + player->getXuid().toString() + L".dat"); #else @@ -439,10 +439,10 @@ CompoundTag* DirectoryLevelStorage::load(std::shared_ptr player) { CompoundTag* DirectoryLevelStorage::loadPlayerDataTag(PlayerUID xuid) { // 4J Jev, removed try/catch. -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 ConsoleSavePath realFile = ConsoleSavePath(m_saveFile->getPlayerDataFilenameForLoad(xuid).c_str()); -#elif defined(_DURANGO) +#elif 0 ConsoleSavePath realFile = ConsoleSavePath(playerDir.getName() + xuid.toString() + L".dat"); #else @@ -470,7 +470,7 @@ CompoundTag* DirectoryLevelStorage::loadPlayerDataTag(PlayerUID xuid) { void DirectoryLevelStorage::clearOldPlayerFiles() { if (StorageManager.GetSaveDisabled()) return; -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 std::vector* playerFiles = m_saveFile->getValidPlayerDatFiles(); #else std::vector* playerFiles = @@ -487,7 +487,7 @@ void DirectoryLevelStorage::clearOldPlayerFiles() { std::wstring xuidStr = replaceAll( replaceAll(file->data.filename, playerDir.getName(), L""), L".dat", L""); -#if defined(__PS3__) || defined(__ORBIS__) || defined(_DURANGO) +#if 0 || 0 || 0 PlayerUID xuid(xuidStr); #else PlayerUID xuid = _fromString(xuidStr); @@ -507,7 +507,7 @@ void DirectoryLevelStorage::clearOldPlayerFiles() { std::wstring xuidStr = replaceAll( replaceAll(file->data.filename, playerDir.getName(), L""), L".dat", L""); -#if defined(__PS3__) || defined(__ORBIS__) || defined(_DURANGO) +#if 0 || 0 || 0 PlayerUID xuid(xuidStr); #else PlayerUID xuid = _fromString(xuidStr); @@ -550,7 +550,7 @@ void DirectoryLevelStorage::flushSaveFile(bool autosave) { // 4J Added void DirectoryLevelStorage::resetNetherPlayerPositions() { if (app.GetResetNether()) { -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) +#if 0 || 0 || 0 std::vector* playerFiles = m_saveFile->getValidPlayerDatFiles(); #else diff --git a/Minecraft.World/Level/Storage/DirectoryLevelStorage.h b/Minecraft.World/Level/Storage/DirectoryLevelStorage.h index e800bb891..9f6db2744 100644 --- a/Minecraft.World/Level/Storage/DirectoryLevelStorage.h +++ b/Minecraft.World/Level/Storage/DirectoryLevelStorage.h @@ -85,8 +85,8 @@ private: void writeMappings(DataOutputStream* dos); void readMappings(DataInputStream* dis); }; -#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || \ - defined(_DURANGO) +#if 0 || 0 || 0 || \ + 0 std::unordered_map m_playerMappings; #else diff --git a/Minecraft.World/Level/Storage/McRegionChunkStorage.cpp b/Minecraft.World/Level/Storage/McRegionChunkStorage.cpp index 0e267e0e7..b5aa7582f 100644 --- a/Minecraft.World/Level/Storage/McRegionChunkStorage.cpp +++ b/Minecraft.World/Level/Storage/McRegionChunkStorage.cpp @@ -336,7 +336,7 @@ void McRegionChunkStorage::staticCtor() { s_saveThreads[i]->SetProcessor(CPU_CORE_SAVE_THREAD_A); else if (i == 1) { s_saveThreads[i]->SetProcessor(CPU_CORE_SAVE_THREAD_B); -#ifdef __ORBIS__ +#if 0 s_saveThreads[i]->SetPriority( THREAD_PRIORITY_BELOW_NORMAL); // On Orbis, this core is also // used for Matching 2, and that diff --git a/Minecraft.World/Level/Storage/OldChunkStorage.cpp b/Minecraft.World/Level/Storage/OldChunkStorage.cpp index 02fddf092..4df66d9ba 100644 --- a/Minecraft.World/Level/Storage/OldChunkStorage.cpp +++ b/Minecraft.World/Level/Storage/OldChunkStorage.cpp @@ -60,7 +60,7 @@ File OldChunkStorage::getFile(int x, int z) { wchar_t xRadix36[64]; wchar_t zRadix36[64]; -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || \ +#if (0 || 0 || 0 || \ defined __linux__) assert(0); // need a gcc verison of _itow ? #else diff --git a/Minecraft.World/Level/Storage/PortalForcer.cpp b/Minecraft.World/Level/Storage/PortalForcer.cpp index 8c2d9d783..944055873 100644 --- a/Minecraft.World/Level/Storage/PortalForcer.cpp +++ b/Minecraft.World/Level/Storage/PortalForcer.cpp @@ -70,7 +70,7 @@ bool PortalForcer::findPortal(std::shared_ptr e, double xOriginal, if (level->dimension->id == -1) { r *= 3; } else { -#ifdef __PSVITA__ +#if 0 // AP poor little Vita takes 30 seconds to leave the Nether. This should // help r *= 5; diff --git a/Minecraft.World/Level/Storage/Region.cpp b/Minecraft.World/Level/Storage/Region.cpp index 4e5f331bd..9596efda4 100644 --- a/Minecraft.World/Level/Storage/Region.cpp +++ b/Minecraft.World/Level/Storage/Region.cpp @@ -72,7 +72,7 @@ int Region::getTile(int x, int y, int z) { int xc = (x >> 4); int zc = (z >> 4); -#ifdef __PSVITA__ +#if 0 // AP - added a caching system for Chunk::rebuild to take advantage of if (CachedTiles && xc == xcCached && zc == zcCached) { unsigned char* Tiles = CachedTiles; diff --git a/Minecraft.World/Level/Storage/SparseDataStorage.cpp b/Minecraft.World/Level/Storage/SparseDataStorage.cpp index 910c72772..a511aa46f 100644 --- a/Minecraft.World/Level/Storage/SparseDataStorage.cpp +++ b/Minecraft.World/Level/Storage/SparseDataStorage.cpp @@ -33,7 +33,7 @@ SparseDataStorage::SparseDataStorage() { // MM_PHYSICAL_4KB_BASE upwards. We can use this fact to identify the // allocation later, and so free it with the corresponding call to // XPhysicalFree. -#ifdef _XBOX +#if 0 unsigned char* planeIndices = (unsigned char*)XPhysicalAlloc( 128 * 128, MAXULONG_PTR, 4096, PAGE_READWRITE); #else @@ -85,7 +85,7 @@ SparseDataStorage::~SparseDataStorage() { // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc -#ifdef _XBOX +#if 0 if ((unsigned int)indicesAndData >= MM_PHYSICAL_4KB_BASE) { XPhysicalFree(indicesAndData); } else @@ -474,7 +474,7 @@ void SparseDataStorage::tick() { // if( toFree ) printf("Deleting 0x%x\n", toFree); // Determine correct means to free this data - could have been allocated either // with XPhysicalAlloc or malloc -#ifdef _XBOX +#if 0 if ((unsigned int)toFree >= MM_PHYSICAL_4KB_BASE) { XPhysicalFree(toFree); } else diff --git a/Minecraft.World/Level/Storage/SparseDataStorage.h b/Minecraft.World/Level/Storage/SparseDataStorage.h index 659a5b467..1e16e8155 100644 --- a/Minecraft.World/Level/Storage/SparseDataStorage.h +++ b/Minecraft.World/Level/Storage/SparseDataStorage.h @@ -70,7 +70,7 @@ private: static const int ALL_0_INDEX = 128; -#ifdef _XBOX +#if 0 static const unsigned int MM_PHYSICAL_4KB_BASE = 0xE0000000; // Start of where 4KB page sized physical allocations are // made diff --git a/Minecraft.World/Level/Storage/SparseLightStorage.cpp b/Minecraft.World/Level/Storage/SparseLightStorage.cpp index 58aea4e58..222f78391 100644 --- a/Minecraft.World/Level/Storage/SparseLightStorage.cpp +++ b/Minecraft.World/Level/Storage/SparseLightStorage.cpp @@ -34,7 +34,7 @@ SparseLightStorage::SparseLightStorage(bool sky) { // MM_PHYSICAL_4KB_BASE upwards. We can use this fact to identify the // allocation later, and so free it with the corresponding call to // XPhysicalFree. -#ifdef _XBOX +#if 0 unsigned char* planeIndices = (unsigned char*)XPhysicalAlloc( 128 * 128, MAXULONG_PTR, 4096, PAGE_READWRITE); #else @@ -86,7 +86,7 @@ SparseLightStorage::~SparseLightStorage() { // Determine correct means to free this data - could have been allocated // either with XPhysicalAlloc or malloc -#ifdef _XBOX +#if 0 if ((unsigned int)indicesAndData >= MM_PHYSICAL_4KB_BASE) { XPhysicalFree(indicesAndData); } else @@ -477,7 +477,7 @@ void SparseLightStorage::tick() { // if( toFree ) printf("Deleting 0x%x\n", toFree); // Determine correct means to free this data - could have been allocated either // with XPhysicalAlloc or malloc -#ifdef _XBOX +#if 0 if ((unsigned int)toFree >= MM_PHYSICAL_4KB_BASE) { XPhysicalFree(toFree); } else diff --git a/Minecraft.World/Level/Storage/SparseLightStorage.h b/Minecraft.World/Level/Storage/SparseLightStorage.h index b7c885d2f..aa6d8a6e3 100644 --- a/Minecraft.World/Level/Storage/SparseLightStorage.h +++ b/Minecraft.World/Level/Storage/SparseLightStorage.h @@ -72,7 +72,7 @@ private: static const int ALL_0_INDEX = 128; static const int ALL_15_INDEX = 129; -#ifdef _XBOX +#if 0 static const unsigned int MM_PHYSICAL_4KB_BASE = 0xE0000000; // Start of where 4KB page sized physical allocations are // made diff --git a/Minecraft.World/Network/Connection.cpp b/Minecraft.World/Network/Connection.cpp index 5370ab1d6..a4a74e0cd 100644 --- a/Minecraft.World/Network/Connection.cpp +++ b/Minecraft.World/Network/Connection.cpp @@ -119,7 +119,7 @@ Connection::Connection(Socket* socket, const std::wstring& id, new C4JThread(runWrite, this, writeThreadName, WRITE_STACK_SIZE); readThread->SetProcessor(CPU_CORE_CONNECTIONS); writeThread->SetProcessor(CPU_CORE_CONNECTIONS); -#ifdef __ORBIS__ +#if 0 readThread->SetPriority( THREAD_PRIORITY_BELOW_NORMAL); // On Orbis, this core is also used for // Matching 2, and that priority of that @@ -278,7 +278,7 @@ bool Connection::writeTick() { // "game" packets to QNet, rather than amalgamated chunks of data // that may include many packets, and partial packets b) To be able // to change the priority and queue of a packet if required -#ifdef _XBOX +#if 0 int flags = QNET_SENDDATA_LOW_PRIORITY | QNET_SENDDATA_SECONDARY; #else int flags = NON_QNET_SENDDATA_ACK_REQUIRED; @@ -554,7 +554,7 @@ int Connection::runRead(void* lpParam) { Connection* con = (Connection*)lpParam; if (con == NULL) { -#ifdef __PS3__ +#if 0 ShutdownManager::HasFinished(ShutdownManager::eConnectionReadThreads); #endif return 0; diff --git a/Minecraft.World/Network/Packets/AwardStatPacket.cpp b/Minecraft.World/Network/Packets/AwardStatPacket.cpp index 01fc3f2cb..1eac9e417 100644 --- a/Minecraft.World/Network/Packets/AwardStatPacket.cpp +++ b/Minecraft.World/Network/Packets/AwardStatPacket.cpp @@ -64,7 +64,7 @@ bool AwardStatPacket::isAync() { return true; } // On most platforms we only store 'count' in an AwardStatPacket. int AwardStatPacket::getCount() { -#ifdef _DURANGO +#if 0 assert(false); // Method not supported on Durango. return 0; #else diff --git a/Minecraft.World/Network/Packets/DisconnectPacket.h b/Minecraft.World/Network/Packets/DisconnectPacket.h index dde68d95c..c5a10a415 100644 --- a/Minecraft.World/Network/Packets/DisconnectPacket.h +++ b/Minecraft.World/Network/Packets/DisconnectPacket.h @@ -33,7 +33,7 @@ public: eDisconnect_NoUGC_Single_Local, eDisconnect_ContentRestricted_AllLocal, eDisconnect_ContentRestricted_Single_Local, -#ifndef __PS3__ +#if 1 eDisconnect_NoUGC_Remote, #endif @@ -41,10 +41,10 @@ public: eDisconnect_Banned, eDisconnect_NotFriendsWithHost, eDisconnect_NATMismatch, -#ifdef __ORBIS__ +#if 0 eDisconnect_NetworkError, #endif -#ifdef _XBOX_ONE +#if 0 eDisconnect_ExitedGame, #endif }; diff --git a/Minecraft.World/Network/Packets/RemoveEntitiesPacket.cpp b/Minecraft.World/Network/Packets/RemoveEntitiesPacket.cpp index 2f0599034..405e69186 100644 --- a/Minecraft.World/Network/Packets/RemoveEntitiesPacket.cpp +++ b/Minecraft.World/Network/Packets/RemoveEntitiesPacket.cpp @@ -39,7 +39,7 @@ int RemoveEntitiesPacket::getEstimatedSize() { return 1 + (ids.length * 4); } 4J: These are necesary on the PS3. (and 4). */ -#if (defined __PS3__ || defined __ORBIS__ || defined __PSVITA__ || \ +#if (0 || 0 || 0 || \ defined __linux__) const int RemoveEntitiesPacket::MAX_PER_PACKET; #endif diff --git a/Minecraft.World/Network/Socket.cpp b/Minecraft.World/Network/Socket.cpp index 2dc1369bf..cfa91e163 100644 --- a/Minecraft.World/Network/Socket.cpp +++ b/Minecraft.World/Network/Socket.cpp @@ -461,7 +461,7 @@ void Socket::SocketOutputStreamNetwork::writeWithFlags(byteArray b, return; } -#ifdef _XBOX +#if 0 bool lowPriority = ((flags & QNET_SENDDATA_LOW_PRIORITY) == QNET_SENDDATA_LOW_PRIORITY); bool requireAck = lowPriority; diff --git a/Minecraft.World/Platform/Minecraft.World.cpp b/Minecraft.World/Platform/Minecraft.World.cpp index 2abd7d9fc..58d1b93d2 100644 --- a/Minecraft.World/Platform/Minecraft.World.cpp +++ b/Minecraft.World/Platform/Minecraft.World.cpp @@ -17,7 +17,7 @@ #include "Minecraft.World.h" #include "../../Minecraft.Client/Level/ServerLevel.h" -#ifdef _DURANGO +#if 0 #include "../Stats/DurangoStats.h" #else #include "../Stats/CommonStats.h" @@ -42,7 +42,7 @@ void MinecraftWorld_RunStaticCtors() { Item::staticCtor(); FurnaceRecipes::staticCtor(); Recipes::staticCtor(); -#ifdef _DURANGO +#if 0 GenericStats::setInstance(new DurangoStats()); #else GenericStats::setInstance(new CommonStats()); diff --git a/Minecraft.World/Platform/System.cpp b/Minecraft.World/Platform/System.cpp index bece637ef..a974dcf1f 100644 --- a/Minecraft.World/Platform/System.cpp +++ b/Minecraft.World/Platform/System.cpp @@ -1,5 +1,5 @@ #include "stdafx.h" -#ifdef __PS3__ +#if 0 #include #endif #include "System.h" @@ -84,7 +84,7 @@ int64_t System::nanoTime() { // the difference, measured in milliseconds, between the current time and // midnight, January 1, 1970 UTC. int64_t System::currentTimeMillis() { -#ifdef __PS3__ +#if 0 // sys_time_get_current_time() obtains the elapsed time since Epoch //(1970/01/01 00:00:00 UTC). The value is separated into two parts: sec //stores the elapsed time in seconds, and nsec @@ -95,12 +95,12 @@ int64_t System::currentTimeMillis() { int64_t msec = (sec * 1000) + (nsec / (1000 * 1000)); return msec; -#elif defined __ORBIS__ +#elif 0 SceRtcTick tick; int err = sceRtcGetCurrentTick(&tick); return (int64_t)(tick.tick / 1000); -#elif defined __PSVITA__ +#elif 0 // AP - TRC states we can't use the RTC for measuring elapsed game time return sceKernelGetProcessTimeWide() / 1000; /* SceDateTime Time; @@ -129,13 +129,13 @@ int64_t System::currentTimeMillis() { li.LowPart = UTCFileTime.dwLowDateTime; return li.QuadPart / 10000; -#endif // __PS3__ +#endif // 0 } // 4J Stu - Added this so that we can use real-world timestamps in PSVita saves. // Particularly required for the save transfers to be smooth int64_t System::currentRealTimeMillis() { -#ifdef __PSVITA__ +#if 0 SceDateTime Time; sceRtcGetCurrentClockLocalTime(&Time); int64_t systTime = diff --git a/Minecraft.World/Player/Player.cpp b/Minecraft.World/Player/Player.cpp index f7b8e9b85..298ab9e7c 100644 --- a/Minecraft.World/Player/Player.cpp +++ b/Minecraft.World/Player/Player.cpp @@ -101,7 +101,7 @@ void Player::_init() { m_bCheckedForModelParts = false; m_bCheckedDLCForModelParts = false; -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 m_ePlayerNameValidState = ePlayerNameValid_NotSet; #endif @@ -146,7 +146,7 @@ Player::Player(Level* level, const std::wstring& name) : LivingEntity(level) { app.GetGameHostOption(eGameHostOption_Gamertags) != 0 ? true : false); m_bIsGuest = false; -#ifndef _XBOX_ONE +#if 1 // 4J: Set UUID to name on none-XB1 consoles, may change in future but for // now ownership of animals on these consoles is done by name setUUID(name); @@ -345,7 +345,7 @@ void Player::tick() { this->drop( std::shared_ptr(new ItemInstance( Item::pickAxe_diamond, 1 )) ); #endif -#ifdef __PS3__ +#if 0 // #ifdef _DEBUG // // Drop some items so we have them in inventory to play with // this->drop( shared_ptr( new ItemInstance(Tile::recordPlayer) ) ); @@ -356,7 +356,7 @@ void Player::tick() { // #endif #endif -#ifdef _DURANGO +#if 0 // Drop some items so we have them in inventory to play with this->drop( std::shared_ptr( new ItemInstance(Tile::recordPlayer) ) ); this->drop( std::shared_ptr( new ItemInstance(Item::map) ) ); @@ -721,7 +721,7 @@ unsigned int Player::getSkinAnimOverrideBitmask(std::uint32_t skinId) { void Player::setXuid(PlayerUID xuid) { m_xuid = xuid; -#ifdef _XBOX_ONE +#if 0 // 4J Stu - For XboxOne (and probably in the future all other platforms) we // store a UUID for the player to use as the owner key for tamed animals // This should just be a string version of the xuid @@ -1955,7 +1955,7 @@ void Player::checkRidingStatistiscs(double dx, double dy, double dz) { // on durango. int dist = minecartAchievementPos->dist( Mth::floor(x), Mth::floor(y), Mth::floor(z)); -#ifdef _XBOX_ONE +#if 0 // 4J-PB - send the event to cause the progress bar to // increase on XB1 if (m_bAwardedOnARail == false) { @@ -2203,7 +2203,7 @@ void Player::startUsingItem(std::shared_ptr instance, GenericStats::param_itemsUsed( std::dynamic_pointer_cast(shared_from_this()), instance)); -#if (!defined _DURANGO) && (defined _EXTENDED_ACHIEVEMENTS) +#if (!0) && (defined _EXTENDED_ACHIEVEMENTS) if ((instance->getItem()->id == Item::rotten_flesh_Id) && (getFoodData()->getFoodLevel() == 0)) awardStat(GenericStats::ironBelly(), GenericStats::param_ironBelly()); @@ -2375,12 +2375,12 @@ int Player::getTexture() { int Player::hash_fnct(const std::shared_ptr k) { // TODO 4J Stu - Should we just be using the pointers and hashing them? -#ifdef __PS3__ +#if 0 return (int)boost::hash_value( k->name); // 4J Stu - Names are completely unique? #else return (int)std::hash()(k->name); -#endif // __PS3__ +#endif // 0 } bool Player::eq_test(const std::shared_ptr x, @@ -2815,7 +2815,7 @@ void Player::SetAdditionalModelParts( m_ppAdditionalModelParts = ppAdditionalModelParts; } -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 Player::ePlayerNameValidState Player::GetPlayerNameValidState(void) { return m_ePlayerNameValidState; diff --git a/Minecraft.World/Player/Player.h b/Minecraft.World/Player/Player.h index 8d3d3194c..ba6217249 100644 --- a/Minecraft.World/Player/Player.h +++ b/Minecraft.World/Player/Player.h @@ -582,7 +582,7 @@ public: void SetAdditionalModelParts( std::vector* ppAdditionalModelParts); -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 enum ePlayerNameValidState { ePlayerNameValid_NotSet = 0, ePlayerNameValid_True, @@ -597,7 +597,7 @@ private: bool m_bCheckedForModelParts; bool m_bCheckedDLCForModelParts; -#if defined(__PS3__) || defined(__ORBIS__) +#if 0 || 0 ePlayerNameValidState m_ePlayerNameValidState; // 4J-PB - to ensure we have the characters // for this name in our font, or display a diff --git a/Minecraft.World/Stats/Achievements.cpp b/Minecraft.World/Stats/Achievements.cpp index 46cdf6467..39817175c 100644 --- a/Minecraft.World/Stats/Achievements.cpp +++ b/Minecraft.World/Stats/Achievements.cpp @@ -219,7 +219,7 @@ void Achievements::staticCtor() { Tile::treeTrunk, (Achievement*)buildSword)) ->postConstruct(); -#ifndef _XBOX +#if 1 // WARNING: NO NEW ACHIEVMENTS CAN BE ADDED HERE // These stats (achievements) are directly followed by new // stats/achievements in the profile data, so cannot be changed without diff --git a/Minecraft.World/Stats/CommonStats.cpp b/Minecraft.World/Stats/CommonStats.cpp index 1b047e801..4d40cfacc 100644 --- a/Minecraft.World/Stats/CommonStats.cpp +++ b/Minecraft.World/Stats/CommonStats.cpp @@ -83,7 +83,7 @@ Stat* CommonStats::get_totalBlocksMined() { return Stats::totalBlocksMined; } Stat* CommonStats::get_timePlayed() { return Stats::timePlayed; } Stat* CommonStats::get_blocksPlaced(int blockId) { -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) return Stats::blocksPlaced[blockId]; #else return NULL; @@ -98,7 +98,7 @@ Stat* CommonStats::get_itemsCollected(int itemId, int itemAux) { // 4J-JEV: We don't need itemsCollected(emerald) so I'm using it to // stor itemsBought(emerald) so I don't have to make yet another massive // StatArray for Items Bought. -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) if (itemId == Tile::wool_Id) return Stats::rainbowCollection[itemAux]; #endif @@ -117,7 +117,7 @@ Stat* CommonStats::get_itemsSmelted(int itemId) { } Stat* CommonStats::get_itemsUsed(int itemId) { -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) // 4J-JEV: I've done the same thing here, we can't place these items anyway. if (itemId == Item::porkChop_cooked_Id) return Stats::blocksPlaced[itemId]; #endif @@ -141,7 +141,7 @@ Stat* CommonStats::get_killsEnderdragon() { return Stats::killsEnderdragon; } Stat* CommonStats::get_completeTheEnd() { return Stats::completeTheEnd; } Stat* CommonStats::get_enteredBiome(int biomeId) { -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) return Stats::biomesVisisted[biomeId]; #else return NULL; @@ -203,7 +203,7 @@ Stat* CommonStats::get_achievement(eAward achievementId) { case eAward_socialPost: return (Stat*)Achievements::socialPost; -#ifndef _XBOX +#if 1 case eAward_snipeSkeleton: return (Stat*)Achievements::snipeSkeleton; case eAward_diamonds: diff --git a/Minecraft.World/Stats/GenericStats.cpp b/Minecraft.World/Stats/GenericStats.cpp index 87396f522..b93502c12 100644 --- a/Minecraft.World/Stats/GenericStats.cpp +++ b/Minecraft.World/Stats/GenericStats.cpp @@ -151,7 +151,7 @@ Stat* GenericStats::flyPig() { } Stat* GenericStats::snipeSkeleton() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_snipeSkeleton); #else return NULL; @@ -159,7 +159,7 @@ Stat* GenericStats::snipeSkeleton() { } Stat* GenericStats::diamonds() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_diamonds); #else return NULL; @@ -167,7 +167,7 @@ Stat* GenericStats::diamonds() { } Stat* GenericStats::ghast() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_ghast); #else return NULL; @@ -175,7 +175,7 @@ Stat* GenericStats::ghast() { } Stat* GenericStats::blazeRod() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_blazeRod); #else return NULL; @@ -183,7 +183,7 @@ Stat* GenericStats::blazeRod() { } Stat* GenericStats::potion() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_potion); #else return NULL; @@ -191,7 +191,7 @@ Stat* GenericStats::potion() { } Stat* GenericStats::theEnd() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_theEnd); #else return NULL; @@ -199,7 +199,7 @@ Stat* GenericStats::theEnd() { } Stat* GenericStats::winGame() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_winGame); #else return NULL; @@ -207,7 +207,7 @@ Stat* GenericStats::winGame() { } Stat* GenericStats::enchantments() { -#ifndef _XBOX +#if 1 return instance->get_achievement(eAward_enchantments); #else return NULL; @@ -536,7 +536,7 @@ byteArray GenericStats::getParam_onARail(int distance) { } byteArray GenericStats::getParam_overkill(int damage) { -#ifdef _XBOX +#if 0 return getParam_noArgs(); #else return getParam_achievement(eAward_overkill); @@ -739,7 +739,7 @@ byteArray GenericStats::param_flyPig() { } byteArray GenericStats::param_snipeSkeleton() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_snipeSkeleton); @@ -747,7 +747,7 @@ byteArray GenericStats::param_snipeSkeleton() { } byteArray GenericStats::param_diamonds() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_diamonds); @@ -755,7 +755,7 @@ byteArray GenericStats::param_diamonds() { } byteArray GenericStats::param_ghast() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_ghast); @@ -763,7 +763,7 @@ byteArray GenericStats::param_ghast() { } byteArray GenericStats::param_blazeRod() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_blazeRod); @@ -771,7 +771,7 @@ byteArray GenericStats::param_blazeRod() { } byteArray GenericStats::param_potion() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_potion); @@ -779,7 +779,7 @@ byteArray GenericStats::param_potion() { } byteArray GenericStats::param_theEnd() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_theEnd); @@ -787,7 +787,7 @@ byteArray GenericStats::param_theEnd() { } byteArray GenericStats::param_winGame() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_winGame); @@ -795,7 +795,7 @@ byteArray GenericStats::param_winGame() { } byteArray GenericStats::param_enchantments() { -#ifdef _XBOX +#if 0 return instance->getParam_noArgs(); #else return instance->getParam_achievement(eAward_enchantments); diff --git a/Minecraft.World/Stats/Stat.cpp b/Minecraft.World/Stats/Stat.cpp index 6841f5ded..57e06ea9e 100644 --- a/Minecraft.World/Stats/Stat.cpp +++ b/Minecraft.World/Stats/Stat.cpp @@ -39,12 +39,12 @@ Stat* Stat::postConstruct() { Stats::all->push_back(this); std::pair id1(id, this); -#ifdef __PS3__ +#if 0 Stats::statsById->emplace(id1); // assert(0); // MGH - TODO - FIX - find // out where this move function comes from #else Stats::statsById->emplace(std::move(id1)); -#endif // __PS3__ +#endif // 0 return this; } diff --git a/Minecraft.World/Stats/Stats.cpp b/Minecraft.World/Stats/Stats.cpp index 81ea8846e..ba409bd84 100644 --- a/Minecraft.World/Stats/Stats.cpp +++ b/Minecraft.World/Stats/Stats.cpp @@ -26,7 +26,7 @@ std::vector* Stats::blocksMinedStats = new std::vector; std::vector* Stats::itemsCollectedStats = new std::vector; std::vector* Stats::itemsCraftedStats = new std::vector; -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) std::vector* Stats::blocksPlacedStats = new std::vector; #endif @@ -59,7 +59,7 @@ StatArray Stats::blocksMined; StatArray Stats::itemsCollected; StatArray Stats::itemsCrafted; -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) StatArray Stats::blocksPlaced; StatArray Stats::rainbowCollection; StatArray Stats::biomesVisisted; @@ -577,7 +577,7 @@ void Stats::buildAdditionalStats() { Stats::completeTheEnd = (new GeneralStat(offset++, L"stat.completeTheEnd"))->postConstruct(); -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) { ItemStat* itemStat = new ItemStat(offset++, L"craftItem.flowerPot", Item::flowerPot_Id); diff --git a/Minecraft.World/Stats/Stats.h b/Minecraft.World/Stats/Stats.h index 971f4181c..7f825d320 100644 --- a/Minecraft.World/Stats/Stats.h +++ b/Minecraft.World/Stats/Stats.h @@ -23,7 +23,7 @@ public: static std::vector* itemsCollectedStats; static std::vector* itemsCraftedStats; -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) static std::vector* blocksPlacedStats; #endif @@ -61,7 +61,7 @@ public: static StatArray itemsCollected; static StatArray itemsCrafted; -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) static StatArray blocksPlaced; #endif @@ -71,7 +71,7 @@ public: static Stat* completeTheEnd; // The number of times this player has been // present when the Enderdragon has died -#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _DURANGO) +#if (defined _EXTENDED_ACHIEVEMENTS) && (!0) static StatArray biomesVisisted; static StatArray rainbowCollection; #endif diff --git a/Minecraft.World/Util/Definitions.h b/Minecraft.World/Util/Definitions.h index b0dec3cfe..3b8295142 100644 --- a/Minecraft.World/Util/Definitions.h +++ b/Minecraft.World/Util/Definitions.h @@ -16,7 +16,7 @@ enum ByteOrder { BIGENDIAN, LITTLEENDIAN, -#if defined(__PS3__) || defined(_XBOX) +#if 0 || 0 LOCALSYTEM_ENDIAN = BIGENDIAN, #else LOCALSYTEM_ENDIAN = LITTLEENDIAN, diff --git a/Minecraft.World/Util/HashExtension.h b/Minecraft.World/Util/HashExtension.h index d9a40d799..86bd8025e 100644 --- a/Minecraft.World/Util/HashExtension.h +++ b/Minecraft.World/Util/HashExtension.h @@ -1,5 +1,5 @@ #pragma once -#ifdef _XBOX +#if 0 // namespace std { namespace tr1 { diff --git a/Minecraft.World/Util/I18n.cpp b/Minecraft.World/Util/I18n.cpp index 4203e44b5..e65ec6be1 100644 --- a/Minecraft.World/Util/I18n.cpp +++ b/Minecraft.World/Util/I18n.cpp @@ -5,7 +5,7 @@ Language* I18n::lang = Language::getInstance(); // 4jcraft const & into va_start is ub std::wstring I18n::get(std::wstring id, ...) { -#ifdef __PSVITA__ // 4J - vita doesn't like having a reference type as the last +#if 0 // 4J - vita doesn't like having a reference type as the last // parameter passed to va_start - we shouldn't need this // method anyway return L""; diff --git a/Minecraft.World/Util/Icon.h b/Minecraft.World/Util/Icon.h index 3937e974e..cce77735b 100644 --- a/Minecraft.World/Util/Icon.h +++ b/Minecraft.World/Util/Icon.h @@ -8,7 +8,7 @@ public: static const int IS_GRASS_SIDE = 1; static const int IS_GRASS_TOP = 2; -#ifdef __PSVITA__ +#if 0 // AP - alpha cut out is expensive on vita so we mark which icons require it static const int IS_ALPHA_CUT_OUT = 4; #endif diff --git a/Minecraft.World/Util/Language.cpp b/Minecraft.World/Util/Language.cpp index 8c7f854bd..1f7ccb8a0 100644 --- a/Minecraft.World/Util/Language.cpp +++ b/Minecraft.World/Util/Language.cpp @@ -79,7 +79,7 @@ std::wstring Language::getElement(const std::wstring& elementId) // 4jcraft changed, again const reference into va_start, std forbids std::wstring Language::getElement(std::wstring elementId, ...) { -#ifdef __PSVITA__ // 4J - vita doesn't like having a reference type as the last +#if 0 // 4J - vita doesn't like having a reference type as the last // parameter passed to va_start - we shouldn't need this // method anyway return L""; diff --git a/Minecraft.World/Util/SoundTypes.h b/Minecraft.World/Util/SoundTypes.h index bbe203f4e..e2d61f9ea 100644 --- a/Minecraft.World/Util/SoundTypes.h +++ b/Minecraft.World/Util/SoundTypes.h @@ -82,7 +82,7 @@ enum eSOUND_TYPE { eSoundType_AMBIENT_WEATHER_RAIN, eSoundType_AMBIENT_WEATHER_THUNDER, eSoundType_AMBIENT_CAVE_CAVE, -#ifdef _XBOX +#if 0 eSoundType_AMBIENT_CAVE_CAVE2, //- fixed version of eSoundType_CAVE_CAVE, // without the two 192k sounds #endif diff --git a/Minecraft.World/Util/StringHelpers.cpp b/Minecraft.World/Util/StringHelpers.cpp index 9f47f92b8..da49643a4 100644 --- a/Minecraft.World/Util/StringHelpers.cpp +++ b/Minecraft.World/Util/StringHelpers.cpp @@ -103,7 +103,7 @@ const char* wstringtofilename(const std::wstring& name) { assert(name.length() < 256); for (unsigned int i = 0; i < name.length(); i++) { wchar_t c = name[i]; -#if defined __PS3__ || defined __ORBIS__ || defined __linux__ +#if 0 || 0 || defined __linux__ if (c == '\\') c = '/'; #else if (c == '/') c = '\\'; diff --git a/Minecraft.World/Util/ThreadName.cpp b/Minecraft.World/Util/ThreadName.cpp index 8cc91d3ff..4f958acdc 100644 --- a/Minecraft.World/Util/ThreadName.cpp +++ b/Minecraft.World/Util/ThreadName.cpp @@ -11,7 +11,7 @@ typedef struct tagTHREADNAME_INFO { } THREADNAME_INFO; void SetThreadName(std::uint32_t threadId, const char* threadName) { -#ifndef __PS3__ +#if 1 THREADNAME_INFO info; info.dwType = 0x1000; @@ -19,7 +19,7 @@ void SetThreadName(std::uint32_t threadId, const char* threadName) { info.dwThreadID = threadId; info.dwFlags = 0; -#if (defined _WINDOWS64 | defined _DURANGO) +#if (defined _WINDOWS64 | 0) __try { RaiseException(0x406D1388, 0, sizeof(info) / sizeof(std::uint32_t), reinterpret_cast(&info)); @@ -27,7 +27,7 @@ void SetThreadName(std::uint32_t threadId, const char* threadName) { : EXCEPTION_EXECUTE_HANDLER) { } #endif -#ifdef _XBOX +#if 0 __try { RaiseException( 0x406D1388, 0, sizeof(info) / sizeof(std::uint32_t), @@ -36,5 +36,5 @@ void SetThreadName(std::uint32_t threadId, const char* threadName) { : EXCEPTION_EXECUTE_HANDLER) { } #endif -#endif // __PS3__ +#endif // 0 } diff --git a/Minecraft.World/WorldGen/Biomes/BiomeSource.cpp b/Minecraft.World/WorldGen/Biomes/BiomeSource.cpp index 8d05b2cad..1b42db936 100644 --- a/Minecraft.World/WorldGen/Biomes/BiomeSource.cpp +++ b/Minecraft.World/WorldGen/Biomes/BiomeSource.cpp @@ -351,7 +351,7 @@ void BiomeSource::update() { cache->update(); } // #define DEBUG_SEEDS 50 // 4J added - find a seed for this biomesource that matches certain criteria -#ifdef __PSVITA__ +#if 0 int64_t BiomeSource::findSeed( LevelType* generator, bool* pServerRunning) // MGH - added pRunning, so we can early out of this @@ -418,7 +418,7 @@ int64_t BiomeSource::findSeed(LevelType* generator) tryCount++; mcprogress->progressStagePercentage(tryCount % 100); -#ifdef __PSVITA__ +#if 0 } while (!matchFound && *pServerRunning); #else } while (!matchFound); diff --git a/Minecraft.World/WorldGen/Biomes/BiomeSource.h b/Minecraft.World/WorldGen/Biomes/BiomeSource.h index 433260cf5..1a1325023 100644 --- a/Minecraft.World/WorldGen/Biomes/BiomeSource.h +++ b/Minecraft.World/WorldGen/Biomes/BiomeSource.h @@ -36,7 +36,7 @@ private: static bool getIsMatch(float* frac); // 4J added static void getFracs(intArray indices, float* fracs); // 4J added public: -#ifdef __PSVITA__ +#if 0 static int64_t findSeed( LevelType* generator, bool* pServerRunning); // MGH - added pRunning, so we can early out of diff --git a/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp b/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp index ea2e3e3b6..e0ccf322a 100644 --- a/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp +++ b/Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp @@ -27,7 +27,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) { memset(m_biomeOverride.data, Biome::plains->id, m_biomeOverride.length); } else { -#ifdef _DURANGO +#if 0 __debugbreak(); // TODO DWORD bytesRead, dwFileSize = 0; #else diff --git a/Minecraft.World/WorldGen/Layers/Layer.cpp b/Minecraft.World/WorldGen/Layers/Layer.cpp index 06bc8168b..7a7379ae7 100644 --- a/Minecraft.World/WorldGen/Layers/Layer.cpp +++ b/Minecraft.World/WorldGen/Layers/Layer.cpp @@ -3,7 +3,7 @@ #include "../../Headers/net.minecraft.world.level.h" #include "BiomeOverrideLayer.h" -#ifdef __PSVITA__ +#if 0 // AP - this is used to perform fast 64bit divides of known values #include "../../Util/libdivide.h" @@ -172,7 +172,7 @@ void Layer::initRandom(int64_t x, int64_t y) { } int Layer::nextRandom(int max) { -#ifdef __PSVITA__ +#if 0 // AP - 64bit mods are very slow on Vita. Replaced with a divide/mult for // general case and a fast divide library for specific numbers todo - this // can sometimes yield a different number to the original. There's a strange