diff --git a/targets/app/common/Game.cpp b/targets/app/common/Game.cpp index c04daa4aa..e0a5d5d98 100644 --- a/targets/app/common/Game.cpp +++ b/targets/app/common/Game.cpp @@ -521,12 +521,6 @@ int32_t Game::RegisterConfigValues(char* pType, int iValue) { return hr; } -#if defined(_WINDOWS64) -#elif defined(__linux__) -#else - -#endif - // DLC // AUTOSAVE diff --git a/targets/app/common/Network/GameNetworkManager.h b/targets/app/common/Network/GameNetworkManager.h index 02a7a30af..240a55a15 100644 --- a/targets/app/common/Network/GameNetworkManager.h +++ b/targets/app/common/Network/GameNetworkManager.h @@ -4,9 +4,6 @@ #include #include #include -#if !defined(__linux__) -#include -#endif #include "minecraft/network/INetworkService.h" #include "platform/C4JThread.h" #include "platform/network/NetTypes.h" diff --git a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp index a3c966828..d57d95314 100644 --- a/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp +++ b/targets/app/common/UI/Components/UIComponent_DebugUIMarketingGuide.cpp @@ -19,9 +19,6 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide( IggyDataValue value[1]; value[0].type = IGGY_DATATYPE_number; value[0].number = (F64)0; // WIN64 -#if defined(_WINDOWS64) || defined(__linux__) - value[0].number = (F64)0; -#endif IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, IggyPlayerRootPath(getMovie()), m_funcSetPlatform, 1, value); diff --git a/targets/app/common/UI/Controls/UIControl_Touch.cpp b/targets/app/common/UI/Controls/UIControl_Touch.cpp index 05993b64f..27ac76b77 100644 --- a/targets/app/common/UI/Controls/UIControl_Touch.cpp +++ b/targets/app/common/UI/Controls/UIControl_Touch.cpp @@ -1,8 +1,9 @@ #include "UIControl_Touch.h" +#include "app/common/Iggy/include/iggy.h" #include "app/common/UI/Controls/UIControl.h" #include "app/common/UI/Controls/UIControl_Base.h" -#include "app/common/Iggy/include/iggy.h" +#include "app/common/UI/ConsoleUIController.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif @@ -20,7 +21,6 @@ bool UIControl_Touch::setupControl(UIScene* scene, IggyValuePath* parent, void UIControl_Touch::init(int iId) { m_id = iId; -#if !defined(__linux__) switch (m_parentScene->GetParentLayer()->m_iLayer) { case eUILayer_Error: case eUILayer_Fullscreen: @@ -29,7 +29,6 @@ void UIControl_Touch::init(int iId) { ui.TouchBoxAdd(this, m_parentScene); break; } -#endif } void UIControl_Touch::ReInit() { diff --git a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp index 81fdff7c3..1f3fbff69 100644 --- a/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp +++ b/targets/app/common/UI/Scenes/Frontend Menu screens/UIScene_Intro.cpp @@ -25,9 +25,7 @@ UIScene_Intro::UIScene_Intro(int iPad, void* initData, UILayer* parentLayer) bool bChina = false; // 4J Stu - These map to values in the Actionscript -#if defined(_WINDOWS64) || defined(__linux__) int platformIdx = 0; -#endif IggyDataValue result; IggyDataValue value[3]; diff --git a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h index 3ba6f6151..c70a3724e 100644 --- a/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h +++ b/targets/app/common/UI/Scenes/Help & Options/UIScene_Credits.h @@ -21,10 +21,8 @@ class UILayer; #define DYNAMODE_FONT_CREDITS_COUNT 2 #define PS3_DOLBY_CREDIT 4 -#if defined(_WINDOWS64) || defined(__linux__) #define MAX_CREDIT_STRINGS \ (XBOXONE_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT) -#endif class UIScene_Credits : public UIScene { private: diff --git a/targets/app/common/UI/UIController.cpp b/targets/app/common/UI/UIController.cpp index 2b6551edc..0e8f16a1e 100644 --- a/targets/app/common/UI/UIController.cpp +++ b/targets/app/common/UI/UIController.cpp @@ -213,7 +213,7 @@ UIController::UIController() { // 4J Stu - This is a bit of a hack until we change the Minecraft // initialisation to store the proper screen size for other platforms -#if defined(_WINDOWS64) || defined(__linux__) +#if 1 m_fScreenWidth = 1920.0f; m_fScreenHeight = 1080.0f; m_bScreenWidthSetup = true; @@ -498,7 +498,7 @@ void UIController::tick() { void UIController::loadSkins() { std::string platformSkinPath = ""; -#if defined(_WINDOWS64) || defined(__linux__) +#if 1 if (m_fScreenHeight == 1080.0f) { platformSkinPath = "skinHDWin.swf"; } else { @@ -514,7 +514,7 @@ void UIController::loadSkins() { loadSkin(platformSkinPath, "platformskin.swf"); } -#if defined(_WINDOWS64) || defined(__linux__) +#if 1 #if defined(_WINDOWS64) // 4J Stu - Load the 720/480 skins so that we have something to fallback on @@ -616,7 +616,7 @@ void UIController::ReloadSkin() { m_iggyLibraries[i] = IGGY_INVALID_LIBRARY; } -#if defined(_WINDOWS64) || defined(__linux__) +#if 1 // 4J Stu - Don't load on a thread on windows. I haven't investigated this // in detail, so a quick fix reloadSkinThreadProc(this); @@ -668,7 +668,7 @@ int UIController::reloadSkinThreadProc(void* lpParam) { // 4J Stu - Don't do this on windows, as we never navigated forwards to // start with -#if !(defined(_WINDOWS64) || defined(__linux__)) +#if 0 controller->NavigateBack(0, false, eUIScene_COUNT, eUILayer_Tooltips); #endif } @@ -969,13 +969,8 @@ void UIController::setupCustomDrawGameState() { m_customRenderingClearRect.top = LONG_MAX; m_customRenderingClearRect.bottom = LONG_MIN; -#if defined(_WINDOWS64) - PlatformRenderer.StartFrame(); - gdraw_D3D11_setViewport_4J(); -#elif defined(__linux__) PlatformRenderer.StartFrame(); -#endif PlatformRenderer.Set_matrixDirty(); // 4J Stu - We don't need to clear this here as iggy hasn't written anything @@ -1059,11 +1054,7 @@ void UIController::setupCustomDrawGameStateAndMatrices( } void UIController::endCustomDrawGameState() { -#if defined(__linux__) PlatformRenderer.Clear(GL_DEPTH_BUFFER_BIT); -#else - PlatformRenderer.Clear(GL_DEPTH_BUFFER_BIT, &m_customRenderingClearRect); -#endif // glClear(GL_DEPTH_BUFFER_BIT); glDepthMask(false); glDisable(GL_ALPHA_TEST); @@ -2257,7 +2248,7 @@ UIController::RequestContentRestrictedMessageBox( } if (message == -1) { -#if defined(_WINDOWS64) || defined(__linux__) +#if 1 // IDS_CONTENT_RESTRICTION doesn't exist on XB1 message = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE; #else @@ -2283,7 +2274,7 @@ void UIController::setFontCachingCalculationBuffer(int length) { draw call is not large enough, Iggy will crash or otherwise behave incorrectly. */ -#if defined(_WIN64) || defined(__linux__) +#if INTPTR_MAX == INT64_MAX static const int CHAR_SIZE = 24; #else static const int CHAR_SIZE = 16; diff --git a/targets/app/common/UI/UIController.h b/targets/app/common/UI/UIController.h index ade585821..3843b63e8 100644 --- a/targets/app/common/UI/UIController.h +++ b/targets/app/common/UI/UIController.h @@ -10,17 +10,10 @@ #include "util/Timer.h" -#ifdef __linux__ - #include "app/common/Iggy/include/iggy.h" #ifndef _ENABLEIGGY #include "app/common/Iggy/iggy_stubs.h" #endif - -#elif defined(_WINDOWS64) -#include "app/windows/Iggy/include/iggy.h" -#endif - #include "UIGroup.h" #include "app/common/UI/All Platforms/IUIController.h" #include "app/common/UI/All Platforms/UIEnums.h" diff --git a/targets/app/common_sources.txt b/targets/app/common_sources.txt index 14600167c..3af0cf590 100644 --- a/targets/app/common_sources.txt +++ b/targets/app/common_sources.txt @@ -143,7 +143,6 @@ common/UI/Controls/UIControl_SlotList.cpp common/UI/Controls/UIControl_SpaceIndicatorBar.cpp common/UI/Controls/UIControl_TextInput.cpp common/UI/Controls/UIControl_TexturePackList.cpp -common/UI/Controls/UIControl_Touch.cpp common/UI/Scenes/Debug/UIScene_DebugCreateSchematic.cpp common/UI/Scenes/Debug/UIScene_DebugOptions.cpp common/UI/Scenes/Debug/UIScene_DebugOverlay.cpp diff --git a/targets/minecraft/client/gui/Minimap.cpp b/targets/minecraft/client/gui/Minimap.cpp index ca4374ca5..b34f818fa 100644 --- a/targets/minecraft/client/gui/Minimap.cpp +++ b/targets/minecraft/client/gui/Minimap.cpp @@ -71,11 +71,11 @@ void Minimap::reloadColours() { int b = ((color) & 0xff) * br / 255; // 4J - changed byte order to save having to reorder later -#if defined(_WIN64) || __linux__ +// #if defined(_WIN64) || __linux__ LUT[i] = 255 << 24 | b << 16 | g << 8 | r; -#else - LUT[i] = r << 24 | g << 16 | b << 8 | 255; -#endif +// #else +// LUT[i] = r << 24 | g << 16 | b << 8 | 255; +// #endif // pixels[i] = (255) << 24 | r << 16 | g << 8 | b; } diff --git a/targets/minecraft/client/renderer/GameRenderer.cpp b/targets/minecraft/client/renderer/GameRenderer.cpp index faea5c8b6..1d50d5887 100644 --- a/targets/minecraft/client/renderer/GameRenderer.cpp +++ b/targets/minecraft/client/renderer/GameRenderer.cpp @@ -802,25 +802,25 @@ void GameRenderer::renderItemInHand(float a, int eye) { // 4J - change brought forward from 1.8.2 void GameRenderer::turnOffLightLayer(double alpha) { // 4J - TODO FRAME_PROFILE_SCOPE(Lightmap); -#if defined(__linux__) + + // 4jcraft if (SharedConstants::TEXTURE_LIGHTING) { PlatformRenderer.TextureBindVertex(-1); } -#else - // 4jcraft: manually handle this in order to ensure that the light layer is - // turned off correctly - if (SharedConstants::TEXTURE_LIGHTING) { - glClientActiveTexture(GL_TEXTURE1); - glActiveTexture(GL_TEXTURE1); - glMatrixMode(GL_TEXTURE); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glDisable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, 0); - glClientActiveTexture(GL_TEXTURE0); - glActiveTexture(GL_TEXTURE0); - } -#endif + + // // 4jcraft: manually handle this in order to ensure that the light layer is + // // turned off correctly + // if (SharedConstants::TEXTURE_LIGHTING) { + // glClientActiveTexture(GL_TEXTURE1); + // glActiveTexture(GL_TEXTURE1); + // glMatrixMode(GL_TEXTURE); + // glLoadIdentity(); + // glMatrixMode(GL_MODELVIEW); + // glDisable(GL_TEXTURE_2D); + // glBindTexture(GL_TEXTURE_2D, 0); + // glClientActiveTexture(GL_TEXTURE0); + // glActiveTexture(GL_TEXTURE0); + // } } // 4J - change brought forward from 1.8.2 @@ -828,7 +828,7 @@ void GameRenderer::turnOnLightLayer( double alpha, bool scaleLight) { // 4jcraft: added scaleLight for entity lighting FRAME_PROFILE_SCOPE(Lightmap); -#if defined(__linux__) +#if 1 if (!SharedConstants::TEXTURE_LIGHTING) return; const int textureId = getLightTexture(mc->player->GetXboxPad(), mc->level); @@ -988,11 +988,11 @@ void GameRenderer::updateLightTexture(float a) { int g = (int)(_g * 255); int b = (int)(_b * 255); -#if defined(_WIN64) || __linux__ +// #if defined(_WIN64) || __linux__ lightPixels[j][i] = alpha << 24 | b << 16 | g << 8 | r; -#else - lightPixels[j][i] = r << 24 | g << 16 | b << 8 | alpha; -#endif +// #else +// lightPixels[j][i] = r << 24 | g << 16 | b << 8 | alpha; +// #endif } mc->textures->replaceTextureDirect(lightPixels[j], 16, 16, diff --git a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp index 3bdeecbc1..139b65d61 100644 --- a/targets/minecraft/client/renderer/ItemInHandRenderer.cpp +++ b/targets/minecraft/client/renderer/ItemInHandRenderer.cpp @@ -460,14 +460,15 @@ void ItemInHandRenderer::render(float a) { std::floor(player->z), 0); int u = col % 65536; int v = col / 65536; -#if defined(__linux__) + + // 4jcraft static int lightmapLogCount = 0; if (lightmapLogCount < 8) { ++lightmapLogCount; - Log::info("[linux-lightmap] item-hand raw=0x%08x uv=(%d,%d)\n", col, + Log::info("[4jcraft-lightmap] item-hand raw=0x%08x uv=(%d,%d)\n", col, u, v); } -#endif + glMultiTexCoord2f(GL_TEXTURE1, u / 1.0f, v / 1.0f); glColor4f(1, 1, 1, 1); } diff --git a/targets/minecraft/client/renderer/Tesselator.cpp b/targets/minecraft/client/renderer/Tesselator.cpp index 0d1e7bff0..f851e13b0 100644 --- a/targets/minecraft/client/renderer/Tesselator.cpp +++ b/targets/minecraft/client/renderer/Tesselator.cpp @@ -412,7 +412,7 @@ typedef unsigned short hfloat; extern hfloat convertFloatToHFloat(float f); extern float convertHFloatToFloat(hfloat hf); -#if defined(__linux__) +#if 1 namespace { void packLinuxLightmapCoords(int tex2, std::int16_t& u, std::int16_t& v) { u = static_cast(tex2 & 0xffff); @@ -469,7 +469,7 @@ void Tesselator::vertex(float x, float y, float z) { pShortData[5] = (((int)(v * 8192.0f)) & 0xffff); std::int16_t u2 = static_cast(_tex2 & 0xffff); std::int16_t v2 = static_cast((_tex2 >> 16) & 0xffff); -#if defined(__linux__) +#if 1 packLinuxLightmapCoords(_tex2, u2, v2); logLinuxPackedLightmapCoords("compact", _tex2, u2, v2); #endif @@ -524,7 +524,7 @@ void Tesselator::vertex(float x, float y, float z) { } if (hasTexture2) { // 4jcraft: we will be lighting the blocks right in here -#if defined(__linux__) +#if 1 std::int16_t tex2U; std::int16_t tex2V; packLinuxLightmapCoords(_tex2, tex2U, tex2V); diff --git a/targets/minecraft/network/packet/RemoveEntitiesPacket.cpp b/targets/minecraft/network/packet/RemoveEntitiesPacket.cpp index 54a648628..50a4c2a07 100644 --- a/targets/minecraft/network/packet/RemoveEntitiesPacket.cpp +++ b/targets/minecraft/network/packet/RemoveEntitiesPacket.cpp @@ -38,6 +38,6 @@ int RemoveEntitiesPacket::getEstimatedSize() { return 1 + (ids.size() * 4); } 4J: These are necesary on the PS3. (and 4). */ -#if (0 || 0 || 0 || defined __linux__) +#if 1 const int RemoveEntitiesPacket::MAX_PER_PACKET; #endif diff --git a/targets/minecraft/world/item/Item.cpp b/targets/minecraft/world/item/Item.cpp index 74e7200ce..e7575f12d 100644 --- a/targets/minecraft/world/item/Item.cpp +++ b/targets/minecraft/world/item/Item.cpp @@ -1712,7 +1712,7 @@ attrAttrModMap* Item::getDefaultAttributeModifiers() { 4J: These are necesary on the PS3. (and 4 and Vita). */ -#if (0 || 0 || 0 || defined __linux__) +#if 1 const int Item::shovel_iron_Id; const int Item::pickAxe_iron_Id; const int Item::hatchet_iron_Id;