cleanup: remove console branches from render texture and world helpers

This commit is contained in:
MatthewBeshay 2026-03-26 19:24:04 +11:00
parent 6ef7d05f7e
commit 1fecbf297a
139 changed files with 535 additions and 535 deletions

View file

@ -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);

View file

@ -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<std::uint8_t*>(
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);

View file

@ -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);

View file

@ -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);

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -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<LoginPacket> 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<LoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<sce::Toolkit::NP::FriendsList>
friendList;
int ret = -1;
@ -2072,7 +2072,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> packet) {
}
}
}
#else // __ORBIS__
#else // 0
sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::FriendsList>
friendList;
@ -2097,7 +2097,7 @@ void ClientConnection::handlePreLogin(std::shared_ptr<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<PreLoginPacket> 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<RespawnPacket> 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<unsigned int>(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<Merchant> 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;

View file

@ -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

View file

@ -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

View file

@ -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<ServerPlayer> player = nullptr;

View file

@ -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;
}

View file

@ -1,20 +1,20 @@
#include "stdafx.h"
#ifndef __PS3__
#if 1
//#include <compressapi.h>
#endif // __PS3__
#endif // 0
#ifdef __PS3__
#if 0
#include "../GameState/StatsCounter.h"
#include <libsn.h>
#include <libsntuner.h>
#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 <libperf.h>
#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

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -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,

View file

@ -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 <xcam.h>
DWORD XCamInitialize(){ return 0; }

View file

@ -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(),

View file

@ -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;

View file

@ -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;

View file

@ -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)));

View file

@ -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<Entity> player) const;
float squishedDistanceToSqr(std::shared_ptr<Entity> player);
void reset();

View file

@ -18,7 +18,7 @@ void EnchantTableRenderer::render(std::shared_ptr<TileEntity> _table, double x,
std::shared_ptr<EnchantmentTableEntity> table =
std::dynamic_pointer_cast<EnchantmentTableEntity>(_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

View file

@ -86,7 +86,7 @@ void EnderDragonRenderer::renderModel(std::shared_ptr<LivingEntity> _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<LivingEntity> _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);

View file

@ -1,7 +1,7 @@
#pragma once
#include "MobRenderer.h"
#ifdef _XBOX
#if 0
class EnderDragon;
#endif
class DragonModel;

View file

@ -93,7 +93,7 @@ int EndermanRenderer::prepareArmor(std::shared_ptr<LivingEntity> _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);

View file

@ -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 =

View file

@ -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

View file

@ -511,7 +511,7 @@ void LivingEntityRenderer::renderNameTag(std::shared_ptr<LivingEntity> 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:

View file

@ -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

View file

@ -33,7 +33,7 @@ int SpiderRenderer::prepareArmor(std::shared_ptr<LivingEntity> _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

View file

@ -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();

View file

@ -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 =

View file

@ -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<LivingEntity> player, int layer,
return count;
}
#ifdef __PSVITA__
#if 0
#include <stdlib.h>
// 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

View file

@ -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,

View file

@ -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> 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),

View file

@ -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;

View file

@ -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

View file

@ -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),

View file

@ -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.

View file

@ -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);

View file

@ -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

View file

@ -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();

View file

@ -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

View file

@ -78,7 +78,7 @@ protected:
void loadDefaultUI();
void loadDefaultColourTable();
void loadDefaultHTMLColourTable();
#ifdef _XBOX
#if 0
void loadHTMLColourTableFromXuiScene(HXUIOBJ hObj);
#endif

View file

@ -15,7 +15,7 @@
#include <cstdint>
#include <limits>
#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"");

View file

@ -35,7 +35,7 @@ public:
}
// Added for sound banks with MashUp packs
#ifdef _XBOX
#if 0
IXACT3WaveBank* m_pStreamedWaveBank;
IXACT3SoundBank* m_pSoundBank;
#endif

View file

@ -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"");

View file

@ -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");

View file

@ -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));

View file

@ -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
}

View file

@ -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();

View file

@ -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

View file

@ -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

View file

@ -88,7 +88,7 @@ std::vector<Texture*>* 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);

View file

@ -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));

View file

@ -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; }

View file

@ -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();

View file

@ -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;

View file

@ -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);

View file

@ -2,9 +2,9 @@
#include <cstdint>
#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,

View file

@ -65,7 +65,7 @@ protected:
static const int AttributeNames[];
};
#ifdef __ORBIS__
#if 0
typedef std::unordered_map<eATTRIBUTE_ID, AttributeModifier*, std::hash<int>>
attrAttrModMap;
#else

View file

@ -5,7 +5,7 @@ class ModifiableAttributeInstance;
class BaseAttributeMap {
protected:
// unordered_map<Attribute *, AttributeInstance *> attributesByObject;
#ifdef __ORBIS__
#if 0
std::unordered_map<eATTRIBUTE_ID, AttributeInstance*, std::hash<int> >
attributesById;
#else

View file

@ -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);

View file

@ -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

View file

@ -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> 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

View file

@ -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

View file

@ -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);

View file

@ -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;

View file

@ -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))
{

View file

@ -5,7 +5,7 @@ class CommandSender;
class CommandDispatcher {
private:
#ifdef __ORBIS__
#if 0
std::unordered_map<EGameCommand, Command*, std::hash<int>> commandsById;
#else
std::unordered_map<EGameCommand, Command*> commandsById;

View file

@ -98,7 +98,7 @@ std::shared_ptr<ItemInstance> 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 =

View file

@ -72,7 +72,7 @@ void FurnaceResultSlot::checkTakeAchievements(
}
}
#ifdef _DURANGO
#if 0
if (!player->level->isClientSide && removeCount > 0) {
player->awardStat(
GenericStats::itemsSmelted(carried->id),

View file

@ -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)) {

View file

@ -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"";

View file

@ -40,13 +40,13 @@ public:
virtual std::vector<FileEntry*>* 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<FileEntry*>* getValidPlayerDatFiles() = 0;
#endif //__PS3__
#endif //0
virtual int getSaveVersion() = 0;
virtual int getOriginalSaveVersion() = 0;

View file

@ -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<FileEntry*>* playerFiles = sourceSave->getValidPlayerDatFiles();
#else
std::vector<FileEntry*>* 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

View file

@ -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<FileEntry*>* 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<FileEntry*>* getValidPlayerDatFiles();
#endif //__PS3__
#endif //0
virtual int getSaveVersion();
virtual int getOriginalSaveVersion();

View file

@ -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<FileEntry*>* ConsoleSaveFileSplit::getRegionFilesByDimension(
return files;
}
#if defined(__PS3__) || defined(__ORBIS__)
#if 0 || 0
std::wstring ConsoleSaveFileSplit::getPlayerDataFilenameForLoad(
const PlayerUID& pUID) {
return header.getPlayerDataFilenameForLoad(pUID);

View file

@ -145,11 +145,11 @@ public:
virtual std::vector<FileEntry*>* 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<FileEntry*>* getValidPlayerDatFiles();
#endif //__PS3__
#endif //0
virtual int getSaveVersion();
virtual int getOriginalSaveVersion();

View file

@ -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<FileEntry*>* 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<FileEntry*>* 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<FileEntry*>* 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<FileEntry*>* 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;

View file

@ -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<FileEntry*> 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<FileEntry*>* 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<FileEntry*>* getDatFilesWithOnlineID(const PlayerUID& pUID);

View file

@ -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

View file

@ -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__
#endif // 0

View file

@ -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);

View file

@ -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

View file

@ -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();

View file

@ -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);

View file

@ -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

View file

@ -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

View file

@ -77,7 +77,7 @@ std::shared_ptr<ItemInstance> 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());

View file

@ -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;

View file

@ -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

View file

@ -2272,7 +2272,7 @@ void Level::tick(std::shared_ptr<Entity> 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<Entity> 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<std::shared_ptr<Entity> >* 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<std::shared_ptr<Entity> >* Level::getEntities(
}
MemSect(0);
#ifdef __PSVITA__
#if 0
#ifdef _ENTITIES_RW_SECTION
LeaveCriticalRWSection(&LevelChunk::m_csEntities, false);
#else
@ -3475,7 +3475,7 @@ std::vector<std::shared_ptr<Entity> >* Level::getEntitiesOfClass(
std::vector<std::shared_ptr<Entity> >* es =
new std::vector<std::shared_ptr<Entity> >();
#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<std::shared_ptr<Entity> >* Level::getEntitiesOfClass(
}
}
#ifdef __PSVITA__
#if 0
#ifdef _ENTITIES_RW_SECTION
LeaveCriticalRWSection(&LevelChunk::m_csEntities, false);
#else

View file

@ -447,7 +447,7 @@ public:
void toggleDownfall();
protected:
#ifdef __PSVITA__
#if 0
// AP - See CustomSet.h for an explanation of this
CustomSet chunksToPoll;
#else

View file

@ -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<Entity> 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<Entity> 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<Entity> 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
}

View file

@ -17,7 +17,7 @@ class EntitySelector;
#define SHARING_ENABLED
class TileCompressData_SPU;
#if 0 //__PSVITA__
#if 0 //0
#define _ENTITIES_RW_SECTION
#endif

View file

@ -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);

View file

@ -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);

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