From f19563bbd781ced381a0cac6e3685ecb94364640 Mon Sep 17 00:00:00 2001 From: MatthewBeshay <92357869+MatthewBeshay@users.noreply.github.com> Date: Thu, 26 Mar 2026 20:18:29 +1100 Subject: [PATCH] cleanup: flatten dead branches in common app and ui code --- Minecraft.Client/Minecraft.cpp | 733 +---- Minecraft.Client/Minecraft.h | 14 +- Minecraft.Client/MinecraftServer.cpp | 279 +- Minecraft.Client/MinecraftServer.h | 10 +- .../Platform/Common/App_Defines.h | 13 - Minecraft.Client/Platform/Common/App_enums.h | 157 - .../Platform/Common/App_structs.h | 25 - .../Platform/Common/Audio/SoundEngine.cpp | 283 +- .../Platform/Common/Audio/SoundEngine.h | 15 +- .../Platform/Common/Audio/SoundNames.cpp | 4 - .../Platform/Common/Console_Awards_enum.h | 4 +- .../Platform/Common/Console_Utils.cpp | 12 +- .../Platform/Common/Consoles_App.cpp | 2587 +---------------- .../Platform/Common/Consoles_App.h | 171 +- .../Platform/Common/DLC/DLCAudioFile.cpp | 2 +- .../Common/DLC/DLCGameRulesHeader.cpp | 44 - .../Platform/Common/DLC/DLCManager.cpp | 25 +- .../Platform/Common/DLC/DLCManager.h | 3 - .../Platform/Common/DLC/DLCPack.cpp | 41 +- .../Platform/Common/DLC/DLCPack.h | 12 - .../Platform/Common/DLC/DLCSkinFile.cpp | 12 - .../Common/GameRules/GameRuleManager.cpp | 43 +- .../GameRules/LevelGenerationOptions.cpp | 19 +- .../Leaderboards/LeaderboardManager.cpp | 2 - .../Common/Leaderboards/LeaderboardManager.h | 13 - .../Leaderboards/SonyLeaderboardManager.cpp | 99 +- .../Leaderboards/SonyLeaderboardManager.h | 9 - .../Common/Network/GameNetworkManager.cpp | 496 +--- .../Common/Network/GameNetworkManager.h | 35 +- .../Network/PlatformNetworkManagerInterface.h | 9 +- .../Network/PlatformNetworkManagerStub.h | 2 - .../Platform/Common/Network/SessionInfo.h | 66 - .../Common/Telemetry/TelemetryManager.cpp | 8 - .../Platform/Common/Tutorial/FullTutorial.cpp | 17 - .../Platform/Common/Tutorial/Tutorial.cpp | 55 - .../Platform/Common/Tutorial/Tutorial.h | 16 - .../Common/Tutorial/XuiCraftingTask.cpp | 11 - .../Platform/Common/UI/IUIController.h | 3 - .../UI/IUIScene_AbstractContainerMenu.cpp | 125 +- .../UI/IUIScene_AbstractContainerMenu.h | 16 +- .../Common/UI/IUIScene_CraftingMenu.cpp | 13 +- .../Common/UI/IUIScene_CreativeMenu.cpp | 49 +- .../Common/UI/IUIScene_EnchantingMenu.cpp | 6 - .../Platform/Common/UI/IUIScene_PauseMenu.cpp | 258 -- .../Platform/Common/UI/IUIScene_StartGame.cpp | 87 - .../Common/UI/IUIScene_TradingMenu.cpp | 3 - Minecraft.Client/Platform/Common/UI/UI.h | 6 - .../UI/UIComponent_DebugUIMarketingGuide.cpp | 12 +- .../UI/UIComponent_PressStartToPlay.cpp | 22 - .../Common/UI/UIComponent_Tooltips.cpp | 112 - .../Platform/Common/UI/UIComponent_Tooltips.h | 40 - .../Common/UI/UIComponent_TutorialPopup.cpp | 48 - .../Platform/Common/UI/UIControl.cpp | 13 - .../Platform/Common/UI/UIControl.h | 5 - .../Platform/Common/UI/UIControl_Button.cpp | 12 - .../Common/UI/UIControl_ButtonList.cpp | 48 - .../Platform/Common/UI/UIControl_ButtonList.h | 4 - .../Platform/Common/UI/UIControl_CheckBox.cpp | 11 - .../Common/UI/UIControl_DynamicLabel.cpp | 11 - .../Common/UI/UIControl_HTMLLabel.cpp | 11 - .../Common/UI/UIControl_LeaderboardList.cpp | 33 - .../Common/UI/UIControl_LeaderboardList.h | 7 - .../Common/UI/UIControl_PlayerSkinPreview.cpp | 8 +- .../Platform/Common/UI/UIControl_Slider.cpp | 11 - .../Common/UI/UIControl_TextInput.cpp | 11 - .../Common/UI/UIControl_TexturePackList.cpp | 11 - .../Platform/Common/UI/UIController.cpp | 1004 +------ .../Platform/Common/UI/UIController.h | 35 +- Minecraft.Client/Platform/Common/UI/UIEnums.h | 17 +- .../Platform/Common/UI/UIFontData.cpp | 10 +- .../Platform/Common/UI/UIGroup.cpp | 28 - Minecraft.Client/Platform/Common/UI/UIGroup.h | 10 - .../Platform/Common/UI/UILayer.cpp | 44 +- Minecraft.Client/Platform/Common/UI/UILayer.h | 15 - .../Platform/Common/UI/UIScene.cpp | 142 +- Minecraft.Client/Platform/Common/UI/UIScene.h | 17 - .../UI/UIScene_AbstractContainerMenu.cpp | 27 +- .../Platform/Common/UI/UIScene_AnvilMenu.cpp | 28 - .../Common/UI/UIScene_ConnectingProgress.cpp | 34 - .../Common/UI/UIScene_ConnectingProgress.h | 3 - .../Common/UI/UIScene_ControlsMenu.cpp | 58 +- .../Platform/Common/UI/UIScene_ControlsMenu.h | 5 - .../Common/UI/UIScene_CraftingMenu.cpp | 136 +- .../Platform/Common/UI/UIScene_CraftingMenu.h | 34 - .../Common/UI/UIScene_CreateWorldMenu.cpp | 481 +-- .../Common/UI/UIScene_CreateWorldMenu.h | 10 - .../Common/UI/UIScene_CreativeMenu.cpp | 65 - .../Platform/Common/UI/UIScene_CreativeMenu.h | 12 - .../Platform/Common/UI/UIScene_Credits.cpp | 555 +--- .../Platform/Common/UI/UIScene_Credits.h | 14 +- .../Common/UI/UIScene_DLCMainMenu.cpp | 116 - .../Platform/Common/UI/UIScene_DLCMainMenu.h | 3 - .../Common/UI/UIScene_DLCOffersMenu.cpp | 683 +---- .../Common/UI/UIScene_DLCOffersMenu.h | 29 - .../Platform/Common/UI/UIScene_DeathMenu.cpp | 29 - .../Platform/Common/UI/UIScene_DeathMenu.h | 3 - .../Platform/Common/UI/UIScene_EULA.cpp | 37 - .../Platform/Common/UI/UIScene_EULA.h | 2 - .../Platform/Common/UI/UIScene_EndPoem.cpp | 14 - .../Common/UI/UIScene_FullscreenProgress.cpp | 12 - .../Platform/Common/UI/UIScene_HUD.h | 5 - .../Common/UI/UIScene_HelpAndOptionsMenu.cpp | 17 +- .../Platform/Common/UI/UIScene_HowToPlay.cpp | 37 - .../Common/UI/UIScene_HowToPlayMenu.cpp | 32 - .../Common/UI/UIScene_HowToPlayMenu.h | 4 - .../UI/UIScene_InGameHostOptionsMenu.cpp | 3 - .../Common/UI/UIScene_InGameInfoMenu.cpp | 100 +- .../Common/UI/UIScene_InGameInfoMenu.h | 6 - .../UI/UIScene_InGamePlayerOptionsMenu.cpp | 15 +- .../UI/UIScene_InGameSaveManagementMenu.cpp | 62 +- .../UI/UIScene_InGameSaveManagementMenu.h | 9 - .../Platform/Common/UI/UIScene_Intro.cpp | 100 +- .../Platform/Common/UI/UIScene_Intro.h | 17 +- .../Platform/Common/UI/UIScene_JoinMenu.cpp | 136 +- .../Platform/Common/UI/UIScene_JoinMenu.h | 4 - .../Platform/Common/UI/UIScene_Keyboard.h | 2 - .../Common/UI/UIScene_LanguageSelector.cpp | 3 - .../Common/UI/UIScene_LanguageSelector.h | 10 - .../UI/UIScene_LaunchMoreOptionsMenu.cpp | 110 +- .../Common/UI/UIScene_LaunchMoreOptionsMenu.h | 21 - .../Common/UI/UIScene_LeaderboardsMenu.cpp | 233 +- .../Platform/Common/UI/UIScene_LoadMenu.cpp | 649 +---- .../Platform/Common/UI/UIScene_LoadMenu.h | 13 - .../Common/UI/UIScene_LoadOrJoinMenu.cpp | 1545 +--------- .../Common/UI/UIScene_LoadOrJoinMenu.h | 101 +- .../Platform/Common/UI/UIScene_MainMenu.cpp | 1069 +------ .../Platform/Common/UI/UIScene_MainMenu.h | 28 - .../Platform/Common/UI/UIScene_MessageBox.cpp | 6 - .../Common/UI/UIScene_NewUpdateMessage.cpp | 11 - .../Common/UI/UIScene_NewUpdateMessage.h | 2 - .../Platform/Common/UI/UIScene_PauseMenu.cpp | 964 +----- .../Platform/Common/UI/UIScene_PauseMenu.h | 33 - .../Common/UI/UIScene_QuadrantSignin.cpp | 87 - .../Common/UI/UIScene_QuadrantSignin.h | 9 - .../Common/UI/UIScene_ReinstallMenu.cpp | 3 - .../Common/UI/UIScene_SaveMessage.cpp | 76 - .../Platform/Common/UI/UIScene_SaveMessage.h | 6 - .../Common/UI/UIScene_SettingsAudioMenu.cpp | 3 - .../Common/UI/UIScene_SettingsControlMenu.cpp | 3 - .../UI/UIScene_SettingsGraphicsMenu.cpp | 3 - .../Common/UI/UIScene_SettingsMenu.cpp | 10 - .../Common/UI/UIScene_SettingsOptionsMenu.cpp | 16 +- .../Common/UI/UIScene_SettingsUIMenu.cpp | 3 - .../Common/UI/UIScene_SignEntryMenu.cpp | 35 - .../Common/UI/UIScene_SkinSelectMenu.cpp | 396 +-- .../Common/UI/UIScene_SkinSelectMenu.h | 44 - .../Common/UI/UIScene_TeleportMenu.cpp | 11 +- .../Common/UI/UIScene_TradingMenu.cpp | 6 - .../Common/UI/UIScene_TrialExitUpsell.cpp | 16 - .../Common/UI/UIScene_TrialExitUpsell.h | 2 - .../Platform/Common/UI/UIString.cpp | 6 - .../Platform/Common/UI/UIString.h | 25 - .../Platform/Common/UI/UIStructs.h | 21 - .../Platform/Common/XML/xmlFilesCallback.h | 18 +- 154 files changed, 297 insertions(+), 15903 deletions(-) diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index d6828122a..e416094ad 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -29,7 +29,7 @@ #include "UI/Screens/ErrorScreen.h" #include "UI/Screens/TitleScreen.h" #include "UI/Screens/InventoryScreen.h" -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) #include "UI/Screens/CreativeInventoryScreen.h" #endif #include "UI/Screens/InBedChatScreen.h" @@ -88,21 +88,6 @@ int Minecraft::frameTimePos = 0; int64_t Minecraft::warezTime = 0; File Minecraft::workDir = File(L""); -#if 0 - -TOUCHSCREENRECT QuickSelectRect[3] = { - {560, 890, 1360, 980}, - {450, 840, 1449, 960}, - {320, 840, 1600, 970}, -}; - -int QuickSelectBoxWidth[3] = {89, 111, 142}; - -// 4J - TomK ToDo: these really shouldn't be magic numbers, it should read the -// hud position from flash. -int iToolTipOffset = 85; - -#endif ResourceLocation Minecraft::DEFAULT_FONT_LOCATION = ResourceLocation(TN_DEFAULT_FONT); @@ -220,17 +205,15 @@ Minecraft::Minecraft(Component* mouseComponent, Canvas* parent, // 4J-PB - Removed it from here on Orbis due to it causing a crash with the // network init. We should work out why... -#if 1 this->soundEngine->init(NULL); -#endif -#ifndef DISABLE_LEVELTICK_THREAD +#if !defined(DISABLE_LEVELTICK_THREAD) levelTickEventQueue = new C4JThread::EventQueue(levelTickUpdateFunc, levelTickThreadInitFunc, "LevelTick_EventQueuePoll"); levelTickEventQueue->setProcessor(3); levelTickEventQueue->setPriority(THREAD_PRIORITY_NORMAL); -#endif // DISABLE_LEVELTICK_THREAD +#endif } void Minecraft::clearConnectionFailed() { @@ -247,70 +230,6 @@ void Minecraft::connectTo(const std::wstring& server, int port) { } void Minecraft::init() { -#if 0 // 4J - removed - if (parent != null) - { - Graphics g = parent.getGraphics(); - if (g != null) { - g.setColor(Color.BLACK); - g.fillRect(0, 0, width, height); - g.dispose(); - } - Display.setParent(parent); - } else { - if (fullscreen) { - Display.setFullscreen(true); - width = Display.getDisplayMode().getWidth(); - height = Display.getDisplayMode().getHeight(); - if (width <= 0) width = 1; - if (height <= 0) height = 1; - } else { - Display.setDisplayMode(new DisplayMode(width, height)); - } - } - - Display.setTitle("Minecraft " + VERSION_STRING); - try { - Display.create(); - /* - * System.out.println("LWJGL version: " + Sys.getVersion()); - * System.out.println("GL RENDERER: " + - * GL11.glGetString(GL11.GL_RENDERER)); - * System.out.println("GL VENDOR: " + - * GL11.glGetString(GL11.GL_VENDOR)); - * System.out.println("GL VERSION: " + - * GL11.glGetString(GL11.GL_VERSION)); ContextCapabilities caps = - * GLContext.getCapabilities(); System.out.println("OpenGL 3.0: " + - * caps.OpenGL30); System.out.println("OpenGL 3.1: " + - * caps.OpenGL31); System.out.println("OpenGL 3.2: " + - * caps.OpenGL32); System.out.println("ARB_compatibility: " + - * caps.GL_ARB_compatibility); if (caps.OpenGL32) { IntBuffer buffer - * = ByteBuffer.allocateDirect(16 * - * 4).order(ByteOrder.nativeOrder()).asIntBuffer(); - * GL11.glGetInteger(GL32.GL_CONTEXT_PROFILE_MASK, buffer); int - * profileMask = buffer.get(0); System.out.println("PROFILE MASK: " - * + Integer.toBinaryString(profileMask)); - * System.out.println("CORE PROFILE: " + ((profileMask & - * GL32.GL_CONTEXT_CORE_PROFILE_BIT) != 0)); - * System.out.println("COMPATIBILITY PROFILE: " + ((profileMask & - * GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0)); } - */ - } catch (LWJGLException e) { - // This COULD be because of a bug! A delay followed by a new attempt - // is supposed to fix it. - e.printStackTrace(); - try { - Thread.sleep(1000); - } catch (InterruptedException e1) { - } - Display.create(); - } - - if (Minecraft.FLYBY_MODE) { - glPixelStorei(GL_PACK_ALIGNMENT, 1); - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - } -#endif // glClearColor(0.2f, 0.2f, 0.2f, 1); @@ -363,14 +282,6 @@ void Minecraft::init() { // Keyboard::create(); Mouse::create(); -#if 0 // 4J - removed - mouseHandler = new MouseHandler(parent); - try { - Controllers.create(); - } catch (Exception e) { - e.printStackTrace(); - } -#endif MemSect(31); checkGlError(L"Pre startup"); @@ -433,7 +344,7 @@ void Minecraft::init() { void Minecraft::renderLoadingScreen() { // 4J Unused // testing stuff on vita just now -#if (0 || defined(ENABLE_JAVA_GUIS)) +#if defined(ENABLE_JAVA_GUIS) ScreenSizeCalculator ssc(options, width, height); // xxx @@ -556,7 +467,7 @@ void Minecraft::setScreen(Screen* screen) { screen = new TitleScreen(); } else if (player != NULL && !ui.GetMenuDisplayed(player->GetXboxPad()) && player->getHealth() <= 0) { -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) screen = new DeathScreen(); #else // 4J Stu - If we exit from the death screen then we are saved as being @@ -590,7 +501,7 @@ void Minecraft::setScreen(Screen* screen) { // 4J-PB - if a screen has been set, go into menu mode // it's possible that player doesn't exist here yet // 4jcraft: reuse this for the java GUI -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) if (screen != NULL && player != NULL) { if (player && player->GetXboxPad() != -1) { InputManager.SetMenuDisplayed(player->GetXboxPad(), true); @@ -629,7 +540,7 @@ void Minecraft::destroy() { screen = new TitleScreen(); } else if (player != NULL && !ui.GetMenuDisplayed(player->GetXboxPad()) && player->getHealth() <= 0) { -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) screen = new DeathScreen(); #else // 4J Stu - If we exit from the death screen then we are saved as being @@ -662,7 +573,7 @@ void Minecraft::destroy() { // 4J-PB - if a screen has been set, go into menu mode // it's possible that player doesn't exist here yet -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) if (screen != NULL) { if (player && player->GetXboxPad() != -1) { InputManager.SetMenuDisplayed(player->GetXboxPad(), true); @@ -691,161 +602,6 @@ void Minecraft::destroy() { // 4J-PB - splitting this function into 3 parts, so we can call the middle part // from our xbox game loop -#if 0 -void Minecraft::run() -{ - running = true; - // try { // 4J - removed try/catch - init(); - // } catch (Exception e) { - // e.printStackTrace(); - // crash(new CrashReport("Failed to start game", e)); - // return; - // } - // try { // 4J - removed try/catch - if (Minecraft::FLYBY_MODE) - { - generateFlyby(); - return; - } - - int64_t lastTime = System::currentTimeMillis(); - int frames = 0; - - while (running) - { - // try { // 4J - removed try/catch - // if (minecraftApplet != null && !minecraftApplet.isActive()) break; // 4J - removed - AABB::resetPool(); - Vec3::resetPool(); - - // if (parent == NULL && Display.isCloseRequested()) { // 4J - removed - // stop(); - // } - - if (pause && level != NULL) - { - float lastA = timer->a; - timer->advanceTime(); - timer->a = lastA; - } - else - { - timer->advanceTime(); - } - - int64_t beforeTickTime = System::nanoTime(); - for (int i = 0; i < timer->ticks; i++) - { - ticks++; - // try { // 4J - try/catch removed - tick(); - // } catch (LevelConflictException e) { - // this.level = null; - // setLevel(null); - // setScreen(new LevelConflictScreen()); - // } - } - int64_t tickDuraction = System::nanoTime() - beforeTickTime; - checkGlError(L"Pre render"); - - TileRenderer::fancy = options->fancyGraphics; - - // if (pause) timer.a = 1; - - soundEngine->update(player, timer->a); - - glEnable(GL_TEXTURE_2D); - if (level != NULL) level->updateLights(); - - // if (!Keyboard::isKeyDown(Keyboard.KEY_F7)) Display.update(); // 4J - removed - - if (player != NULL && player->isInWall()) options->thirdPersonView = false; - if (!noRender) - { - if (gameMode != NULL) gameMode->render(timer->a); - gameRenderer->render(timer->a); - } - - /* 4J - removed - if (!Display::isActive()) - { - if (fullscreen) - { - this->toggleFullScreen(); - } - Sleep(10); - } - */ - - if (options->renderDebug) - { - renderFpsMeter(tickDuraction); - } - else - { - lastTimer = System::nanoTime(); - } - - achievementPopup->render(); - - Sleep(0); // 4J - was Thread.yield() - - // if (Keyboard::isKeyDown(Keyboard::KEY_F7)) Display.update(); // 4J - removed condition - Display::update(); - - // checkScreenshot(); // 4J - removed - - /* 4J - removed - if (parent != NULL && !fullscreen) - { - if (parent.getWidth() != width || parent.getHeight() != height) - { - width = parent.getWidth(); - height = parent.getHeight(); - if (width <= 0) width = 1; - if (height <= 0) height = 1; - - resize(width, height); - } - } - */ - checkGlError(L"Post render"); - frames++; - pause = !isClientSide() && screen != NULL && screen->isPauseScreen(); - - while (System::currentTimeMillis() >= lastTime + 1000) - { - fpsString = _toString(frames) + L" fps, " + _toString(Chunk::updates) + L" chunk updates"; - Chunk::updates = 0; - lastTime += 1000; - frames = 0; - } - /* - } catch (LevelConflictException e) { - this.level = null; - setLevel(null); - setScreen(new LevelConflictScreen()); - } catch (OutOfMemoryError e) { - emergencySave(); - setScreen(new OutOfMemoryScreen()); - System.gc(); - } - */ - } - /* - } catch (StopGameException e) { - } catch (Throwable e) { - emergencySave(); - e.printStackTrace(); - crash(new CrashReport("Unexpected error", e)); - } finally { - destroy(); - } - */ - destroy(); -} -#endif void Minecraft::run() { running = true; @@ -1011,9 +767,6 @@ bool Minecraft::addLocalPlayer(int idx) { } else { app.DebugPrintf("g_NetworkManager.AddLocalPlayerByUserIndex failed\n"); -#if 0 - ProfileManager.RemoveGamepadFromGame(idx); -#endif } return success; @@ -1151,11 +904,6 @@ void Minecraft::removeLocalPlayerIdx(int idx) { } getLevel(localplayers[idx]->dimension)->removeEntity(localplayers[idx]); -#if 0 - // 4J Stu - Fix for #12368 - Crash: Game crashes when saving then - // exiting and selecting to save - app.TutorialSceneNavigateBack(idx); -#endif // 4J Stu - Fix for #13257 - CRASH: Gameplay: Title crashed after // exiting the tutorial It doesn't matter if they were in the tutorial @@ -1176,16 +924,8 @@ void Minecraft::removeLocalPlayerIdx(int idx) { // Not sure how this works on qnet, but for other platforms, calling // RemoveLocalPlayerByUserIndex won't do anything if there isn't a local // user to remove Now just updating the UI directly in this case -#if 0 - // 4J Stu - A signout early in the game creation before this player has - // connected to the game server - updateXui = false; -#endif // 4J Stu - Adding this back in for exactly the reason my comment above // suggests it was added in the first place -#if 0 || 0 - g_NetworkManager.RemoveLocalPlayerByUserIndex(idx); -#endif } localplayers[idx] = nullptr; @@ -1235,7 +975,7 @@ void Minecraft::run_middle() { if (lastTime == 0) lastTime = System::nanoTime(); static int frames = 0; -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) // 4jcraft: while the java ui is leaving world, don't run the rest of // run_middle if (exitingWorldRightNow) { @@ -1329,7 +1069,7 @@ void Minecraft::run_middle() { ProfileManager.GetPrimaryPad(), eAppAction_AutosaveSaveGame); // app.SetAutosaveTimerTime(); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) { // print the time SYSTEMTIME UTCSysTime; @@ -1454,15 +1194,10 @@ void Minecraft::run_middle() { 1LL << MINECRAFT_ACTION_PAUSEMENU; app.DebugPrintf( "PAUSE PRESSED - ipad = %d, Storing press\n", i); -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) pauseGame(); #endif } -#if 0 - if (InputManager.ButtonPressed(i, ACTION_MENU_GTC_PAUSE)) - localplayers[i]->ullButtonsPressed |= - 1LL << ACTION_MENU_GTC_PAUSE; -#endif if (InputManager.ButtonPressed(i, MINECRAFT_ACTION_DROP)) localplayers[i]->ullButtonsPressed |= 1LL << MINECRAFT_ACTION_DROP; @@ -1489,7 +1224,7 @@ void Minecraft::run_middle() { localplayers[i]->ullButtonsPressed |= 1LL << MINECRAFT_ACTION_GAME_INFO; -#ifndef _FINAL_BUILD +#if !defined(_FINAL_BUILD) if (app.DebugSettingsOn() && app.GetUseDPadForDebug()) { localplayers[i]->ullDpad_last = 0; localplayers[i]->ullDpad_this = 0; @@ -1522,7 +1257,6 @@ void Minecraft::run_middle() { localplayers[i]->ullDpad_this = 0; int dirCount = 0; -#if 1 if (InputManager.ButtonDown( i, MINECRAFT_ACTION_DPAD_LEFT)) { localplayers[i]->ullDpad_this |= @@ -1547,7 +1281,6 @@ void Minecraft::run_middle() { 1LL << MINECRAFT_ACTION_DPAD_DOWN; dirCount++; } -#endif if (dirCount <= 1) { localplayers[i]->ullDpad_last = @@ -1573,7 +1306,6 @@ void Minecraft::run_middle() { } else { // 4J Stu - This doesn't make any sense with the way we // handle XboxOne users -#if 1 // did we just get input from a player who doesn't exist? // They'll be wanting to join the game then bool tryJoin = !pause && @@ -1694,57 +1426,9 @@ void Minecraft::run_middle() { } } } -#endif // 0 } } -#if 0 - // did we just get input from a player who doesn't exist? They'll be - // wanting to join the game then - if (!pause && - !ui.IsIgnorePlayerJoinMenuDisplayed( - ProfileManager.GetPrimaryPad()) && - g_NetworkManager.SessionHasSpace() && RenderManager.IsHiDef()) { - int firstEmptyUser = 0; - for (int i = 0; i < XUSER_MAX_COUNT; i++) { - if (localplayers[i] == NULL) { - firstEmptyUser = i; - break; - } - } - - // For durango, check for unmapped controllers - for (unsigned int iPad = XUSER_MAX_COUNT; - iPad < (XUSER_MAX_COUNT + InputManager.MAX_GAMEPADS); - ++iPad) { - bool isPadLocked = InputManager.IsPadLocked(iPad), - isPadConnected = InputManager.IsPadConnected(iPad), - buttonPressed = InputManager.ButtonPressed(iPad); - if (isPadLocked || !isPadConnected || !buttonPressed) - continue; - - if (!ui.PressStartPlaying(firstEmptyUser)) { - ui.ShowPressStart(firstEmptyUser); - } else { - // did we just get input from a player who doesn't - // exist? They'll be wanting to join the game then - if (InputManager.ButtonPressed( - iPad, MINECRAFT_ACTION_PAUSEMENU)) { - // bring up the sign in dialog - app.DebugPrintf("Bringing up the sign in ui\n"); - ProfileManager.RequestSignInUI( - false, g_NetworkManager.IsLocalGame(), true, - false, true, &Minecraft::InGame_SignInReturned, - this, iPad); - - // 4J Stu - If we are joining a pad here, then we - // don't want to try and join any others - break; - } - } - } - } -#endif if (pause && level != NULL) { float lastA = timer->a; @@ -1901,7 +1585,7 @@ void Minecraft::run_middle() { } } -#ifndef _ENABLEIGGY +#if !defined(_ENABLEIGGY) // On Linux, Iggy Flash UI is not available. If no players were // rendered (menu / title-screen state), call GameRenderer // directly so mc->screen draws. @@ -2001,7 +1685,7 @@ void Minecraft::run_middle() { frames++; // pause = !isClientSide() && screen != NULL && // screen->isPauseScreen(); -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) pause = g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && screen != nullptr && screen->isPauseScreen(); @@ -2009,7 +1693,7 @@ void Minecraft::run_middle() { pause = app.IsAppPaused(); #endif -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) while (System::nanoTime() >= lastTime + 1000000000) { MemSect(31); fpsString = _toString(frames) + L" fps, " + @@ -2161,7 +1845,7 @@ void Minecraft::pauseGame() { screen->keyPressed(0, Keyboard::KEY_ESCAPE); return; } -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) setScreen(new PauseScreen()); // 4J - TODO put back in #endif } @@ -2253,22 +1937,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { gui->tick(); gameRenderer->pick(1); -#if 0 - // 4J - removed - we don't use ChunkCache anymore - if (player != NULL) - { - ChunkSource *cs = level->getChunkSource(); - if (dynamic_cast(cs) != NULL) - { - ChunkCache *spcc = (ChunkCache *)cs; - - // 4J - there was also Mth::floors on these ints but that seems superfluous - int xt = ((int) player->x) >> 4; - int zt = ((int) player->z) >> 4; - spcc->centerOn(xt, zt); - } - } -#endif // soundEngine.playMusicTick(); @@ -3626,24 +3294,19 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if (player->missTime > 0) player->missTime--; -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) if (app.DebugSettingsOn()) { -#if 1 // 4J-PB - debugoverlay for primary player only if (iPad == ProfileManager.GetPrimaryPad()) { if ((player->ullButtonsPressed & (1LL << MINECRAFT_ACTION_RENDER_DEBUG))) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) options->renderDebug = !options->renderDebug; -#if 0 - app.EnableDebugOverlay(options->renderDebug, iPad); -#else // 4J Stu - The xbox uses a completely different way of // navigating to this scene ui.NavigateToScene(0, eUIScene_DebugOverlay, NULL, eUILayer_Debug); -#endif #endif } @@ -3668,7 +3331,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { player->abilities.debugflying = !player->abilities.debugflying; player->abilities.flying = !player->abilities.flying; } -#endif // PSVITA } #endif @@ -3691,7 +3353,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { std::shared_ptr player = Minecraft::GetInstance()->player; ui.PlayUISFX(eSFX_Press); -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) setScreen(new InventoryScreen(player)); #else app.LoadInventoryMenu(iPad, player); @@ -3711,7 +3373,7 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { // Creative mode ui.PlayUISFX(eSFX_Press); -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) setScreen(new CreativeInventoryScreen(player)); } #else @@ -3738,15 +3400,12 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { } if ((player->ullButtonsPressed & (1LL << MINECRAFT_ACTION_PAUSEMENU)) -#if 0 - || (player->ullButtonsPressed & (1LL << ACTION_MENU_GTC_PAUSE)) -#endif ) { app.DebugPrintf( "PAUSE PRESS PROCESSING - ipad = %d, NavigateToScene\n", player->GetXboxPad()); ui.PlayUISFX(eSFX_Press); -#ifndef ENABLE_JAVA_GUIS +#if !defined(ENABLE_JAVA_GUIS) ui.NavigateToScene(iPad, eUIScene_PauseMenu, NULL, eUILayer_Scene); #endif } @@ -3759,30 +3418,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { uint64_t ullButtonsPressed = player->ullButtonsPressed; bool selected = false; -#if 0 - // 4J-PB - use the touchscreen for quickselect - SceTouchData* pTouchData = InputManager.GetTouchPadData(iPad, false); - - if (pTouchData->reportNum == 1) { - int iHudSize = app.GetGameSettings(iPad, eGameSetting_UISize); - int iYOffset = (app.GetGameSettings(ProfileManager.GetPrimaryPad(), - eGameSetting_Tooltips) == 0) - ? iToolTipOffset - : 0; - if ((pTouchData->report[0].x > QuickSelectRect[iHudSize].left) && - (pTouchData->report[0].x < QuickSelectRect[iHudSize].right) && - (pTouchData->report[0].y > - QuickSelectRect[iHudSize].top + iYOffset) && - (pTouchData->report[0].y < - QuickSelectRect[iHudSize].bottom + iYOffset)) { - player->inventory->selected = - (pTouchData->report[0].x - QuickSelectRect[iHudSize].left) / - QuickSelectBoxWidth[iHudSize]; - selected = true; - app.DebugPrintf("Touch %d\n", player->inventory->selected); - } - } -#endif { int hotbarSlot = InputManager.GetHotbarSlotPressed(iPad); if (hotbarSlot >= 0 && hotbarSlot <= 9) { @@ -3835,150 +3470,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { // } // #endif -#if 0 - // 4J - TODO - some replacement for input handling... - if (screen == NULL || screen.passEvents) - { - while (Mouse.next()) - { - long passedTime = System.currentTimeMillis() - lastTickTime; - if (passedTime > 200) continue; - - int wheel = Mouse.getEventDWheel(); - if (wheel != 0) { - player->inventory.swapPaint(wheel); - - if (options.isFlying) { - if (wheel > 0) wheel = 1; - if (wheel < 0) wheel = -1; - - options.flySpeed += wheel * .25f; - } - } - - if (screen == null) { - if (!mouseGrabbed && Mouse.getEventButtonState()) { - grabMouse(); - } else { - if (Mouse.getEventButton() == 0 && Mouse.getEventButtonState()) { - handleMouseClick(0); - lastClickTick = ticks; - } - if (Mouse.getEventButton() == 1 && Mouse.getEventButtonState()) { - handleMouseClick(1); - lastClickTick = ticks; - } - if (Mouse.getEventButton() == 2 && Mouse.getEventButtonState()) { - handleGrabTexture(); - } - } - } else if (screen != null) { - screen.mouseEvent(); - } - } - - if (missTime > 0) missTime--; - - while (Keyboard.next()) { - player->setKey(Keyboard.getEventKey(), Keyboard.getEventKeyState()); - if (Keyboard.getEventKeyState()) { - if (Keyboard.getEventKey() == Keyboard.KEY_F11) { - toggleFullScreen(); - continue; - } - /* - * if (Keyboard.getEventKey() == Keyboard.KEY_F4) { new - * PortalForcer().createPortal(level, player); continue; } - */ - - /* - * if (Keyboard.getEventKey() == Keyboard.KEY_RETURN) { - * level.pathFind(); continue; } - */ - - if (screen != null) { - screen.keyboardEvent(); - } else { - if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { - pauseGame(); - } - - if (Keyboard.getEventKey() == Keyboard.KEY_S && Keyboard.isKeyDown(Keyboard.KEY_F3)) { - reloadSound(); - } - - // if (Keyboard.getEventKey() == Keyboard.KEY_P) { - // gameMode = new DemoMode(this); - // selectLevel(CreateWorldScreen.findAvailableFolderName(getLevelSource(), "Demo"), "Demo World", 0L); - // setScreen(null); - // - // } - - if (Keyboard.getEventKey() == Keyboard.KEY_F1) { - options.hideGui = !options.hideGui; - } - if (Keyboard.getEventKey() == Keyboard.KEY_F3) { - options.renderDebug = !options.renderDebug; - } - if (Keyboard.getEventKey() == Keyboard.KEY_F5) { - options.thirdPersonView = !options.thirdPersonView; - } - if (Keyboard.getEventKey() == Keyboard.KEY_F8) { - options.smoothCamera = !options.smoothCamera; - } - if (DEADMAU5_CAMERA_CHEATS) { - if (Keyboard.getEventKey() == Keyboard.KEY_F6) { - options.isFlying = !options.isFlying; - } - if (Keyboard.getEventKey() == Keyboard.KEY_F9) { - options.fixedCamera = !options.fixedCamera; - } - if (Keyboard.getEventKey() == Keyboard.KEY_ADD) { - options.cameraSpeed += .1f; - } - if (Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT) { - options.cameraSpeed -= .1f; - if (options.cameraSpeed < 0) { - options.cameraSpeed = 0; - } - } - } - - if (Keyboard.getEventKey() == options.keyBuild.key) { - setScreen(new InventoryScreen(player)); - } - - if (Keyboard.getEventKey() == options.keyDrop.key) { - player->drop(); - } - if (isClientSide() && Keyboard.getEventKey() == options.keyChat.key) { - setScreen(new ChatScreen()); - } - } - - for (int i = 0; i < 9; i++) { - if (Keyboard.getEventKey() == Keyboard.KEY_1 + i) player->inventory.selected = i; - } - if (Keyboard.getEventKey() == options.keyFog.key) { - options.toggle(Options.Option.RENDER_DISTANCE, Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ? -1 : 1); - } - } - } - - if (screen == null) { - if (Mouse.isButtonDown(0) && ticks - lastClickTick >= timer.ticksPerSecond / 4 && mouseGrabbed) { - handleMouseClick(0); - lastClickTick = ticks; - } - if (Mouse.isButtonDown(1) && ticks - lastClickTick >= timer.ticksPerSecond / 4 && mouseGrabbed) { - handleMouseClick(1); - lastClickTick = ticks; - } - } - - handleMouseDown(0, screen == null && Mouse.isButtonDown(0) && mouseGrabbed); - } -#endif if (level != NULL) { if (player != NULL) { @@ -4012,11 +3503,11 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if (bFirst) { levelsTickedFlags = 0; -#ifndef DISABLE_LEVELTICK_THREAD +#if !defined(DISABLE_LEVELTICK_THREAD) PIXBeginNamedEvent(0, "levelTickEventQueue waitForFinish"); levelTickEventQueue->waitForFinish(); PIXEndNamedEvent(); -#endif // DISABLE_LEVELTICK_THREAD +#endif SparseLightStorage::tick(); // 4J added CompressedTileStorage::tick(); // 4J added SparseDataStorage::tick(); // 4J added @@ -4059,41 +3550,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { // optimisation to set the culling off early, in parallel with // other stuff -#if 0 && !defined DISABLE_SPU_CODE - // kick off the culling for all valid players in this level - int currPlayerIdx = getLocalPlayerIdx(); - for (int idx = 0; idx < XUSER_MAX_COUNT; idx++) { - if (localplayers[idx] != NULL) { - if (localplayers[idx]->level == levels[i]) { - setLocalPlayerIdx(idx); - gameRenderer->setupCamera(timer->a, i); - Camera::prepare( - localplayers[idx], - localplayers[idx]->ThirdPersonView() == 2); - std::shared_ptr cameraEntity = - cameraTargetPlayer; - double xOff = - cameraEntity->xOld + - (cameraEntity->x - cameraEntity->xOld) * - timer->a; - double yOff = - cameraEntity->yOld + - (cameraEntity->y - cameraEntity->yOld) * - timer->a; - double zOff = - cameraEntity->zOld + - (cameraEntity->z - cameraEntity->zOld) * - timer->a; - FrustumCuller frustObj; - Culler* frustum = &frustObj; - MemSect(0); - frustum->prepare(xOff, yOff, zOff); - levelRenderer->cull_SPU(idx, frustum, 0); - } - } - } - setLocalPlayerIdx(currPlayerIdx); -#endif // 0 // 4J Stu - We are always online, but still could be paused if (!pause) // || isClientSide()) @@ -4102,11 +3558,11 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { // Difficulty = %d",options->difficulty); levels[i]->setSpawnSettings(level->difficulty > 0, true); PIXBeginNamedEvent(0, "Level tick"); -#ifdef DISABLE_LEVELTICK_THREAD +#if defined(DISABLE_LEVELTICK_THREAD) levels[i]->tick(); #else levelTickEventQueue->sendEvent(levels[i]); -#endif // DISABLE_LEVELTICK_THREAD +#endif PIXEndNamedEvent(); } } @@ -4123,16 +3579,6 @@ void Minecraft::tick(bool bFirst, bool bUpdateTextures) { if (pause) tickAllConnections(); // player->tick(); } -#if 0 - - // while(!g_tickLevelQueue.empty()) - // { - // Level* pLevel = g_tickLevelQueue.front(); - // g_tickLevelQueue.pop(); - // pLevel->tick(); - // }; - -#endif // if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD7) || // Keyboard.isKeyDown(Keyboard.KEY_Q)) rota++; @@ -4331,14 +3777,6 @@ void Minecraft::setLevel(MultiPlayerLevel* level, int message /*=-1*/, PlayerUID playerXUIDOnline = INVALID_XUID; ProfileManager.GetXUID(iPrimaryPlayer, &playerXUIDOffline, false); ProfileManager.GetXUID(iPrimaryPlayer, &playerXUIDOnline, true); -#if 0 - if (CGameNetworkManager::usingAdhocMode() && - playerXUIDOnline.getOnlineID()[0] == 0) { - // player doesn't have an online UID, set it from the player - // name - playerXUIDOnline.setForAdhoc(); - } -#endif player->setXuid(playerXUIDOffline); player->setOnlineXuid(playerXUIDOnline); @@ -4372,20 +3810,6 @@ void Minecraft::setLevel(MultiPlayerLevel* level, int message /*=-1*/, levelRenderer->setLevel(player->GetXboxPad(), level); if (particleEngine != NULL) particleEngine->setLevel(level); -#if 0 - // 4J - removed - we don't use ChunkCache anymore - ChunkSource *cs = level->getChunkSource(); - if (dynamic_cast(cs) != NULL) - { - ChunkCache *spcc = (ChunkCache *)cs; - - // 4J - these had a Mth::floor which seems unrequired - int xt = ((int) player->x) >> 4; - int zt = ((int) player->z) >> 4; - - spcc->centerOn(xt, zt); - } -#endif gameMode->adjustPlayer(player); for (int i = 0; i < XUSER_MAX_COUNT; i++) { @@ -4436,15 +3860,6 @@ void Minecraft::prepareLevel(int title) { spawnPos->z = (int)player->z; } -#if 0 - // 4J - removed - we don't use ChunkCache anymore - if (dynamic_cast(cs)!=NULL) - { - ChunkCache *spcc = (ChunkCache *) cs; - - spcc->centerOn(spawnPos->x >> 4, spawnPos->z >> 4); - } -#endif for (int x = -r; x <= r; x += 16) { for (int z = -r; z <= r; z += 16) { @@ -4728,31 +4143,11 @@ void Minecraft::main() { ColourTable::staticCtor(); app.loadDefaultGameRules(); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) LevelRenderer::staticCtor(); #endif // 4J Stu - This block generates XML for the game rules schema -#if 0 - for(unsigned int i = 0; i < Item::items.length; ++i) - { - if(Item::items[i] != NULL) - { - app.DebugPrintf("%ls\n", i, app.GetString( Item::items[i]->getDescriptionId() )); - } - } - - app.DebugPrintf("\n\n\n\n\n"); - - for(unsigned int i = 0; i < 256; ++i) - { - if(Tile::tiles[i] != NULL) - { - app.DebugPrintf("%ls\n", i, app.GetString( Tile::tiles[i]->getDescriptionId() )); - } - } - __debugbreak(); -#endif // 4J-PB - Can't call this for the first 5 seconds of a game - MS rule // if (ProfileManager.IsFullVersion()) @@ -4773,9 +4168,7 @@ void Minecraft::main() { // On PS4, we call Minecraft::Start from another thread, as this has been // timed taking ~2.5 seconds and we need to do some basic rendering stuff so // that we don't break the TRCs on SubmitDone calls -#if 1 Minecraft::start(name, sessionId); -#endif } bool Minecraft::renderNames() { @@ -4994,7 +4387,6 @@ void Minecraft::playerLeftTutorial(int iPad) { // 4J Stu -This telemetry event means something different on XboxOne, so // we don't call it for simple state changes like this -#if 1 for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { if (localplayers[idx] != NULL) { TelemetryManager->RecordLevelStart( @@ -5004,56 +4396,11 @@ void Minecraft::playerLeftTutorial(int iPad) { g_NetworkManager.GetOnlinePlayerCount()); } } -#endif } } -#if 0 -void Minecraft::inGameSignInCheckAllPrivilegesCallback(void* lpParam, - bool hasPrivileges, - int iPad) { - Minecraft* pClass = (Minecraft*)lpParam; - if (!hasPrivileges) { - ProfileManager.RemoveGamepadFromGame(iPad); - } else { - if (!g_NetworkManager.SessionHasSpace()) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_MULTIPLAYER_FULL_TITLE, - IDS_MULTIPLAYER_FULL_TEXT, uiIDA, 1); - ProfileManager.RemoveGamepadFromGame(iPad); - } else if (ProfileManager.IsSignedInLive(iPad) && - ProfileManager.AllowedToPlayMultiplayer(iPad)) { - // create the local player for the iPad - std::shared_ptr player = pClass->localplayers[iPad]; - if (player == NULL) { - if (pClass->level->isClientSide) { - pClass->addLocalPlayer(iPad); - } else { - // create the local player for the iPad - std::shared_ptr player = pClass->localplayers[iPad]; - if (player == NULL) { - player = pClass->createExtraLocalPlayer( - iPad, - (convStringToWstring( - ProfileManager.GetGamertag(iPad))) - .c_str(), - iPad, pClass->level->dimension->id); - } - } - } - } - } -} -#endif - -#if 0 -int Minecraft::InGame_SignInReturned(void* pParam, bool bContinue, int iPad, - int iController) -#else int Minecraft::InGame_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { Minecraft* pMinecraftClass = (Minecraft*)pParam; @@ -5074,23 +4421,11 @@ int Minecraft::InGame_SignInReturned(void* pParam, bool bContinue, int iPad) // It's possible that the player has not signed in - they can back out // or choose no for the converttoguest if (ProfileManager.IsSignedIn(iPad)) { -#if 0 - if (!g_NetworkManager.IsLocalGame() && - ProfileManager.IsSignedInLive(iPad) && - ProfileManager.AllowedToPlayMultiplayer(iPad)) { - ProfileManager.CheckMultiplayerPrivileges( - iPad, true, &inGameSignInCheckAllPrivilegesCallback, - pMinecraftClass); - } else -#endif if (!g_NetworkManager.SessionHasSpace()) { unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; ui.RequestErrorMessage(IDS_MULTIPLAYER_FULL_TITLE, IDS_MULTIPLAYER_FULL_TEXT, uiIDA, 1); -#if 0 - ProfileManager.RemoveGamepadFromGame(iPad); -#endif } // if this is a local game then profiles just need to be signed in else if (g_NetworkManager.IsLocalGame() || @@ -5126,9 +4461,6 @@ int Minecraft::InGame_SignInReturned(void* pParam, bool bContinue, int iPad) ui.RequestErrorMessage(IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1, iPad); -#if 0 - ProfileManager.RemoveGamepadFromGame(iPad); -#endif } } } @@ -5182,16 +4514,3 @@ ColourTable* Minecraft::getColourTable() { return colours; } -#if 0 -int Minecraft::MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result) { - Minecraft* pMinecraft = (Minecraft*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &Minecraft::InGame_SignInReturned, pMinecraft, false, iPad); - } - - return 0; -} -#endif diff --git a/Minecraft.Client/Minecraft.h b/Minecraft.Client/Minecraft.h index e55b474a1..6bf2fb96d 100644 --- a/Minecraft.Client/Minecraft.h +++ b/Minecraft.Client/Minecraft.h @@ -41,7 +41,7 @@ class MultiPlayerGameMode; #include "../Minecraft.World/Util/C4JThread.h" #include "Textures/ResourceLocation.h" -#ifdef linux +#if defined(linux) #undef linux #endif @@ -340,15 +340,7 @@ public: void delayTextureReload(); static int64_t currentTimeMillis(); -#if 0 - static void inGameSignInCheckAllPrivilegesCallback(void* lpParam, - bool hasPrivileges, - int iPad); - static int InGame_SignInReturned(void* pParam, bool bContinue, int iPad, - int iController); -#else static int InGame_SignInReturned(void* pParam, bool bContinue, int iPad); -#endif // 4J-PB Screen* getScreen(); @@ -395,8 +387,4 @@ public: unsigned int getCurrentTexturePackId(); ColourTable* getColourTable(); -#if 0 - static int MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif }; diff --git a/Minecraft.Client/MinecraftServer.cpp b/Minecraft.Client/MinecraftServer.cpp index 00927b354..7440acca3 100644 --- a/Minecraft.Client/MinecraftServer.cpp +++ b/Minecraft.Client/MinecraftServer.cpp @@ -27,7 +27,7 @@ #include "../Minecraft.World/Util/Pos.h" #include "../Minecraft.World/Platform/System.h" #include "../Minecraft.World/Util/StringHelpers.h" -#ifdef SPLIT_SAVES +#if defined(SPLIT_SAVES) #include "../Minecraft.World/IO/Files/ConsoleSaveFileSplit.h" #endif #include "../Minecraft.World/IO/Files/ConsoleSaveFileOriginal.h" @@ -59,7 +59,7 @@ int64_t MinecraftServer::setTimeOfDay = 0; bool MinecraftServer::m_bPrimaryPlayerSignedOut = false; bool MinecraftServer::s_bServerHalted = false; bool MinecraftServer::s_bSaveOnExitAnswered = false; -#ifdef _ACK_CHUNK_SEND_THROTTLING +#if defined(_ACK_CHUNK_SEND_THROTTLING) bool MinecraftServer::s_hasSentEnoughPackets = false; int64_t MinecraftServer::s_tickStartTime = 0; std::vector MinecraftServer::s_sentTo; @@ -108,36 +108,6 @@ MinecraftServer::~MinecraftServer() {} bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData, std::uint32_t initSettings, bool findSeed) { // 4J - removed -#if 0 - commands = new ConsoleCommands(this); - - Thread t = new Thread() { - public void run() { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - String line = null; - try { - while (!stopped && running && (line = br.readLine()) != null) { - handleConsoleInput(line, MinecraftServer.this); - } - } catch (IOException e) { - e.printStackTrace(); - } - } - }; - t.setDaemon(true); - t.start(); - - - LogConfigurator.initLogger(); - logger.info("Starting minecraft server version " + VERSION); - - if (Runtime.getRuntime().maxMemory() / 1024 / 1024 < 512) { - logger.warning("**** NOT ENOUGH RAM!"); - logger.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\""); - } - - logger.info("Loading properties"); -#endif settings = new Settings(new File(L"server.properties")); app.DebugPrintf("\n*** SERVER SETTINGS ***\n"); @@ -184,44 +154,12 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData, setFlightAllowed(true); // settings->getBoolean(L"allow-flight", false); // 4J Stu - Enabling flight to stop it kicking us when we use it -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) setFlightAllowed(true); #endif -#if 1 connection = new ServerConnection(this); Socket::Initialise(connection); // 4J - added -#else - // 4J - removed - InetAddress localAddress = null; - if (localIp.length() > 0) localAddress = InetAddress.getByName(localIp); - port = settings.getInt("server-port", DEFAULT_MINECRAFT_PORT); - - logger.info("Starting Minecraft server on " + - (localIp.length() == 0 ? "*" : localIp) + ":" + port); - try { - connection = new ServerConnection(this, localAddress, port); - } catch (IOException e) { - logger.warning("**** FAILED TO BIND TO PORT!"); - logger.log(Level.WARNING, "The exception was: " + e.toString()); - logger.warning("Perhaps a server is already running on that port?"); - return false; - } - - if (!onlineMode) { - logger.warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); - logger.warning( - "The server will make no attempt to authenticate usernames. " - "Beware."); - logger.warning( - "While this makes the game possible to play without internet " - "access, it also opens up the ability for hackers to connect with " - "any username they choose."); - logger.warning( - "To change this, set \"online-mode\" to \"true\" in the " - "server.settings file."); - } -#endif setPlayers(new PlayerList(this)); // 4J-JEV: Need to wait for levelGenerationOptions to load. @@ -260,11 +198,7 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData, mcprogress->progressStart(IDS_PROGRESS_INITIALISING_SERVER); if (findSeed) { -#if 0 - seed = BiomeSource::findSeed(pLevelType, &running); -#else seed = BiomeSource::findSeed(pLevelType); -#endif } setMaxBuildHeight( @@ -274,17 +208,6 @@ bool MinecraftServer::initServer(__int64 seed, NetworkGameInitData* initData, Mth::clamp(getMaxBuildHeight(), 64, Level::maxBuildHeight)); // settings->setProperty(L"max-build-height", maxBuildHeight); -#if 0 - std::wstring levelSeedString = settings->getString(L"level-seed", L""); - int64_t levelSeed = (new Random())->nextLong(); - if (levelSeedString.length() > 0) - { - long newSeed = _fromString(levelSeedString); - if (newSeed != 0) { - levelSeed = newSeed; - } - } -#endif // logger.info("Preparing level \"" + levelName + "\""); m_bLoaded = loadLevel(new McRegionLevelStorageSource(File(L".")), levelName, seed, pLevelType, initData); @@ -349,14 +272,6 @@ int MinecraftServer::runPostUpdate(void* lpParam) { LeaveCriticalSection(&server->m_postProcessCS); request.chunkSource->postProcess(request.chunkSource, request.x, request.z); -#if 0 -#ifndef _CONTENT_PACKAGE - if ((server->m_postProcessRequests.size() % 10) == 0) - printf("processing request %00d\n", - server->m_postProcessRequests.size()); -#endif - Sleep(1); -#endif EnterCriticalSection(&server->m_postProcessCS); } LeaveCriticalSection(&server->m_postProcessCS); @@ -443,7 +358,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, if (initData->saveData != NULL) { // We are loading a file from disk with the data passed in -#ifdef SPLIT_SAVES +#if defined(SPLIT_SAVES) ConsoleSaveFileOriginal oldFormatSave( initData->saveData->saveName, initData->saveData->data, initData->saveData->fileSize, false, initData->savePlatform); @@ -465,7 +380,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, new McRegionLevelStorage(pSave, File(L"."), name, true)); } else { // We are loading a save from the storage manager -#ifdef SPLIT_SAVES +#if defined(SPLIT_SAVES) bool bLevelGenBaseSave = false; LevelGenerationOptions* levelGen = app.getLevelGenerationOptions(); if (levelGen != NULL && levelGen->requiresBaseSave()) { @@ -586,11 +501,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, int64_t startTime = System::currentTimeMillis(); // 4J Stu - Added this to temporarily make starting games on vita faster -#if 0 - int r = 48; -#else int r = 196; -#endif // 4J JEV: load gameRules. ConsoleSavePath filepath(GAME_RULE_SAVENAME); @@ -614,7 +525,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, } int64_t lastTime = System::currentTimeMillis(); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) if (app.GetGameNewWorldSize() > levels[0]->getLevelData()->getXZSizeOld()) { if (!app.GetGameNewWorldSizeUseMoat()) // check the moat settings to // see if we should be @@ -639,30 +550,6 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, // storage->getSaveFile()->convertLevelChunks(level) } -#if 0 - int64_t lastStorageTickTime = System::currentTimeMillis(); - - // Test code to enable full creation of levels at start up - int halfsidelen = ( i == 0 ) ? 27 : 9; - for( int x = -halfsidelen; x < halfsidelen; x++ ) - { - for( int z = -halfsidelen; z < halfsidelen; z++ ) - { - int total = halfsidelen * halfsidelen * 4; - int pos = z + halfsidelen + ( ( x + halfsidelen ) * 2 * halfsidelen ); - mcprogress->progressStagePercentage((pos) * 100 / total); - level->cache->create(x,z, true); // 4J - added parameter to disable postprocessing here - - if( System::currentTimeMillis() - lastStorageTickTime > 50 ) - { - CompressedTileStorage::tick(); - SparseLightStorage::tick(); - SparseDataStorage::tick(); - lastStorageTickTime = System::currentTimeMillis(); - } - } - } -#else int64_t lastStorageTickTime = System::currentTimeMillis(); Pos* spawnPos = level->getSharedSpawnPos(); @@ -713,21 +600,8 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, // 4J - removed this as now doing the recheckGaps call when each // chunk is post-processed, so can happen on things outside of the // spawn area too -#if 0 - // 4J - added this code to propagate lighting properly in the spawn area before we go sharing it with the local client or across the network - for (int x = -r; x <= r && running; x += 16) - { - for (int z = -r; z <= r && running; z += 16) - { - PIXBeginNamedEvent(0,"Lighting gaps for %d %d",x,z); - level->getChunkAt(spawnPos->x + x, spawnPos->z + z)->recheckGaps(true); - PIXEndNamedEvent(); - } - } -#endif delete spawnPos; -#endif } } // printf("Main thread complete at %dms\n",System::currentTimeMillis() - @@ -815,7 +689,7 @@ bool MinecraftServer::loadLevel(LevelStorageSource* storageSource, return true; } -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) void MinecraftServer::overwriteBordersForNewWorldSize(ServerLevel* level) { // recreate the chunks round the border (2 chunks or 32 blocks deep), // deleting any player data from them @@ -900,9 +774,7 @@ void MinecraftServer::saveAllChunks() { for (unsigned int i = 0; i < levels.length; i++) { // 4J Stu - Due to the way save mounting is handled on XboxOne, we can // actually save after the player has signed out. -#if 1 if (m_bPrimaryPlayerSignedOut) break; -#endif // 4J Stu - Save the levels in reverse order so we don't overwrite the // level.dat with the data from the nethers leveldata. Fix for #7418 - // Functional: Gameplay: Saving after sleeping in a bed will place @@ -925,7 +797,7 @@ void MinecraftServer::saveAllChunks() { // 4J-JEV: Added void MinecraftServer::saveGameRules() { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) & (1L << eDebugSetting_DistributableSave)) { @@ -1005,11 +877,6 @@ bool MinecraftServer::IsSuspending() { return m_suspending; } void MinecraftServer::stopServer(bool didInit) { // 4J-PB - need to halt the rendering of the data, since we're about to // remove it -#if 0 - if (ShutdownManager::ShouldRun( - ShutdownManager::eServerThread)) // This thread will take itself - // out if we are shutting down -#endif { Minecraft::GetInstance()->gameRenderer->DisableUpdateThread(); } @@ -1023,18 +890,9 @@ void MinecraftServer::stopServer(bool didInit) { // also need to check for a profile switch here - primary player signs out, // and another player signs in before dismissing the dash -#if 0 - // On Durango check if the primary user is signed in OR mid-sign-out - if (ProfileManager.GetUser(0, true) != nullptr) -#else if ((m_bPrimaryPlayerSignedOut == false) && ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad())) -#endif { -#if 0 || 0 - // Always save on exit! Except if saves are disabled. - if (!saveOnExitAnswered()) m_saveOnExit = true; -#endif // if trial version or saving is disabled, then don't save anything. // Also don't save anything if we didn't actually get through the server // initialisation. @@ -1076,11 +934,6 @@ void MinecraftServer::stopServer(bool didInit) { // ultimately delete the directory level storage & therefore the // ConsoleSaveSplit instance, which needs to be around until all the sub // files have completed saving. -#if 0 || 0 || 0 - while (StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle) { - Sleep(10); - } -#endif // 4J-PB remove the server levels unsigned int iServerLevelC = levels.length; @@ -1091,13 +944,6 @@ void MinecraftServer::stopServer(bool didInit) { } } -#if 0 || 0 - // Clear the update flags as it's possible they could be out of sync, - // causing a crash when starting a new world after the first new level ticks - // Fix for PS3 #1538 - [IN GAME] If the user 'Exit without saving' from - // inside the Nether or The End, the title can hang when loading back into - // the save. -#endif delete connection; connection = NULL; @@ -1332,61 +1178,6 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) { switch (eAction) { case eXuiServerAction_AutoSaveGame: -#if 0 || 0 - { - PIXBeginNamedEvent(0, "Autosave"); - - // Get the frequency of the timer - LARGE_INTEGER qwTicksPerSec, qwTime, qwNewTime, - qwDeltaTime; - float fElapsedTime = 0.0f; - QueryPerformanceFrequency(&qwTicksPerSec); - float fSecsPerTick = - 1.0f / (float)qwTicksPerSec.QuadPart; - - // Save the start time - QueryPerformanceCounter(&qwTime); - - if (players != NULL) { - players->saveAll(NULL); - } - - for (unsigned int j = 0; j < levels.length; j++) { - if (s_bServerHalted) break; - // 4J Stu - Save the levels in reverse order so we - // don't overwrite the level.dat with the data from - // the nethers leveldata. Fix for #7418 - - // Functional: Gameplay: Saving after sleeping in a - // bed will place player at nighttime when - // restarting. - ServerLevel* level = levels[levels.length - 1 - j]; - PIXBeginNamedEvent(0, "Saving level %d", - levels.length - 1 - j); - level->save(false, NULL, true); - PIXEndNamedEvent(); - } - if (!s_bServerHalted) { - PIXBeginNamedEvent(0, "Saving game rules"); - saveGameRules(); - PIXEndNamedEvent(); - - PIXBeginNamedEvent(0, "Save to disc"); - levels[0]->saveToDisc( - Minecraft::GetInstance()->progressRenderer, - true); - PIXEndNamedEvent(); - } - PIXEndNamedEvent(); - - QueryPerformanceCounter(&qwNewTime); - qwDeltaTime.QuadPart = - qwNewTime.QuadPart - qwTime.QuadPart; - fElapsedTime = fSecsPerTick * - static_cast(qwDeltaTime.QuadPart); - app.DebugPrintf("Autosave: Elapsed time %f\n", - fElapsedTime); - } break; -#endif case eXuiServerAction_SaveGame: app.EnterSaveNotificationSection(); if (players != NULL) { @@ -1503,7 +1294,7 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) { ->options->difficulty))); break; case eXuiServerAction_ExportSchematic: -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) app.EnterSaveNotificationSection(); // players->broadcastAll( @@ -1542,7 +1333,7 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) { #endif break; case eXuiServerAction_SetCameraLocation: -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) { DebugSetCameraPosition* pos = (DebugSetCameraPosition*)param; @@ -1585,29 +1376,6 @@ void MinecraftServer::run(int64_t seed, void* lpParameter) { // Sleep(10); // } // } -#if 0 -} catch (Throwable t) { - t.printStackTrace(); - logger.log(Level.SEVERE, "Unexpected exception", t); - while (running) { - handleConsoleInputs(); - try { - Thread.sleep(10); - } catch (InterruptedException e1) { - e1.printStackTrace(); - } - } -} finally { - try { - stopServer(); - stopped = true; - } catch (Throwable t) { - t.printStackTrace(); - } finally { - System::exit(0); - } -} -#endif // 4J Stu - Stop the server when the loops complete, as the finally would do stopServer(didInit); @@ -1708,22 +1476,6 @@ void MinecraftServer::tick() { // nether, but Actually gets removed only when it returns if ((players->getPlayerCount(level) > 0) || (level->hasEntitiesToRemove())) { -#if 0 - // AP - the PlayerList->viewDistance initially starts out at 3 - // to make starting a level speedy the problem with this is that - // spawned monsters are always generated on the edge of the - // known map which means they wont process (unless they are - // surrounded by 2 visible chunks). This means they wont - // checkDespawn so they are NEVER removed which results in - // monsters not spawning. This bit of hack will modify the view - // distance once the level is up and running. - int newViewDistance = 5; - level->getServer()->getPlayers()->setViewDistance( - newViewDistance); - level->getTracker()->updateMaxRange(); - level->getChunkMap()->setRadius( - level->getServer()->getPlayers()->getViewDistance()); -#endif level->tickEntities(); } PIXEndNamedEvent(); @@ -1749,11 +1501,6 @@ void MinecraftServer::tick() { PIXEndNamedEvent(); // 4J - removed -#if 0 - for (int i = 0; i < tickables.size(); i++) { - tickables.get(i)-tick(); - } -#endif // try { // 4J - removed try/catch handleConsoleInputs(); @@ -1824,7 +1571,7 @@ void MinecraftServer::setLevel(int dimension, ServerLevel* level) { levels[0] = level; } -#if defined _ACK_CHUNK_SEND_THROTTLING +#if defined(_ACK_CHUNK_SEND_THROTTLING) bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer* player) { if (s_hasSentEnoughPackets) return false; if (player == NULL) return false; @@ -1835,11 +1582,7 @@ bool MinecraftServer::chunkPacketManagement_CanSendTo(INetworkPlayer* player) { } } -#if 0 || 0 || 0 - return (player->GetOutstandingAckCount() < 3); -#else return (player->GetOutstandingAckCount() < 2); -#endif } void MinecraftServer::chunkPacketManagement_DidSendTo(INetworkPlayer* player) { diff --git a/Minecraft.Client/MinecraftServer.h b/Minecraft.Client/MinecraftServer.h index 3db062c22..a18275a89 100644 --- a/Minecraft.Client/MinecraftServer.h +++ b/Minecraft.Client/MinecraftServer.h @@ -22,10 +22,6 @@ class CommandDispatcher; #define MINECRAFT_SERVER_SLOW_QUEUE_DELAY 250 -#if 0 || 0 || 0 || \ - 0 || 0 -#define _ACK_CHUNK_SEND_THROTTLING -#endif typedef struct _LoadSaveDataThreadParam { void* data; @@ -150,7 +146,7 @@ private: void saveAllChunks(); void saveGameRules(); void stopServer(bool didInit); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) void overwriteBordersForNewWorldSize(ServerLevel* level); void overwriteHellBordersForNewWorldSize(ServerLevel* level, int oldHellSize); @@ -280,7 +276,7 @@ private: // 4J Added - A static that stores the QNet index of the player that is next // allowed to send a packet in the slow queue -#ifdef _ACK_CHUNK_SEND_THROTTLING +#if defined(_ACK_CHUNK_SEND_THROTTLING) static bool s_hasSentEnoughPackets; static int64_t s_tickStartTime; static std::vector s_sentTo; @@ -301,7 +297,7 @@ private: public: static bool chunkPacketManagement_CanSendTo(INetworkPlayer* player); static void chunkPacketManagement_DidSendTo(INetworkPlayer* player); -#ifndef _ACK_CHUNK_SEND_THROTTLING +#if !defined(_ACK_CHUNK_SEND_THROTTLING) static void cycleSlowQueueIndex(); #endif diff --git a/Minecraft.Client/Platform/Common/App_Defines.h b/Minecraft.Client/Platform/Common/App_Defines.h index 10cb99994..f5d301268 100644 --- a/Minecraft.Client/Platform/Common/App_Defines.h +++ b/Minecraft.Client/Platform/Common/App_Defines.h @@ -9,11 +9,7 @@ #define MAX_TYPE_SIZE 32 #define MAX_EXTENSION_TYPES 3 -#if 0 -#define MAX_LOCAL_PLAYERS 1 -#else #define MAX_LOCAL_PLAYERS 4 -#endif // 4J Stu - Required for sentient reporting of whether the volume level has been // changed or not @@ -59,15 +55,6 @@ enum EGameHostOptionWorldSize { e_worldSize_Large }; -#if 0 -#define PROFILE_VERSION_1 1 -#define PROFILE_VERSION_2 2 -#define PROFILE_VERSION_3 3 -#define PROFILE_VERSION_4 4 -#define PROFILE_VERSION_5 6 -#define PROFILE_VERSION_6 7 -#define PROFILE_VERSION_7 8 -#endif #define PROFILE_VERSION_8 10 #define PROFILE_VERSION_9 11 diff --git a/Minecraft.Client/Platform/Common/App_enums.h b/Minecraft.Client/Platform/Common/App_enums.h index e2ee02a32..1b6c2240c 100644 --- a/Minecraft.Client/Platform/Common/App_enums.h +++ b/Minecraft.Client/Platform/Common/App_enums.h @@ -72,9 +72,6 @@ enum eXuiAction { eAppAction_TexturePackRequired, // when the user has joined from invite, // but doesn't have the texture pack -#if 0 - eAppAction_OptionsSaveNoSpace, -#endif eAppAction_DebugText, }; @@ -630,153 +627,6 @@ enum eGameHostOption { // 4J-PB - If any new DLC items are added to the TMSFiles, this array needs // updated -#if 0 -enum _TMSFILES { - TMS_SP1 = 0, - TMS_SP2, - TMS_SP3, - TMS_SP4, - TMS_SP5, - TMS_SP6, - TMS_SPF, - TMS_SPB, - TMS_SPC, - TMS_SPZ, - TMS_SPM, - TMS_SPI, - TMS_SPG, - TMS_SPD1, - TMS_SPSW1, - - TMS_THST, - TMS_THIR, - TMS_THGO, - TMS_THDI, - TMS_THAW, - - TMS_GPAN, - TMS_GPCO, - TMS_GPEN, - TMS_GPFO, - TMS_GPTO, - TMS_GPBA, - TMS_GPFA, - TMS_GPME, - TMS_GPMF, - TMS_GPMM, - TMS_GPSE, - TMS_GPOr, - TMS_GPMi, - TMS_GPMB, - TMS_GPBr, - TMS_GPM1, - TMS_GPM2, - TMS_GPM3, - - TMS_AH_0001, - TMS_AH_0002, - TMS_AH_0003, - TMS_AH_0004, - TMS_AH_0005, - TMS_AH_0006, - TMS_AH_0007, - TMS_AH_0008, - TMS_AH_0009, - TMS_AH_0010, - TMS_AH_0011, - TMS_AH_0012, - TMS_AH_0013, - - TMS_AT_0001, - TMS_AT_0002, - TMS_AT_0003, - TMS_AT_0004, - TMS_AT_0005, - TMS_AT_0006, - TMS_AT_0007, - TMS_AT_0008, - TMS_AT_0009, - TMS_AT_0010, - TMS_AT_0011, - TMS_AT_0012, - TMS_AT_0013, - TMS_AT_0014, - TMS_AT_0015, - TMS_AT_0016, - TMS_AT_0017, - TMS_AT_0018, - TMS_AT_0019, - TMS_AT_0020, - TMS_AT_0021, - TMS_AT_0022, - TMS_AT_0023, - TMS_AT_0024, - TMS_AT_0025, - TMS_AT_0026, - - TMS_AP_0001, - TMS_AP_0002, - TMS_AP_0003, - TMS_AP_0004, - TMS_AP_0005, - TMS_AP_0006, - TMS_AP_0007, - TMS_AP_0009, - TMS_AP_0010, - TMS_AP_0011, - TMS_AP_0012, - TMS_AP_0013, - TMS_AP_0014, - TMS_AP_0015, - TMS_AP_0016, - TMS_AP_0017, - TMS_AP_0018, - - TMS_AP_0019, - TMS_AP_0020, - TMS_AP_0021, - TMS_AP_0022, - TMS_AP_0023, - TMS_AP_0024, - TMS_AP_0025, - TMS_AP_0026, - TMS_AP_0027, - TMS_AP_0028, - TMS_AP_0029, - TMS_AP_0030, - TMS_AP_0031, - TMS_AP_0032, - TMS_AP_0033, - - TMS_AA_0001, - - TMS_MPMA, - TMS_MPMA_DAT, - TMS_MPSR, - TMS_MPSR_DAT, - TMS_MPHA, - TMS_MPHA_DAT, - TMS_MPFE, - TMS_MPFE_DAT, - - TMS_TP01, - TMS_TP01_DAT, - TMS_TP02, - TMS_TP02_DAT, - TMS_TP04, - TMS_TP04_DAT, - TMS_TP05, - TMS_TP05_DAT, - TMS_TP06, - TMS_TP06_DAT, - TMS_TP07, - TMS_TP07_DAT, - TMS_TP08, - TMS_TP08_DAT, - - TMS_COUNT -}; -#endif enum EHTMLFontSize { eHTMLSize_Normal, @@ -808,14 +658,7 @@ enum EControllerActions { ACTION_MENU_OTHER_STICK_RIGHT, ACTION_MENU_PAUSEMENU, -#if 0 - ACTION_MENU_GTC_PAUSE, - ACTION_MENU_GTC_RESUME, -#endif -#if 0 - ACTION_MENU_TOUCHPAD_PRESS, -#endif ACTION_MENU_OK, ACTION_MENU_CANCEL, diff --git a/Minecraft.Client/Platform/Common/App_structs.h b/Minecraft.Client/Platform/Common/App_structs.h index 0a56bdd33..2e44678a5 100644 --- a/Minecraft.Client/Platform/Common/App_structs.h +++ b/Minecraft.Client/Platform/Common/App_structs.h @@ -117,17 +117,10 @@ typedef struct { }; } GAME_SETTINGS; -#if 0 -typedef struct { - WCHAR wchPlayerUID[64]; - char pszLevelName[14]; -} BANNEDLISTDATA, *PBANNEDLISTDATA; -#else typedef struct { PlayerUID xuid; char pszLevelName[14]; } BANNEDLISTDATA, *PBANNEDLISTDATA; -#endif typedef std::vector VBANNEDLIST; @@ -150,26 +143,12 @@ typedef struct { typedef struct { eDLCContentType eDLCType; -#if 0 || 0 || 0 - char chImageURL[256]; // SCE_NP_COMMERCE2_URL_LEN -#else -#if 0 - - std::wstring wsProductId; - std::wstring wsDisplayName; - - // add a store for the local DLC image - std::uint8_t* pbImageData; - unsigned int dwImageBytes; -#else ULONGLONG ullOfferID_Full; ULONGLONG ullOfferID_Trial; -#endif WCHAR wchBanner[MAX_BANNERNAME_SIZE]; WCHAR wchDataFile[MAX_BANNERNAME_SIZE]; int iGender; -#endif int iConfig; unsigned int uiSortIndex; } DLC_INFO; @@ -196,12 +175,8 @@ typedef struct _TMSPPRequest { C4JStorage::eGlobalStorage eStorageFacility; C4JStorage::eTMS_FILETYPEVAL eFileTypeVal; // char szFilename[MAX_TMSFILENAME_SIZE]; -#if 0 - int (*CallbackFunc)(void*, int, int, void*, WCHAR*); -#else int (*CallbackFunc)(void*, int, int, C4JStorage::PTMSPP_FILEDATA, LPCSTR szFilename); -#endif WCHAR wchFilename[MAX_TMSFILENAME_SIZE]; void* lpCallbackParam; diff --git a/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp index c34b51ea4..c997aa7d4 100644 --- a/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp +++ b/Minecraft.Client/Platform/Common/Audio/SoundEngine.cpp @@ -10,10 +10,7 @@ #include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h" #include "../DLC/DLCAudioFile.h" -#if 0 -#include -#endif -#ifdef __linux__ +#if defined(__linux__) #define STB_VORBIS_HEADER_ONLY #include "stb_vorbis.c" // Fixes strcasecmp in miniaudio @@ -35,7 +32,7 @@ int strcasecmp(const char* a, const char* b) { #undef STB_VORBIS_HEADER_ONLY #include "stb_vorbis.c" #endif -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) #include "../../Minecraft.Client/Platform/Windows64/Windows64_App.h" #include "../../Minecraft.Client/Platform/Windows64/Miles/include/imssapi.h" #endif @@ -81,56 +78,21 @@ const char* SoundEngine::m_szStreamFileA[eStream_Max] = {"calm1", "strad", "ward", "where_are_we_now"}; -#ifdef __linux__ +#if defined(__linux__) char SoundEngine::m_szSoundPath[] = {"Sound/"}; char SoundEngine::m_szMusicPath[] = {"music/"}; char SoundEngine::m_szRedistName[] = {"redist64"}; #endif -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) char SoundEngine::m_szSoundPath[] = {"Durango\\Sound\\"}; char SoundEngine::m_szMusicPath[] = {"music\\"}; char SoundEngine::m_szRedistName[] = {"redist64"}; -#elif 0 -char SoundEngine::m_szSoundPath[] = {"Sound\\"}; -char SoundEngine::m_szMusicPath[] = {"music\\"}; -char SoundEngine::m_szRedistName[] = {"redist64"}; -#elif 0 - -#ifdef _CONTENT_PACKAGE -char SoundEngine::m_szSoundPath[] = {"Sound/"}; -#elif defined _ART_BUILD -char SoundEngine::m_szSoundPath[] = {"Sound/"}; -#else -// just use the host Durango folder for the sound. In the content package, we'll -// have moved this in the .gp4 file -char SoundEngine::m_szSoundPath[] = {"Durango/Sound/"}; -#endif -char SoundEngine::m_szMusicPath[] = {"music/"}; -char SoundEngine::m_szRedistName[] = {"redist64"}; -#elif 0 -char SoundEngine::m_szSoundPath[] = {"PSVita/Sound/"}; -char SoundEngine::m_szMusicPath[] = {"music/"}; -char SoundEngine::m_szRedistName[] = {"redist"}; -#elif 0 -// extern const char* getPS3HomePath(); -char SoundEngine::m_szSoundPath[] = {"PS3/Sound/"}; -char SoundEngine::m_szMusicPath[] = {"music/"}; -char SoundEngine::m_szRedistName[] = {"redist"}; - -#define USE_SPURS - -#ifdef USE_SPURS -#include -#else -#include -#endif - #endif // END ASSETS // Linux specific functions -#ifdef __linux__ +#if defined(__linux__) std::wstring stws(const char* utf8) { size_t len = std::mbstowcs(nullptr, utf8, 0); if (len == static_cast(-1)) return L""; @@ -438,7 +400,7 @@ void SoundEngine::playStreaming(const wstring& name, float x, float y, float z, m_iMusicDelay = random->nextInt( 20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10; -#ifdef _DEBUG +#if defined(_DEBUG) m_iMusicDelay = 0; #endif Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -1044,21 +1006,13 @@ void SoundEngine::tick(shared_ptr* players, float a) { #else void SoundEngine::init(Options* pOptions) { app.DebugPrintf("---SoundEngine::init\n"); -#ifdef __DISABLE_MILES__ +#if defined(__DISABLE_MILES__) return; #endif -#if 0 - C4JThread::PushAffinityAllCores(); -#endif -#if 0 || 0 || 0 || \ - 0 - Register_RIB(BinkADec); -#endif char* redistpath; -#if (defined _WINDOWS64 || \ - 0) // || 0 || 0 ) +#if defined(_WINDOWS64) redistpath = AIL_set_redist_directory(m_szRedistName); #endif @@ -1068,55 +1022,15 @@ void SoundEngine::init(Options* pOptions) { int iNumberOfChannels = initAudioHardware(8); // Create a driver to render our audio - 44khz, 16 bit, -#if 0 - // On the Sony PS3, the driver is always opened in 48 kHz, 32-bit floating - // point. The only meaningful configurations are MSS_MC_STEREO, - // MSS_MC_51_DISCRETE, and MSS_MC_71_DISCRETE. - m_hDriver = AIL_open_digital_driver(48000, 16, iNumberOfChannels, - AIL_OPEN_DIGITAL_USE_SPU0); -#elif 0 - - // maximum of 16 samples - AIL_set_preference(DIG_MIXER_CHANNELS, 16); - - m_hDriver = AIL_open_digital_driver(48000, 16, MSS_MC_STEREO, 0); - - // AP - For some reason the submit thread defaults to a priority of zero - // (invalid). Make sure it has the highest priority to avoid audio breakup. - SceUID threadID; - AIL_platform_property(m_hDriver, PSP2_SUBMIT_THREAD, &threadID, 0, 0); - S32 g_DefaultCPU = sceKernelGetThreadCpuAffinityMask(threadID); - S32 Old = sceKernelChangeThreadPriority(threadID, 64); - - // AP - register a callback when the mixer starts - AILMIXERCB temp = AIL_register_mix_callback(m_hDriver, MilesMixerCB); - - InitializeCriticalSection(&SoundEngine_MixerMutex); - -#elif 0 - m_hDriver = AIL_open_digital_driver(48000, 16, 2, 0); - app.DebugPrintf("---SoundEngine::init - AIL_open_digital_driver\n"); - -#else m_hDriver = AIL_open_digital_driver(44100, 16, MSS_MC_USE_SYSTEM_CONFIG, 0); -#endif if (m_hDriver == 0) { app.DebugPrintf("Couldn't open digital sound driver. (%s)\n", AIL_last_error()); AIL_shutdown(); -#if 0 - C4JThread::PopAffinity(); -#endif return; } app.DebugPrintf("---SoundEngine::init - driver opened\n"); -#if 0 - - // set high falloff power for maximum spatial effect in software mode - AIL_set_speaker_configuration(m_hDriver, 0, 0, 4.0F); - -#endif AIL_set_event_error_callback(ErrorCallback); @@ -1134,40 +1048,12 @@ void SoundEngine::init(Options* pOptions) { app.DebugPrintf("Couldn't init event system (%s).\n", AIL_last_error()); AIL_close_digital_driver(m_hDriver); AIL_shutdown(); -#if 0 - C4JThread::PopAffinity(); -#endif app.DebugPrintf( "---SoundEngine::init - AIL_startup_event_system failed\n"); return; } char szBankName[255]; -#if 0 - if (app.GetBootedFromDiscPatch()) { - char szTempSoundFilename[255]; - sprintf(szTempSoundFilename, "%s%s", m_szSoundPath, "Minecraft.msscmp"); - - app.DebugPrintf( - "SoundEngine::playMusicUpdate - (booted from disc patch) looking " - "for %s\n", - szTempSoundFilename); - sprintf(szBankName, "%s/%s", app.GetBDUsrDirPath(szTempSoundFilename), - m_szSoundPath); - app.DebugPrintf( - "SoundEngine::playMusicUpdate - (booted from disc patch) music " - "path - %s\n", - szBankName); - } else { - sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath); - } - -#elif 0 - sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath); -#elif 0 - sprintf(szBankName, "%s/%s", getUsrDirPath(), m_szSoundPath); -#else strcpy((char*)szBankName, m_szSoundPath); -#endif strcat((char*)szBankName, "Minecraft.msscmp"); @@ -1179,9 +1065,6 @@ void SoundEngine::init(Options* pOptions) { Error); AIL_close_digital_driver(m_hDriver); AIL_shutdown(); -#if 0 - C4JThread::PopAffinity(); -#endif return; } @@ -1208,45 +1091,12 @@ void SoundEngine::init(Options* pOptions) { m_openStreamThread = NULL; -#if 0 - C4JThread::PopAffinity(); -#endif -#if 0 - // AP - By default the mixer won't start up and nothing will process. Kick - // off a blank sample to force the mixer to start up. - HSAMPLE Sample = AIL_allocate_sample_handle(m_hDriver); - AIL_init_sample(Sample, DIG_F_STEREO_16); - static U64 silence = 0; - AIL_set_sample_address(Sample, &silence, sizeof(U64)); - AIL_start_sample(Sample); - - // wait for 1 mix... - AIL_release_sample_handle(Sample); -#endif } -#if 0 -// void SoundEngine::SetHandle(int32_t hAudio) -// { -// //m_hAudio=hAudio; -// } -#endif // AP - moved to a separate function so it can be called from the mixer callback // on Vita void SoundEngine::updateMiles() { -#if 0 - // CD - We must check for Background Music [BGM] at any point - // If it's playing disable our audio, otherwise enable - int NoBGMPlaying = sceAudioOutGetAdopt(SCE_AUDIO_OUT_PORT_TYPE_BGM); - updateSystemMusicPlaying(!NoBGMPlaying); -#elif 0 - // is the system playing background music? - SceAudioOutPortState outPortState; - sceAudioOutGetPortState(m_hBGMAudio, &outPortState); - updateSystemMusicPlaying(outPortState.output == - SCE_AUDIO_OUT_STATE_OUTPUT_UNKNOWN); -#endif if (m_validListenerCount == 1) { for (int i = 0; i < MAX_LOCAL_PLAYERS; i++) { @@ -1471,7 +1321,7 @@ void SoundEngine::updateMiles() { } // #define DISTORTION_TEST -#ifdef DISTORTION_TEST +#if defined(DISTORTION_TEST) static float fVal = 0.0f; #endif ///////////////////////////////////////////// @@ -1480,22 +1330,16 @@ static float fVal = 0.0f; // ///////////////////////////////////////////// -#if 0 -static S32 running = AIL_ms_count(); -#endif void SoundEngine::tick(std::shared_ptr* players, float a) { -#ifdef __DISABLE_MILES__ +#if defined(__DISABLE_MILES__) return; #endif -#if 0 - EnterCriticalSection(&SoundEngine_MixerMutex); -#endif // update the listener positions int listenerCount = 0; -#ifdef DISTORTION_TEST +#if defined(DISTORTION_TEST) float fX, fY, fZ; #endif if (players) { @@ -1541,15 +1385,7 @@ void SoundEngine::tick(std::shared_ptr* players, float a) { } m_validListenerCount = listenerCount; -#if 0 - // AP - Show that a change has occurred so we know to update the values at - // the next Mixer callback - SoundEngine_Change = true; - - LeaveCriticalSection(&SoundEngine_MixerMutex); -#else updateMiles(); -#endif } SoundEngine::SoundEngine() { random = new Random(); @@ -1577,13 +1413,10 @@ SoundEngine::SoundEngine() { memset(CurrentSoundsPlaying, 0, sizeof(int) * (eSoundType_MAX + eSFX_MAX)); memset(m_ListenerA, 0, sizeof(AUDIO_LISTENER) * XUSER_MAX_COUNT); -#if 0 - m_hBGMAudio = GetAudioBGMHandle(); -#endif } void SoundEngine::destroy() {} -#ifdef _DEBUG +#if defined(_DEBUG) void SoundEngine::GetSoundName(char* szSoundName, int iSound) { strcpy((char*)szSoundName, "Minecraft/"); std::wstring name = wchSoundNames[iSound]; @@ -1620,7 +1453,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, // build the name strcpy((char*)szSoundName, "Minecraft/"); -#ifdef DISTORTION_TEST +#if defined(DISTORTION_TEST) std::wstring name = wchSoundNames[eSoundType_MOB_ENDERDRAGON_GROWL]; #else std::wstring name = wchSoundNames[iSound]; @@ -1641,7 +1474,7 @@ void SoundEngine::play(int iSound, float x, float y, float z, float volume, AudioInfo.bIs3D = true; AudioInfo.bUseSoundsPitchVal = false; AudioInfo.iSound = iSound + eSFX_MAX; -#ifdef _DEBUG +#if defined(_DEBUG) strncpy(AudioInfo.chName, (char*)szSoundName, 64); #endif @@ -1701,7 +1534,7 @@ void SoundEngine::playUI(int iSound, float volume, float pitch) { } else { AudioInfo.iSound = iSound; } -#ifdef _DEBUG +#if defined(_DEBUG) strncpy(AudioInfo.chName, (char*)szSoundName, 64); #endif @@ -1745,7 +1578,7 @@ void SoundEngine::playStreaming(const std::wstring& name, float x, float y, m_iMusicDelay = random->nextInt( 20 * 60 * 3); // random->nextInt(20 * 60 * 10) + 20 * 60 * 10; -#ifdef _DEBUG +#if defined(_DEBUG) m_iMusicDelay = 0; #endif Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -1779,7 +1612,7 @@ void SoundEngine::playStreaming(const std::wstring& name, float x, float y, } } int SoundEngine::OpenStreamThreadProc(void* lpParameter) { -#ifdef __DISABLE_MILES__ +#if defined(__DISABLE_MILES__) return 0; #endif SoundEngine* soundEngine = (SoundEngine*)lpParameter; @@ -1794,9 +1627,7 @@ int SoundEngine::OpenStreamThreadProc(void* lpParameter) { ///////////////////////////////////////////// void SoundEngine::playMusicTick() { // AP - vita will update the music during the mixer callback -#if 1 playMusicUpdate(); -#endif } // AP - moved to a separate function so it can be called from the mixer callback @@ -1822,29 +1653,7 @@ void SoundEngine::playMusicUpdate() { if (m_musicID != -1) { // start playing it -#if (0 || 0 || 0) - -#if 0 - // 4J-PB - Need to check if we are a patched BD build - if (app.GetBootedFromDiscPatch()) { - sprintf(m_szStreamName, "%s/%s", - app.GetBDUsrDirPath(m_szMusicPath), m_szMusicPath); - app.DebugPrintf( - "SoundEngine::playMusicUpdate - (booted from disc " - "patch) music path - %s", - m_szStreamName); - } else { - sprintf(m_szStreamName, "%s/%s", getUsrDirPath(), - m_szMusicPath); - } -#else - sprintf(m_szStreamName, "%s/%s", getUsrDirPath(), - m_szMusicPath); -#endif - -#else strcpy((char*)m_szStreamName, m_szMusicPath); -#endif // are we using a mash-up pack? // if(pMinecraft && !pMinecraft->skins->isUsingDefaultSkin() && // pMinecraft->skins->getSelected()->hasAudio()) @@ -1871,15 +1680,6 @@ void SoundEngine::playMusicUpdate() { m_MusicType = eMusicType_Game; m_StreamingAudioInfo.bIs3D = false; -#if 0 - std::wstring& wstrSoundName = - dlcAudioFile->GetSoundName(m_musicID); - std::wstring wstrFile = - L"TPACK:\\Data\\" + wstrSoundName + L".binka"; - std::wstring mountedPath = - StorageManager.GetMountedPath(wstrFile); - wcstombs(m_szStreamName, mountedPath.c_str(), 255); -#else std::wstring& wstrSoundName = dlcAudioFile->GetSoundName(m_musicID); char szName[255]; @@ -1890,7 +1690,6 @@ void SoundEngine::playMusicUpdate() { std::string mountedPath = StorageManager.GetMountedPath(strFile); strcpy(m_szStreamName, mountedPath.c_str()); -#endif } else { SetIsPlayingStreamingGameMusic(false); SetIsPlayingStreamingCDMusic(true); @@ -1908,53 +1707,6 @@ void SoundEngine::playMusicUpdate() { } else { // 4J-PB - if this is a PS3 disc patch, we have to check if // the music file is in the patch data -#if 0 - if (app.GetBootedFromDiscPatch() && - (m_musicID < m_iStream_CD_1)) { - // rebuild the path for the music - strcpy((char*)m_szStreamName, m_szMusicPath); - strcat((char*)m_szStreamName, "music/"); - strcat((char*)m_szStreamName, - m_szStreamFileA[m_musicID]); - strcat((char*)m_szStreamName, ".binka"); - - // check if this is in the patch data - sprintf(m_szStreamName, "%s/%s", - app.GetBDUsrDirPath(m_szStreamName), - m_szMusicPath); - strcat((char*)m_szStreamName, "music/"); - strcat((char*)m_szStreamName, - m_szStreamFileA[m_musicID]); - strcat((char*)m_szStreamName, ".binka"); - - SetIsPlayingStreamingGameMusic(true); - SetIsPlayingStreamingCDMusic(false); - m_MusicType = eMusicType_Game; - m_StreamingAudioInfo.bIs3D = false; - } else if (m_musicID < m_iStream_CD_1) { - SetIsPlayingStreamingGameMusic(true); - SetIsPlayingStreamingCDMusic(false); - m_MusicType = eMusicType_Game; - m_StreamingAudioInfo.bIs3D = false; - // build the name - strcat((char*)m_szStreamName, "music/"); - strcat((char*)m_szStreamName, - m_szStreamFileA[m_musicID]); - strcat((char*)m_szStreamName, ".binka"); - } - - else { - SetIsPlayingStreamingGameMusic(false); - SetIsPlayingStreamingCDMusic(true); - m_MusicType = eMusicType_CD; - m_StreamingAudioInfo.bIs3D = true; - // build the name - strcat((char*)m_szStreamName, "cds/"); - strcat((char*)m_szStreamName, - m_szStreamFileA[m_musicID]); - strcat((char*)m_szStreamName, ".binka"); - } -#else if (m_musicID < m_iStream_CD_1) { SetIsPlayingStreamingGameMusic(true); SetIsPlayingStreamingCDMusic(false); @@ -1973,7 +1725,6 @@ void SoundEngine::playMusicUpdate() { strcat((char*)m_szStreamName, m_szStreamFileA[m_musicID]); strcat((char*)m_szStreamName, ".binka"); -#endif } // std::wstring name = diff --git a/Minecraft.Client/Platform/Common/Audio/SoundEngine.h b/Minecraft.Client/Platform/Common/Audio/SoundEngine.h index 307c38781..07d22668d 100644 --- a/Minecraft.Client/Platform/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Platform/Common/Audio/SoundEngine.h @@ -19,7 +19,6 @@ enum eMUSICFILES { eStream_Overworld_hal4, eStream_Overworld_nuance1, eStream_Overworld_nuance2, -#if 1 // Add the new music tracks eStream_Overworld_Creative1, eStream_Overworld_Creative2, @@ -31,7 +30,6 @@ enum eMUSICFILES { eStream_Overworld_Menu2, eStream_Overworld_Menu3, eStream_Overworld_Menu4, -#endif eStream_Overworld_piano1, eStream_Overworld_piano2, eStream_Overworld_piano3, // <-- make piano3 the last overworld one @@ -80,7 +78,7 @@ typedef struct { int iSound; bool bIs3D; bool bUseSoundsPitchVal; -#ifdef _DEBUG +#if defined(_DEBUG) char chName[64]; #endif } AUDIO_INFO; @@ -94,7 +92,7 @@ class SoundEngine : public ConsoleSoundEngine { public: SoundEngine(); virtual void destroy(); -#ifdef _DEBUG +#if defined(_DEBUG) void GetSoundName(char* szSoundName, int iSound); #endif virtual void play(int iSound, float x, float y, float z, float volume, @@ -129,12 +127,8 @@ public: private: float getMasterMusicVolume(); // platform specific functions -#if 0 - int initAudioHardware(int iMinSpeakers); -#else int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; } -#endif -#ifdef __linux__ +#if defined(__linux__) void updateMiniAudio(); #endif @@ -177,7 +171,4 @@ private: int m_iStream_CD_1; bool* m_bHeardTrackA; -#if 0 - int32_t m_hBGMAudio; -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/Audio/SoundNames.cpp b/Minecraft.Client/Platform/Common/Audio/SoundNames.cpp index a284f3cc5..e714abc8d 100644 --- a/Minecraft.Client/Platform/Common/Audio/SoundNames.cpp +++ b/Minecraft.Client/Platform/Common/Audio/SoundNames.cpp @@ -85,10 +85,6 @@ const WCHAR* ConsoleSoundEngine::wchSoundNames[eSoundType_MAX] = { L"ambient/weather/rain", // eSoundType_AMBIENT_WEATHER_RAIN, L"ambient/weather/thunder", // eSoundType_AMBIENT_WEATHER_THUNDER, L"ambient/cave/cave", // eSoundType_CAVE_CAVE, DON'T USE FOR XBOX 360!!! -#if 0 - L"ambient/cave/cave2", // eSoundType_CAVE_CAVE2 - removed the two sounds - //that were at 192k in the first ambient cave event -#endif L"portal/portal", // eSoundType_PORTAL_PORTAL, // 4J-PB - added a couple that were still using std::wstring L"portal/trigger", // eSoundType_PORTAL_TRIGGER diff --git a/Minecraft.Client/Platform/Common/Console_Awards_enum.h b/Minecraft.Client/Platform/Common/Console_Awards_enum.h index 5ae54a86f..a8003a310 100644 --- a/Minecraft.Client/Platform/Common/Console_Awards_enum.h +++ b/Minecraft.Client/Platform/Common/Console_Awards_enum.h @@ -30,7 +30,6 @@ enum eAward eAward_arrowKillCreeper, eAward_socialPost, -#if 1 // 4J Stu - Does not map to any Xbox achievements eAward_snipeSkeleton, eAward_diamonds, @@ -43,9 +42,8 @@ enum eAward eAward_enchantments, eAward_overkill, eAward_bookcase, -#endif -#ifdef _EXTENDED_ACHIEVEMENTS +#if defined(_EXTENDED_ACHIEVEMENTS) eAward_adventuringTime, eAward_repopulation, //eAward_porkChop, diff --git a/Minecraft.Client/Platform/Common/Console_Utils.cpp b/Minecraft.Client/Platform/Common/Console_Utils.cpp index f659b5f29..a934bed4b 100644 --- a/Minecraft.Client/Platform/Common/Console_Utils.cpp +++ b/Minecraft.Client/Platform/Common/Console_Utils.cpp @@ -6,10 +6,10 @@ // Name: DebugSpewV() // Desc: Internal helper function //-------------------------------------------------------------------------------------- -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) static void DebugSpewV(const char* strFormat, va_list pArgList) { -#if 0 || 0 || 0 || defined(__linux__) +#if defined(__linux__) assert(0); #else char str[2048]; @@ -23,16 +23,12 @@ static void DebugSpewV(const char* strFormat, va_list pArgList) #endif //-------------------------------------------------------------------------------------- -// Name: DebugSpew() +// Name: DebugPrintf() // Desc: Prints formatted debug spew //-------------------------------------------------------------------------------------- -#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation -void CDECL DebugSpew(_In_z_ _Printf_format_string_ const char* strFormat, ...) -#else void CDECL DebugPrintf(const char* strFormat, ...) -#endif { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) va_list pArgList; va_start( pArgList, strFormat ); DebugSpewV( strFormat, pArgList ); diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index 7057f6c6a..dd7dfd6c4 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -27,7 +27,7 @@ #include "../Minecraft.Client/GameState/GameMode.h" #include "../Minecraft.Client/Platform/Windows64/Social/SocialManager.h" #include "Tutorial/TutorialMode.h" -#if 0 || defined _WINDOWS64 +#if defined(_WINDOWS64) #include "../Minecraft.Client/Platform/Common/XML/ATGXmlParser.h" #include "../Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h" #endif @@ -48,25 +48,10 @@ #include "../Minecraft.Client/Textures/Packs/DLCTexturePack.h" #include "DLC/DLCPack.h" #include "../Minecraft.Client/Utils/StringTable.h" -#if 1 #include "../Minecraft.Client/Utils/ArchiveFile.h" -#endif #include "../Minecraft.Client/Minecraft.h" -#if 0 -#include "../Minecraft.Client/Platform/Windows64/GameConfig/Minecraft.spa.h" -#include "XUI/XUI_TextEntry.h" -#include "XUI/XUI_XZP_Icons.h" -#include "XUI/XUI_PauseMenu.h" -#else #include "UI/UI.h" #include "UI/UIScene_PauseMenu.h" -#endif -#if 0 -#include -#endif -#if 0 -#include -#endif #include "Leaderboards/LeaderboardManager.h" @@ -77,12 +62,8 @@ const float CMinecraftApp::fSafeZoneX = 64.0f; // 5% of 1280 const float CMinecraftApp::fSafeZoneY = 36.0f; // 5% of 720 int CMinecraftApp::s_iHTMLFontSizesA[eHTMLSize_COUNT] = { -#if 0 - 14, 12, 14, 24 -#else // 20,15,20,24 20, 13, 20, 26 -#endif }; CMinecraftApp::CMinecraftApp() { @@ -94,7 +75,7 @@ CMinecraftApp::CMinecraftApp() { "changed, so all stat data is likely incorrect. Is: %d, Should be: " "%d\n", sizeof(GAME_SETTINGS), GAME_SETTINGS_PROFILE_DATA_BYTES); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif } @@ -139,9 +120,9 @@ CMinecraftApp::CMinecraftApp() { m_bChangingSessionType = false; m_bReallyChangingSessionType = false; -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) -#ifdef _CONTENT_PACKAGE +#if defined(_CONTENT_PACKAGE) m_bDebugOptions = false; // make them off by default in a content package build #else @@ -179,7 +160,7 @@ CMinecraftApp::CMinecraftApp() { m_uiGameHostSettings = 0; -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) m_GameNewWorldSize = 0; m_bGameNewWorldSizeUseMoat = false; m_GameNewHellScale = 0; @@ -206,23 +187,13 @@ CMinecraftApp::CMinecraftApp() { m_bResetNether = false; -#if 0 - // m_bTransferSavesToXboxOne=false; - // m_uiTransferSlotC=5; -#endif -#if (defined _CONTENT_PACAKGE) || (0) +#if defined(_CONTENT_PACAKGE) m_bUseDPadForDebug = false; #else m_bUseDPadForDebug = true; #endif -#if (0 || 0 || 0 || \ - 0) - for (int i = 0; i < XUSER_MAX_COUNT; i++) { - m_eOptionsStatusA[i] = C4JStorage::eOptions_Callback_Idle; - } -#endif for (int i = 0; i < XUSER_MAX_COUNT; i++) { m_vBannedListA[i] = new std::vector; @@ -230,13 +201,10 @@ CMinecraftApp::CMinecraftApp() { LocaleAndLanguageInit(); -#if 0 - m_hasReachedMainMenu = false; -#endif } void CMinecraftApp::DebugPrintf(const char* szFormat, ...) { -#ifndef _FINAL_BUILD +#if !defined(_FINAL_BUILD) char buf[1024]; va_list ap; va_start(ap, szFormat); @@ -247,47 +215,18 @@ void CMinecraftApp::DebugPrintf(const char* szFormat, ...) { } void CMinecraftApp::DebugPrintf(int user, const char* szFormat, ...) { -#ifndef _FINAL_BUILD +#if !defined(_FINAL_BUILD) if (user == USER_NONE) return; char buf[1024]; va_list ap; va_start(ap, szFormat); vsnprintf(buf, sizeof(buf), szFormat, ap); va_end(ap); -#if 0 - unsigned int writelen; - sys_tty_write(SYS_TTYP_USER1 + (user - 1), buf, strlen(buf), &writelen); -#elif 0 - switch (user) { - case 0: { - SceUID tty2 = sceIoOpen("tty2:", SCE_O_WRONLY, 0); - if (tty2 >= 0) { - std::string string1(buf); - sceIoWrite(tty2, string1.c_str(), string1.length()); - sceIoClose(tty2); - } - } break; - case 1: { - SceUID tty3 = sceIoOpen("tty3:", SCE_O_WRONLY, 0); - if (tty3 >= 0) { - std::string string1(buf); - sceIoWrite(tty3, string1.c_str(), string1.length()); - sceIoClose(tty3); - } - } break; - default: - OutputDebugStringA(buf); - break; - } -#else OutputDebugStringA(buf); -#endif -#if 1 if (user == USER_UI) { ui.logDebugString(buf); } #endif -#endif } const wchar_t* CMinecraftApp::GetString(int iID) { @@ -321,18 +260,7 @@ void CMinecraftApp::SetAction(int iPad, eXuiAction action, void* param) { } bool CMinecraftApp::IsAppPaused() { -#if 0 || 0 - bool paused = m_bIsAppPaused; - EnterCriticalSection(&m_saveNotificationCriticalSection); - if (g_NetworkManager.IsLocalGame() && - g_NetworkManager.GetPlayerCount() == 1) { - paused |= m_saveNotificationDepth > 0; - } - LeaveCriticalSection(&m_saveNotificationCriticalSection); - return paused; -#else return m_bIsAppPaused; -#endif } void CMinecraftApp::SetAppPaused(bool val) { m_bIsAppPaused = val; } @@ -737,14 +665,8 @@ bool CMinecraftApp::LoadBeaconMenu(int iPad, ////////////////////////////////////////////// void CMinecraftApp::InitGameSettings() { for (int i = 0; i < XUSER_MAX_COUNT; i++) { -#if (0 || 0 || 0 || \ - 0) - GameSettingsA[i] = - (GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(i); -#else GameSettingsA[i] = (GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(i); -#endif // clear the flag to say the settings have changed GameSettingsA[i]->bSettingsChanged = false; @@ -753,18 +675,12 @@ void CMinecraftApp::InitGameSettings() { // 4J-PB - adding in for Windows & PS3 to set the defaults for the // joypad -#if defined _WINDOWS64 // || 0 +#if defined(_WINDOWS64) C_4JProfile::PROFILESETTINGS* pProfileSettings = ProfileManager.GetDashboardProfileSettings(i); // clear this for now - it will come from reading the system values memset(pProfileSettings, 0, sizeof(C_4JProfile::PROFILESETTINGS)); SetDefaultOptions(pProfileSettings, i); -#elif 0 || 0 || 0 || \ - 0 - C4JStorage::PROFILESETTINGS* pProfileSettings = - StorageManager.GetDashboardProfileSettings(i); - // 4J-PB - don't cause an options write to happen here - SetDefaultOptions(pProfileSettings, i, false); #else // 4jcrqaft: Linux (and any other platform): profile data is // zero-initialised, so explicitly apply defaults @@ -776,14 +692,8 @@ void CMinecraftApp::InitGameSettings() { } } -#if (0 || 0 || 0 || \ - 0) -int CMinecraftApp::SetDefaultOptions(C4JStorage::PROFILESETTINGS* pSettings, - const int iPad, bool bWriteProfile) -#else int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS* pSettings, const int iPad) -#endif { SetGameSettings(iPad, eGameSetting_MusicVolume, DEFAULT_VOLUME_LEVEL); SetGameSettings(iPad, eGameSetting_SoundFXVolume, DEFAULT_VOLUME_LEVEL); @@ -878,22 +788,12 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS* pSettings, // #endif -#if (0 || 0 || 0 || \ - 0) - GameSettingsA[iPad]->bSettingsChanged = bWriteProfile; -#endif return 0; } -#if (0 || 0 || 0 || \ - 0) -int CMinecraftApp::DefaultOptionsCallback( - void* pParam, C4JStorage::PROFILESETTINGS* pSettings, const int iPad) -#else int CMinecraftApp::DefaultOptionsCallback( void* pParam, C_4JProfile::PROFILESETTINGS* pSettings, const int iPad) -#endif { CMinecraftApp* pApp = (CMinecraftApp*)pParam; @@ -911,83 +811,6 @@ int CMinecraftApp::DefaultOptionsCallback( return 0; } -#if (0 || 0 || 0 || \ - 0) - -std::wstring CMinecraftApp::toStringOptionsStatus( - const C4JStorage::eOptionsCallback& eStatus) { -#ifndef _CONTENT_PACKAGE - switch (eStatus) { - case C4JStorage::eOptions_Callback_Idle: - return L"Idle"; - case C4JStorage::eOptions_Callback_Write: - return L"Write"; - case C4JStorage::eOptions_Callback_Write_Fail_NoSpace: - return L"Write_Fail_NoSpace"; - case C4JStorage::eOptions_Callback_Write_Fail: - return L"Write_Fail"; - case C4JStorage::eOptions_Callback_Read: - return L"Read"; - case C4JStorage::eOptions_Callback_Read_Fail: - return L"Read_Fail"; - case C4JStorage::eOptions_Callback_Read_FileNotFound: - return L"Read_FileNotFound"; - case C4JStorage::eOptions_Callback_Read_Corrupt: - return L"Read_Corrupt"; - case C4JStorage::eOptions_Callback_Read_CorruptDeletePending: - return L"Read_CorruptDeletePending"; - case C4JStorage::eOptions_Callback_Read_CorruptDeleted: - return L"Read_CorruptDeleted"; - default: - return L"[UNRECOGNISED_OPTIONS_STATUS]"; - } -#else - return L""; -#endif -} - -#if 0 -int CMinecraftApp::OptionsDataCallback(void* pParam, int iPad, - unsigned short usVersion, - C4JStorage::eOptionsCallback eStatus, - int iBlocksRequired) { - CMinecraftApp* pApp = (CMinecraftApp*)pParam; - pApp->m_eOptionsStatusA[iPad] = eStatus; - pApp->m_eOptionsBlocksRequiredA[iPad] = iBlocksRequired; - return 0; -} - -int CMinecraftApp::GetOptionsBlocksRequired(int iPad) { - return m_eOptionsBlocksRequiredA[iPad]; -} - -#else -int CMinecraftApp::OptionsDataCallback(void* pParam, int iPad, - unsigned short usVersion, - C4JStorage::eOptionsCallback eStatus) { - CMinecraftApp* pApp = (CMinecraftApp*)pParam; - -#ifndef _CONTENT_PACKAGE - pApp->DebugPrintf("[OptionsDataCallback] Pad_%i: new status == %ls(%i).\n", - iPad, pApp->toStringOptionsStatus(eStatus).c_str(), - (int)eStatus); -#endif - - pApp->m_eOptionsStatusA[iPad] = eStatus; - - return 0; -} -#endif - -C4JStorage::eOptionsCallback CMinecraftApp::GetOptionsCallbackStatus(int iPad) { - return m_eOptionsStatusA[iPad]; -} - -void CMinecraftApp::SetOptionsCallbackStatus( - int iPad, C4JStorage::eOptionsCallback eStatus) { - m_eOptionsStatusA[iPad] = eStatus; -} -#endif int CMinecraftApp::OldProfileVersionCallback(void* pParam, unsigned char* pucData, @@ -997,292 +820,6 @@ int CMinecraftApp::OldProfileVersionCallback(void* pParam, // one switch (usVersion) { -#if 0 - case PROFILE_VERSION_1: - case PROFILE_VERSION_2: - // need to fill in values for the new profile data. No need to save - // the profile - that'll happen if they get changed, or if the auto - // save for the profile kicks in - { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - pGameSettings->ucMenuSensitivity = - 100; // eGameSetting_Sensitivity_InMenu - pGameSettings->ucInterfaceOpacity = - 80; // eGameSetting_Sensitivity_InMenu - pGameSettings->usBitmaskValues |= - 0x0200; // eGameSetting_DisplaySplitscreenGamertags - on - pGameSettings->usBitmaskValues |= - 0x0400; // eGameSetting_Hints - on - pGameSettings->usBitmaskValues |= - 0x1000; // eGameSetting_Autosave - 2 - pGameSettings->usBitmaskValues |= - 0x8000; // eGameSetting_Tooltips - on - - // 4J-PB - Let's also award all the achievements they have again - // because of the profile bug that seemed to stop the awards of - // some Changing this to check the system achievements at - // sign-in and award any that the game says we have and the - // system says we haven't - // ProfileManager.ReAwardAchievements(iPad); - - pGameSettings->uiBitmaskValues = 0L; // reset - pGameSettings->uiBitmaskValues |= - GAMESETTING_CLOUDS; // eGameSetting_Clouds - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_ONLINE; // eGameSetting_GameSetting_Online - on - // eGameSetting_GameSetting_Invite - off - pGameSettings->uiBitmaskValues |= - GAMESETTING_FRIENDSOFFRIENDS; // eGameSetting_GameSetting_FriendsOfFriends - // - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYUPDATEMSG; // eGameSetting_DisplayUpdateMessage - // (counter) - // TU6 - pGameSettings->uiBitmaskValues &= - ~GAMESETTING_BEDROCKFOG; // eGameSetting_BedrockFog - off - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHUD; // eGameSetting_DisplayHUD - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHAND; // eGameSetting_DisplayHand - on - // TU7 - pGameSettings->uiBitmaskValues |= - GAMESETTING_CUSTOMSKINANIM; // eGameSetting_CustomSkinAnim - // - on - // TU9 - pGameSettings->uiBitmaskValues |= - GAMESETTING_DEATHMESSAGES; // eGameSetting_DeathMessages - - // on - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE & 0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE_SPLITSCREEN & - 0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues |= - GAMESETTING_ANIMATEDCHARACTER; // eGameSetting_AnimatedCharacter - // - on - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the - // Mash-up pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - } - break; - case PROFILE_VERSION_3: - - { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - pGameSettings->uiBitmaskValues = 0L; // reset - pGameSettings->uiBitmaskValues |= - GAMESETTING_CLOUDS; // eGameSetting_Clouds - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_ONLINE; // eGameSetting_GameSetting_Online - on - // eGameSetting_GameSetting_Invite - off - pGameSettings->uiBitmaskValues |= - GAMESETTING_FRIENDSOFFRIENDS; // eGameSetting_GameSetting_FriendsOfFriends - // - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYUPDATEMSG; // eGameSetting_DisplayUpdateMessage - // (counter) - // TU6 - pGameSettings->uiBitmaskValues &= - ~GAMESETTING_BEDROCKFOG; // eGameSetting_BedrockFog - off - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHUD; // eGameSetting_DisplayHUD - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHAND; // eGameSetting_DisplayHand - on - // TU7 - pGameSettings->uiBitmaskValues |= - GAMESETTING_CUSTOMSKINANIM; // eGameSetting_CustomSkinAnim - on - // TU9 - pGameSettings->uiBitmaskValues |= - GAMESETTING_DEATHMESSAGES; // eGameSetting_DeathMessages - on - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE & 0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE_SPLITSCREEN & - 0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues |= - GAMESETTING_ANIMATEDCHARACTER; // eGameSetting_AnimatedCharacter - // - on - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the Mash-up - // pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - - } break; - case PROFILE_VERSION_4: { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - - pGameSettings->uiBitmaskValues &= - ~GAMESETTING_BEDROCKFOG; // eGameSetting_BedrockFog - off - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHUD; // eGameSetting_DisplayHUD - on - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYHAND; // eGameSetting_DisplayHand - on - // TU7 - pGameSettings->uiBitmaskValues |= - GAMESETTING_CUSTOMSKINANIM; // eGameSetting_CustomSkinAnim - on - // TU9 - pGameSettings->uiBitmaskValues |= - GAMESETTING_DEATHMESSAGES; // eGameSetting_DeathMessages - on - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE & 0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE_SPLITSCREEN & - 0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues |= - GAMESETTING_ANIMATEDCHARACTER; // eGameSetting_AnimatedCharacter - // - on - - // Set the online flag to on, so it's not saved if a game starts - // offline when the user didn't change it to be offline (xbox - // disconnected from LIVE) - pGameSettings->uiBitmaskValues |= - GAMESETTING_ONLINE; // eGameSetting_GameSetting_Online - on - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the Mash-up - // pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - - } - - break; - case PROFILE_VERSION_5: { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - - // reset the display new message counter - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYUPDATEMSG; // eGameSetting_DisplayUpdateMessage - // (counter) - // TU7 - pGameSettings->uiBitmaskValues |= - GAMESETTING_CUSTOMSKINANIM; // eGameSetting_CustomSkinAnim - on - // TU9 - pGameSettings->uiBitmaskValues |= - GAMESETTING_DEATHMESSAGES; // eGameSetting_DeathMessages - on - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE & 0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE_SPLITSCREEN & - 0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues |= - GAMESETTING_ANIMATEDCHARACTER; // eGameSetting_AnimatedCharacter - // - on - // Set the online flag to on, so it's not saved if a game starts - // offline when the user didn't change it to be offline (xbox - // disconnected from LIVE) - pGameSettings->uiBitmaskValues |= - GAMESETTING_ONLINE; // eGameSetting_GameSetting_Online - on - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the Mash-up - // pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - - } - - break; - case PROFILE_VERSION_6: { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - - // Added gui size for splitscreen and fullscreen - // Added death messages toggle - - // reset the display new message counter - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYUPDATEMSG; // eGameSetting_DisplayUpdateMessage - // (counter) - // TU9 - pGameSettings->uiBitmaskValues |= - GAMESETTING_DEATHMESSAGES; // eGameSetting_DeathMessages - on - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE & 0x00000800); // uisize 2 - pGameSettings->uiBitmaskValues |= - (GAMESETTING_UISIZE_SPLITSCREEN & - 0x00004000); // splitscreen ui size 3 - pGameSettings->uiBitmaskValues |= - GAMESETTING_ANIMATEDCHARACTER; // eGameSetting_AnimatedCharacter - // - on - // Set the online flag to on, so it's not saved if a game starts - // offline when the user didn't change it to be offline (xbox - // disconnected from LIVE) - pGameSettings->uiBitmaskValues |= - GAMESETTING_ONLINE; // eGameSetting_GameSetting_Online - on - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the Mash-up - // pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - - } - - break; - - case PROFILE_VERSION_7: { - GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; - // reset the display new message counter - pGameSettings->uiBitmaskValues |= - GAMESETTING_DISPLAYUPDATEMSG; // eGameSetting_DisplayUpdateMessage - // (counter) - - // TU12 - // favorite skins added, but only set in TU12 - set to FFs - for (int i = 0; i < MAX_FAVORITE_SKINS; i++) { - pGameSettings->uiFavoriteSkinA[i] = 0xFFFFFFFF; - } - pGameSettings->ucCurrentFavoriteSkinPos = 0; - // Added a bitmask in TU13 to enable/disable display of the Mash-up - // pack worlds in the saves list - pGameSettings->uiMashUpPackWorldsDisplay = 0xFFFFFFFF; - - // PS3 1.05 - added Greek - pGameSettings->ucLanguage = - MINECRAFT_LANGUAGE_DEFAULT; // use the system language - - } break; -#endif case PROFILE_VERSION_8: { GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)pucData; // reset the display new message counter @@ -1344,7 +881,7 @@ int CMinecraftApp::OldProfileVersionCallback(void* pParam, // updates app.DebugPrintf( "Don't know what to do with this profile version!\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) // __debugbreak(); #endif @@ -2452,23 +1989,13 @@ void CMinecraftApp::CheckGameSettingsChanged(bool bOverride5MinuteTimer, if (iPad == XUSER_INDEX_ANY) { for (int i = 0; i < XUSER_MAX_COUNT; i++) { if (GameSettingsA[i]->bSettingsChanged) { -#if (0 || 0 || 0 || \ - 0) - StorageManager.WriteToProfile(i, true, bOverride5MinuteTimer); -#else ProfileManager.WriteToProfile(i, true, bOverride5MinuteTimer); -#endif GameSettingsA[i]->bSettingsChanged = false; } } } else { if (GameSettingsA[iPad]->bSettingsChanged) { -#if (0 || 0 || 0 || \ - 0) - StorageManager.WriteToProfile(iPad, true, bOverride5MinuteTimer); -#else ProfileManager.WriteToProfile(iPad, true, bOverride5MinuteTimer); -#endif GameSettingsA[iPad]->bSettingsChanged = false; } } @@ -2483,7 +2010,7 @@ void CMinecraftApp::ClearGameSettingsChangedFlag(int iPad) { // Remove the debug settings in the content package build // //////////////////////////// -#ifndef _DEBUG_MENUS_ENABLED +#if !defined(_DEBUG_MENUS_ENABLED) unsigned int CMinecraftApp::GetGameSettingsDebugMask( int iPad, bool bOverridePlayer) // bOverridePlayer is to force the send for // the server to get the read options @@ -2517,7 +2044,7 @@ unsigned int CMinecraftApp::GetGameSettingsDebugMask( } void CMinecraftApp::SetGameSettingsDebugMask(int iPad, unsigned int uiVal) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) GameSettingsA[iPad]->bSettingsChanged = true; GameSettingsA[iPad]->uiDebugBitmask = uiVal; @@ -2825,12 +2352,6 @@ void CMinecraftApp::HandleXuiActions(void) { loadingParams->completionData = completionData; // 4J Stu - Xbox only -#if 0 - // Temporarily make this scene fullscreen - CXuiSceneBase::SetPlayerBaseScenePosition( - ProfileManager.GetPrimaryPad(), - CXuiSceneBase::e_BaseScene_Fullscreen); -#endif ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_FullscreenProgress, @@ -2844,13 +2365,6 @@ void CMinecraftApp::HandleXuiActions(void) { app.SetAutosaveTimerTime(); SetAction(i, eAppAction_Idle); -#if 0 || 0 - app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), - eXuiServerAction_AutoSaveGame); - - if (app.GetGameHostOption(eGameHostOption_DisableSaving)) - StorageManager.SetSaveDisabled(true); -#else // turn off the gamertags in splitscreen for the primary // player, since they are about to be made fullscreen ui.HideAllGameUIElements(); @@ -2893,18 +2407,11 @@ void CMinecraftApp::HandleXuiActions(void) { loadingParams->completionData = completionData; // 4J Stu - Xbox only -#if 0 - // Temporarily make this scene fullscreen - CXuiSceneBase::SetPlayerBaseScenePosition( - ProfileManager.GetPrimaryPad(), - CXuiSceneBase::e_BaseScene_Fullscreen); -#endif ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_FullscreenProgress, loadingParams, eUILayer_Fullscreen, eUIGroup_Fullscreen); -#endif } break; case eAppAction_ExitPlayer: // a secondary player has chosen to quit @@ -2914,23 +2421,7 @@ void CMinecraftApp::HandleXuiActions(void) { // Since the player is exiting, let's flush any profile // writes for them, and hope we're not breaking TCR // 136... -#if (0 || 0 || 0 || \ - 0) - StorageManager.ForceQueuedProfileWrites(i); - LeaderboardManager::Instance()->OpenSession(); - for (int j = 0; j < XUSER_MAX_COUNT; j++) { - if (ProfileManager.IsSignedIn(j)) { - app.DebugPrintf( - "Stats save for an offline game for the " - "player at index %d\n", - 0); - Minecraft::GetInstance()->forceStatsSave(j); - } - } - LeaderboardManager::Instance()->CloseSession(); -#else ProfileManager.ForceQueuedProfileWrites(i); -#endif // not required - it's done within the // removeLocalPlayerIdx @@ -2953,30 +2444,9 @@ void CMinecraftApp::HandleXuiActions(void) { ProfileManager.GetPrimaryPad()); pMinecraft->removeLocalPlayerIdx(i); -#if 0 - // tell the xui scenes a splitscreen player left - has - // to come after removeLocalPlayerIdx which calls - // updatePlayerViewportAssignments - XUIMessage xuiMsg; - CustomMessage_Splitscreenplayer_Struct myMsgData; - CustomMessage_Splitscreenplayer(&xuiMsg, &myMsgData, - false); - // send the message - for (int idx = 0; idx < XUSER_MAX_COUNT; idx++) { - if ((i != idx) && - (pMinecraft->localplayers[idx] != NULL)) { - XuiBroadcastMessage( - CXuiSceneBase::GetPlayerBaseScene(idx), - &xuiMsg); - } - } -#endif - -#if 1 // Wipe out the tooltips ui.SetTooltips(i, -1); -#endif // Change the presence info // Are we offline or online, and how many players are @@ -3022,9 +2492,6 @@ void CMinecraftApp::HandleXuiActions(void) { } } -#if 0 - ProfileManager.RemoveGamepadFromGame(i); -#endif SetAction(i, eAppAction_Idle); } @@ -3033,12 +2500,7 @@ void CMinecraftApp::HandleXuiActions(void) { int iPlayerC = g_NetworkManager.GetPlayerCount(); // Since the player is exiting, let's flush any profile // writes for them, and hope we're not breaking TCR 136... -#if (0 || 0 || 0 || \ - 0) - StorageManager.ForceQueuedProfileWrites(i); -#else ProfileManager.ForceQueuedProfileWrites(i); -#endif // if there are any tips showing, we need to close them pMinecraft->gui->clearMessages(i); @@ -3049,29 +2511,9 @@ void CMinecraftApp::HandleXuiActions(void) { ProfileManager.GetPrimaryPad()); pMinecraft->removeLocalPlayerIdx(i); -#if 0 - // tell the xui scenes a splitscreen player left - has to - // come after removeLocalPlayerIdx which calls - // updatePlayerViewportAssignments - XUIMessage xuiMsg; - CustomMessage_Splitscreenplayer_Struct myMsgData; - CustomMessage_Splitscreenplayer(&xuiMsg, &myMsgData, false); - // send the message - for (int idx = 0; idx < XUSER_MAX_COUNT; idx++) { - if ((i != idx) && - (pMinecraft->localplayers[idx] != NULL)) { - XuiBroadcastMessage( - CXuiSceneBase::GetPlayerBaseScene(idx), - &xuiMsg); - } - } -#endif - -#if 1 // Wipe out the tooltips ui.SetTooltips(i, -1); -#endif // Change the presence info // Are we offline or online, and how many players are there @@ -3116,39 +2558,6 @@ void CMinecraftApp::HandleXuiActions(void) { SetAction(i, eAppAction_Idle); } break; -#if 0 - case eAppAction_OptionsSaveNoSpace: { - SetAction(i, eAppAction_Idle); - - SceSaveDataDialogParam param; - SceSaveDataDialogSystemMessageParam sysParam; - SceSaveDataDialogItems items; - SceSaveDataDirName dirName; - - sceSaveDataDialogParamInitialize(¶m); - param.mode = SCE_SAVE_DATA_DIALOG_MODE_SYSTEM_MSG; - param.dispType = SCE_SAVE_DATA_DIALOG_TYPE_SAVE; - memset(&sysParam, 0, sizeof(sysParam)); - param.sysMsgParam = &sysParam; - param.sysMsgParam->sysMsgType = - SCE_SAVE_DATA_DIALOG_SYSMSG_TYPE_NOSPACE_CONTINUABLE; - param.sysMsgParam->value = app.GetOptionsBlocksRequired(i); - memset(&items, 0, sizeof(items)); - param.items = &items; - param.items->userId = ProfileManager.getUserID(i); - - int ret = sceSaveDataDialogInitialize(); - ret = sceSaveDataDialogOpen(¶m); - - app.SetOptionsSaveDataDialogRunning( - true); // m_bOptionsSaveDataDialogRunning = true; - // pClass->m_eSaveIncompleteType = saveIncompleteType; - - // StorageManager.SetSaveDisabled(true); - // pClass->EnterSaveNotificationSection(); - - } break; -#endif case eAppAction_ExitWorld: pMinecraft->exitingWorldRightNow = true; @@ -3178,23 +2587,6 @@ void CMinecraftApp::HandleXuiActions(void) { // Since the player forced the exit, let's flush any profile // writes, and hope we're not breaking TCR 136... -#if (0 || 0 || 0 || \ - 0) - StorageManager.ForceQueuedProfileWrites(); - LeaderboardManager::Instance()->OpenSession(); - for (int j = 0; j < XUSER_MAX_COUNT; j++) { - if (ProfileManager.IsSignedIn(j)) { - app.DebugPrintf( - "Stats save for an offline game for the player " - "at index %d\n", - 0); - Minecraft::GetInstance()->forceStatsSave(j); - } - } - LeaderboardManager::Instance()->CloseSession(); -#elif (0) - ProfileManager.ForceQueuedProfileWrites(); -#endif // 4J-PB - cancel any possible std::string verifications // queued with LIVE @@ -3210,9 +2602,6 @@ void CMinecraftApp::HandleXuiActions(void) { ProfileManager.GetPrimaryPad()); pMinecraft->removeLocalPlayerIdx(i); -#if 0 - ProfileManager.RemoveGamepadFromGame(i); -#endif SetAction(i, eAppAction_Idle); return; } @@ -3282,9 +2671,6 @@ void CMinecraftApp::HandleXuiActions(void) { // 4J Stu - Fix for #12368 - Crash: Game crashes when saving // then exiting and selecting to save for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { -#if 0 - app.TutorialSceneNavigateBack(idx, true); -#endif // 4J Stu - Fix for #13257 - CRASH: Gameplay: Title // crashed after exiting the tutorial It doesn't matter @@ -3335,9 +2721,6 @@ void CMinecraftApp::HandleXuiActions(void) { // 4J Stu - Fix for #12368 - Crash: Game crashes when saving // then exiting and selecting to save for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { -#if 0 - app.TutorialSceneNavigateBack(idx, true); -#endif // 4J Stu - Fix for #13257 - CRASH: Gameplay: Title // crashed after exiting the tutorial It doesn't matter @@ -3581,15 +2964,6 @@ void CMinecraftApp::HandleXuiActions(void) { } } } else { -#if 0 || 0 || 0 - if (UIScene_LoadOrJoinMenu:: - isSaveTransferRunning()) { - // the save transfer is still in progress, delay - // jumping back to the main menu until we've - // cleaned up - SetAction(i, eAppAction_EthernetDisconnected); - } else -#endif { app.DebugPrintf( "Handling eAppAction_EthernetDisconnected " @@ -3652,9 +3026,6 @@ void CMinecraftApp::HandleXuiActions(void) { // saving then exiting and selecting to save for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { -#if 0 - app.TutorialSceneNavigateBack(idx, true); -#endif // 4J Stu - Fix for #13257 - CRASH: Gameplay: Title // crashed after exiting the tutorial It doesn't @@ -3738,24 +3109,6 @@ void CMinecraftApp::HandleXuiActions(void) { SetAction(i, eAppAction_Idle); // Check the player really wants to do this -#if 0 || 0 - // Show save option is saves ARE disabled - if (ProfileManager.IsFullVersion() && - StorageManager.GetSaveDisabled() && - i == ProfileManager.GetPrimaryPad() && - g_NetworkManager.IsHost() && GetGameStarted()) { - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_EXIT_GAME_SAVE; - uiIDA[2] = IDS_EXIT_GAME_NO_SAVE; - - ui.RequestAlertMessage( - IDS_EXIT_GAME, IDS_CONFIRM_LEAVE_VIA_INVITE, uiIDA, - 3, i, - &CMinecraftApp:: - ExitAndJoinFromInviteSaveDialogReturned, - this); - } else -#else if (ProfileManager.IsFullVersion() && !StorageManager.GetSaveDisabled() && i == ProfileManager.GetPrimaryPad() && @@ -3771,7 +3124,6 @@ void CMinecraftApp::HandleXuiActions(void) { ExitAndJoinFromInviteSaveDialogReturned, this); } else -#endif { if (!ProfileManager.IsFullVersion()) { TelemetryManager->RecordUpsellPresented( @@ -3812,9 +3164,6 @@ void CMinecraftApp::HandleXuiActions(void) { // 4J Stu - Fix for #12368 - Crash: Game crashes when saving // then exiting and selecting to save for (unsigned int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { -#if 0 - app.TutorialSceneNavigateBack(idx, true); -#endif // 4J Stu - Fix for #13257 - CRASH: Gameplay: Title // crashed after exiting the tutorial It doesn't matter @@ -3845,48 +3194,18 @@ void CMinecraftApp::HandleXuiActions(void) { // need to stop the streaming audio - by playing // streaming audio from the default texture pack now // reset the streaming sounds back to the normal ones -#if 1 pMinecraft->soundEngine->SetStreamingSounds( eStream_Overworld_Calm1, eStream_Overworld_piano3, eStream_Nether1, eStream_Nether4, eStream_end_dragon, eStream_end_end, eStream_CD_1); -#endif pMinecraft->soundEngine->playStreaming(L"", 0, 0, 0, 1, 1); -#if 0 - if (pDLCTexPack->m_pStreamedWaveBank != NULL) { - pDLCTexPack->m_pStreamedWaveBank->Destroy(); - } - if (pDLCTexPack->m_pSoundBank != NULL) { - pDLCTexPack->m_pSoundBank->Destroy(); - } -#endif -#if 0 - const unsigned int result = - StorageManager.UnmountInstalledDLC(L"TPACK"); -#else const unsigned int result = StorageManager.UnmountInstalledDLC("TPACK"); -#endif app.DebugPrintf("Unmount result is %d\n", result); } -#if 0 - // 4J Stu - It's possible that we can sign in/remove players - // between the mask initially being set and this point - m_InviteData.dwLocalUsersMask = 0; - for (unsigned int index = 0; index < XUSER_MAX_COUNT; - ++index) { - if (ProfileManager.IsSignedIn(index)) { - if (index == i || - pMinecraft->localplayers[index] != NULL) { - m_InviteData.dwLocalUsersMask |= - g_NetworkManager.GetLocalPlayerMask(index); - } - } - } -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); @@ -3932,21 +3251,6 @@ void CMinecraftApp::HandleXuiActions(void) { ProfileManager.SetLockedProfile(inviteData->dwUserIndex); ProfileManager.SetPrimaryPad(inviteData->dwUserIndex); -#if 0 - // 4J Stu - If a player is signed in (i.e. locked) but not - // in the mask, unlock them - for (unsigned int index = 0; index < XUSER_MAX_COUNT; - ++index) { - if (index != inviteData->dwUserIndex && - ProfileManager.IsSignedIn(index)) { - if ((m_InviteData.dwLocalUsersMask & - g_NetworkManager.GetLocalPlayerMask(index)) == - 0) { - ProfileManager.RemoveGamepadFromGame(index); - } - } - } -#endif // change the minecraft player name Minecraft::GetInstance()->user->name = @@ -4020,11 +3324,7 @@ void CMinecraftApp::HandleXuiActions(void) { UIFullscreenProgressCompletionData* completionData = new UIFullscreenProgressCompletionData(); -#if 0 - completionData->bRequiresUserAction = FALSE; -#else completionData->bRequiresUserAction = TRUE; -#endif completionData->bShowBackground = TRUE; completionData->bShowLogo = TRUE; completionData->iPad = DEFAULT_XUI_MENU_USER; @@ -4049,29 +3349,10 @@ void CMinecraftApp::HandleXuiActions(void) { // change SetAction(i, eAppAction_Idle); } -#if 0 - // 4J-HG - Took this out since ChangeSessionType is only set in two places (both in EthernetDisconnected) and this case is handled there, plus this breaks - // this if statements original purpose (to allow us to wait for IsInGameplay before actioning switching to offline - - // QNet must do this kind of thing automatically by itself, but on PS3 at least, we need the disconnection to definitely end up with us out of the game one way or another, - // and the other two cases above don't catch the case where we are just starting the game and get a disconnection during the loading/creation - else - { - if( g_NetworkManager.IsInSession() ) - { - g_NetworkManager._LeaveGame(); - } - } -#endif } break; case eAppAction_SetDefaultOptions: SetAction(i, eAppAction_Idle); -#if (0 || 0 || 0 || \ - 0) - SetDefaultOptions((C4JStorage::PROFILESETTINGS*)param, i); -#else SetDefaultOptions((C_4JProfile::PROFILESETTINGS*)param, i); -#endif // if the profile data has been changed, then force a // profile write It seems we're allowed to break the 5 @@ -4169,20 +3450,6 @@ void CMinecraftApp::HandleXuiActions(void) { !g_NetworkManager.IsLeavingGame()) { TelemetryManager->RecordBanLevel(i); -#if 0 - INetworkPlayer* pHost = - g_NetworkManager.GetHostPlayer(); - // write the level to the banned level list, and exit - // the world - AddLevelToBannedLevelList( - i, pHost->GetUID(), - GetUniqueMapName(), true); -#elif 0 - INetworkPlayer* pHost = - g_NetworkManager.GetHostPlayer(); - AddLevelToBannedLevelList(i, pHost->GetUID(), - GetUniqueMapName(), true); -#endif // primary player would exit the world, secondary would // exit the player if (ProfileManager.GetPrimaryPad() == i) { @@ -4224,15 +3491,6 @@ void CMinecraftApp::HandleXuiActions(void) { case eAppAction_DebugText: // launch the xui for text entry { -#if 0 - CScene_TextEntry::XuiTextInputParams* pDebugTextParams = - new CScene_TextEntry::XuiTextInputParams; - pDebugTextParams->iPad = i; - pDebugTextParams->wch = (WCHAR)param; - - app.NavigateToScene(i, eUIScene_TextEntry, - pDebugTextParams); -#endif SetAction(i, eAppAction_Idle); } break; @@ -4256,10 +3514,6 @@ void CMinecraftApp::HandleXuiActions(void) { DLCManager::e_DLCType_Texture, L"")) { purchased = true; } -#if 0 - TelemetryManager->RecordTexturePackLoaded( - i, pTexturePack->getId(), purchased ? 1 : 0); -#endif } // 4J-PB - If the texture pack has audio, we need to switch @@ -4271,7 +3525,6 @@ void CMinecraftApp::HandleXuiActions(void) { } break; case eAppAction_ReloadFont: { -#if 1 app.DebugPrintf( "[Consoles_App] eAppAction_ReloadFont, ingame='%s'.\n", app.GetGameStarted() ? "Yes" : "No"); @@ -4284,34 +3537,9 @@ void CMinecraftApp::HandleXuiActions(void) { ui.StartReloadSkinThread(); ui.setCleanupOnReload(); -#endif } break; case eAppAction_TexturePackRequired: { -#if 0 || 0 || 0 - unsigned int uiIDA[2]; - uiIDA[0] = IDS_TEXTUREPACK_FULLVERSION; - uiIDA[1] = IDS_CONFIRM_CANCEL; // let them continue without - // the texture pack here (as - // this is only really for r - // Give the player a warning about the texture pack missing - ui.RequestErrorMessage( - IDS_DLC_TEXTUREPACK_NOT_PRESENT_TITLE, - IDS_DLC_TEXTUREPACK_NOT_PRESENT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::TexturePackDialogReturned, this); - SetAction(i, eAppAction_Idle); -#else -#if 0 - ULONGLONG ullOfferID_Full; - app.GetDLCFullOfferIDForPackID( - app.GetRequiredTexturePackID(), &ullOfferID_Full); - - TelemetryManager->RecordUpsellPresented( - ProfileManager.GetPrimaryPad(), - eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_TEXTUREPACK_FULLVERSION; @@ -4324,7 +3552,6 @@ void CMinecraftApp::HandleXuiActions(void) { ProfileManager.GetPrimaryPad(), &CMinecraftApp::TexturePackDialogReturned, this); SetAction(i, eAppAction_Idle); -#endif } break; @@ -4342,89 +3569,24 @@ void CMinecraftApp::HandleXuiActions(void) { // TMS++ actions case eTMSAction_TMSPP_RetrieveFiles_CreateLoad_SignInReturned: case eTMSAction_TMSPP_RetrieveFiles_RunPlayGame: -#if 0 - app.TMSPP_SetTitleGroupID(GROUP_ID); - SetTMSAction(i, eTMSAction_TMSPP_GlobalFileList); -#elif 0 - SetTMSAction(i, eTMSAction_TMSPP_GlobalFileList_Waiting); - app.TMSPP_RetrieveFileList(i, - C4JStorage::eGlobalStorage_Title, - eTMSAction_TMSPP_UserFileList); -#else SetTMSAction(i, eTMSAction_TMSPP_UserFileList); -#endif break; -#if 0 - case eTMSAction_TMSPP_GlobalFileList: - SetTMSAction(i, eTMSAction_TMSPP_GlobalFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_Title, "\\", - eTMSAction_TMSPP_UserFileList); - break; -#endif case eTMSAction_TMSPP_UserFileList: // retrieve the file list first -#if 0 - SetTMSAction(i, eTMSAction_TMSPP_UserFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_TitleUser, "\\", - eTMSAction_TMSPP_XUIDSFile); -#elif 0 - SetTMSAction(i, eTMSAction_TMSPP_UserFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_TitleUser, - eTMSAction_TMSPP_DLCFile); -#else SetTMSAction(i, eTMSAction_TMSPP_XUIDSFile); -#endif break; case eTMSAction_TMSPP_XUIDSFile: -#if 0 - SetTMSAction(i, eTMSAction_TMSPP_XUIDSFile_Waiting); - // pass in the next app action on the call or callback - // completing - app.TMSPP_ReadXuidsFile(i, eTMSAction_TMSPP_DLCFile); -#else SetTMSAction(i, eTMSAction_TMSPP_DLCFile); -#endif break; case eTMSAction_TMSPP_DLCFile: -#if 0 || 0 - SetTMSAction(i, eTMSAction_TMSPP_DLCFile_Waiting); - // pass in the next app action on the call or callback - // completing - app.TMSPP_ReadDLCFile(i, eTMSAction_TMSPP_BannedListFile); -#else SetTMSAction(i, eTMSAction_TMSPP_BannedListFile); -#endif break; case eTMSAction_TMSPP_BannedListFile: // If we have one in TMSPP, then we can assume we can ignore // TMS -#if 0 - SetTMSAction(i, eTMSAction_TMSPP_BannedListFile_Waiting); - // pass in the next app action on the call or callback - // completing - if (app.TMSPP_ReadBannedList( - i, eTMSAction_TMS_RetrieveFiles_Complete) == - false) { - // we don't have a banned list in TMSPP, so we should - // check TMS - app.ReadBannedList( - i, eTMSAction_TMS_RetrieveFiles_Complete, true); - } -#elif 0 - SetTMSAction(i, eTMSAction_TMSPP_BannedListFile_Waiting); - // pass in the next app action on the call or callback - // completing - app.TMSPP_ReadBannedList( - i, eTMSAction_TMS_RetrieveFiles_Complete); - -#else SetTMSAction(i, eTMSAction_TMS_RetrieveFiles_Complete); -#endif break; // SPECIAL CASE - where the user goes directly in to Help & @@ -4432,51 +3594,15 @@ void CMinecraftApp::HandleXuiActions(void) { case eTMSAction_TMSPP_RetrieveFiles_HelpAndOptions: case eTMSAction_TMSPP_RetrieveFiles_DLCMain: // retrieve the file list first -#if 0 - // pass in the next app action on the call or callback - // completing - SetTMSAction(i, eTMSAction_TMSPP_XUIDSFile_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_Title, "\\", - eTMSAction_TMSPP_DLCFileOnly); -#elif 0 - SetTMSAction(i, eTMSAction_TMSPP_GlobalFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_Title, - eTMSAction_TMSPP_RetrieveUserFilelist_DLCFileOnly); -#else SetTMSAction(i, eTMSAction_TMSPP_DLCFileOnly); -#endif break; case eTMSAction_TMSPP_RetrieveUserFilelist_DLCFileOnly: -#if 0 - SetTMSAction(i, eTMSAction_TMSPP_UserFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_TitleUser, "\\", - eTMSAction_TMSPP_XUIDSFile); -#elif 0 - // StorageManager.TMSPP_DeleteFile(i,C4JStorage::eGlobalStorage_TitleUser,C4JStorage::TMS_FILETYPE_BINARY,L"TP06.png",NULL,NULL, - // 0); - SetTMSAction(i, eTMSAction_TMSPP_UserFileList_Waiting); - app.TMSPP_RetrieveFileList( - i, C4JStorage::eGlobalStorage_TitleUser, - eTMSAction_TMSPP_DLCFileOnly); -#else SetTMSAction(i, eTMSAction_TMSPP_DLCFileOnly); -#endif break; case eTMSAction_TMSPP_DLCFileOnly: -#if 0 || 0 - SetTMSAction(i, eTMSAction_TMSPP_DLCFile_Waiting); - // pass in the next app action on the call or callback - // completing - app.TMSPP_ReadDLCFile( - i, eTMSAction_TMSPP_RetrieveFiles_Complete); -#else SetTMSAction(i, eTMSAction_TMSPP_RetrieveFiles_Complete); -#endif break; case eTMSAction_TMSPP_RetrieveFiles_Complete: @@ -4497,36 +3623,16 @@ void CMinecraftApp::HandleXuiActions(void) { break; case eTMSAction_TMS_DLCFile: - #if 0 - SetTMSAction(i,eTMSAction_TMS_DLCFile_Waiting); - // pass in the next app action on the call or callback - completing - app.ReadDLCFileFromTMS(i,eTMSAction_TMS_BannedListFile,true); - #else SetTMSAction(i,eTMSAction_TMS_BannedListFile); - #endif break; case eTMSAction_TMS_RetrieveFiles_HelpAndOptions: case eTMSAction_TMS_RetrieveFiles_DLCMain: - #if 0 - SetTMSAction(i,eTMSAction_TMS_DLCFile_Waiting); - // pass in the next app action on the call or callback - completing app.ReadDLCFileFromTMS(i,eTMSAction_Idle,true); - #else SetTMSAction(i,eTMSAction_Idle); - #endif break; case eTMSAction_TMS_BannedListFile: - #if 0 - SetTMSAction(i,eTMSAction_TMS_BannedListFile_Waiting); - // pass in the next app action on the call or callback - completing app.ReadBannedList(i, - eTMSAction_TMS_RetrieveFiles_Complete,true); #else - SetTMSAction(i,eTMSAction_TMS_RetrieveFiles_Complete); - #endif break; @@ -4556,20 +3662,6 @@ int CMinecraftApp::BannedLevelDialogReturned( // Minecraft *pMinecraft=Minecraft::GetInstance(); if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 || 0 - INetworkPlayer* pHost = g_NetworkManager.GetHostPlayer(); - // unban the level - if (pHost != NULL) { -#if 0 - pApp->RemoveLevelFromBannedLevelList( - iPad, pHost->GetUID(), - pApp->GetUniqueMapName()); -#else - pApp->RemoveLevelFromBannedLevelList(iPad, pHost->GetUID(), - pApp->GetUniqueMapName()); -#endif - } -#endif } else { if (iPad == ProfileManager.GetPrimaryPad()) { pApp->SetAction(iPad, eAppAction_ExitWorld); @@ -4584,66 +3676,18 @@ int CMinecraftApp::BannedLevelDialogReturned( void CMinecraftApp::loadMediaArchive() { std::wstring mediapath = L""; -#if 0 - mediapath = L"Common\\Media\\MediaPS3.arc"; -#elif _WINDOWS64 +#if _WINDOWS64 mediapath = L"Common\\Media\\MediaWindows64.arc"; #elif __linux__ mediapath = L"Common/Media/MediaLinux.arc"; -#elif 0 - mediapath = L"Common\\Media\\MediaOrbis.arc"; -#elif 0 - mediapath = L"Common\\Media\\MediaDurango.arc"; -#elif 0 - mediapath = L"Common\\Media\\MediaPSVita.arc"; #endif if (!mediapath.empty()) { m_mediaArchive = new ArchiveFile(File(mediapath)); } -#if 0 - std::string path = "Common\\media.arc"; - HANDLE hFile = CreateFile( path.c_str(), - GENERIC_READ, - FILE_SHARE_READ, - NULL, - OPEN_EXISTING, - FILE_FLAG_SEQUENTIAL_SCAN, - NULL ); - - if( hFile != INVALID_HANDLE_VALUE ) - { - File fileHelper(convStringToWstring(path)); - std::uint32_t dwFileSize = fileHelper.length(); - - // Initialize memory. - std::uint8_t* m_fBody = new std::uint8_t[ dwFileSize ]; - ZeroMemory(m_fBody, dwFileSize); - - std::uint32_t m_fSize = 0; - BOOL hr = ReadFile( hFile, - m_fBody, - dwFileSize, - &m_fSize, - NULL ); - - assert( m_fSize == dwFileSize ); - - CloseHandle( hFile ); - - m_mediaArchive = new ArchiveFile(m_fBody, m_fSize); - } - else - { - assert( false ); - // AHHHHHHHHHHHH - m_mediaArchive = NULL; - } -#endif } void CMinecraftApp::loadStringTable() { -#if 1 if (m_stringTable != NULL) { // we need to unload the current std::string table, this is a reload @@ -4659,7 +3703,6 @@ void CMinecraftApp::loadStringTable() { assert(false); // AHHHHHHHHH. } -#endif } int CMinecraftApp::PrimaryPlayerSignedOutReturned( @@ -4693,9 +3736,6 @@ int CMinecraftApp::EthernetDisconnectReturned( } else { // 4J-PB - turn off the PSN store icon just in case this happened when // we were in one of the DLC menus -#if 0 || 0 - app.GetCommerce()->HidePsStoreIcon(); -#endif app.SetAction(iPad, eAppAction_EthernetDisconnectedReturned_Menus); } return 0; @@ -4729,12 +3769,6 @@ int CMinecraftApp::SignoutExitWorldThreadProc(void* lpParameter) { exitReasonStringId = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; break; -#if 0 - case DisconnectPacket::eDisconnect_NoUGC_Remote: - exitReasonStringId = - IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE; - break; -#endif case DisconnectPacket::eDisconnect_NoFlying: exitReasonStringId = IDS_DISCONNECTED_FLYING; break; @@ -4791,21 +3825,6 @@ int CMinecraftApp::SignoutExitWorldThreadProc(void* lpParameter) { exitReasonStringId = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; break; -#if 0 || 0 || 0 - case DisconnectPacket::eDisconnect_ContentRestricted_AllLocal: - exitReasonStringId = IDS_CONTENT_RESTRICTION_MULTIPLAYER; - break; - case DisconnectPacket:: - eDisconnect_ContentRestricted_Single_Local: - exitReasonStringId = IDS_CONTENT_RESTRICTION; - break; -#endif -#if 0 - case DisconnectPacket::eDisconnect_NoUGC_Remote: - exitReasonStringId = - IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE; - break; -#endif case DisconnectPacket::eDisconnect_OutdatedServer: exitReasonStringId = IDS_DISCONNECTED_SERVER_OLD; break; @@ -4854,36 +3873,11 @@ int CMinecraftApp::UnlockFullInviteReturned(void* pParam, int iPad, if (result == C4JStorage::EMessage_ResultAccept) { if (ProfileManager.IsSignedInLive(iPad)) { // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { ProfileManager.DisplayFullVersionPurchase( false, iPad, eSen_UpsellID_Full_Version_Of_Game); } } -#if 0 - else { - // you're not signed in to PSN! - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::MustSignInFullVersionPurchaseReturned, &app); - } -#endif } else { TelemetryManager->RecordUpsellResponded( iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, @@ -4901,58 +3895,12 @@ int CMinecraftApp::UnlockFullSaveReturned(void* pParam, int iPad, if (result == C4JStorage::EMessage_ResultAccept) { if (ProfileManager.IsSignedInLive(pMinecraft->player->GetXboxPad())) { // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { ProfileManager.DisplayFullVersionPurchase( false, pMinecraft->player->GetXboxPad(), eSen_UpsellID_Full_Version_Of_Game); } } -#if 0 - else { - // you're not signed in to PSN! - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::MustSignInFullVersionPurchaseReturned, &app); - } -#elif 0 - else { - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(iPad)) { - // Signed in to PSN but not connected (no internet access) - assert(!ProfileManager.isConnectedToPSN(iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, iPad); - } else { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad, &CMinecraftApp::MustSignInFullVersionPurchaseReturned, - &app); - } - } -#endif } else { TelemetryManager->RecordUpsellResponded( iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, @@ -4970,71 +3918,12 @@ int CMinecraftApp::UnlockFullExitReturned(void* pParam, int iPad, if (result == C4JStorage::EMessage_ResultAccept) { if (ProfileManager.IsSignedInLive(pMinecraft->player->GetXboxPad())) { // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { ProfileManager.DisplayFullVersionPurchase( false, pMinecraft->player->GetXboxPad(), eSen_UpsellID_Full_Version_Of_Game); -#if 0 || 0 || 0 - // still need to exit the trial or we'll be in the Pause menu - // with input ignored - pApp->SetAction(pMinecraft->player->GetXboxPad(), - eAppAction_ExitWorldTrial); -#endif } } -#if 0 || 0 - else { - // you're not signed in to PSN! - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial, - &app); - } -#elif 0 - else { - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(iPad)) { - // Signed in to PSN but not connected (no internet access) - assert(!ProfileManager.isConnectedToPSN(iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, iPad); - // still need to exit the trial or we'll be in the Pause menu - // with input ignored - pApp->SetAction(pMinecraft->player->GetXboxPad(), - eAppAction_ExitWorldTrial); - } else { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad, - &CMinecraftApp:: - MustSignInFullVersionPurchaseReturnedExitTrial, - &app); - } - } -#endif } else { TelemetryManager->RecordUpsellResponded( iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, @@ -5055,57 +3944,21 @@ int CMinecraftApp::TrialOverReturned(void* pParam, int iPad, // we need a signed in user for the unlock if (ProfileManager.IsSignedInLive(pMinecraft->player->GetXboxPad())) { // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { ProfileManager.DisplayFullVersionPurchase( false, pMinecraft->player->GetXboxPad(), eSen_UpsellID_Full_Version_Of_Game); } } else { -#if 0 - - // you're not signed in to PSN! - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::MustSignInFullVersionPurchaseReturned, &app); - - // 4J Stu - We can't actually exit the game, so just exit back to - // the main menu - // pApp->SetAction(pMinecraft->player->GetXboxPad(),eAppAction_ExitWorldTrial); -#else pApp->SetAction(pMinecraft->player->GetXboxPad(), eAppAction_ExitTrial); -#endif } } else { TelemetryManager->RecordUpsellResponded( iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID, eSen_UpsellOutcome_Declined); -#if 0 || 0 - // 4J Stu - We can't actually exit the game, so just exit back to the - // main menu - pApp->SetAction(pMinecraft->player->GetXboxPad(), - eAppAction_ExitWorldTrial); -#else pApp->SetAction(pMinecraft->player->GetXboxPad(), eAppAction_ExitTrial); -#endif } return 0; @@ -5139,12 +3992,6 @@ void CMinecraftApp::ClearSignInChangeUsersMask() { void CMinecraftApp::SignInChangeCallback(void* pParam, bool bPrimaryPlayerChanged, unsigned int uiSignInData) { -#if 0 - // this is normally set in the main menu, but we can go online in the create - // world screens, and the primary player name isn't updated - Minecraft::GetInstance()->user->name = convStringToWstring( - ProfileManager.GetGamertag(ProfileManager.GetPrimaryPad())); -#endif CMinecraftApp* pApp = (CMinecraftApp*)pParam; // check if the primary player signed out @@ -5268,25 +4115,6 @@ void CMinecraftApp::SignInChangeCallback(void* pParam, } } } -#if 0 - // check if any of the addition players have signed out of - // PSN (primary player is handled below) - if (!switchToOffline && - i != ProfileManager.GetLockedProfile() && - !g_NetworkManager.IsLocalGame()) { - if (g_NetworkManager.GetLocalPlayerByUserIndex(i) != - NULL) { - if (ProfileManager.IsSignedInLive(i) == false) { - pApp->DebugPrintf( - "Recommending removal of player at index " - "%d because they're no longer signed into " - "PSNd\n", - i); - pApp->SetAction(i, eAppAction_ExitPlayer); - } - } - } -#endif } // If it's an online game, and the primary profile is no longer @@ -5304,28 +4132,12 @@ void CMinecraftApp::SignInChangeCallback(void* pParam, else if (pApp->GetLiveLinkRequired() && !ProfileManager.IsSignedInLive( ProfileManager.GetLockedProfile())) { -#if 0 - if (!CGameNetworkManager::usingAdhocMode()) // if we're in - // adhoc mode, we - // can ignore this -#endif { pApp->SetAction(iPrimaryPlayer, eAppAction_EthernetDisconnected); } } -#if (0 || 0 || 0 || \ - 0) - // 4J-JEV: Need to kick of loading of profile data for sub-sign in - // players. - for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - if (i != iPrimaryPlayer && (uiChangedPlayers & (1 << i)) && - (uiSignInData & (1 << i))) { - StorageManager.ReadFromProfile(i); - } - } -#endif } m_uiLastSignInData = uiSignInData; } else if (iPrimaryPlayer != -1) { @@ -5393,104 +4205,17 @@ void CMinecraftApp::NotificationsCallback(void* pParam, } break; case XN_SYS_STORAGEDEVICESCHANGED: { -#if 0 - // If the devices have changed, and we've got a dlc pack with audio - // selected, and that pack's content device is no longer valid... - // then pull the plug on audio streaming, as if we leave this until - // later xact gets locked up attempting to destroy the streamed wave - // bank. - TexturePack* pTexPack = - Minecraft::GetInstance()->skins->getSelected(); - if (pTexPack->hasAudio()) { - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)pTexPack; - XCONTENTDEVICEID deviceID = pDLCTexPack->GetDLCDeviceID(); - if (XContentGetDeviceState(deviceID, NULL) != ERROR_SUCCESS) { - // Set texture pack flag so that it is now considered as not - // having audio - this is critical so that the next - // playStreaming does what it is meant to do, and also so - // that we don't try and unmount this again, or play any - // sounds from it in the future - pTexPack->setHasAudio(false); - // need to stop the streaming audio - by playing streaming - // audio from the default texture pack now - Minecraft::GetInstance()->soundEngine->playStreaming( - L"", 0, 0, 0, 0, 0); - - if (pDLCTexPack->m_pStreamedWaveBank != NULL) { - pDLCTexPack->m_pStreamedWaveBank->Destroy(); - } - if (pDLCTexPack->m_pSoundBank != NULL) { - pDLCTexPack->m_pSoundBank->Destroy(); - } - const unsigned int result = - StorageManager.UnmountInstalledDLC("TPACK"); - app.DebugPrintf("Unmount result is %d\n", result); - } - } -#endif } break; } pClass->m_vNotifications.push_back(pNotification); } -#if 0 || 0 || 0 -int CMinecraftApp::MustSignInFullVersionPurchaseReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#else // __PS4__ - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#endif - } - - return 0; -} - -#if 0 || 0 || 0 -int CMinecraftApp::MustSignInFullVersionPurchaseReturnedExitTrial( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#else // __PS4__ - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &CMinecraftApp::NowDisplayFullVersionPurchase, &app, true); -#endif - } - - // 4J-PB - we need to exit the trial, or we'll be in the pause menu with - // ignore input true - app.SetAction(iPad, eAppAction_ExitWorldTrial); - - return 0; -} -#endif - -int CMinecraftApp::NowDisplayFullVersionPurchase(void* pParam, bool bContinue, - int iPad) { - app.m_bDisplayFullVersionPurchase = true; - return 0; -} -#endif void CMinecraftApp::UpsellReturnedCallback(void* pParam, eUpsellType type, eUpsellResponse result, int iUserData) { ESen_UpsellID senType; ESen_UpsellOutcome senResponse; -#if 0 - unsigned int uiIDA[2]; -#endif // Map the eUpsellResponse to the enum we use for sentient switch (result) { @@ -5500,32 +4225,6 @@ void CMinecraftApp::UpsellReturnedCallback(void* pParam, eUpsellType type, case eUpsellResponse_Accepted_Purchase: senResponse = eSen_UpsellOutcome_Accepted; break; -#if 0 - // special case for people who are not signed in to the PSN while - // playing the trial game - case eUpsellResponse_UserNotSignedInPSN: - - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CMinecraftApp::MustSignInFullVersionPurchaseReturned, &app); - - return; - - case eUpsellResponse_NotAllowedOnline: // On earning a trophy in the - // trial version, where the user - // is underage and can't go - // online to buy the game, but - // they selected to buy the game - // on the trophy upsell - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - break; -#endif case eUpsellResponse_Declined: default: senResponse = eSen_UpsellOutcome_Declined; @@ -5548,7 +4247,7 @@ void CMinecraftApp::UpsellReturnedCallback(void* pParam, eUpsellType type, app.m_dwOfferID, senResponse); } -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) bool CMinecraftApp::DebugArtToolsOn() { return DebugSettingsOn() && (GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) & @@ -5678,39 +4377,11 @@ void CMinecraftApp::MountNextDLC(int iPad) { ui.HandleDLCMountingComplete(); -#if 0 || 0 - // Check if the current texture pack is now installed - if (!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) { - TexturePack* tPack = Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - DLCPack* pParentPack = - pDLCTexPack->getDLCInfoParentPack(); // tPack->getDLCPack(); - - if (pParentPack->hasPurchasedFile(DLCManager::e_DLCType_Texture, - L"")) { - StorageManager.SetSaveDisabled(false); - } - } -#endif -#if 0 || 0 || 0 - { - TexturePack* currentTPack = - Minecraft::GetInstance()->skins->getSelected(); - TexturePack* requiredTPack = - Minecraft::GetInstance()->skins->getTexturePackById( - app.GetRequiredTexturePackID()); - if (currentTPack != requiredTPack) { - Minecraft::GetInstance()->skins->selectTexturePackById( - app.GetRequiredTexturePackID()); - } - } -#endif } } // 4J-JEV: For the sake of clarity in DLCMountedCallback. -#if 0 || 0 || defined(_WINDOWS64) +#if defined(_WINDOWS64) #define CONTENT_DATA_DISPLAY_NAME(a) (a.szDisplayName) #else #define CONTENT_DATA_DISPLAY_NAME(a) (a.wszDisplayName) @@ -5719,9 +4390,7 @@ void CMinecraftApp::MountNextDLC(int iPad) { int CMinecraftApp::DLCMountedCallback(void* pParam, int iPad, std::uint32_t dwErr, std::uint32_t dwLicenceMask) { -#if 0 || 0 || 0 || \ - 0 || defined(_WINDOWS64) || \ - 0 // Chris TODO +#if defined(_WINDOWS64) app.DebugPrintf("--- CMinecraftApp::DLCMountedCallback\n"); if (dwErr != ERROR_SUCCESS) { @@ -5748,11 +4417,8 @@ int CMinecraftApp::DLCMountedCallback(void* pParam, int iPad, app.DebugPrintf("Pack \"%ls\" is not installed, so adding it\n", CONTENT_DATA_DISPLAY_NAME(ContentData)); -#if 0 || 0 || defined(_WINDOWS64) +#if defined(_WINDOWS64) pack = new DLCPack(ContentData.szDisplayName, dwLicenceMask); -#elif 0 - pack = new DLCPack(ContentData.wszDisplayName, - ContentData.wszProductID, dwLicenceMask); #else pack = new DLCPack(ContentData.wszDisplayName, dwLicenceMask); #endif @@ -5781,7 +4447,7 @@ int CMinecraftApp::DLCMountedCallback(void* pParam, int iPad, ++app.m_iTotalDLCInstalled; app.MountNextDLC(iPad); -#endif // 0 +#endif return 0; } #undef CONTENT_DATA_DISPLAY_NAME @@ -5816,76 +4482,13 @@ int CMinecraftApp::DLCMountedCallback(void* pParam, int iPad, void CMinecraftApp::HandleDLC(DLCPack* pack) { unsigned int dwFilesProcessed = 0; -#if 1 -#if 0 || 0 || defined(_WINDOWS64) || \ - 0 || defined(__linux__) +#if defined(_WINDOWS64) || defined(__linux__) std::vector dlcFilenames; -#elif 0 - std::vector dlcFilenames; #endif StorageManager.GetMountedDLCFileList("DLCDrive", dlcFilenames); -#if 0 - // 4J Stu - I don't know why we handle more than one file here any more, - // however this doesn't seem to work with the PS4 patches - if (dlcFilenames.size() > 0) - m_dlcManager.readDLCDataFile(dwFilesProcessed, dlcFilenames[0], pack); -#else for (int i = 0; i < dlcFilenames.size(); i++) { m_dlcManager.readDLCDataFile(dwFilesProcessed, dlcFilenames[i], pack); } -#endif -#else - WIN32_FIND_DATA wfd; - HANDLE hFind; - - char szPath[] = "DLCDrive:\\"; - char szFullFilename[256]; - strcpy(szFullFilename, szPath); - strcat(szFullFilename, "*"); - - // Start the find and check for failure. - hFind = FindFirstFile(szFullFilename, &wfd); - - if (INVALID_HANDLE_VALUE == hFind) { - app.DebugPrintf("FindFirstFile failed."); - } else { - // Display each file and ask for the next. - do { - strcpy(szFullFilename, szPath); - strcat(szFullFilename, wfd.cFileName); - - if ((GetFileAttributes(szFullFilename) & - FILE_ATTRIBUTE_DIRECTORY) != FILE_ATTRIBUTE_DIRECTORY) { -#if 0 - std::uint32_t dwPackID = - m_dlcManager.retrievePackIDFromDLCDataFile(szFullFilename, - pack); - - // Do we need to override the TexturePack.pck with an updated - // version in a TU? - std::wstring wsTemp = getFilePath( - dwPackID, std::wstring(L"TexturePack.pck"), false); - File texturePCKPath(wsTemp); - if (texturePCKPath.exists()) { - app.DebugPrintf("Found a replacement .pck\n"); - m_dlcManager.readDLCDataFile(dwFilesProcessed, wsTemp, - pack); - } else { - m_dlcManager.readDLCDataFile(dwFilesProcessed, - szFullFilename, pack); - } -#else - m_dlcManager.readDLCDataFile(dwFilesProcessed, szFullFilename, - pack); - -#endif - } - } while (FindNextFile(hFind, &wfd)); - - // Close the find handle. - FindClose(hFind); - } -#endif // 0 || 0 if (dwFilesProcessed == 0) m_dlcManager.removePack(pack); } @@ -5965,7 +4568,7 @@ void CMinecraftApp::AddMemoryTextureFile(const std::wstring& wName, PMEMDATA pData = NULL; AUTO_VAR(it, m_MEM_Files.find(wName)); if (it != m_MEM_Files.end()) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf(L"Incrementing the memory texture file count for %ls\n", wName.c_str()); #endif @@ -5984,7 +4587,7 @@ void CMinecraftApp::AddMemoryTextureFile(const std::wstring& wName, return; } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) // wprintf(L"Adding the memory texture file data for %ls\n", wName.c_str()); #endif // this is a texture (png) file @@ -6008,14 +4611,14 @@ void CMinecraftApp::RemoveMemoryTextureFile(const std::wstring& wName) { AUTO_VAR(it, m_MEM_Files.find(wName)); if (it != m_MEM_Files.end()) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf(L"Decrementing the memory texture file count for %ls\n", wName.c_str()); #endif PMEMDATA pData = (*it).second; --pData->ucRefCount; if (pData->ucRefCount <= 0) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf(L"Erasing the memory texture file data for %ls\n", wName.c_str()); #endif @@ -6094,37 +4697,7 @@ void CMinecraftApp::RemoveMemoryTPDFile(int iConfig) { LeaveCriticalSection(&csMemTPDLock); } -#if 0 -int CMinecraftApp::GetTPConfigVal(WCHAR* pwchDataFile) { - DLC_INFO* pDLCInfo = NULL; - // run through the DLC info to find the right texture pack/mash-up pack - for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) { - ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); - pDLCInfo = app.GetDLCInfoForFullOfferID(ull); - - if (wcscmp(pwchDataFile, pDLCInfo->wchDataFile) == 0) { - return pDLCInfo->iConfig; - } - } - - return -1; -} -#elif 0 -int CMinecraftApp::GetTPConfigVal(WCHAR* pwchDataFile) { - DLC_INFO* pDLCInfo = NULL; - // run through the DLC info to find the right texture pack/mash-up pack - for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) { - pDLCInfo = app.GetDLCInfoForFullOfferID( - (WCHAR*)app.GetDLCInfoTexturesFullOffer(i).c_str()); - - if (wcscmp(pwchDataFile, pDLCInfo->wchDataFile) == 0) { - return pDLCInfo->iConfig; - } - } - - return -1; -} -#elif defined _WINDOWS64 +#if defined(_WINDOWS64) int CMinecraftApp::GetTPConfigVal(WCHAR* pwchDataFile) { return -1; } #endif bool CMinecraftApp::IsFileInTPD(int iConfig) { @@ -6226,18 +4799,6 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned( // upsell // get the dlc texture pack -#if 0 - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - ULONGLONG ullOfferID_Full; - app.GetDLCFullOfferIDForPackID( - pDLCTexPack->getDLCParentPackId(), &ullOfferID_Full); - - // tell sentient about the upsell of the full version of the - // skin pack - TelemetryManager->RecordUpsellPresented( - iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; @@ -6254,7 +4815,6 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned( return S_OK; } } -#if 1 // does the save exist? bool bSaveExists; StorageManager.DoesSaveExist(&bSaveExists); @@ -6272,11 +4832,7 @@ int CMinecraftApp::ExitAndJoinFromInviteSaveDialogReturned( pClass); return 0; } else -#endif { -#if 0 || 0 - StorageManager.SetSaveDisabled(false); -#endif MinecraftServer::getInstance()->setSaveOnExit(true); } } else { @@ -6302,134 +4858,7 @@ int CMinecraftApp::WarningTrialTexturePackReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { // 4J Stu - I added this in when fixing an X1 bug. We should probably add // this as well but I don't have time to test all platforms atm -#if 0 // 0 || 0 || 0 - if(result==C4JStorage::EMessage_ResultAccept) - { - if(!ProfileManager.IsSignedInLive(iPad)) - { - // you're not signed in to PSN! - } - else - { - // 4J-PB - need to check this user can access the store - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions(iPad,true,NULL,&bContentRestricted,NULL); - if(bContentRestricted) - { - unsigned int uiIDA[1]; - uiIDA[0]=IDS_CONFIRM_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - } - else - { - // need to get info on the pack to see if the user has already downloaded it - TexturePack *tPack = Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack *pDLCTexPack=(DLCTexturePack *)tPack; - - // retrieve the store name for the skin pack - DLCPack *pDLCPack=pDLCTexPack->getDLCInfoParentPack();//tPack->getDLCPack(); - const char *pchPackName=wstringtofilename(pDLCPack->getName()); - app.DebugPrintf("Texture Pack - %s\n",pchPackName); - SONYDLC *pSONYDLCInfo=app.GetSONYDLCInfo((char *)pchPackName); - - if(pSONYDLCInfo!=NULL) - { - char chName[42]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID,0,SCE_NP_COMMERCE2_SKU_ID_LEN); - // find the info on the skin pack - // we have to retrieve the skuid from the store info, it can't be hardcoded since Sony may change it. - // So we assume the first sku for the product is the one we want -#if 0 - sprintf(chName,"%s",pSONYDLCInfo->chDLCKeyname); -#else - sprintf(chName,"%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname); -#endif - app.GetDLCSkuIDFromProductList(chName,chSkuID); - // 4J-PB - need to check for an empty store -#if 0 || 0 || 0 - if(app.CheckForEmptyStore(iPad)==false) -#endif - { - if(app.DLCAlreadyPurchased(chSkuID)) - { - app.DownloadAlreadyPurchased(chSkuID); - } - else - { - app.Checkout(chSkuID); - } - } - } - } - } - } -#endif // - -#if 0 - if (result == C4JStorage::EMessage_ResultAccept) { - if (ProfileManager.IsSignedIn(iPad)) { - if (ProfileManager.IsSignedInLive(iPad)) { - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - DLCPack* pDLCPack = pDLCTexPack->getDLCInfoParentPack(); - - DLC_INFO* pDLCInfo = app.GetDLCInfoForProductName( - (WCHAR*)pDLCPack->getName().c_str()); - - StorageManager.InstallOffer( - 1, (WCHAR*)pDLCInfo->wsProductId.c_str(), NULL, NULL); - - // the license change coming in when the offer has been - // installed will cause this scene to refresh - } else { - // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no - // active network connection user is unable to convert from - // Trial to Full texture pack and is not messaged why. - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } - } - } - -#endif -#if 0 - - CMinecraftApp* pClass = (CMinecraftApp*)pParam; - - TexturePack* tPack = Minecraft::GetInstance()->skins->getSelected(); - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - ULONGLONG ullIndexA[1]; - - // Need to get the parent packs id, since this may be one of many child - // packs with their own ids - app.GetDLCFullOfferIDForPackID(pDLCTexPack->getDLCParentPackId(), - &ullIndexA[0]); - - if (result == C4JStorage::EMessage_ResultAccept) { - if (ProfileManager.IsSignedIn(iPad)) { - // need to allow downloads here, or the player would need to quit - // the game to let the download of a texture pack happen. This might - // affect the network traffic, since the download could take all the - // bandwidth... - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); - - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - } - } else { - TelemetryManager->RecordUpsellResponded(iPad, eSet_UpsellID_Texture_DLC, - (ullIndexA[0] & 0xFFFFFFFF), - eSen_UpsellOutcome_Declined); - } -#endif return 0; } @@ -6453,18 +4882,6 @@ int CMinecraftApp::ExitAndJoinFromInviteAndSaveReturned( // upsell // get the dlc texture pack -#if 0 - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - ULONGLONG ullOfferID_Full; - app.GetDLCFullOfferIDForPackID( - pDLCTexPack->getDLCParentPackId(), &ullOfferID_Full); - - // tell sentient about the upsell of the full version of the - // skin pack - TelemetryManager->RecordUpsellPresented( - iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; @@ -6495,9 +4912,6 @@ int CMinecraftApp::ExitAndJoinFromInviteDeclineSaveReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { // results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { -#if 0 || 0 - StorageManager.SetSaveDisabled(false); -#endif MinecraftServer::getInstance()->setSaveOnExit(false); // flag a app action of exit and join game from invite app.SetAction(iPad, eAppAction_ExitAndJoinFromInviteConfirmed); @@ -6588,7 +5002,7 @@ void CMinecraftApp::InitialiseTips() { // going to leave the multiplayer tip so it is always first // Only randomise the content package build -#ifdef _CONTENT_PACKAGE +#if defined(_CONTENT_PACKAGE) for (int i = 1; i < MAX_TIPS_GAMETIP; i++) { m_GameTipA[i].iSortValue = TipRandom->nextInt(); @@ -6623,7 +5037,7 @@ void CMinecraftApp::InitialiseTips() { if (m_TipIDA[i] == 0) { // the m_TriviaTipA or the m_GameTipA are out of sync -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif } @@ -6820,21 +5234,7 @@ std::wstring CMinecraftApp::FormatHTMLString( GetActionReplacement(iPad, MINECRAFT_ACTION_DPAD_RIGHT)); text = replaceAll(text, L"{*CONTROLLER_ACTION_DPAD_LEFT*}", GetActionReplacement(iPad, MINECRAFT_ACTION_DPAD_LEFT)); -#if 0 || 0 - text = replaceAll(text, L"{*CONTROLLER_VK_START*}", - GetVKReplacement(VK_PAD_START)); - text = replaceAll(text, L"{*CONTROLLER_VK_BACK*}", - GetVKReplacement(VK_PAD_BACK)); -#endif -#if 0 - std::wstring imageRoot = L""; - - Minecraft* pMinecraft = Minecraft::GetInstance(); - imageRoot = pMinecraft->skins->getSelected()->getXuiRootPath(); - - text = replaceAll(text, L"{*IMAGEROOT*}", imageRoot); -#endif // 0 // Fix for #8903 - UI: Localization: KOR/JPN/CHT: Button Icons are rendered // with padding space, which looks no good @@ -6855,53 +5255,6 @@ std::wstring CMinecraftApp::GetActionReplacement(int iPad, unsigned int input = InputManager.GetGameJoypadMaps( InputManager.GetJoypadMapVal(iPad), ucAction); -#if 0 - switch (input) { - case _360_JOY_BUTTON_A: - return app.GetString(IDS_CONTROLLER_A); - case _360_JOY_BUTTON_B: - return app.GetString(IDS_CONTROLLER_B); - case _360_JOY_BUTTON_X: - return app.GetString(IDS_CONTROLLER_X); - case _360_JOY_BUTTON_Y: - return app.GetString(IDS_CONTROLLER_Y); - case _360_JOY_BUTTON_LSTICK_UP: - case _360_JOY_BUTTON_LSTICK_DOWN: - case _360_JOY_BUTTON_LSTICK_LEFT: - case _360_JOY_BUTTON_LSTICK_RIGHT: - return app.GetString(IDS_CONTROLLER_LEFT_STICK); - case _360_JOY_BUTTON_RSTICK_LEFT: - case _360_JOY_BUTTON_RSTICK_RIGHT: - case _360_JOY_BUTTON_RSTICK_UP: - case _360_JOY_BUTTON_RSTICK_DOWN: - return app.GetString(IDS_CONTROLLER_RIGHT_STICK); - case _360_JOY_BUTTON_LT: - return app.GetString(IDS_CONTROLLER_LEFT_TRIGGER); - case _360_JOY_BUTTON_RT: - return app.GetString(IDS_CONTROLLER_RIGHT_TRIGGER); - case _360_JOY_BUTTON_RB: - return app.GetString(IDS_CONTROLLER_RIGHT_BUMPER); - case _360_JOY_BUTTON_LB: - return app.GetString(IDS_CONTROLLER_LEFT_BUMPER); - case _360_JOY_BUTTON_BACK: - return app.GetString(IDS_CONTROLLER_BACK); - case _360_JOY_BUTTON_START: - return app.GetString(IDS_CONTROLLER_START); - case _360_JOY_BUTTON_RTHUMB: - return app.GetString(IDS_CONTROLLER_RIGHT_THUMBSTICK); - case _360_JOY_BUTTON_LTHUMB: - return app.GetString(IDS_CONTROLLER_LEFT_THUMBSTICK); - case _360_JOY_BUTTON_DPAD_LEFT: - return app.GetString(IDS_CONTROLLER_DPAD_L); - case _360_JOY_BUTTON_DPAD_RIGHT: - return app.GetString(IDS_CONTROLLER_DPAD_R); - case _360_JOY_BUTTON_DPAD_UP: - return app.GetString(IDS_CONTROLLER_DPAD_U); - case _360_JOY_BUTTON_DPAD_DOWN: - return app.GetString(IDS_CONTROLLER_DPAD_D); - }; - return L""; -#else std::wstring replacement = L""; // 4J Stu - Some of our actions can be mapped to multiple physical buttons, @@ -6951,9 +5304,7 @@ std::wstring CMinecraftApp::GetActionReplacement(int iPad, wchar_t string[128]; -#if 0 - int size = 30; -#elif defined _WIN64 +#if defined(_WIN64) int size = 45; if (ui.getScreenWidth() < 1920) size = 30; #else @@ -6965,72 +5316,16 @@ std::wstring CMinecraftApp::GetActionReplacement(int iPad, replacement.c_str(), size, size); return string; -#endif } std::wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) { -#if 0 - switch (uiVKey) { - case VK_PAD_A: - return app.GetString(IDS_CONTROLLER_A); - case VK_PAD_B: - return app.GetString(IDS_CONTROLLER_B); - case VK_PAD_X: - return app.GetString(IDS_CONTROLLER_X); - case VK_PAD_Y: - return app.GetString(IDS_CONTROLLER_Y); - case VK_PAD_LSHOULDER: - return app.GetString(IDS_CONTROLLER_LEFT_BUMPER); - case VK_PAD_RSHOULDER: - return app.GetString(IDS_CONTROLLER_RIGHT_BUMPER); - case VK_PAD_LTRIGGER: - return app.GetString(IDS_CONTROLLER_LEFT_TRIGGER); - case VK_PAD_RTRIGGER: - return app.GetString(IDS_CONTROLLER_RIGHT_TRIGGER); - case VK_PAD_LTHUMB_UP: - case VK_PAD_LTHUMB_DOWN: - case VK_PAD_LTHUMB_RIGHT: - case VK_PAD_LTHUMB_LEFT: - case VK_PAD_LTHUMB_UPLEFT: - case VK_PAD_LTHUMB_UPRIGHT: - case VK_PAD_LTHUMB_DOWNRIGHT: - case VK_PAD_LTHUMB_DOWNLEFT: - return app.GetString(IDS_CONTROLLER_LEFT_STICK); - case VK_PAD_RTHUMB_UP: - case VK_PAD_RTHUMB_DOWN: - case VK_PAD_RTHUMB_RIGHT: - case VK_PAD_RTHUMB_LEFT: - case VK_PAD_RTHUMB_UPLEFT: - case VK_PAD_RTHUMB_UPRIGHT: - case VK_PAD_RTHUMB_DOWNRIGHT: - case VK_PAD_RTHUMB_DOWNLEFT: - return app.GetString(IDS_CONTROLLER_RIGHT_STICK); - default: - break; - } - return NULL; -#else std::wstring replacement = L""; switch (uiVKey) { case VK_PAD_A: -#if 0 || 0 || 0 - if (InputManager.IsCircleCrossSwapped()) - replacement = L"ButtonB"; - else - replacement = L"ButtonA"; -#else replacement = L"ButtonA"; -#endif break; case VK_PAD_B: -#if 0 || 0 || 0 - if (InputManager.IsCircleCrossSwapped()) - replacement = L"ButtonA"; - else - replacement = L"ButtonB"; -#else replacement = L"ButtonB"; -#endif break; case VK_PAD_X: replacement = L"ButtonX"; @@ -7070,22 +5365,12 @@ std::wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) { case VK_PAD_RTHUMB_DOWNLEFT: replacement = L"ButtonRightStick"; break; -#if 0 || 0 - case VK_PAD_START: - replacement = L"ButtonStart"; - break; - case VK_PAD_BACK: - replacement = L"ButtonBack"; - break; -#endif default: break; } wchar_t string[128]; -#if 0 - int size = 30; -#elif defined _WIN64 +#if defined(_WIN64) int size = 45; if (ui.getScreenWidth() < 1920) size = 30; #else @@ -7097,26 +5382,12 @@ std::wstring CMinecraftApp::GetVKReplacement(unsigned int uiVKey) { replacement.c_str(), size, size); return string; -#endif } std::wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) { -#if 0 - switch (uiIcon) { - case XZP_ICON_SHANK_01: - return app.GetString(IDS_ICON_SHANK_01); - case XZP_ICON_SHANK_03: - return app.GetString(IDS_ICON_SHANK_03); - default: - break; - } - return NULL; -#else wchar_t string[128]; -#if 0 - int size = 22; -#elif defined _WIN64 +#if defined(_WIN64) int size = 33; if (ui.getScreenWidth() < 1920) size = 22; #else @@ -7139,33 +5410,13 @@ std::wstring CMinecraftApp::GetIconReplacement(unsigned int uiIcon) { break; } return result; -#endif } -#if 0 || 0 || 0 -std::unordered_map - CMinecraftApp::MojangData; -std::unordered_map CMinecraftApp::DLCTextures_PackID; -std::unordered_map CMinecraftApp::DLCInfo; -std::unordered_map CMinecraftApp::DLCInfo_SkinName; -#elif 0 -std::unordered_map - CMinecraftApp::MojangData; -std::unordered_map - CMinecraftApp::DLCTextures_PackID; // for mash-up packs & texture packs -// std::unordered_map CMinecraftApp::DLCInfo_Trial; // -// full offerid, dlc_info -std::unordered_map - CMinecraftApp::DLCInfo_Full; // full offerid, dlc_info -std::unordered_map - CMinecraftApp::DLCInfo_SkinName; // skin name, full offer id -#else std::unordered_map CMinecraftApp::MojangData; std::unordered_map CMinecraftApp::DLCTextures_PackID; std::unordered_map CMinecraftApp::DLCInfo_Trial; std::unordered_map CMinecraftApp::DLCInfo_Full; std::unordered_map CMinecraftApp::DLCInfo_SkinName; -#endif HRESULT CMinecraftApp::RegisterMojangData(WCHAR* pXuidName, PlayerUID xuid, WCHAR* pSkin, WCHAR* pCape) { @@ -7230,7 +5481,7 @@ HRESULT CMinecraftApp::RegisterConfigValues(WCHAR* pType, int iValue) { return hr; } -#if (0 || defined _WINDOWS64) +#if defined(_WINDOWS64) HRESULT CMinecraftApp::RegisterDLCData(WCHAR* pType, WCHAR* pBannerName, int iGender, uint64_t ullOfferID_Full, uint64_t ullOfferID_Trial, @@ -7247,7 +5498,6 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR* pType, WCHAR* pBannerName, pDLCData->uiSortIndex = uiSortIndex; pDLCData->iConfig = iConfig; -#if 1 // ignore the names if we don't recognize them if (pBannerName != L"") { wcsncpy_s(pDLCData->wchBanner, pBannerName, MAX_BANNERNAME_SIZE); @@ -7256,7 +5506,6 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR* pType, WCHAR* pBannerName, if (pDataFile[0] != 0) { wcsncpy_s(pDLCData->wchDataFile, pDataFile, MAX_BANNERNAME_SIZE); } -#endif if (pType != NULL) { if (wcscmp(pType, L"Skin") == 0) { @@ -7282,81 +5531,6 @@ HRESULT CMinecraftApp::RegisterDLCData(WCHAR* pType, WCHAR* pBannerName, return hr; } -#elif 0 - -std::unordered_map* CMinecraftApp::GetDLCInfo() { - return &DLCInfo_Full; -} - -HRESULT CMinecraftApp::RegisterDLCData(eDLCContentType eType, - WCHAR* pwchBannerName, - WCHAR* pwchProductId, - WCHAR* pwchProductName, - WCHAR* pwchFirstSkin, int iConfig, - unsigned int uiSortIndex) { - HRESULT hr = S_OK; - // 4J-PB - need to convert the product id to uppercase because the catalog - // calls come back with upper case - WCHAR wchUppercaseProductID[64]; - if (pwchProductId[0] != 0) { - for (int i = 0; i < 64; i++) { - wchUppercaseProductID[i] = towupper((wchar_t)pwchProductId[i]); - } - } - - // check if we already have this info from the local DLC file - std::wstring wsTemp = wchUppercaseProductID; - - AUTO_VAR(it, DLCInfo_Full.find(wsTemp)); - if (it == DLCInfo_Full.end()) { - // Not found - - DLC_INFO* pDLCData = new DLC_INFO; - ZeroMemory(pDLCData, sizeof(DLC_INFO)); - - pDLCData->eDLCType = e_DLC_NotDefined; - pDLCData->uiSortIndex = uiSortIndex; - pDLCData->iConfig = iConfig; - - if (pwchProductId[0] != 0) { - pDLCData->wsProductId = wchUppercaseProductID; - } - - // ignore the names if we don't recognize them - if (pwchBannerName != L"") { - wcsncpy_s(pDLCData->wchBanner, pwchBannerName, MAX_BANNERNAME_SIZE); - } - - if (pwchProductName[0] != 0) { - pDLCData->wsDisplayName = pwchProductName; - } - - pDLCData->eDLCType = eType; - - switch (eType) { - case e_DLC_MashupPacks: - case e_DLC_TexturePacks: - DLCTextures_PackID[iConfig] = pDLCData->wsProductId; - break; - } - - if (pwchFirstSkin[0] != 0) - DLCInfo_SkinName[pwchFirstSkin] = pDLCData->wsProductId; - -#if 0 - // ignore the names, and use the product id instead - DLCInfo_Full[pDLCData->wsProductId] = pDLCData; -#else - DLCInfo_Full[pDLCData->wsDisplayName] = pDLCData; -#endif - } - app.DebugPrintf( - "DLCInfo - type - %d, productID - %ls, name - %ls , banner - %ls, " - "iconfig - %d, sort index - %d\n", - eType, pwchProductId, pwchProductName, pwchBannerName, iConfig, - uiSortIndex); - return hr; -} #elif defined(__linux__) HRESULT CMinecraftApp::RegisterDLCData(WCHAR* pType, WCHAR* pBannerName, int iGender, __uint64 ullOfferID_Full, @@ -7418,123 +5592,6 @@ HRESULT CMinecraftApp::RegisterDLCData(char* pchDLCName, } #endif -#if 0 || 0 || 0 -bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, - ULONGLONG* pullVal) { - AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); - if (it == DLCInfo_SkinName.end()) { - return false; - } else { - *pullVal = (ULONGLONG)it->second; - return true; - } -} -bool CMinecraftApp::GetDLCNameForPackID(const int iPackID, char** ppchKeyID) { - AUTO_VAR(it, DLCTextures_PackID.find(iPackID)); - if (it == DLCTextures_PackID.end()) { - *ppchKeyID = NULL; - return false; - } else { - *ppchKeyID = (char*)it->second; - return true; - } -} -DLC_INFO* CMinecraftApp::GetDLCInfo(char* pchDLCName) { - std::string tempString = pchDLCName; - - if (DLCInfo.size() > 0) { - AUTO_VAR(it, DLCInfo.find(tempString)); - - if (it == DLCInfo.end()) { - // nothing for this - return NULL; - } else { - return it->second; - } - } else - return NULL; -} - -DLC_INFO* CMinecraftApp::GetDLCInfoFromTPackID(int iTPID) { - std::unordered_map::iterator it = DLCInfo.begin(); - - for (int i = 0; i < DLCInfo.size(); i++) { - if (((DLC_INFO*)it->second)->iConfig == iTPID) { - return it->second; - } - ++it; - } - return NULL; -} - -DLC_INFO* CMinecraftApp::GetDLCInfo(int iIndex) { - std::unordered_map::iterator it = DLCInfo.begin(); - - for (int i = 0; i < iIndex; i++) { - ++it; - } - - return it->second; -} - -char* CMinecraftApp::GetDLCInfoTextures(int iIndex) { - std::unordered_map::iterator it = DLCTextures_PackID.begin(); - - for (int i = 0; i < iIndex; i++) { - ++it; - } - - return it->second; -} - -#elif 0 -bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, - std::wstring& ProductId) { - AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); - if (it == DLCInfo_SkinName.end()) { - return false; - } else { - ProductId = it->second; - return true; - } -} -bool CMinecraftApp::GetDLCFullOfferIDForPackID(const int iPackID, - std::wstring& ProductId) { - AUTO_VAR(it, DLCTextures_PackID.find(iPackID)); - if (it == DLCTextures_PackID.end()) { - return false; - } else { - ProductId = it->second; - return true; - } -} -// DLC_INFO *CMinecraftApp::GetDLCInfoForTrialOfferID(std::wstring &ProductId) -// { -// return NULL; -// } - -DLC_INFO* CMinecraftApp::GetDLCInfoTrialOffer(int iIndex) { return NULL; } -DLC_INFO* CMinecraftApp::GetDLCInfoFullOffer(int iIndex) { - std::unordered_map::iterator it = - DLCInfo_Full.begin(); - - for (int i = 0; i < iIndex; i++) { - ++it; - } - - return it->second; -} -std::wstring CMinecraftApp::GetDLCInfoTexturesFullOffer(int iIndex) { - std::unordered_map::iterator it = - DLCTextures_PackID.begin(); - - for (int i = 0; i < iIndex; i++) { - ++it; - } - - return it->second; -} -#else bool CMinecraftApp::GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, ULONGLONG* pullVal) { AUTO_VAR(it, DLCInfo_SkinName.find(FirstSkin)); @@ -7601,42 +5658,7 @@ ULONGLONG CMinecraftApp::GetDLCInfoTexturesFullOffer(int iIndex) { return it->second; } -#endif -#if 0 - -DLC_INFO* CMinecraftApp::GetDLCInfoForFullOfferID(WCHAR* pwchProductID) { - std::wstring wsTemp = pwchProductID; - if (DLCInfo_Full.size() > 0) { - AUTO_VAR(it, DLCInfo_Full.find(wsTemp)); - - if (it == DLCInfo_Full.end()) { - // nothing for this - return NULL; - } else { - return it->second; - } - } else - return NULL; -} -DLC_INFO* CMinecraftApp::GetDLCInfoForProductName(WCHAR* pwchProductName) { - std::unordered_map::iterator it = - DLCInfo_Full.begin(); - std::wstring wsProductName = pwchProductName; - - for (int i = 0; i < DLCInfo_Full.size(); i++) { - DLC_INFO* pDLCInfo = (DLC_INFO*)it->second; - if (wsProductName == pDLCInfo->wsDisplayName) { - return pDLCInfo; - } - ++it; - } - - return NULL; -} - -#elif 0 || 0 || 0 -#else DLC_INFO* CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full) { if (DLCInfo_Full.size() > 0) { @@ -7651,7 +5673,6 @@ DLC_INFO* CMinecraftApp::GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full) { } else return NULL; } -#endif void CMinecraftApp::EnterSaveNotificationSection() { EnterCriticalSection(&m_saveNotificationCriticalSection); @@ -7762,23 +5783,15 @@ int CMinecraftApp::ExitGameFromRemoteSaveDialogReturned( if (result == C4JStorage::EMessage_ResultDecline) { app.SetAction(iPad, eAppAction_ExitWorld); } else { -#if 1 // Inform fullscreen progress scene that it's not being cancelled after // all UIScene_FullscreenProgress* pScene = (UIScene_FullscreenProgress*)ui.FindScene( eUIScene_FullscreenProgress); -#if 0 - if (pScene != NULL) -#else if (pScene != nullptr) -#endif { pScene->SetWasCancelled(false); } -#else - // Don't have to worry about this on Xbox -#endif } return 0; } @@ -7810,16 +5823,6 @@ void CMinecraftApp::InvalidateBannedList(int iPad) { } } -#if 0 -void CMinecraftApp::AddLevelToBannedLevelList(int iPad, - PBANNEDLISTDATA pBannedListData, - bool bWriteToTMS) { - PlayerUID xuid = pBannedListData->wchPlayerUID; - - AddLevelToBannedLevelList(iPad, xuid, pBannedListData->pszLevelName, - bWriteToTMS); -} -#endif void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, char* pszLevelName, @@ -7830,12 +5833,7 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, BANNEDLISTDATA* pBannedListData = new BANNEDLISTDATA; memset(pBannedListData, 0, sizeof(BANNEDLISTDATA)); -#if 0 - memcpy(&pBannedListData->wchPlayerUID, xuid.toString().c_str(), - sizeof(WCHAR) * 64); -#else memcpy(&pBannedListData->xuid, &xuid, sizeof(PlayerUID)); -#endif strcpy(pBannedListData->pszLevelName, pszLevelName); m_vBannedListA[iPad]->push_back(pBannedListData); @@ -7856,17 +5854,6 @@ void CMinecraftApp::AddLevelToBannedLevelList(int iPad, PlayerUID xuid, // bool // bRes=StorageManager.WriteTMSFile(iPad,C4JStorage::eGlobalStorage_TitleUser,L"BannedList",(std::uint8_t*)pBannedList, // dwDataBytes); -#if 0 - StorageManager.TMSPP_WriteFile( - iPad, C4JStorage::eGlobalStorage_TitleUser, - C4JStorage::TMS_FILETYPE_BINARY, C4JStorage::TMS_UGCTYPE_NONE, - "BannedList", (PCHAR)pBannedList, dataBytes, NULL, NULL, 0); -#elif 0 - StorageManager.TMSPP_WriteFile( - iPad, C4JStorage::eGlobalStorage_TitleUser, - C4JStorage::TMS_FILETYPE_BINARY, L"BannedList", - (std::uint8_t*)pBannedList, dataBytes, NULL, NULL, 0); -#endif delete[] pBannedList; } @@ -7878,14 +5865,8 @@ bool CMinecraftApp::IsInBannedLevelList(int iPad, PlayerUID xuid, for (AUTO_VAR(it, m_vBannedListA[iPad]->begin()); it != m_vBannedListA[iPad]->end(); ++it) { PBANNEDLISTDATA pData = *it; -#if 0 - PlayerUID bannedPlayerUID = pData->wchPlayerUID; - if (IsEqualXUID(bannedPlayerUID, xuid) && - (strcmp(pData->pszLevelName, pszLevelName) == 0)) -#else if (IsEqualXUID(pData->xuid, xuid) && (strcmp(pData->pszLevelName, pszLevelName) == 0)) -#endif { return true; } @@ -7906,14 +5887,8 @@ void CMinecraftApp::RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, PBANNEDLISTDATA pBannedListData = *it; if (pBannedListData != NULL) { -#if 0 - PlayerUID bannedPlayerUID = pBannedListData->wchPlayerUID; - if (IsEqualXUID(bannedPlayerUID, xuid) && - (strcmp(pBannedListData->pszLevelName, pszLevelName) == 0)) -#else if (IsEqualXUID(pBannedListData->xuid, xuid) && (strcmp(pBannedListData->pszLevelName, pszLevelName) == 0)) -#endif { TelemetryManager->RecordUnBanLevel(iPad); @@ -7932,14 +5907,6 @@ void CMinecraftApp::RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, static_cast(sizeof(BANNEDLISTDATA) * bannedListCount); if (dataBytes == 0) { // wipe the file -#if 0 - StorageManager.DeleteTMSFile(iPad, C4JStorage::eGlobalStorage_TitleUser, - L"BannedList"); -#elif 0 - StorageManager.TMSPP_DeleteFile( - iPad, C4JStorage::eGlobalStorage_TitleUser, - C4JStorage::TMS_FILETYPE_BINARY, L"BannedList", NULL, NULL, 0); -#endif } else { PBANNEDLISTDATA pBannedList = (BANNEDLISTDATA*)(new std::uint8_t[dataBytes]); @@ -7949,16 +5916,6 @@ void CMinecraftApp::RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, memcpy(&pBannedList[i], pBannedListData, sizeof(BANNEDLISTDATA)); } -#if 0 - StorageManager.WriteTMSFile(iPad, C4JStorage::eGlobalStorage_TitleUser, - L"BannedList", (std::uint8_t*)pBannedList, - dataBytes); -#elif 0 - StorageManager.TMSPP_WriteFile( - iPad, C4JStorage::eGlobalStorage_TitleUser, - C4JStorage::TMS_FILETYPE_BINARY, L"BannedList", (PBYTE)pBannedList, - dataBytes, NULL, NULL, 0); -#endif delete[] pBannedList; } @@ -8392,15 +6349,10 @@ unsigned char CMinecraftApp::m_szPNG[8] = {137, 80, 78, 71, 13, 10, 26, 10}; #define PNG_TAG_tEXt 0x74455874 unsigned int CMinecraftApp::FromBigEndian(unsigned int uiValue) { -#if 0 || 0 - // Keep it in big endian - return uiValue; -#else unsigned int uiReturn = ((uiValue >> 24) & 0x000000ff) | ((uiValue >> 8) & 0x0000ff00) | ((uiValue << 8) & 0x00ff0000) | ((uiValue << 24) & 0xff000000); return uiReturn; -#endif } void CMinecraftApp::GetImageTextData(std::uint8_t* imageData, @@ -8688,11 +6640,9 @@ std::wstring CMinecraftApp::getEntityName(eINSTANCEOF type) { std::uint32_t CMinecraftApp::m_dwContentTypeA[e_Marketplace_MAX] = { XMARKETPLACE_OFFERING_TYPE_CONTENT, // e_DLC_SkinPack, e_DLC_TexturePacks, // e_DLC_MashupPacks -#if 1 XMARKETPLACE_OFFERING_TYPE_THEME, // e_DLC_Themes XMARKETPLACE_OFFERING_TYPE_AVATARITEM, // e_DLC_AvatarItems XMARKETPLACE_OFFERING_TYPE_TILE, // e_DLC_Gamerpics -#endif }; unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, @@ -8743,7 +6693,6 @@ unsigned int CMinecraftApp::AddDLCRequest(eDLCMarketplaceType eType, unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote) { -#if !0 && !0 && !0 // lock access EnterCriticalSection(&csTMSPPDownloadQueue); @@ -8855,67 +6804,6 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, // run through the trial offers first, then the full offers. Any // duplicates won't be added to the download queue int iCount; -#if 0 // Only trial offers on Xbox 360 - iCount = GetDLCInfoTrialOffersCount(); - for (int i = 0; i < iCount; i++) { - DLC_INFO* pDLC = GetDLCInfoTrialOffer(i); - - // is this the right type? - if (pDLC->eDLCType == eType) { - WCHAR* cString = pDLC->wchBanner; - - // 4J-PB - shouldn't check this here - let the TMS files - // override it, so if they are on TMS, we'll take them first is - // the file in the TMS XZP? - // int iIndex = app.GetLocalTMSFileIndex(cString,true); - - // if(iIndex!=-1) - { - bool bPresent = app.IsFileInMemoryTextures(cString); - - if (!bPresent) // retrieve it from TMSPP - { - bool bAlreadyInQueue = false; - for (AUTO_VAR(it, m_TMSPPDownloadQueue.begin()); - it != m_TMSPPDownloadQueue.end(); ++it) { - TMSPPRequest* pCurrent = *it; - - if (wcscmp(pDLC->wchBanner, - pCurrent->wchFilename) == 0) { - bAlreadyInQueue = true; - break; - } - } - - if (!bAlreadyInQueue) { - TMSPPRequest* pTMSPPreq = new TMSPPRequest; - - pTMSPPreq->CallbackFunc = - &CMinecraftApp::TMSPPFileReturned; - pTMSPPreq->lpCallbackParam = this; - pTMSPPreq->eStorageFacility = - C4JStorage::eGlobalStorage_Title; - pTMSPPreq->eFileTypeVal = - C4JStorage::TMS_FILETYPE_BINARY; - // wcstombs(pTMSPPreq->szFilename,pDLC->wchBanner,MAX_TMSFILENAME_SIZE); - memcpy(pTMSPPreq->wchFilename, pDLC->wchBanner, - sizeof(WCHAR) * MAX_BANNERNAME_SIZE); - pTMSPPreq->eType = eType; - pTMSPPreq->eState = e_TMS_ContentState_Queued; - - m_bAllTMSContentRetrieved = false; - m_TMSPPDownloadQueue.push_back(pTMSPPreq); - app.DebugPrintf( - "===m_TMSPPDownloadQueue Adding %ls, q size is " - "%d\n", - pTMSPPreq->wchFilename, - m_TMSPPDownloadQueue.size()); - } - } - } - } - } -#endif // and the full offers iCount = GetDLCInfoFullOffersCount(); @@ -8988,7 +6876,6 @@ unsigned int CMinecraftApp::AddTMSPPFileTypeRequest(eDLCContentType eType, } LeaveCriticalSection(&csTMSPPDownloadQueue); -#endif return 1; } @@ -9036,7 +6923,7 @@ bool CMinecraftApp::RetrieveNextDLCContent() { DLCRequest* pCurrent = *it; if (pCurrent->eState == e_DLC_ContentState_Idle) { -#ifdef _DEBUG +#if defined(_DEBUG) app.DebugPrintf("RetrieveNextDLCContent - type = %d\n", pCurrent->dwType); #endif @@ -9061,17 +6948,9 @@ bool CMinecraftApp::RetrieveNextDLCContent() { return false; } -#if !0 && !0 && !0 -#if 0 -int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, - void* lpvData, WCHAR* wchFilename) { - C4JStorage::PTMSPP_FILEDATA pFileData = - (C4JStorage::PTMSPP_FILEDATA)lpvData; -#else int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, C4JStorage::PTMSPP_FILEDATA pFileData, LPCSTR szFilename) { -#endif CMinecraftApp* pClass = (CMinecraftApp*)pParam; @@ -9080,60 +6959,17 @@ int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, for (AUTO_VAR(it, pClass->m_TMSPPDownloadQueue.begin()); it != pClass->m_TMSPPDownloadQueue.end(); ++it) { TMSPPRequest* pCurrent = *it; -#if 0 || defined(_WINDOWS64) +#if defined(_WINDOWS64) char szFile[MAX_TMSFILENAME_SIZE]; wcstombs(szFile, pCurrent->wchFilename, MAX_TMSFILENAME_SIZE); if (strcmp(szFilename, szFile) == 0) -#elif 0 - if (wcscmp(wchFilename, pCurrent->wchFilename) == 0) #endif { // set this to retrieved whether it found it or not pCurrent->eState = e_TMS_ContentState_Retrieved; if (pFileData != NULL) { -#if 0 - - switch (pCurrent->eType) { - case e_DLC_TexturePackData: { - // 4J-PB - we need to allocate memory for the file data - // and copy into it, since the current data is a - // reference into the blob download memory - std::uint8_t* pbData = - new std::uint8_t[pFileData->size]; - memcpy(pbData, pFileData->pbData, pFileData->size); - - pClass->m_vTMSPPData.push_back(pbData); - app.DebugPrintf("Got texturepack data\n"); - // get the config value for the texture pack - int iConfig = app.GetTPConfigVal(pCurrent->wchFilename); - app.AddMemoryTPDFile(iConfig, pbData, pFileData->size); - } break; - default: - // 4J-PB - check the data is an image - if (pFileData->pbData[0] == 0x89) { - // 4J-PB - we need to allocate memory for the file - // data and copy into it, since the current data is - // a reference into the blob download memory - std::uint8_t* pbData = - new std::uint8_t[pFileData->size]; - memcpy(pbData, pFileData->pbData, pFileData->size); - - pClass->m_vTMSPPData.push_back(pbData); - app.DebugPrintf("Got image data - %ls\n", - pCurrent->wchFilename); - app.AddMemoryTextureFile(pCurrent->wchFilename, - pbData, pFileData->size); - } else { - app.DebugPrintf( - "Got image data, but it's not a png - %ls\n", - pCurrent->wchFilename); - } - break; - } - -#else switch (pCurrent->eType) { case e_DLC_TexturePackData: { app.DebugPrintf("--- Got texturepack data %ls\n", @@ -9151,15 +6987,9 @@ int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, pFileData->size); break; } -#endif } else { -#if 0 - app.DebugPrintf("TMSImageReturned failed (%ls)...\n", - wchFilename); -#else app.DebugPrintf("TMSImageReturned failed (%s)...\n", szFilename); -#endif } break; } @@ -9168,124 +6998,8 @@ int CMinecraftApp::TMSPPFileReturned(void* pParam, int iPad, int iUserData, return 0; } -#endif bool CMinecraftApp::RetrieveNextTMSPPContent() { -#if 0 || 0 - // If there's already a retrieve in progress, quit - // we may have re-ordered the list, so need to check every item - - // is there a primary player and a network connection? - if (ProfileManager.GetPrimaryPad() == -1) return false; - - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) == false) - return false; - - EnterCriticalSection(&csTMSPPDownloadQueue); - for (AUTO_VAR(it, m_TMSPPDownloadQueue.begin()); - it != m_TMSPPDownloadQueue.end(); ++it) { - TMSPPRequest* pCurrent = *it; - - if (pCurrent->eState == e_TMS_ContentState_Retrieving) { - app.DebugPrintf("."); - LeaveCriticalSection(&csTMSPPDownloadQueue); - return true; - } - } - - // Now look for the next retrieval - for (AUTO_VAR(it, m_TMSPPDownloadQueue.begin()); - it != m_TMSPPDownloadQueue.end(); ++it) { - TMSPPRequest* pCurrent = *it; - - if (pCurrent->eState == e_TMS_ContentState_Queued) { - // 4J-PB - the file may be in the local TMS files, but try to - // retrieve it from the remote TMS in case it's been changed. If - // it's not in the list of TMS files, this will return right away - // with a ETMSStatus_Fail_ReadDetailsNotRetrieved -#if 0 - char szFilename[MAX_TMSFILENAME_SIZE]; - wcstombs(szFilename, pCurrent->wchFilename, MAX_TMSFILENAME_SIZE); - - app.DebugPrintf("\nRetrieveNextTMSPPContent - type = %d, %s\n", - pCurrent->eType, szFilename); - - C4JStorage::ETMSStatus status = StorageManager.TMSPP_ReadFile( - ProfileManager.GetPrimaryPad(), pCurrent->eStorageFacility, - pCurrent->eFileTypeVal, szFilename, pCurrent->CallbackFunc, - this); - switch (status) { - case C4JStorage::ETMSStatus_Pending: - pCurrent->eState = e_TMS_ContentState_Retrieving; - break; - case C4JStorage::ETMSStatus_Idle: - pCurrent->eState = e_TMS_ContentState_Retrieved; - break; - case C4JStorage::ETMSStatus_Fail_ReadInProgress: - case C4JStorage::ETMSStatus_ReadInProgress: - pCurrent->eState = e_TMS_ContentState_Retrieving; - if (pCurrent->eState == - C4JStorage::ETMSStatus_Fail_ReadInProgress) { - app.DebugPrintf( - "TMSPP_ReadFile failed - read in progress\n"); - Sleep(50); - LeaveCriticalSection(&csTMSPPDownloadQueue); - return false; - } - break; - default: - pCurrent->eState = e_TMS_ContentState_Retrieved; - break; - } -#else - eTitleStorageState status; - app.DebugPrintf("RetrieveNextTMSPPContent - type = %d, %ls\n", - pCurrent->eType, pCurrent->wchFilename); - // eTitleStorageState - // status=StorageManager.TMSPP_ReadFile(ProfileManager.GetPrimaryPad(),pCurrent->eStorageFacility,pCurrent->eFileTypeVal,pCurrent->wchFilename,pCurrent->CallbackFunc,this,0); - if (0) // wcscmp(pCurrent->wchFilename,L"TP01.png")==0) - { - // TP01 fails because the blob size returned is bigger than the - // global metadata says it should be - status = eTitleStorage_readerror; - } else { - status = StorageManager.TMSPP_ReadFile( - ProfileManager.GetPrimaryPad(), pCurrent->eStorageFacility, - pCurrent->eFileTypeVal, pCurrent->wchFilename, - pCurrent->CallbackFunc, this, 0); - } - switch (status) { - case eTitleStorage_pending: - pCurrent->eState = e_TMS_ContentState_Retrieving; - break; - case eTitleStorage_idle: - pCurrent->eState = e_TMS_ContentState_Retrieved; - break; - case eTitleStorage_busy: - // try again next time - { - app.DebugPrintf( - "@@@@@@@@@@@@@@@@@ TMSPP_ReadFile failed - busy " - "(probably reading already)\n"); - Sleep(50); - LeaveCriticalSection(&csTMSPPDownloadQueue); - return false; - } - break; - default: - pCurrent->eState = e_TMS_ContentState_Retrieved; - break; - } -#endif - - LeaveCriticalSection(&csTMSPPDownloadQueue); - return true; - } - } - - LeaveCriticalSection(&csTMSPPDownloadQueue); - -#endif return false; } @@ -9572,77 +7286,7 @@ std::wstring CMinecraftApp::getSkinPathFromId(std::uint32_t skinId) { int CMinecraftApp::TexturePackDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { -#if 0 || 0 || 0 - if (result == C4JStorage::EMessage_ResultAccept) { - Minecraft* pMinecraft = Minecraft::GetInstance(); - if (pMinecraft->skins->selectTexturePackById( - app.GetRequiredTexturePackID())) { - // it's been installed already - } else { - // we need to enable background downloading for the DLC - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); - SONYDLC* pSONYDLCInfo = - app.GetSONYDLCInfo(app.GetRequiredTexturePackID()); - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // we have to retrieve the skuid from the store info, it can't - // be hardcoded since Sony may change it. So we assume the first - // sku for the product is the one we want MGH - keyname in the - // DLC file is 16 chars long, but there's no space for a NULL - // terminating char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - // 4J-PB - need to check for an empty store - if (app.CheckForEmptyStore(iPad) == false) { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } - } - } else { - app.DebugPrintf("Continuing without installing texture pack\n"); - } -#endif - -#if 0 - if (result != C4JStorage::EMessage_Cancelled) { - if (app.GetRequiredTexturePackID() != 0) { - // we need to enable background downloading for the DLC - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); - - ULONGLONG ullOfferID_Full; - ULONGLONG ullIndexA[1]; - app.GetDLCFullOfferIDForPackID(app.GetRequiredTexturePackID(), - &ullOfferID_Full); - - if (result == C4JStorage::EMessage_ResultAccept) // Full version - { - ullIndexA[0] = ullOfferID_Full; - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - } else // trial version - { - DLC_INFO* pDLCInfo = - app.GetDLCInfoForFullOfferID(ullOfferID_Full); - ullIndexA[0] = pDLCInfo->ullOfferID_Trial; - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - } - } - } -#endif return 0; } @@ -9684,15 +7328,6 @@ byteArray CMinecraftApp::getArchiveFile(const std::wstring& filename) { // DLC -#if 0 || 0 || 0 -int CMinecraftApp::GetDLCInfoCount() { return (int)DLCInfo.size(); } -#elif 0 -int CMinecraftApp::GetDLCInfoTrialOffersCount() { return 0; } - -int CMinecraftApp::GetDLCInfoFullOffersCount() { - return (int)DLCInfo_Full.size(); -} -#else int CMinecraftApp::GetDLCInfoTrialOffersCount() { return (int)DLCInfo_Trial.size(); } @@ -9700,7 +7335,6 @@ int CMinecraftApp::GetDLCInfoTrialOffersCount() { int CMinecraftApp::GetDLCInfoFullOffersCount() { return (int)DLCInfo_Full.size(); } -#endif int CMinecraftApp::GetDLCInfoTexturesOffersCount() { return (int)DLCTextures_PackID.size(); @@ -9708,14 +7342,10 @@ int CMinecraftApp::GetDLCInfoTexturesOffersCount() { // AUTOSAVE void CMinecraftApp::SetAutosaveTimerTime(void) { -#if 0 || 0 - m_uiAutosaveTimer = GetTickCount() + 1000 * 60; -#else m_uiAutosaveTimer = GetTickCount() + GetGameSettings(ProfileManager.GetPrimaryPad(), eGameSetting_Autosave) * 1000 * 60 * 15; -#endif } // value x 15 to get mins, x60 for secs bool CMinecraftApp::AutosaveDue(void) { @@ -9744,10 +7374,6 @@ bool CMinecraftApp::IsLocalMultiplayerAvailable() { bool available = RenderManager.IsHiDef() && connectedControllers > 1; -#if 0 - // Check for remote play - available = available && InputManager.IsLocalMultiplayerAvailable(); -#endif return available; @@ -9781,37 +7407,6 @@ void CMinecraftApp::getLocale(std::vector& vecWstrLocales) { // 4J-PB - restrict the 360 language until we're ready to have them in -#if 0 - switch (systemLanguage) { - case XC_LANGUAGE_FRENCH: - locales.push_back(eMCLang_frFR); - break; - case XC_LANGUAGE_ITALIAN: - locales.push_back(eMCLang_itIT); - break; - case XC_LANGUAGE_GERMAN: - locales.push_back(eMCLang_deDE); - break; - case XC_LANGUAGE_SPANISH: - locales.push_back(eMCLang_esES); - break; - case XC_LANGUAGE_PORTUGUESE: - if (XGetLocale() == XC_LOCALE_BRAZIL) { - locales.push_back(eMCLang_ptBR); - } - locales.push_back(eMCLang_ptPT); - break; - case XC_LANGUAGE_JAPANESE: - locales.push_back(eMCLang_jaJP); - break; - case XC_LANGUAGE_KOREAN: - locales.push_back(eMCLang_koKR); - break; - case XC_LANGUAGE_TCHINESE: - locales.push_back(eMCLang_zhCHT); - break; - } -#else switch (systemLanguage) { case XC_LANGUAGE_ENGLISH: switch (XGetLocale()) { @@ -9953,36 +7548,7 @@ void CMinecraftApp::getLocale(std::vector& vecWstrLocales) { locales.push_back(eMCLang_zhCN); break; -#if 0 || 0 || 0 || \ - 0 - case XC_LANGUAGE_DANISH: - locales.push_back(eMCLang_daDA); - locales.push_back(eMCLang_daDK); - break; - - case XC_LANGUAGE_FINISH: - locales.push_back(eMCLang_fiFI); - break; - - case XC_LANGUAGE_CZECH: - locales.push_back(eMCLang_csCZ); - locales.push_back(eMCLang_enCZ); - break; - - case XC_LANGUAGE_SLOVAK: - locales.push_back(eMCLang_skSK); - locales.push_back(eMCLang_enSK); - break; - - case XC_LANGUAGE_GREEK: - locales.push_back(eMCLang_elEL); - locales.push_back(eMCLang_elGR); - locales.push_back(eMCLang_enGR); - locales.push_back(eMCLang_enGB); - break; -#endif } -#endif locales.push_back(eMCLang_enUS); locales.push_back(eMCLang_null); @@ -10163,9 +7729,7 @@ void CMinecraftApp::LocaleAndLanguageInit() { m_xcLangA[L"pl-PL"] = XC_LOCALE_POLAND; m_xcLangA[L"tr-TR"] = XC_LOCALE_TURKEY; m_xcLangA[L"el-EL"] = XC_LOCALE_GREECE; -#if 1 m_xcLangA[L"la-LAS"] = XC_LOCALE_LATIN_AMERICA; -#endif // New ones for Xbox One m_xcLangA[L"zh-SG"] = XC_LOCALE_SINGAPORE; @@ -10224,32 +7788,6 @@ std::wstring CMinecraftApp::getFilePath(std::uint32_t packId, return getRootPath(packId, false, true, mountPoint) + filename; } -#if 0 -// Texture packs that have their data in the TU data -enum ETitleUpdateTexturePacks { - eTUTP_MassEffect = 0x400, - eTUTP_Skyrim = 0x401, - eTUTP_Halo = 0x402, - eTUTP_Festive = 0x405, - - eTUTP_Plastic = 0x801, - eTUTP_Candy = 0x802, - eTUTP_Fantasy = 0x803, - eTUTP_Halloween = 0x804, - eTUTP_Natural = 0x805, - eTUTP_City = - 0x01000806, // 4J Stu - The released City pack had a sub-pack ID - eTUTP_Cartoon = 0x807, - eTUTP_Steampunk = - 0x01000808, // 4J Stu - The released Steampunk pack had a sub-pack ID -}; - -#ifdef _TU_BUILD -std::wstring titleUpdateTexturePackRoot = L"UPDATE:\\res\\DLC\\"; -#else -std::wstring titleUpdateTexturePackRoot = L"GAME:\\res\\TitleUpdate\\DLC\\"; -#endif -#else enum ETitleUpdateTexturePacks { // eTUTP_MassEffect = 0x400, // eTUTP_Skyrim = 0x401, @@ -10266,70 +7804,17 @@ enum ETitleUpdateTexturePacks { // Stu - The released Steampunk pack had a sub-pack ID }; -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) std::wstring titleUpdateTexturePackRoot = L"Windows64\\DLC\\"; -#elif 0 -std::wstring titleUpdateTexturePackRoot = L"/app0/orbis/CU/DLC/"; -#elif 0 -std::wstring titleUpdateTexturePackRoot = L"PSVita/CU/DLC/"; -#elif 0 -std::wstring titleUpdateTexturePackRoot = L"PS3/CU/DLC/"; #else std::wstring titleUpdateTexturePackRoot = L"CU\\DLC\\"; #endif -#endif std::wstring CMinecraftApp::getRootPath(std::uint32_t packId, bool allowOverride, bool bAddDataFolder, std::wstring mountPoint) { std::wstring path = mountPoint; -#if 0 - if (allowOverride) { - switch (packId) { - case eTUTP_MassEffect: - path = titleUpdateTexturePackRoot + L"MassEffect"; - break; - case eTUTP_Skyrim: - path = titleUpdateTexturePackRoot + L"Skyrim"; - break; - case eTUTP_Halo: - path = titleUpdateTexturePackRoot + L"Halo"; - break; - case eTUTP_Festive: - path = titleUpdateTexturePackRoot + L"Festive"; - break; - case eTUTP_Plastic: - path = titleUpdateTexturePackRoot + L"Plastic"; - break; - case eTUTP_Candy: - path = titleUpdateTexturePackRoot + L"Candy"; - break; - case eTUTP_Fantasy: - path = titleUpdateTexturePackRoot + L"Fantasy"; - break; - case eTUTP_Halloween: - path = titleUpdateTexturePackRoot + L"Halloween"; - break; - case eTUTP_Natural: - path = titleUpdateTexturePackRoot + L"Natural"; - break; - case eTUTP_City: - path = titleUpdateTexturePackRoot + L"City"; - break; - case eTUTP_Cartoon: - path = titleUpdateTexturePackRoot + L"Cartoon"; - break; - case eTUTP_Steampunk: - path = titleUpdateTexturePackRoot + L"Steampunk"; - break; - }; - File folder(path); - if (!folder.exists()) { - path = mountPoint; - } - } -#else if (allowOverride) { switch (packId) { case eTUTP_Halloween: @@ -10341,7 +7826,6 @@ std::wstring CMinecraftApp::getRootPath(std::uint32_t packId, path = mountPoint; } } -#endif if (bAddDataFolder) { return path + L"\\Data\\"; @@ -10350,8 +7834,3 @@ std::wstring CMinecraftApp::getRootPath(std::uint32_t packId, } } -#if 0 -void CMinecraftApp::SetReachedMainMenu() { m_hasReachedMainMenu = true; } - -bool CMinecraftApp::HasReachedMainMenu() { return m_hasReachedMainMenu; } -#endif diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 253a5b8ac..778c5f29b 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -5,21 +5,17 @@ // using namespace std; #include "Audio/Consoles_SoundEngine.h" -#ifndef __linux__ +#if !defined(__linux__) #include #endif #include "Tutorial/TutorialEnum.h" -#if 0 -#include "XUI/XUI_Helper.h" -#include "XUI/XUI_HelpCredits.h" -#endif #include "UI/UIStructs.h" #include "../Minecraft.World/Network/Packets/DisconnectPacket.h" -#ifndef __linux__ +#if !defined(__linux__) #include -#endif // __linux__ +#endif #include "../Minecraft.Client/Utils/StringTable.h" #include "DLC/DLCManager.h" @@ -61,9 +57,6 @@ class Merchant; class CMinecraftAudio; class CMinecraftApp -#if 0 - : public CXuiModule -#endif { private: static int s_iHTMLFontSizesA[eHTMLSize_COUNT]; @@ -100,7 +93,7 @@ public: // stored at the same positions when we read them static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204; -#ifdef _EXTENDED_ACHIEVEMENTS +#if defined(_EXTENDED_ACHIEVEMENTS) /* 4J-JEV: * We need more space in the profile data because of the new achievements * and statistics necessary for the new expanded achievement set. @@ -129,8 +122,8 @@ public: void HandleButtonPresses(); bool IntroRunning() { return m_bIntroRunning; } void SetIntroRunning(bool bSet) { m_bIntroRunning = bSet; } -#ifdef _CONTENT_PACKAGE -#ifndef _FINAL_BUILD +#if defined(_CONTENT_PACKAGE) +#if !defined(_FINAL_BUILD) bool PartnernetPasswordRunning() { return m_bPartnernetPasswordRunning; } void SetPartnernetPasswordRunning(bool bSet) { m_bPartnernetPasswordRunning = bSet; @@ -276,9 +269,6 @@ public: // debug -0 show safe area void ShowSafeArea(bool show) { -#if 0 - CXuiSceneBase::ShowSafeArea(show); -#endif } // 4J-PB - to capture the social post screenshot virtual void CaptureScreenshot(int iPad) {}; @@ -290,38 +280,11 @@ public: const unsigned short usVersion, const int iPad); -#if (0 || 0 || 0 || \ - 0) - std::wstring toStringOptionsStatus( - const C4JStorage::eOptionsCallback& eStatus); - static int DefaultOptionsCallback(void* pParam, - C4JStorage::PROFILESETTINGS* pSettings, - const int iPad); - int SetDefaultOptions(C4JStorage::PROFILESETTINGS* pSettings, - const int iPad, bool bWriteProfile = true); -#if 0 - static int OptionsDataCallback(void* pParam, int iPad, - unsigned short usVersion, - C4JStorage::eOptionsCallback eStatus, - int iBlocksRequired); - int GetOptionsBlocksRequired(int iPad); -#else - static int OptionsDataCallback(void* pParam, int iPad, - unsigned short usVersion, - C4JStorage::eOptionsCallback eStatus); -#endif - - C4JStorage::eOptionsCallback GetOptionsCallbackStatus(int iPad); - - void SetOptionsCallbackStatus(int iPad, - C4JStorage::eOptionsCallback eStatus); -#else static int DefaultOptionsCallback(void* pParam, C_4JProfile::PROFILESETTINGS* pSettings, const int iPad); int SetDefaultOptions(C_4JProfile::PROFILESETTINGS* pSettings, const int iPad); -#endif virtual void SetRichPresenceContext(int iPad, int contextId) = 0; void SetGameSettings(int iPad, eGameSetting eVal, unsigned char ucVal); @@ -408,18 +371,8 @@ public: static void UpsellReturnedCallback(void* pParam, eUpsellType type, eUpsellResponse result, int iUserData); -#if 0 || 0 || 0 - static int NowDisplayFullVersionPurchase(void* pParam, bool bContinue, - int iPad); - static int MustSignInFullVersionPurchaseReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result); -#endif -#if 0 || 0 || 0 - static int MustSignInFullVersionPurchaseReturnedExitTrial( - void* pParam, int iPad, C4JStorage::EMessageResult result); -#endif -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) bool DebugSettingsOn() { return m_bDebugOptions; } bool DebugArtToolsOn(); #else @@ -486,9 +439,7 @@ public: bool IsFileInTPD(int iConfig); void GetTPD(int iConfig, std::uint8_t** ppbData, unsigned int* pByteCount); int GetTPDSize() { return m_MEM_TPD.size(); } -#if 1 int GetTPConfigVal(WCHAR* pwchDataFile); -#endif bool DefaultCapeExists(); // void InstallDefaultCape(); // attempt to install the default cape once @@ -505,11 +456,7 @@ public: private: PlayerUID m_xuidNotch; -#if 0 - std::unordered_map m_GTS_Files; -#else std::unordered_map m_GTS_Files; -#endif // for storing memory textures - player skin std::unordered_map m_MEM_Files; @@ -535,10 +482,6 @@ public: void InvalidateBannedList(int iPad); void SetUniqueMapName(char* pszUniqueMapName); char* GetUniqueMapName(void); -#if 0 - void AddLevelToBannedLevelList(int iPad, PBANNEDLISTDATA pBannedListData, - bool bWriteToTMS); -#endif public: bool GetResourcesLoaded() { return m_bResourcesLoaded; } @@ -590,8 +533,8 @@ private: // bool m_bSplitScreenEnabled; -#ifdef _CONTENT_PACKAGE -#ifndef _FINAL_BUILD +#if defined(_CONTENT_PACKAGE) +#if !defined(_FINAL_BUILD) bool m_bPartnernetPasswordRunning; #endif #endif @@ -733,30 +676,12 @@ public: MOJANG_DATA* GetMojangDataForXuid(PlayerUID xuid); static HRESULT RegisterConfigValues(WCHAR* pType, int iValue); -#if 0 || 0 || 0 - HRESULT RegisterDLCData(char* pchDLCName, unsigned int uiSortIndex, - char* pchImageURL); - bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, - ULONGLONG* pullVal); - DLC_INFO* GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); - DLC_INFO* GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full); -#elif 0 - static HRESULT RegisterDLCData(eDLCContentType, WCHAR*, WCHAR*, WCHAR*, - WCHAR*, int, unsigned int); - // bool GetDLCFullOfferIDForSkinID(const std::wstring &FirstSkin,WCHAR - // *pwchProductId); - bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, - std::wstring& wsProductId); - DLC_INFO* GetDLCInfoForFullOfferID(WCHAR* pwchProductId); - DLC_INFO* GetDLCInfoForProductName(WCHAR* pwchProductName); -#else static HRESULT RegisterDLCData(WCHAR*, WCHAR*, int, uint64_t, uint64_t, WCHAR*, unsigned int, int, WCHAR* pDataFile); bool GetDLCFullOfferIDForSkinID(const std::wstring& FirstSkin, ULONGLONG* pullVal); DLC_INFO* GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial); DLC_INFO* GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full); -#endif unsigned int GetDLCCreditsCount(); SCreditTextItemDef* GetDLCCredits(int iIndex); @@ -781,26 +706,6 @@ public: private: std::vector vDLCCredits; -#if 0 || 0 || 0 - static std::unordered_map - MojangData; - static std::unordered_map - DLCTextures_PackID; // for mash-up packs & texture packs - static std::unordered_map DLCInfo; - static std::unordered_map - DLCInfo_SkinName; // skin name, full offer id -#elif 0 - static std::unordered_map - MojangData; - static std::unordered_map - DLCTextures_PackID; // for mash-up packs & texture packs - // static std::unordered_map DLCInfo_Trial; // - // full offerid, dlc_info - static std::unordered_map - DLCInfo_Full; // full offerid, dlc_info - static std::unordered_map - DLCInfo_SkinName; // skin name, full offer id -#else static std::unordered_map MojangData; static std::unordered_map DLCTextures_PackID; // for mash-up packs & texture packs @@ -810,7 +715,6 @@ private: DLCInfo_Full; // full offerid, dlc_info static std::unordered_map DLCInfo_SkinName; // skin name, full offer id -#endif // bool m_bRead_TMS_XUIDS_XML; // track whether we have already read the // TMS xuids.xml file bool m_bRead_TMS_DLCINFO_XML; // track whether // we have already read the TMS DLC.xml file @@ -869,7 +773,7 @@ private: unsigned int m_uiGameHostSettings; static unsigned char m_szPNG[8]; -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) unsigned int m_GameNewWorldSize; bool m_bGameNewWorldSizeUseMoat; unsigned int m_GameNewHellScale; @@ -884,7 +788,7 @@ public: unsigned int GetGameHostOption(unsigned int uiHostSettings, eGameHostOption eVal); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) void SetGameNewWorldSize(unsigned int newSize, bool useMoat) { m_GameNewWorldSize = newSize; m_bGameNewWorldSizeUseMoat = useMoat; @@ -962,39 +866,17 @@ public: unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote = false); int GetDLCInfoTexturesOffersCount(); -#if 0 || 0 || 0 - DLC_INFO* GetDLCInfo(int iIndex); - DLC_INFO* GetDLCInfo(char*); - DLC_INFO* GetDLCInfoFromTPackID(int iTPID); - bool GetDLCNameForPackID(const int iPackID, char** ppchKeyID); - char* GetDLCInfoTextures(int iIndex); - int GetDLCInfoCount(); -#else -#if 0 - static int TMSPPFileReturned(void* pParam, int iPad, int iUserData, void*, - WCHAR* wchFilename); - std::unordered_map* GetDLCInfo(); -#else static int TMSPPFileReturned(void* pParam, int iPad, int iUserData, C4JStorage::PTMSPP_FILEDATA pFileData, LPCSTR szFilename); -#endif DLC_INFO* GetDLCInfoTrialOffer(int iIndex); DLC_INFO* GetDLCInfoFullOffer(int iIndex); int GetDLCInfoTrialOffersCount(); int GetDLCInfoFullOffersCount(); -#if 0 - bool GetDLCFullOfferIDForPackID(const int iPackID, - std::wstring& wsProductId); - std::wstring GetDLCInfoTexturesFullOffer(int iIndex); - -#else bool GetDLCFullOfferIDForPackID(const int iPackID, ULONGLONG* pullVal); ULONGLONG GetDLCInfoTexturesFullOffer(int iIndex); -#endif -#endif void SetCorruptSaveDeleted(bool bVal) { m_bCorruptSaveDeleted = bVal; } bool GetCorruptSaveDeleted(void) { return m_bCorruptSaveDeleted; } @@ -1099,18 +981,7 @@ private: bool m_bResetNether; std::uint32_t m_dwRequiredTexturePackID; -#if 0 - std::vector m_vTMSPPData; -#endif -#if (0 || 0 || 0 || \ - 0) - C4JStorage::eOptionsCallback m_eOptionsStatusA[XUSER_MAX_COUNT]; - -#if 0 - int m_eOptionsBlocksRequiredA[XUSER_MAX_COUNT]; -#endif -#endif // 4J-PB - language and locale functions public: @@ -1133,28 +1004,12 @@ private: bool bAddDataFolder, std::wstring mountPoint); public: -#if 0 - // bool m_bTransferSavesToXboxOne; - // unsigned int m_uiTransferSlotC; - -#elif 0 - -#elif 0 - -#elif defined _WINDOWS64 +#if defined(_WINDOWS64) // CMinecraftAudio audio; -#else // PS4 +#else #endif -#if 0 -public: - void SetReachedMainMenu(); - bool HasReachedMainMenu(); - -private: - bool m_hasReachedMainMenu; -#endif }; // singleton diff --git a/Minecraft.Client/Platform/Common/DLC/DLCAudioFile.cpp b/Minecraft.Client/Platform/Common/DLC/DLCAudioFile.cpp index 892b09171..1550d88e2 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCAudioFile.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCAudioFile.cpp @@ -4,7 +4,7 @@ #include #include "DLCManager.h" #include "DLCAudioFile.h" -#if 0 || defined _WINDOWS64 +#if defined(_WINDOWS64) #include "../../Minecraft.Client/Platform/Common/XML/ATGXmlParser.h" #include "../../Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h" #endif diff --git a/Minecraft.Client/Platform/Common/DLC/DLCGameRulesHeader.cpp b/Minecraft.Client/Platform/Common/DLC/DLCGameRulesHeader.cpp index e52b46368..44851c826 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCGameRulesHeader.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCGameRulesHeader.cpp @@ -26,50 +26,6 @@ void DLCGameRulesHeader::addData(std::uint8_t* pbData, m_pbData = pbData; m_dataBytes = dataBytes; -#if 0 - byteArray data(m_pbData, m_dataBytes); - ByteArrayInputStream bais(data); - DataInputStream dis(&bais); - - // Init values. - int version_number; - byte compression_type; - std::wstring texturepackid; - - // Read Datastream. - version_number = dis.readInt(); - compression_type = dis.readByte(); - m_defaultSaveName = dis.readUTF(); - m_displayName = dis.readUTF(); - texturepackid = dis.readUTF(); - m_grfPath = dis.readUTF(); - - // Debug printout. - app.DebugPrintf ( - "DLCGameRulesHeader::readHeader:\n" - "\tversion_number = '%d',\n" - "\tcompression_type = '%d',\n" - "\tdefault_savename = '%s',\n" - "\tdisplayname = '%s',\n" - "\ttexturepackid = '%s',\n" - "\tgrf_path = '%s',\n", - - version_number, compression_type, - - wstringtofilename(m_defaultSaveName), - wstringtofilename(m_displayName), - wstringtofilename(texturepackid), - wstringtofilename(m_grfPath) - ); - - // Texture Pack. - m_requiredTexturePackId = _fromString(texturepackid); - m_bRequiresTexturePack = m_requiredTexturePackId > 0; - - dis.close(); - bais.close(); - bais.reset(); -#endif } std::uint8_t* DLCGameRulesHeader::getData(std::uint32_t& dataBytes) { diff --git a/Minecraft.Client/Platform/Common/DLC/DLCManager.cpp b/Minecraft.Client/Platform/Common/DLC/DLCManager.cpp index 7c4dfdd36..868c47855 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCManager.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCManager.cpp @@ -75,17 +75,11 @@ void ReadDlcStruct(T* out, const std::uint8_t* data, unsigned int offset = 0) { std::wstring getMountedDlcReadPath(const std::string& path) { std::wstring readPath = convStringToWstring(path); -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) const std::string mountedPath = StorageManager.GetMountedPath(path.c_str()); if (!mountedPath.empty()) { readPath = convStringToWstring(mountedPath); } -#elif 0 - const std::wstring mountedPath = - StorageManager.GetMountedPath(readPath.c_str()); - if (!mountedPath.empty()) { - readPath = mountedPath; - } #endif return readPath; @@ -235,23 +229,6 @@ DLCPack* DLCManager::getPack(const std::wstring& name) { return pack; } -#if 0 -DLCPack* DLCManager::getPackFromProductID(const std::wstring& productID) { - DLCPack* pack = NULL; - // DWORD currentIndex = 0; - DLCPack* currentPack = NULL; - for (AUTO_VAR(it, m_packs.begin()); it != m_packs.end(); ++it) { - currentPack = *it; - std::wstring wsName = currentPack->getPurchaseOfferId(); - - if (wsName.compare(productID) == 0) { - pack = currentPack; - break; - } - } - return pack; -} -#endif DLCPack* DLCManager::getPack(unsigned int index, EDLCType type /*= e_DLCType_All*/) { diff --git a/Minecraft.Client/Platform/Common/DLC/DLCManager.h b/Minecraft.Client/Platform/Common/DLC/DLCManager.h index 83a05309d..95ea04fba 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCManager.h +++ b/Minecraft.Client/Platform/Common/DLC/DLCManager.h @@ -77,9 +77,6 @@ public: void LanguageChanged(void); DLCPack* getPack(const std::wstring& name); -#if 0 - DLCPack* DLCManager::getPackFromProductID(const std::wstring& productID); -#endif DLCPack* getPack(unsigned int index, EDLCType type = e_DLCType_All); unsigned int getPackIndex(DLCPack* pack, bool& found, EDLCType type = e_DLCType_All); diff --git a/Minecraft.Client/Platform/Common/DLC/DLCPack.cpp b/Minecraft.Client/Platform/Common/DLC/DLCPack.cpp index 58b677f93..f85153f14 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCPack.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCPack.cpp @@ -15,32 +15,7 @@ DLCPack::DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask) { m_dataPath = L""; m_packName = name; m_dwLicenseMask = dwLicenseMask; -#if 0 - m_wsProductId = L""; -#else m_ullFullOfferId = 0LL; -#endif - m_isCorrupt = false; - m_packId = 0; - m_packVersion = 0; - m_parentPack = NULL; - m_dlcMountIndex = -1; -#if 0 - m_dlcDeviceID = XCONTENTDEVICE_ANY; -#endif - - // This pointer is for all the data used for this pack, so deleting it - // invalidates ALL of it's children. - m_data = NULL; -} - -#if 0 -DLCPack::DLCPack(const std::wstring& name, const std::wstring& productID, - std::uint32_t dwLicenseMask) { - m_dataPath = L""; - m_packName = name; - m_dwLicenseMask = dwLicenseMask; - m_wsProductId = productID; m_isCorrupt = false; m_packId = 0; m_packVersion = 0; @@ -51,7 +26,7 @@ DLCPack::DLCPack(const std::wstring& name, const std::wstring& productID, // invalidates ALL of it's children. m_data = NULL; } -#endif + DLCPack::~DLCPack() { for (AUTO_VAR(it, m_childPacks.begin()); it != m_childPacks.end(); ++it) { @@ -67,7 +42,7 @@ DLCPack::~DLCPack() { // This pointer is for all the data used for this pack, so deleting it // invalidates ALL of it's children. if (m_data) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf(L"Deleting data for DLC pack %ls\n", m_packName.c_str()); #endif // For the same reason, don't delete data pointer for any child pack as @@ -95,7 +70,7 @@ XCONTENTDEVICEID DLCPack::GetDLCDeviceID() { void DLCPack::addChildPack(DLCPack* childPack) { const std::uint32_t packId = childPack->GetPackId(); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (packId < 0 || packId > 15) { __debugbreak(); } @@ -176,15 +151,11 @@ DLCFile* DLCPack::addFile(DLCManager::EDLCType type, const std::wstring& path) { newFile = new DLCSkinFile(strippedPath); // check to see if we can get the full offer id using this skin name -#if 0 - app.GetDLCFullOfferIDForSkinID(strippedPath, m_wsProductId); -#else ULONGLONG ullVal = 0LL; if (app.GetDLCFullOfferIDForSkinID(strippedPath, &ullVal)) { m_ullFullOfferId = ullVal; } -#endif } break; case DLCManager::e_DLCType_Cape: { std::vector splitPath = stringSplit(path, L'/'); @@ -318,7 +289,7 @@ unsigned int DLCPack::getFileIndexAt(DLCManager::EDLCType type, const std::wstring& path, bool& found) { if (type == DLCManager::e_DLCType_All) { app.DebugPrintf("Unimplemented\n"); -#ifndef __CONTENT_PACKAGE +#if !defined(__CONTENT_PACKAGE) __debugbreak(); #endif return 0; @@ -343,12 +314,12 @@ bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type, const std::wstring& path) { if (type == DLCManager::e_DLCType_All) { app.DebugPrintf("Unimplemented\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return false; } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad()) & (1L << eDebugSetting_UnlockAllDLC)) { return true; diff --git a/Minecraft.Client/Platform/Common/DLC/DLCPack.h b/Minecraft.Client/Platform/Common/DLC/DLCPack.h index fe05ea580..ea3bd7402 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCPack.h +++ b/Minecraft.Client/Platform/Common/DLC/DLCPack.h @@ -19,11 +19,7 @@ private: std::uint32_t m_dwLicenseMask; int m_dlcMountIndex; XCONTENTDEVICEID m_dlcDeviceID; -#if 0 - std::wstring m_wsProductId; -#else ULONGLONG m_ullFullOfferId; -#endif bool m_isCorrupt; std::uint32_t m_packId; std::uint32_t m_packVersion; @@ -33,10 +29,6 @@ private: // deleting it invalidates ALL of it's children. public: DLCPack(const std::wstring& name, std::uint32_t dwLicenseMask); -#if 0 - DLCPack(const std::wstring& name, const std::wstring& productID, - std::uint32_t dwLicenseMask); -#endif ~DLCPack(); std::wstring getFullDataPath() { return m_dataPath; } @@ -76,11 +68,7 @@ public: std::wstring getName() { return m_packName; } void UpdateLanguage(); -#if 0 - std::wstring getPurchaseOfferId() { return m_wsProductId; } -#else ULONGLONG getPurchaseOfferId() { return m_ullFullOfferId; } -#endif DLCFile* addFile(DLCManager::EDLCType type, const std::wstring& path); DLCFile* getFile(DLCManager::EDLCType type, unsigned int index); diff --git a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp index a792b30da..4f1216294 100644 --- a/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp +++ b/Minecraft.Client/Platform/Common/DLC/DLCSkinFile.cpp @@ -107,14 +107,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, SKIN_BOX* pSkinBox = new SKIN_BOX; ZeroMemory(pSkinBox, sizeof(SKIN_BOX)); -#if 0 - // 4J Stu - The Xbox version used swscanf_s which isn't available in - // GCC. - swscanf(value.c_str(), L"%10ls%f%f%f%f%f%f%f%f", wchBodyPart, -#else swscanf_s( value.c_str(), L"%9ls%f%f%f%f%f%f%f%f", wchBodyPart, 10, -#endif &pSkinBox->fX, &pSkinBox->fY, &pSkinBox->fZ, &pSkinBox->fW, &pSkinBox->fH, &pSkinBox->fD, &pSkinBox->fU, &pSkinBox->fV); @@ -136,14 +130,8 @@ void DLCSkinFile::addParameter(DLCManager::EDLCParameterType type, m_AdditionalBoxes.push_back(pSkinBox); } break; case DLCManager::e_DLCParamType_Anim: { -#if 0 - // 4J Stu - The Xbox version used swscanf_s which isn't available in - // GCC. - swscanf(value.c_str(), L"%X", &m_uiAnimOverrideBitmask); -#else swscanf_s(value.c_str(), L"%X", &m_uiAnimOverrideBitmask, sizeof(unsigned int)); -#endif DWORD skinId = app.getSkinIdFromPath(m_path); app.SetAnimOverrideBitmask(skinId, m_uiAnimOverrideBitmask); break; diff --git a/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp index 4c37de5d2..e51ff9d2c 100644 --- a/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp @@ -434,7 +434,7 @@ bool GameRuleManager::readRuleFile( default: app.DebugPrintf("De-compressing game rules."); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) assert(compressionType == APPROPRIATE_COMPRESSION_TYPE); #endif // 4J-JEV: DecompressLZXRLE uses the correct platform specific @@ -627,46 +627,12 @@ void GameRuleManager::processSchematicsLighting(LevelChunk* levelChunk) { } void GameRuleManager::loadDefaultGameRules() { -#if 0 -#ifdef _TU_BUILD - std::wstring fileRoot = L"UPDATE:\\res\\GameRules\\Tutorial.pck"; -#else - std::wstring fileRoot = L"GAME:\\res\\TitleUpdate\\GameRules\\Tutorial.pck"; -#endif - File packedTutorialFile(fileRoot); - if (loadGameRulesPack(&packedTutorialFile)) { - m_levelGenerators.getLevelGenerators()->at(0)->setWorldName( - app.GetString(IDS_PLAY_TUTORIAL)); - // m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName(L"Tutorial"); - m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName( - app.GetString(IDS_TUTORIALSAVENAME)); - } -#ifndef _CONTENT_PACKAGE - // 4J Stu - Remove these just now - // File testRulesPath(L"GAME:\\GameRules"); - // std::vector *packFiles = testRulesPath.listFiles(); - - // for(AUTO_VAR(it,packFiles->begin()); it != packFiles->end(); ++it) - //{ - // loadGameRulesPack(*it); - // } - // delete packFiles; -#endif - -#else // 0 - -#ifndef __linux__ -#ifdef _WINDOWS64 +#if !defined(__linux__) +#if defined(_WINDOWS64) File packedTutorialFile(L"Windows64Media\\Tutorial\\Tutorial.pck"); if (!packedTutorialFile.exists()) packedTutorialFile = File(L"Windows64\\Tutorial\\Tutorial.pck"); -#elif 0 - File packedTutorialFile(L"/app0/orbis/Tutorial/Tutorial.pck"); -#elif 0 - File packedTutorialFile(L"PSVita/Tutorial/Tutorial.pck"); -#elif 0 - File packedTutorialFile(L"PS3/Tutorial/Tutorial.pck"); #else File packedTutorialFile(L"Tutorial\\Tutorial.pck"); #endif @@ -677,7 +643,7 @@ void GameRuleManager::loadDefaultGameRules() { m_levelGenerators.getLevelGenerators()->at(0)->setDefaultSaveName( app.GetString(IDS_TUTORIALSAVENAME)); } -#else // 4jcraft, TODO this is using old pre-TU19 logic for loading the tutorial, modify to use the above ifdefs +#else std::wstring fpTutorial = L"Tutorial.pck"; if(app.getArchiveFileSize(fpTutorial) >= 0) { @@ -692,7 +658,6 @@ void GameRuleManager::loadDefaultGameRules() { else delete pack; } #endif -#endif } bool GameRuleManager::loadGameRulesPack(File* path) { diff --git a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp index ea914a45f..d6a7dc9fd 100644 --- a/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp @@ -157,7 +157,7 @@ GameRuleDefinition* LevelGenerationOptions::addChild( rule = new StartFeature(); m_features.push_back((StartFeature*)rule); } else { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf( L"LevelGenerationOptions: Attempted to add invalid child rule - " L"%d\n", @@ -357,7 +357,7 @@ ConsoleSchematicFile* LevelGenerationOptions::loadSchematicFile( // If we have already loaded this, just return AUTO_VAR(it, m_schematics.find(filename)); if (it != m_schematics.end()) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) wprintf(L"We have already loaded schematic file %ls\n", filename.c_str()); #endif @@ -468,17 +468,10 @@ void LevelGenerationOptions::loadBaseSaveData() { mountIndex = m_parentDLCPack->GetDLCMountIndex(); if (mountIndex > -1) { -#if 0 - if (StorageManager.MountInstalledDLC( - ProfileManager.GetPrimaryPad(), mountIndex, - &LevelGenerationOptions::packMounted, this, - L"WPACK") != ERROR_IO_PENDING) -#else if (StorageManager.MountInstalledDLC( ProfileManager.GetPrimaryPad(), mountIndex, &LevelGenerationOptions::packMounted, this, "WPACK") != ERROR_IO_PENDING) -#endif { // corrupt DLC setLoadedData(); @@ -519,7 +512,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, dlcFile->getGrfPath(), true, L"WPACK:")); if (grf.exists()) { -#ifdef _UNICODE +#if defined(_UNICODE) std::wstring path = grf.getPath(); const WCHAR* pchFilename = path.c_str(); HANDLE fileHandle = CreateFile( @@ -577,7 +570,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, File save(app.getFilePath(lgo->m_parentDLCPack->GetPackID(), lgo->getBaseSavePath(), true, L"WPACK:")); if (save.exists()) { -#ifdef _UNICODE +#if defined(_UNICODE) std::wstring path = save.getPath(); const WCHAR* pchFilename = path.c_str(); HANDLE fileHandle = CreateFile( @@ -624,11 +617,7 @@ int LevelGenerationOptions::packMounted(LPVOID pParam, int iPad, DWORD dwErr, } } } -#if 0 - DWORD result = StorageManager.UnmountInstalledDLC(L"WPACK"); -#else DWORD result = StorageManager.UnmountInstalledDLC("WPACK"); -#endif } lgo->setLoadedData(); diff --git a/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.cpp b/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.cpp index 7cdef6114..b9a29cc43 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.cpp +++ b/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.cpp @@ -73,7 +73,6 @@ bool LeaderboardManager::ReadStats_TopRank(LeaderboardReadListener *listener, in return true; } -#if 1 void LeaderboardManager::printStats(ReadView &view) { app.DebugPrintf("[LeaderboardManager] Printing stats:\n" @@ -103,4 +102,3 @@ bool DebugReadListener::OnStatsReadComplete(LeaderboardManager::eStatsReturn suc } DebugReadListener *DebugReadListener::m_instance = new DebugReadListener(); -#endif \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.h b/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.h index dc8a363e9..94aa2545b 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.h +++ b/Minecraft.Client/Platform/Common/Leaderboards/LeaderboardManager.h @@ -133,10 +133,6 @@ public: public: -#if 0 - typedef XSESSION_VIEW_PROPERTIES *ViewIn; - typedef PXUSER_STATS_READ_RESULTS ViewOut; -#else static const int RECORD_SIZE = 40; //base32 typedef struct StatsData @@ -187,7 +183,6 @@ public: typedef ReadView ViewOut; typedef RegisterScore *ViewIn; -#endif public: @@ -243,26 +238,18 @@ public: virtual bool isIdle() = 0; public: -#if 1 static void printStats(ReadView &view); -#endif }; class LeaderboardReadListener { public: -#if 0 - virtual bool OnStatsReadComplete(bool success, int numResults, LeaderboardManager::ViewOut results) = 0; -#else virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results) = 0; -#endif }; -#if 1 class DebugReadListener : public LeaderboardReadListener { public: virtual bool OnStatsReadComplete(LeaderboardManager::eStatsReturn ret, int numResults, LeaderboardManager::ViewOut results); static DebugReadListener *m_instance; }; -#endif diff --git a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp index 647765570..fad568f89 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp +++ b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.cpp @@ -13,18 +13,7 @@ #include "../../../../Minecraft.World/Util/StringHelpers.h" -#if 0 -#include "Orbis/OrbisExtras/ShutdownManager.h" -#include "Orbis/Orbis_App.h" -#elif 0 -#include "PSVita/PSVitaExtras/ShutdownManager.h" -#include "PSVita/PSVita_App.h" -#elif 0 -#include "PS3/PS3Extras/ShutdownManager.h" -#include "PS3/PS3_App.h" -#else #error "SonyLeaderboardManager is included for a non-sony platform." -#endif SonyLeaderboardManager::SonyLeaderboardManager() { m_eStatsState = eStatsState_Idle; @@ -194,66 +183,6 @@ HRESULT SonyLeaderboardManager::fillByIdsQuery(const SceNpId& myNpId, switch (m_eFilterMode) { case eFM_Friends: { // 4J-JEV: Implementation for Orbis & Vita as they a very similar. -#if (0) || (0) - - sce::Toolkit::NP::Utilities::Future - s_friendList; - ret = getFriendsList(s_friendList); - - if (ret != SCE_TOOLKIT_NP_SUCCESS) { - // Error handling - if (m_eStatsState != eStatsState_Canceled) - m_eStatsState = eStatsState_Failed; - app.DebugPrintf( - "[SonyLeaderboardManager] 'getFriendslist' fail, 0x%x.\n", - ret); - return false; - } else if (s_friendList.hasResult()) { - // 4J-JEV: Friends list doesn't include player, leave space for - // them. - len = s_friendList.get()->size() + 1; - - npIds = new SceNpId[len]; - - int i = 0; - - sce::Toolkit::NP::FriendsList::const_iterator itr; - for (itr = s_friendList.get()->begin(); - itr != s_friendList.get()->end(); itr++) { - npIds[i] = itr->npid; - i++; - } - - npIds[len - 1] = - myNpId; // 4J-JEV: Append player to end of query. - } else { - // 4J-JEV: Something terrible must have happend, - // 'getFriendslist' was supposed to be a synchronous operation. - __debugbreak(); - - // 4J-JEV: We can at least fall-back to just the players score. - len = 1; - npIds = new SceNpId[1]; - - npIds[0] = myNpId; - } - -#elif (0) - // PS3 - - // 4J-JEV: Doesn't include the player (its just their friends). - ret = sceNpBasicGetFriendListEntryCount(&len); - len += 1; - - npIds = new SceNpId[len]; - - for (uint32_t i = 0; i < len - 1; i++) { - ret = sceNpBasicGetFriendListEntry(i, npIds + i); - if (ret < 0) return ret; - } - npIds[len - 1] = myNpId; // 4J-JEV: Append player to end of query. - -#endif } break; case eFM_MyScore: { len = 1; @@ -295,9 +224,6 @@ bool SonyLeaderboardManager::getScoreByIds() { ProfileManager.GetSceNpId(0, &myNpId); ret = fillByIdsQuery(myNpId, npIds, num); -#if 0 - if (ret < 0) goto error2; -#endif ptr = new SceNpScorePlayerRankData[num]; comments = new SceNpScoreComment[num]; @@ -316,9 +242,6 @@ bool SonyLeaderboardManager::getScoreByIds() { int boardId = getBoardId(m_difficulty, m_statsType); // 4J-JEV: Orbis can only do with 100 ids max, so we use batches. -#if 0 - for (int batch = 0; batch < num; batch += 100) { -#endif ret = createTransactionContext(m_titleContext); if (m_eStatsState == eStatsState_Canceled) { // Cancel operation has been called, abort. @@ -352,29 +275,14 @@ bool SonyLeaderboardManager::getScoreByIds() { m_requestId = ret; } -#if 0 - int tmpNum = std::min(num - batch, (unsigned int)100); - app.DebugPrintf( - "[SonyLeaderboardManager]\t Requesting ids %i-%i of %i.\n", batch, - batch + tmpNum, num); -#else int tmpNum = num; -#endif ret = sceNpScoreGetRankingByNpId( m_requestId, boardId, // BoardId -#if 0 - batch + npIds, sizeof(SceNpId) * tmpNum, // IN: Player IDs - batch + ptr, - sizeof(SceNpScorePlayerRankData) * tmpNum, // OUT: Rank Data - batch + comments, - sizeof(SceNpScoreComment) * tmpNum, // OUT: Comments -#else npIds, sizeof(SceNpId) * tmpNum, // IN: Player IDs ptr, sizeof(SceNpScorePlayerRankData) * tmpNum, // OUT: Rank Data comments, sizeof(SceNpScoreComment) * tmpNum, // OUT: Comments -#endif NULL, 0, // GameData. (unused) @@ -407,9 +315,6 @@ bool SonyLeaderboardManager::getScoreByIds() { destroyTransactionContext(m_requestId); m_requestId = 0; -#if 0 - } -#endif m_readCount = num; @@ -640,9 +545,7 @@ bool SonyLeaderboardManager::setScore() { &tmp, // OUT: current rank, -#if 1 NULL, // compareDate -#endif NULL // Reserved, specify null. ); @@ -1029,7 +932,7 @@ void SonyLeaderboardManager::fromSymbols(char* str) { } bool SonyLeaderboardManager::test_string(std::string testing) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) static SceNpScoreComment comment; ZeroMemory(&comment, sizeof(SceNpScoreComment)); memcpy(&comment, testing.c_str(), SCE_NP_SCORE_COMMENT_MAXLEN); diff --git a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h index fa8ad7817..de6a4386e 100644 --- a/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h +++ b/Minecraft.Client/Platform/Common/Leaderboards/SonyLeaderboardManager.h @@ -2,11 +2,7 @@ #include "Common/Leaderboards/LeaderboardManager.h" -#if 0 -typedef CellRtcTick SonyRtcTick; -#else typedef SceRtcTick SonyRtcTick; -#endif class SonyLeaderboardManager : public LeaderboardManager { protected: @@ -135,11 +131,6 @@ protected: virtual HRESULT fillByIdsQuery(const SceNpId& myNpId, SceNpId*& npIds, uint32_t& len); -#if (0) || (0) - virtual HRESULT getFriendsList( - sce::Toolkit::NP::Utilities::Future& - friendsList) = 0; -#endif virtual char* getComment(SceNpScoreComment* comment) = 0; }; diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp index 81599bc5e..e88a072fc 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp @@ -28,14 +28,9 @@ #include "../GameRules/ConsoleGameRules.h" #include "GameNetworkManager.h" -#if !(0) #include "../UI/UI.h" #include "../UI/UIScene_PauseMenu.h" -#endif -#if 0 -#include "../../Minecraft.World/Stats/DurangoStats.h" -#endif // Global instance CGameNetworkManager g_NetworkManager; @@ -72,32 +67,6 @@ void CGameNetworkManager::Terminate() { } void CGameNetworkManager::DoWork() { -#if 0 - // did we get any notifications from the game listener? - if (app.GetNotifications()->size() != 0) { - PNOTIFICATION pNotification = app.GetNotifications()->back(); - - switch (pNotification->dwNotification) { - case XN_LIVE_LINK_STATE_CHANGED: { - int iPrimaryPlayer = g_NetworkManager.GetPrimaryPad(); - bool bConnected = (pNotification->uiParam != 0) ? true : false; - if ((g_NetworkManager.GetLockedProfile() != -1) && - iPrimaryPlayer != -1 && bConnected == false && - g_NetworkManager.IsInSession()) { - app.SetAction(iPrimaryPlayer, - eAppAction_EthernetDisconnected); - } - } break; - case XN_LIVE_INVITE_ACCEPTED: - s_pPlatformNetworkManager->Notify(pNotification->dwNotification, - pNotification->uiParam); - break; - } - - app.GetNotifications()->pop_back(); - delete pNotification; - } -#endif s_pPlatformNetworkManager->DoWork(); } @@ -141,9 +110,6 @@ bool CGameNetworkManager::_RunNetworkGame(void* lpParameter) { bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, void* lpParameter) { -#if 0 - ProfileManager.SetDeferredSignoutEnabled(true); -#endif int64_t seed = 0; if (lpParameter != NULL) { @@ -165,18 +131,7 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, // Load the tutorial save data here if (param->levelGen->requiresBaseSave() && !param->levelGen->getBaseSavePath().empty()) { -#if 0 -#ifdef _TU_BUILD - std::wstring fileRoot = - L"UPDATE:\\res\\GameRules\\" + - param->levelGen->getBaseSavePath(); -#else - std::wstring fileRoot = - L"GAME:\\res\\TitleUpdate\\GameRules\\" + - param->levelGen->getBaseSavePath(); -#endif -#else -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) std::wstring fileRoot = L"Windows64Media\\Tutorial\\" + param->levelGen->getBaseSavePath(); @@ -184,26 +139,13 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, if (!root.exists()) fileRoot = L"Windows64\\Tutorial\\" + param->levelGen->getBaseSavePath(); -#elif 0 - std::wstring fileRoot = - L"/app0/orbis/Tutorial/" + - param->levelGen->getBaseSavePath(); -#elif 0 - std::wstring fileRoot = - L"PSVita/Tutorial/" + - param->levelGen->getBaseSavePath(); -#elif 0 - std::wstring fileRoot = - L"PS3/Tutorial/" + - param->levelGen->getBaseSavePath(); #else std::wstring fileRoot = L"Tutorial\\" + param->levelGen->getBaseSavePath(); -#endif #endif File grf(fileRoot); if (grf.exists()) { -#ifdef _UNICODE +#if defined(_UNICODE) std::wstring path = grf.getPath(); const WCHAR* pchFilename = path.c_str(); HANDLE fileHandle = CreateFile( @@ -272,9 +214,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, C4JThread* thread = new C4JThread(&CGameNetworkManager::ServerThreadProc, lpParameter, "Server", 256 * 1024); -#if 0 || 0 - thread->SetPriority(THREAD_PRIORITY_BELOW_NORMAL); -#endif //0 thread->SetProcessor(CPU_CORE_SERVER); thread->Run(); @@ -292,7 +231,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, Socket::Initialise(NULL); } -#if 1 Minecraft* pMinecraft = Minecraft::GetInstance(); app.DebugPrintf("[NET] IsReadyToPlayOrIdle=%d IsInSession=%d\n", IsReadyToPlayOrIdle(), IsInSession()); @@ -313,7 +251,6 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, if (changedMessage) { pMinecraft->progressRenderer->progressStagePercentage(100); } -#endif // If we aren't in session, then something bad must have happened - we // aren't joining, creating or ready play @@ -518,19 +455,12 @@ bool CGameNetworkManager::StartNetworkGame(Minecraft* minecraft, !connection->isClosed(), ProfileManager.IsSignedIn(idx), !g_NetworkManager.IsLeavingGame()); -#if 0 || 0 - } while (IsInSession() && !connection->isStarted() && - !connection->isClosed() && - ProfileManager.IsSignedIn(idx) && - !g_NetworkManager.IsLeavingGame()); -#else // TODO - This SHOULD be something just like the code above but // temporarily changing here so that we don't have to depend on // the profilemanager behaviour } while (IsInSession() && !connection->isStarted() && !connection->isClosed() && !g_NetworkManager.IsLeavingGame()); -#endif // 4J Stu - Fix for #11279 - CRASH: TCR 001: BAS Game Stability: // Signing out of game will cause title to crash We need to break @@ -619,12 +549,6 @@ INetworkPlayer* CGameNetworkManager::GetPlayerBySmallId(unsigned char smallId) { return s_pPlatformNetworkManager->GetPlayerBySmallId(smallId); } -#if 0 -std::wstring CGameNetworkManager::GetDisplayNameByGamertag( - std::wstring gamertag) { - return s_pPlatformNetworkManager->GetDisplayNameByGamertag(gamertag); -} -#endif INetworkPlayer* CGameNetworkManager::GetHostPlayer() { return s_pPlatformNetworkManager->GetHostPlayer(); @@ -763,9 +687,6 @@ CGameNetworkManager::eJoinGameResult CGameNetworkManager::JoinGame( } void CGameNetworkManager::CancelJoinGame(void* lpParam) { -#if 0 - s_pPlatformNetworkManager->CancelJoinGame(); -#endif } bool CGameNetworkManager::LeaveGame(bool bMigrateHost) { @@ -779,18 +700,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam, INVITE_INFO* pInviteInfo = (INVITE_INFO*)pParam; if (bContinue == true) { -#if 0 - // Check if PSN is unavailable because of age restriction - int npAvailability = ProfileManager.getNPAvailability(iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - - return 0; - } -#endif app.DebugPrintf("JoinFromInvite_SignInReturned, iPad %d\n", iPad); // It's possible that the player has not signed in - they can back out @@ -814,13 +723,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam, // Check if user-created content is allowed, as we cannot play // multiplayer if it's not bool noUGC = false; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions(iPad, false, &noUGC, - NULL, NULL); -#elif 0 - ProfileManager.GetChatAndContentRestrictions(iPad, false, NULL, - &noUGC, NULL); -#endif if (noUGC) { int messageText = @@ -838,15 +740,6 @@ int CGameNetworkManager::JoinFromInvite_SignInReturned(void* pParam, uiIDA, 1, ProfileManager.GetPrimaryPad()); } else { -#if 0 || 0 - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - iPad, false, &chatRestricted, NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - 0, ProfileManager.GetPrimaryPad()); - } -#endif ProfileManager.SetLockedProfile(iPad); ProfileManager.SetPrimaryPad(iPad); @@ -939,11 +832,6 @@ int CGameNetworkManager::RunNetworkGameThreadProc(void* lpParameter) { return -1; } -#if 0 - // 4J-JEV: Wait for the loading/saving to finish. - while (StorageManager.GetSaveState() != C4JStorage::ESaveGame_Idle) - Sleep(10); -#endif Tile::ReleaseThreadStorage(); return 0; @@ -1010,138 +898,12 @@ int CGameNetworkManager::ExitAndJoinFromInviteThreadProc(void* lpParam) { // Xbox should always be online when receiving invites - on PS3 we need to // check & ask the user to sign in -#if !0 && !0 JoinFromInviteData* inviteData = (JoinFromInviteData*)lpParam; app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite, lpParam); -#else - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())) { - JoinFromInviteData* inviteData = (JoinFromInviteData*)lpParam; - app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite, - lpParam); - } else { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, - uiIDA, 2, ProfileManager.GetPrimaryPad(), - &CGameNetworkManager::MustSignInReturned_0, - lpParam); - } -#endif return S_OK; } -#if 0 || 0 || 0 -// This case happens when we have been returned from the game to the main menu -// after receiving an invite and are now trying to go back in to join the new -// game The pair of methods MustSignInReturned_0 & PSNSignInReturned_0 handle -// this -int CGameNetworkManager::MustSignInReturned_0( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_0, pParam, true); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_0, pParam, true); -#elif 0 - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_0, pParam, true); -#endif - } else { - app.SetAction(0, eAppAction_Idle); - ui.NavigateToHomeMenu(); - ui.UpdatePlayerBasePositions(); - } - - return 0; -} - -int CGameNetworkManager::PSNSignInReturned_0(void* pParam, bool bContinue, - int iPad) { - JoinFromInviteData* inviteData = (JoinFromInviteData*)pParam; - - // If the invite data isn't set up yet (indicated by it being all zeroes, - // easiest detected via the net version), then try and get it again... this - // can happen if we got the invite whilst signed out - - if (bContinue) { - if (inviteData->pInviteInfo->netVersion == 0) { -#if 0 || defined __VITA__ - if (!SQRNetworkManager_PS3::UpdateInviteData( - (SQRNetworkManager::PresenceSyncInfo*) - inviteData->pInviteInfo)) { - bContinue = false; - } -#elif 0 - // TODO: No Orbis equivalent (should there be?) -#endif - } - } - - if (bContinue) { - app.SetAction(inviteData->dwUserIndex, eAppAction_JoinFromInvite, - pParam); - } else { - app.SetAction(inviteData->dwUserIndex, eAppAction_Idle); - ui.NavigateToHomeMenu(); - ui.UpdatePlayerBasePositions(); - } - - return 0; -} - -// This case happens when we were in the main menus when we got an invite, and -// weren't signed in... now can proceed with the normal flow of code for this -// situation The pair of methods MustSignInReturned_1 & PSNSignInReturned_1 -// handle this -int CGameNetworkManager::MustSignInReturned_1( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_1, pParam, true); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_1, pParam, true); -#elif 0 - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &CGameNetworkManager::PSNSignInReturned_1, pParam, true); -#endif - } - return 0; -} - -int CGameNetworkManager::PSNSignInReturned_1(void* pParam, bool bContinue, - int iPad) { - INVITE_INFO* inviteInfo = (INVITE_INFO*)pParam; - - // If the invite data isn't set up yet (indicated by it being all zeroes, - // easiest detected via the net version), then try and get it again... this - // can happen if we got the invite whilst signed out - - if (bContinue) { - if (inviteInfo->netVersion == 0) { -#if 0 || defined __VITA__ - if (!SQRNetworkManager_PS3::UpdateInviteData( - (SQRNetworkManager::PresenceSyncInfo*)inviteInfo)) { - bContinue = false; - } -#elif 0 - // TODO: No Orbis equivalent (should there be?) -#endif - } - } - - if (bContinue) { - g_NetworkManager.HandleInviteWhenInMenus(0, inviteInfo); - } - - return 0; -} -#endif void CGameNetworkManager::_LeaveGame() { s_pPlatformNetworkManager->_LeaveGame(false, true); @@ -1157,56 +919,10 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) { Minecraft* pMinecraft = Minecraft::GetInstance(); MinecraftServer* pServer = MinecraftServer::getInstance(); -#if 0 || 0 || 0 - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - if (g_NetworkManager.m_bLastDisconnectWasLostRoomOnly) { - if (g_NetworkManager.m_bSignedOutofPSN) { - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, IDS_ERROR_PSN_SIGN_OUT, - uiIDA, 1, ProfileManager.GetPrimaryPad()); - } else { - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_ERROR_NETWORK_TITLE, - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } - } else { - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_CONNECTION_LOST, - g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT), - uiIDA, 1, ProfileManager.GetPrimaryPad()); - } - - // Swap these two messages around as one is too long to display at 480 - pMinecraft->progressRenderer->progressStartNoAbort( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - pMinecraft->progressRenderer->progressStage( - -1); // g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT) - // ); -#elif 0 - if (g_NetworkManager.m_bFullSessionMessageOnNextSessionChange) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME, IDS_IN_PARTY_SESSION_FULL, - uiIDA, 1, ProfileManager.GetPrimaryPad()); - pMinecraft->progressRenderer->progressStartNoAbort( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - pMinecraft->progressRenderer->progressStage(-1); - } else { pMinecraft->progressRenderer->progressStartNoAbort( g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)); pMinecraft->progressRenderer->progressStage( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - } - -#else - pMinecraft->progressRenderer->progressStartNoAbort( - g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)); - pMinecraft->progressRenderer->progressStage( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); -#endif while (app.GetXuiServerAction(ProfileManager.GetPrimaryPad()) != eXuiServerAction_Idle && @@ -1219,41 +935,13 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) { // wait for the server to be in a non-ticking state pServer->m_serverPausedEvent->WaitForSignal(INFINITE); -#if 0 || 0 || 0 - // Swap these two messages around as one is too long to display at 480 - pMinecraft->progressRenderer->progressStartNoAbort( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - pMinecraft->progressRenderer->progressStage( - -1); // g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT) - // ); -#elif 0 - if (g_NetworkManager.m_bFullSessionMessageOnNextSessionChange) { - pMinecraft->progressRenderer->progressStartNoAbort( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - pMinecraft->progressRenderer->progressStage(-1); - } else { pMinecraft->progressRenderer->progressStartNoAbort( g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)); pMinecraft->progressRenderer->progressStage( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); - } -#else - pMinecraft->progressRenderer->progressStartNoAbort( - g_NetworkManager.CorrectErrorIDS(IDS_CONNECTION_LOST_LIVE_NO_EXIT)); - pMinecraft->progressRenderer->progressStage( - IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME); -#endif pMinecraft->progressRenderer->progressStagePercentage(25); -#if 0 - // wait for any players that were being added, to finish doing this. On XB1, - // if we don't do this then there's an async thread running doing this, - // which could then finish at any inappropriate time later - while (s_pPlatformNetworkManager->IsAddingPlayer()) { - Sleep(1); - } -#endif // Null the network player of all the server players that are local, to stop // them being removed from the server when removed from the session @@ -1348,9 +1036,6 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) { DisconnectPacket:: eDisconnect_ConnectionCreationFailed)) { pMinecraft->removeLocalPlayerIdx(index); -#if 0 - ProfileManager.RemoveGamepadFromGame(index); -#endif } } } @@ -1358,22 +1043,18 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc(void* lpParam) { pMinecraft->progressRenderer->progressStagePercentage(100); -#if 1 // Make sure that we have transitioned through any joining/creating stages // so we're actually ready to set to play while (!s_pPlatformNetworkManager->IsReadyToPlayOrIdle()) { Sleep(10); } -#endif s_pPlatformNetworkManager->_StartGame(); -#if 1 // Wait until the message box has been closed while (ui.IsSceneInStack(XUSER_INDEX_ANY, eUIScene_MessageBox)) { Sleep(10); } -#endif // Start the game again app.SetGameStarted(true); @@ -1400,24 +1081,6 @@ std::wstring CGameNetworkManager::GatherStats() { } void CGameNetworkManager::renderQueueMeter() { -#if 0 - int height = 720; - - CGameNetworkManager::byteQueue[(CGameNetworkManager::messageQueuePos) & - (CGameNetworkManager::messageQueue_length - - 1)] = - GetHostPlayer()->GetSendQueueSizeBytes(NULL, false); - CGameNetworkManager::messageQueue - [(CGameNetworkManager::messageQueuePos++) & - (CGameNetworkManager::messageQueue_length - 1)] = - GetHostPlayer()->GetSendQueueSizeMessages(NULL, false); - - Minecraft* pMinecraft = Minecraft::GetInstance(); - pMinecraft->gui->renderGraph(CGameNetworkManager::messageQueue_length, - CGameNetworkManager::messageQueuePos, - CGameNetworkManager::messageQueue, 10, 1000, - CGameNetworkManager::byteQueue, 100, 25000); -#endif } std::wstring CGameNetworkManager::GatherRTTStats() { @@ -1469,10 +1132,6 @@ void CGameNetworkManager::StateChange_JoiningToIdle( } void CGameNetworkManager::StateChange_AnyToStarting() { -#if 0 || 0 || 0 - app.getRemoteStorage()->shutdown(); // shut the remote storage lib down and - // hopefully get our 7mb back -#endif if (!g_NetworkManager.IsHost()) { LoadingInputParams* loadingParams = new LoadingInputParams(); @@ -1634,22 +1293,6 @@ void CGameNetworkManager::PlayerJoining(INetworkPlayer* pNetworkPlayer) { TelemetryManager->RecordPlayerSessionStart( pNetworkPlayer->GetUserIndex()); } -#if 0 - else { - if (!pNetworkPlayer->IsHost()) { - for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { - if (Minecraft::GetInstance()->localplayers[idx] != NULL) { - TelemetryManager->RecordLevelStart( - idx, eSen_FriendOrMatch_Playing_With_Invited_Friends, - eSen_CompeteOrCoop_Coop_and_Competitive, - Minecraft::GetInstance()->level->difficulty, - app.GetLocalPlayerCount(), - g_NetworkManager.GetOnlinePlayerCount()); - } - } - } - } -#endif } void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) { @@ -1660,20 +1303,6 @@ void CGameNetworkManager::PlayerLeaving(INetworkPlayer* pNetworkPlayer) { TelemetryManager->RecordPlayerSessionExit( pNetworkPlayer->GetUserIndex(), app.GetDisconnectReason()); } -#if 0 - else { - for (int idx = 0; idx < XUSER_MAX_COUNT; ++idx) { - if (Minecraft::GetInstance()->localplayers[idx] != NULL) { - TelemetryManager->RecordLevelStart( - idx, eSen_FriendOrMatch_Playing_With_Invited_Friends, - eSen_CompeteOrCoop_Coop_and_Competitive, - Minecraft::GetInstance()->level->difficulty, - app.GetLocalPlayerCount(), - g_NetworkManager.GetOnlinePlayerCount()); - } - } - } -#endif } void CGameNetworkManager::HostChanged() { @@ -1714,54 +1343,19 @@ void CGameNetworkManager::GameInviteReceived(int userIndex, bool bContentRestricted = false; bool pccAllowed = true; bool pccFriendsAllowed = true; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions(userIndex, false, &noUGC, - &bContentRestricted, NULL); -#else ProfileManager.AllowedPlayerCreatedContent( ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed); if (!pccAllowed && !pccFriendsAllowed) noUGC = true; -#endif -#if 0 || 0 - if (joiningUsers > 1 && !RenderManager.IsHiDef() && - userIndex != ProfileManager.GetPrimaryPad()) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - - // 4J-PB - it's possible there is no primary pad here, when accepting an - // invite from the dashboard - ui.RequestErrorMessage(IDS_CONNECTION_FAILED, - IDS_CONNECTION_FAILED_NO_SD_SPLITSCREEN, uiIDA, - 1, XUSER_INDEX_ANY); - } else -#endif if (noUGC) { -#if 0 - // showing the system message for chat restriction here instead now, to - // fix FQA bug report - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); -#else int messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; if (joiningUsers > 1) messageText = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_ALL_LOCAL; ui.RequestUGCMessageBox(IDS_CONNECTION_FAILED, messageText, XUSER_INDEX_ANY); -#endif } -#if 0 || 0 - else if (bContentRestricted) { - int messageText = IDS_CONTENT_RESTRICTION; - if (joiningUsers > 1) messageText = IDS_CONTENT_RESTRICTION_MULTIPLAYER; - - ui.RequestContentRestrictedMessageBox(IDS_CONNECTION_FAILED, - messageText, XUSER_INDEX_ANY); - } -#endif else if (noPrivileges) { unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -1776,42 +1370,8 @@ void CGameNetworkManager::GameInviteReceived(int userIndex, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1, XUSER_INDEX_ANY); } else { -#if 0 || 0 - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &chatRestricted, NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); - } -#endif if (!g_NetworkManager.IsInSession()) { -#if 0 || 0 - // PS3 is more complicated here - we need to make sure that the - // player is online. If they are then we can do the same as the - // xbox, if not we need to try and get them online and then, if they - // do sign in, go down the same path - - // Determine why they're not "signed in live" - // MGH - On Vita we need to add a new message at some point for - // connecting when already signed in - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad())) { - HandleInviteWhenInMenus(userIndex, pInviteInfo); - } else { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &CGameNetworkManager::MustSignInReturned_1, - (void*)pInviteInfo); - } - -#else HandleInviteWhenInMenus(userIndex, pInviteInfo); -#endif } else { app.DebugPrintf( "We are already in a multiplayer game...need to leave it\n"); @@ -1823,10 +1383,6 @@ void CGameNetworkManager::GameInviteReceived(int userIndex, // pInviteInfo; // tell the app to process this -#if 0 - if (((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager) - ->checkValidInviteData(pInviteInfo)) -#endif { app.ProcessInvite(userIndex, localUsersMask, pInviteInfo); } @@ -1840,12 +1396,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus( int userIndex, const INVITE_INFO* pInviteInfo) { // We are in the root menus somewhere -#if 0 - while( waitHere ) - { - Sleep(1); - } -#endif // if this is the trial game, then we need the user to unlock the full game if (!ProfileManager.IsFullVersion()) { @@ -1854,9 +1404,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus( app.SetAction(userIndex, eAppAction_DashboardTrialJoinFromInvite); } else { -#if 1 ProfileManager.SetPrimaryPad(userIndex); -#endif // 4J Stu - If we accept an invite from the main menu before going to // play game we need to load the DLC These checks are done within the @@ -1870,12 +1418,7 @@ void CGameNetworkManager::HandleInviteWhenInMenus( // as the main player might sign out in the sign-in ui // ProfileManager.SetLockedProfile(-1); -#if 0 - if ((!app.IsLocalMultiplayerAvailable()) && - InputManager.IsPadLocked(userIndex)) -#else if (!app.IsLocalMultiplayerAvailable()) -#endif { bool noPrivileges = !ProfileManager.AllowedToPlayMultiplayer(userIndex); @@ -1917,12 +1460,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus( } else { // the FromInvite will make the lib decide how many panes to display // based on connected pads/signed in players -#if 0 - ProfileManager.RequestSignInUI( - true, false, false, false, false, - &CGameNetworkManager::JoinFromInvite_SignInReturned, - (void*)pInviteInfo, userIndex); -#else SignInInfo info; info.Func = &CGameNetworkManager::JoinFromInvite_SignInReturned; info.lpParam = (void*)pInviteInfo; @@ -1931,7 +1468,6 @@ void CGameNetworkManager::HandleInviteWhenInMenus( ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_QuadrantSignin, &info, eUILayer_Alert, eUIGroup_Fullscreen); -#endif } } } @@ -1944,20 +1480,13 @@ void CGameNetworkManager::AddLocalPlayerFailed(int idx, : DisconnectPacket::eDisconnect_ConnectionCreationFailed); } -#if 0 || 0 || 0 -void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly, bool bPSNSignout) -#else void CGameNetworkManager::HandleDisconnect(bool bLostRoomOnly) -#endif { int iPrimaryPlayer = g_NetworkManager.GetPrimaryPad(); if ((g_NetworkManager.GetLockedProfile() != -1) && iPrimaryPlayer != -1 && g_NetworkManager.IsInSession()) { m_bLastDisconnectWasLostRoomOnly = bLostRoomOnly; -#if 0 || 0 || 0 - m_bSignedOutofPSN = bPSNSignout; -#endif app.SetAction(iPrimaryPlayer, eAppAction_EthernetDisconnected); } else { m_bLastDisconnectWasLostRoomOnly = false; @@ -2040,9 +1569,7 @@ void CGameNetworkManager::ServerStoppedWait() { if (C4JThread::isMainThread()) { int result = WAIT_TIMEOUT; do { -#if 1 RenderManager.StartFrame(); -#endif result = m_hServerStoppedEvent->WaitForSignal(20); // Tick some simple things ProfileManager.Tick(); @@ -2077,26 +1604,7 @@ int CGameNetworkManager::GetJoiningReadyPercentage() { return s_pPlatformNetworkManager->GetJoiningReadyPercentage(); } -#if 1 void CGameNetworkManager::FakeLocalPlayerJoined() { s_pPlatformNetworkManager->FakeLocalPlayerJoined(); } -#endif -#if 0 -bool CGameNetworkManager::usingAdhocMode() { - return ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager) - ->usingAdhocMode(); -} - -void CGameNetworkManager::setAdhocMode(bool bAdhoc) { - ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager) - ->setAdhocMode(bAdhoc); -} - -void CGameNetworkManager::startAdhocMatching() { - ((CPlatformNetworkManagerSony*)s_pPlatformNetworkManager) - ->startAdhocMatching(); -} - -#endif diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.h b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.h index 3bf54a02c..295111c6e 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.h +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.h @@ -1,7 +1,7 @@ #pragma once // using namespace std; #include -#ifndef __linux__ +#if !defined(__linux__) #include #endif #include "../../Minecraft.World/Util/C4JThread.h" @@ -122,15 +122,6 @@ public: static int ServerThreadProc(void* lpParameter); static int ExitAndJoinFromInviteThreadProc(void* lpParam); -#if (0) || (0) || (0) - static int MustSignInReturned_0(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int PSNSignInReturned_0(void* pParam, bool bContinue, int iPad); - - static int MustSignInReturned_1(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int PSNSignInReturned_1(void* pParam, bool bContinue, int iPad); -#endif static void _LeaveGame(); static int ChangeSessionTypeThreadProc(void* lpParam); @@ -154,11 +145,6 @@ public: void ServerStoppedDestroy(); // Destroy signal bool ServerStoppedValid(); // Is non-NULL -#if 0 - static bool usingAdhocMode(); - static void setAdhocMode(bool bAdhoc); - static void startAdhocMatching(); -#endif // Debug output std::wstring GatherStats(); @@ -192,11 +178,7 @@ private: void GameInviteReceived(int userIndex, const INVITE_INFO* pInviteInfo); void HandleInviteWhenInMenus(int userIndex, const INVITE_INFO* pInviteInfo); void AddLocalPlayerFailed(int idx, bool serverFull = false); -#if 0 || 0 || 0 - void HandleDisconnect(bool bLostRoomOnly, bool bPSNSignOut); -#else void HandleDisconnect(bool bLostRoomOnly); -#endif int GetPrimaryPad(); int GetLockedProfile(); @@ -208,12 +190,6 @@ private: C4JThread::Event* m_hServerReadyEvent; bool m_bInitialised; -#if 0 -public: - void SetFullSessionMessageOnNextSessionChange() { - m_bFullSessionMessageOnNextSessionChange = true; - } -#endif private: float m_lastPlayerEventTimeStart; // For telemetry static CPlatformNetworkManager* s_pPlatformNetworkManager; @@ -221,20 +197,11 @@ private: int GetJoiningReadyPercentage(); bool m_bLastDisconnectWasLostRoomOnly; bool m_bFullSessionMessageOnNextSessionChange; -#if 0 || 0 || 0 - bool m_bSignedOutofPSN; -#endif public: -#if 1 void FakeLocalPlayerJoined(); // Temporary method whilst we don't have real // networking to make this happen -#endif }; extern CGameNetworkManager g_NetworkManager; -#if 0 -#undef __in -#define __out -#endif diff --git a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h index 1ec155cd6..90e8bc536 100644 --- a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h +++ b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerInterface.h @@ -1,9 +1,9 @@ #pragma once // using namespace std; #include -#ifndef __linux__ +#if !defined(__linux__) #include -#endif // __linux__ +#endif #include "../../Minecraft.World/Util/C4JThread.h" #include "NetworkPlayerInterface.h" #include "SessionInfo.h" @@ -138,13 +138,8 @@ public: void* pParam) = 0; virtual void ForceFriendsSessionRefresh() = 0; -#if 1 virtual void FakeLocalPlayerJoined() { }; // Temporary method whilst we don't have real networking to make this // happen -#endif -#if 0 - virtual std::wstring GetDisplayNameByGamertag(std::wstring gamertag) = 0; -#endif }; diff --git a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerStub.h b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerStub.h index 330f6c34f..7392ac585 100644 --- a/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerStub.h +++ b/Minecraft.Client/Platform/Common/Network/PlatformNetworkManagerStub.h @@ -193,9 +193,7 @@ public: private: void NotifyPlayerJoined(IQNetPlayer* pQNetPlayer); -#if 1 void FakeLocalPlayerJoined() { NotifyPlayerJoined(m_pIQNet->GetLocalPlayerByUserIndex(0)); } -#endif }; diff --git a/Minecraft.Client/Platform/Common/Network/SessionInfo.h b/Minecraft.Client/Platform/Common/Network/SessionInfo.h index 2b364e2b7..497cd17ca 100644 --- a/Minecraft.Client/Platform/Common/Network/SessionInfo.h +++ b/Minecraft.Client/Platform/Common/Network/SessionInfo.h @@ -1,66 +1,8 @@ #pragma once -#if 0 || 0 -#include "Sony/SQRNetworkManager.h" -#endif // A struct that we store in the QoS data when we are hosting the session. Max // size 1020 bytes. -#if 0 -typedef struct _GameSessionData { - unsigned short netVersion; // 2 bytes - char hostName[XUSER_NAME_SIZE]; // 16 bytes ( 16*1 ) - GameSessionUID hostPlayerUID; // 8 bytes ( 8*1 ) on xbox, 24 bytes on PS3 - GameSessionUID - players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 ( - // 24*8) on PS3 - char szPlayers[MINECRAFT_NET_MAX_PLAYERS] - [XUSER_NAME_SIZE]; // 128 bytes ( 8*16) - unsigned int m_uiGameHostSettings; // 4 bytes - unsigned int texturePackParentId; // 4 bytes - unsigned char subTexturePackId; // 1 byte - - bool isJoinable; // 1 byte - - _GameSessionData() { - netVersion = 0; - memset(hostName, 0, XUSER_NAME_SIZE); - memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0])); - memset(szPlayers, 0, MINECRAFT_NET_MAX_PLAYERS * XUSER_NAME_SIZE); - isJoinable = true; - m_uiGameHostSettings = 0; - texturePackParentId = 0; - subTexturePackId = 0; - } -} GameSessionData; -#elif 0 || 0 || 0 -typedef struct _GameSessionData { - unsigned short netVersion; // 2 bytes - GameSessionUID hostPlayerUID; // 8 bytes ( 8*1 ) on xbox, 24 bytes on PS3 - GameSessionUID - players[MINECRAFT_NET_MAX_PLAYERS]; // 64 bytes ( 8*8 ) on xbox, 192 ( - // 24*8) on PS3 - unsigned int m_uiGameHostSettings; // 4 bytes - unsigned int texturePackParentId; // 4 bytes - unsigned char subTexturePackId; // 1 byte - - bool isJoinable; // 1 byte - - unsigned char playerCount; // 1 byte - bool isReadyToJoin; // 1 byte - - _GameSessionData() { - netVersion = 0; - memset(players, 0, MINECRAFT_NET_MAX_PLAYERS * sizeof(players[0])); - isJoinable = true; - m_uiGameHostSettings = 0; - texturePackParentId = 0; - subTexturePackId = 0; - playerCount = 0; - isReadyToJoin = false; - } -} GameSessionData; -#else typedef struct _GameSessionData { unsigned short netVersion; // 2 bytes unsigned int m_uiGameHostSettings; // 4 bytes @@ -76,18 +18,10 @@ typedef struct _GameSessionData { subTexturePackId = 0; } } GameSessionData; -#endif class FriendSessionInfo { public: SessionID sessionId; -#if 0 - XSESSION_SEARCHRESULT searchResult; -#elif 0 || 0 || 0 - SQRNetworkManager::SessionSearchResult searchResult; -#elif 0 - DQRNetworkManager::SessionSearchResult searchResult; -#endif wchar_t* displayLabel; unsigned char displayLabelLength; unsigned char displayLabelViewableStartIndex; diff --git a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp index 48a5daf2e..2fd26bbfc 100644 --- a/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp +++ b/Minecraft.Client/Platform/Common/Telemetry/TelemetryManager.cpp @@ -8,11 +8,9 @@ #include "TelemetryManager.h" -#if !0 && !0 CTelemetryManager *TelemetryManager = new CTelemetryManager(); -#endif HRESULT CTelemetryManager::Init() { @@ -286,13 +284,7 @@ int CTelemetryManager::GetMultiplayerInstanceID() int CTelemetryManager::GenerateMultiplayerInstanceId() { -#if 0 || 0 - FILETIME SystemTimeAsFileTime; - GetSystemTimeAsFileTime( &SystemTimeAsFileTime ); - return static_cast(SystemTimeAsFileTime.dwLowDateTime); -#else return 0; -#endif } void CTelemetryManager::SetMultiplayerInstanceId(int value) diff --git a/Minecraft.Client/Platform/Common/Tutorial/FullTutorial.cpp b/Minecraft.Client/Platform/Common/Tutorial/FullTutorial.cpp index be859c20f..4686a4055 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/FullTutorial.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/FullTutorial.cpp @@ -38,22 +38,6 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/) e_Tutorial_Completion_Jump_To_Last_Task, eTelemetryTutorial_TrialStart)); } else { -#if 0 - if (getCompleted(eTutorial_Telemetry_Halfway) && - !isStateCompleted(e_Tutorial_State_Redstone_And_Piston)) { - addTask(e_Tutorial_State_Gameplay, - new ChoiceTask(this, IDS_TUTORIAL_NEW_FEATURES_CHOICE, - IDS_TUTORIAL_PROMPT_NEW_FEATURES_CHOICE, - true, ACTION_MENU_A, ACTION_MENU_B, - e_Tutorial_Completion_Jump_To_Last_Task, - eTelemetryTutorial_TrialStart)); - } - - addTask(e_Tutorial_State_Gameplay, - new InfoTask(this, IDS_TUTORIAL_TASK_OVERVIEW, - IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, - ACTION_MENU_A)); -#else if (getCompleted(eTutorial_Telemetry_Halfway)) { addTask(e_Tutorial_State_Gameplay, new ChoiceTask(this, IDS_TUTORIAL_TASK_OVERVIEW, @@ -67,7 +51,6 @@ FullTutorial::FullTutorial(int iPad, bool isTrial /*= false*/) IDS_TUTORIAL_PROMPT_PRESS_A_TO_CONTINUE, true, ACTION_MENU_A)); } -#endif } int lookMappings[] = {MINECRAFT_ACTION_LOOK_UP, MINECRAFT_ACTION_LOOK_DOWN, diff --git a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp index 23752eda7..0b4e6fbea 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp @@ -378,9 +378,6 @@ Tutorial::Tutorial(int iPad, bool isFullTutorial /*= false*/) : m_iPad(iPad) { m_CurrentState = e_Tutorial_State_Gameplay; m_hasStateChanged = false; -#if 0 - m_hTutorialScene = NULL; -#endif for (unsigned int i = 0; i < e_Tutorial_State_Max; ++i) { currentTask[i] = NULL; @@ -1956,14 +1953,8 @@ Tutorial::~Tutorial() { } void Tutorial::debugResetPlayerSavedProgress(int iPad) { -#if (0 || 0 || 0 || \ - 0) - GAME_SETTINGS* pGameSettings = - (GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(iPad); -#else GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(iPad); -#endif ZeroMemory(pGameSettings->ucTutorialCompletion, TUTORIAL_PROFILE_STORAGE_BYTES); pGameSettings->uiSpecialTutorialBitmask = 0; @@ -1987,14 +1978,8 @@ void Tutorial::setCompleted(int completableId) { if (completableIndex >= 0 && completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) { // Set the bit for this position -#if (0 || 0 || 0 || \ - 0) - GAME_SETTINGS* pGameSettings = - (GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(m_iPad); -#else GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad); -#endif int arrayIndex = completableIndex >> 3; int bitIndex = 7 - (completableIndex % 8); pGameSettings->ucTutorialCompletion[arrayIndex] |= 1 << bitIndex; @@ -2022,14 +2007,8 @@ bool Tutorial::getCompleted(int completableId) { completableIndex < TUTORIAL_PROFILE_STORAGE_BITS) { // Read the bit for this position // Retrieve the data pointer from the profile -#if (0 || 0 || 0 || \ - 0) - GAME_SETTINGS* pGameSettings = - (GAME_SETTINGS*)StorageManager.GetGameDefinedProfileData(m_iPad); -#else GAME_SETTINGS* pGameSettings = (GAME_SETTINGS*)ProfileManager.GetGameDefinedProfileData(m_iPad); -#endif int arrayIndex = completableIndex >> 3; int bitIndex = 7 - (completableIndex % 8); return (pGameSettings->ucTutorialCompletion[arrayIndex] & @@ -2147,37 +2126,12 @@ void Tutorial::tick() { } if (!hasRequestedUI) { -#if 0 - m_bSceneIsSplitscreen = app.GetLocalPlayerCount() > 1; - if (m_bSceneIsSplitscreen) { - app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, (void*)this, - false, false, &m_hTutorialScene); - } else { - app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, (void*)this, - false, false, &m_hTutorialScene); - } -#else ui.SetTutorial(m_iPad, this); -#endif hasRequestedUI = true; } else { // if we've changed mode, we may need to change scene if (m_bSceneIsSplitscreen != (app.GetLocalPlayerCount() > 1)) { -#if 0 - app.TutorialSceneNavigateBack(m_iPad); - m_bSceneIsSplitscreen = app.GetLocalPlayerCount() > 1; - if (m_bSceneIsSplitscreen) { - app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, - (void*)this, false, false, - &m_hTutorialScene); - } else { - app.NavigateToScene(m_iPad, eUIComponent_TutorialPopup, - (void*)this, false, false, - &m_hTutorialScene); - } -#else ui.SetTutorial(m_iPad, this); -#endif } } @@ -2979,22 +2933,15 @@ void Tutorial::addMessage( new TutorialMessage(messageId, limitRepeats, numRepeats); } -#if 0 -void Tutorial::changeTutorialState(eTutorial_State newState, - CXuiScene* scene /*= NULL*/) -#else void Tutorial::changeTutorialState(eTutorial_State newState, UIScene* scene /*= NULL*/) -#endif { if (newState == m_CurrentState) { // If clearing the scene, make sure that the tutorial popup has its // reference to this scene removed -#if 1 if (scene == NULL) { ui.RemoveInteractSceneReference(m_iPad, m_UIScene); } -#endif m_UIScene = scene; return; } @@ -3037,11 +2984,9 @@ void Tutorial::changeTutorialState(eTutorial_State newState, // If clearing the scene, make sure that the tutorial popup has its // reference to this scene removed -#if 1 if (scene == NULL) { ui.RemoveInteractSceneReference(m_iPad, m_UIScene); } -#endif m_UIScene = scene; if (m_CurrentState != newState) { diff --git a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h index 126c899d9..94e027447 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h +++ b/Minecraft.Client/Platform/Common/Tutorial/Tutorial.h @@ -67,10 +67,6 @@ private: static int m_iTutorialFreezeTimeValue; eTutorial_State m_CurrentState; bool m_hasStateChanged; -#if 0 - HXUIOBJ - m_hTutorialScene; // to store the popup scene (splitscreen or normal) -#endif bool m_bSceneIsSplitscreen; bool m_bHasTickedOnce; @@ -113,11 +109,7 @@ private: bool hasRequestedUI; bool uiTempDisabled; -#if 0 - CXuiScene* m_UIScene; -#else UIScene* m_UIScene; -#endif int m_iPad; @@ -143,11 +135,7 @@ public: void setCompleted(int completableId); bool getCompleted(int completableId); -#if 0 - void changeTutorialState(eTutorial_State newState, CXuiScene* scene = NULL); -#else void changeTutorialState(eTutorial_State newState, UIScene* scene = NULL); -#endif bool isSelectedItemState(); bool setMessage(PopupMessageDetails* message); @@ -198,11 +186,7 @@ public: std::vector* getTasks(); unsigned int getCurrentTaskIndex(); -#if 0 - CXuiScene* getScene() { return m_UIScene; } -#else UIScene* getScene() { return m_UIScene; } -#endif eTutorial_State getCurrentState() { return m_CurrentState; } // These are required so that we have a consistent mapping of the completion diff --git a/Minecraft.Client/Platform/Common/Tutorial/XuiCraftingTask.cpp b/Minecraft.Client/Platform/Common/Tutorial/XuiCraftingTask.cpp index e7c05e7da..0259d192b 100644 --- a/Minecraft.Client/Platform/Common/Tutorial/XuiCraftingTask.cpp +++ b/Minecraft.Client/Platform/Common/Tutorial/XuiCraftingTask.cpp @@ -1,23 +1,15 @@ #include "../../Minecraft.World/Platform/stdafx.h" #include "../../Minecraft.World/Items/ItemInstance.h" -#if !(0) && !(0) #include "../UI/UI.h" -#endif #include "Tutorial.h" #include "XuiCraftingTask.h" bool XuiCraftingTask::isCompleted() { -#if 1 // This doesn't seem to work // IUIScene_CraftingMenu *craftScene = // reinterpret_cast(tutorial->getScene()); -#if 0 - CXuiSceneCraftingPanel* craftScene = - (CXuiSceneCraftingPanel*)(tutorial->getScene()); -#else UIScene_CraftingMenu* craftScene = reinterpret_cast(tutorial->getScene()); -#endif bool completed = false; @@ -36,7 +28,4 @@ bool XuiCraftingTask::isCompleted() { } return completed; -#else - return true; -#endif } diff --git a/Minecraft.Client/Platform/Common/UI/IUIController.h b/Minecraft.Client/Platform/Common/UI/IUIController.h index 70b01d718..60d79ccef 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIController.h +++ b/Minecraft.Client/Platform/Common/UI/IUIController.h @@ -57,9 +57,6 @@ public: virtual void HandleDLCMountingComplete() = 0; virtual void HandleDLCInstalled(int iPad) = 0; -#if 0 - virtual void HandleDLCLicenseChange() = 0; -#endif virtual void HandleTMSDLCFileRetrieved(int iPad) = 0; virtual void HandleTMSBanFileRetrieved(int iPad) = 0; virtual void HandleInventoryUpdated(int iPad) = 0; diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp index 5030106e4..db0aa476d 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -9,9 +9,6 @@ #include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h" #include "../../Minecraft.Client/Minecraft.h" -#if 0 -#include -#endif IUIScene_AbstractContainerMenu::IUIScene_AbstractContainerMenu() { m_menu = NULL; @@ -65,23 +62,18 @@ void IUIScene_AbstractContainerMenu::Initialize( m_bNavigateBack = bNavigateBack; // Put the pointer over first item in use row to start with. -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) m_eCurrSection = firstSection; m_eCurrTapState = eTapStateNoInput; m_iCurrSlotX = 0; m_iCurrSlotY = 0; -#endif // TAP_DETECTION +#endif // // for(int i=0;itouchNum > 0)) { - if (m_bFirstTouchStored[iPad] == false) { - m_oldvTouchPos.x = (float)pTouchPadData->touch[0].x; - m_oldvTouchPos.y = (float)pTouchPadData->touch[0].y; - m_oldvPointerPos.x = vPointerPos.x; - m_oldvPointerPos.y = vPointerPos.y; - m_bFirstTouchStored[iPad] = true; - } - - // should take the average of multiple touch points - - float fNewX = (((float)pTouchPadData->touch[0].x) - m_oldvTouchPos.x) * - m_fTouchPadMulX; - float fNewY = (((float)pTouchPadData->touch[0].y) - m_oldvTouchPos.y) * - m_fTouchPadMulY; - // relative positions - needs a deadzone - - if (fNewX > m_fTouchPadDeadZoneX) { - vPointerPos.x = m_oldvPointerPos.x + - ((fNewX - m_fTouchPadDeadZoneX) * - ((float)app.GetGameSettings( - iPad, eGameSetting_Sensitivity_InMenu) / - 100.0f)); - } else if (fNewX < -m_fTouchPadDeadZoneX) { - vPointerPos.x = m_oldvPointerPos.x + - ((fNewX + m_fTouchPadDeadZoneX) * - ((float)app.GetGameSettings( - iPad, eGameSetting_Sensitivity_InMenu) / - 100.0f)); - } - - if (fNewY > m_fTouchPadDeadZoneY) { - vPointerPos.y = m_oldvPointerPos.y + - ((fNewY - m_fTouchPadDeadZoneY) * - ((float)app.GetGameSettings( - iPad, eGameSetting_Sensitivity_InMenu) / - 100.0f)); - } else if (fNewY < -m_fTouchPadDeadZoneY) { - vPointerPos.y = m_oldvPointerPos.y + - ((fNewY + m_fTouchPadDeadZoneY) * - ((float)app.GetGameSettings( - iPad, eGameSetting_Sensitivity_InMenu) / - 100.0f)); - } - - // Clamp to pointer extents. - if (vPointerPos.x < m_fPointerMinX) - vPointerPos.x = m_fPointerMinX; - else if (vPointerPos.x > m_fPointerMaxX) - vPointerPos.x = m_fPointerMaxX; - if (vPointerPos.y < m_fPointerMinY) - vPointerPos.y = m_fPointerMinY; - else if (vPointerPos.y > m_fPointerMaxY) - vPointerPos.y = m_fPointerMaxY; - - bStickInput = true; - m_eCurrTapState = eTapStateNoInput; - } else { - // reset the touch flag - m_bFirstTouchStored[iPad] = false; - -#endif // If there is any input on sticks, move the pointer. if ((fabs(fInputX) >= 0.01f) || (fabs(fInputY) >= 0.01f)) { @@ -337,7 +257,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { : (fInputY < 0.0f) ? -1.0f : 0.0f; -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) // Check for potential tap input to jump slot. ETapState eNewTapInput = GetTapInputType(fInputX, fInputY); @@ -363,7 +283,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { default: break; } -#endif // TAP_DETECTION +#endif // Square it so we get more precision for small inputs. fInputX = fInputX * fInputX * fInputDirX * POINTER_SPEED_FACTOR; @@ -380,7 +300,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { fInputScale = ((float)(m_iConsectiveInputTicks) / (float)(MAX_INPUT_TICKS_FOR_SCALING)); } -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) else if (m_iConsectiveInputTicks < MAX_INPUT_TICKS_FOR_TAPPING) { ++m_iConsectiveInputTicks; } else { @@ -396,7 +316,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { fInputX *= fInputScale; fInputY *= fInputScale; -#ifdef USE_POINTER_ACCEL +#if defined(USE_POINTER_ACCEL) m_fPointerAccelX += fInputX / 50.0f; m_fPointerAccelY += fInputY / 50.0f; @@ -436,7 +356,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { bStickInput = true; } else { m_iConsectiveInputTicks = 0; -#ifdef USE_POINTER_ACCEL +#if defined(USE_POINTER_ACCEL) m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; @@ -444,9 +364,6 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { #endif } -#if 0 - } -#endif // Determine which slot the pointer is currently over. ESceneSection eSectionUnderPointer = eSectionNone; @@ -549,7 +466,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { bPointerIsOverSlot = true; -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) // Have we actually changed slot? If so, input cannot be // a tap. if ((eSectionUnderPointer != m_eCurrSection) || @@ -562,7 +479,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { m_eCurrSection = eSectionUnderPointer; m_iCurrSlotX = iNewSlotX; m_iCurrSlotY = iNewSlotY; -#endif // TAP_DETECTION +#endif // No need to check any further slots, the pointer can only ever be over // one. break; @@ -578,7 +495,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { // If we are not over any slot, set focus elsewhere. if (eSectionUnderPointer == eSectionNone) { setFocusToPointer(getPad()); -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) // Input cannot be a tap. m_eCurrTapState = eTapNone; @@ -586,7 +503,7 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { m_eCurrSection = eSectionNone; m_iCurrSlotX = -1; m_iCurrSlotY = -1; -#endif // TAP_DETECTION +#endif } else { if (!bStickInput) { // Did we get a tap input? @@ -848,11 +765,6 @@ void IUIScene_AbstractContainerMenu::onMouseTick() { buttonX = eToolTipPickUpHalf; } -#if 0 - if (!InputManager.IsVitaTV()) { - buttonBack = eToolTipWhatIsThis; - } else -#endif { buttonRT = eToolTipWhatIsThis; } @@ -1180,11 +1092,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, } } -#if 0 - ui.AnimateKeyPress(iPad, iAction); -#else ui.AnimateKeyPress(iPad, iAction, bRepeat, true, false); -#endif int buttonNum = 0; // 0 = LeftMouse, 1 = RightMouse BOOL quickKeyHeld = FALSE; // Represents shift key on PC @@ -1196,15 +1104,12 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, // if(pMinecraft->player->GetXboxPad()!=pInputData->UserIndex) return S_OK; switch (iAction) { -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) case ACTION_MENU_OTHER_STICK_PRESS: itemEditorKeyPress = TRUE; break; #endif case ACTION_MENU_A: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (!bRepeat) { validKeyPress = true; @@ -1357,7 +1262,7 @@ bool IUIScene_AbstractContainerMenu::handleKeyDown(int iPad, int iAction, } bHandled = true; } -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) else if (itemEditorKeyPress == TRUE) { if (IsSectionSlotList(m_eCurrSection)) { ItemEditorInput* initData = new ItemEditorInput(); diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.h b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.h index 07a365fe4..030aa1755 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.h +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_AbstractContainerMenu.h @@ -164,20 +164,6 @@ protected: int m_iCurrSlotX; int m_iCurrSlotY; -#if 0 - bool - m_bFirstTouchStored[XUSER_MAX_COUNT]; // monitor the first position of - // a touch, so we can use - // relative distances of movement - UIVec2D m_oldvPointerPos; - UIVec2D m_oldvTouchPos; - // store the multipliers to map the UI window to the touchpad window - float m_fTouchPadMulX; - float m_fTouchPadMulY; - float m_fTouchPadDeadZoneX; // usese the multipliers - float m_fTouchPadDeadZoneY; - -#endif // ENum indexes of the first section for this scene, and 1+the last section ESceneSection m_eFirstSection, m_eMaxSection; @@ -216,7 +202,7 @@ protected: ETapState eTapDirection, int* piTargetX, int* piTargetY, int xOffset = 0, int yOffset = 0); -#ifdef TAP_DETECTION +#if defined(TAP_DETECTION) ETapState GetTapInputType(float fInputX, float fInputY); #endif diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_CraftingMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_CraftingMenu.cpp index 4a6bd90c5..c398b7379 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_CraftingMenu.cpp @@ -166,9 +166,6 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { bHandled = true; break; case ACTION_MENU_A: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif // Do some crafting! if (m_pPlayer && m_pPlayer->inventory) { // RecipyList *recipes = ((Recipes @@ -463,9 +460,6 @@ bool IUIScene_CraftingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { (!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) { bNoScrollSlots = true; } -#if 0 - bNoScrollSlots = true; -#endif // 4J Stu - We did used to swap the thumsticks based on Southpaw in this // scene, but ONLY in this scene @@ -855,7 +849,7 @@ void IUIScene_CraftingMenu::CheckRecipesAvailable() { iHSlotBrushControl++; } else { app.DebugPrintf("Need more H slots - "); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) OutputDebugStringW( app.GetString(pTempItemInst->getDescriptionId())); #endif @@ -1016,9 +1010,6 @@ void IUIScene_CraftingMenu::UpdateVerticalSlots() { (!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())) { bNoScrollSlots = true; } -#if 0 - bNoScrollSlots = true; -#endif for (int i = 0; i < iSlots; i++) { // 4J this check determines if the crafting scene has only one @@ -1305,7 +1296,7 @@ void IUIScene_CraftingMenu::UpdateDescriptionText(bool bCanBeMade) { setDescriptionText(wsText.c_str()); } else { /// Missing string! -#ifdef _DEBUG +#if defined(_DEBUG) setDescriptionText( L"This is some placeholder description text about the " L"craftable item."); diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp index 28a3773b4..9c7c8061b 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp @@ -211,43 +211,8 @@ void IUIScene_CreativeMenu::staticCtor() { ITEM_AUX(Tile::woolCarpet_Id, 13) // Green ITEM_AUX(Tile::woolCarpet_Id, 12) // Brown -#if 0 - ITEM_AUX(Tile::stained_glass_Id,14) // Red - ITEM_AUX(Tile::stained_glass_Id,1) // Orange - ITEM_AUX(Tile::stained_glass_Id,4) // Yellow - ITEM_AUX(Tile::stained_glass_Id,5) // Lime - ITEM_AUX(Tile::stained_glass_Id,3) // Light Blue - ITEM_AUX(Tile::stained_glass_Id,9) // Cyan - ITEM_AUX(Tile::stained_glass_Id,11) // Blue - ITEM_AUX(Tile::stained_glass_Id,10) // Purple - ITEM_AUX(Tile::stained_glass_Id,2) // Magenta - ITEM_AUX(Tile::stained_glass_Id,6) // Pink - ITEM_AUX(Tile::stained_glass_Id,0) // White - ITEM_AUX(Tile::stained_glass_Id,8) // Light Gray - ITEM_AUX(Tile::stained_glass_Id,7) // Gray - ITEM_AUX(Tile::stained_glass_Id,15) // Black - ITEM_AUX(Tile::stained_glass_Id,13) // Green - ITEM_AUX(Tile::stained_glass_Id,12) // Brown - ITEM_AUX(Tile::stained_glass_pane_Id,14) // Red - ITEM_AUX(Tile::stained_glass_pane_Id,1) // Orange - ITEM_AUX(Tile::stained_glass_pane_Id,4) // Yellow - ITEM_AUX(Tile::stained_glass_pane_Id,5) // Lime - ITEM_AUX(Tile::stained_glass_pane_Id,3) // Light Blue - ITEM_AUX(Tile::stained_glass_pane_Id,9) // Cyan - ITEM_AUX(Tile::stained_glass_pane_Id,11) // Blue - ITEM_AUX(Tile::stained_glass_pane_Id,10) // Purple - ITEM_AUX(Tile::stained_glass_pane_Id,2) // Magenta - ITEM_AUX(Tile::stained_glass_pane_Id,6) // Pink - ITEM_AUX(Tile::stained_glass_pane_Id,0) // White - ITEM_AUX(Tile::stained_glass_pane_Id,8) // Light Gray - ITEM_AUX(Tile::stained_glass_pane_Id,7) // Gray - ITEM_AUX(Tile::stained_glass_pane_Id,15) // Black - ITEM_AUX(Tile::stained_glass_pane_Id,13) // Green - ITEM_AUX(Tile::stained_glass_pane_Id,12) // Brown -#endif - -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) DEF(eCreativeInventory_ArtToolsDecorations) if (app.DebugSettingsOn()) { for (unsigned int i = 0; i < Painting::LAST_VALUE; ++i) { @@ -427,7 +392,7 @@ void IUIScene_CreativeMenu::staticCtor() { BuildFirework(list, FireworksItem::TYPE_STAR, DyePowderItem::YELLOW, 2, false, true, DyePowderItem::ORANGE); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) DEF(eCreativeInventory_ArtToolsMisc) if (app.DebugSettingsOn()) { ITEM_AUX(Item::spawnEgg_Id, @@ -543,7 +508,7 @@ void IUIScene_CreativeMenu::staticCtor() { new EnchantmentInstance(enchantment, enchantment->getMaxLevel()))); } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn()) { std::shared_ptr debugSword = std::shared_ptr( @@ -826,7 +791,7 @@ void IUIScene_CreativeMenu::staticCtor() { specs[eCreativeInventoryTab_BuildingBlocks] = new TabSpec( L"Structures", IDS_GROUPNAME_BUILDING_BLOCKS, 1, blocksGroup); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) ECreative_Inventory_Groups decorationsGroup[] = { eCreativeInventory_Decoration}; ECreative_Inventory_Groups debugDecorationsGroup[] = { @@ -880,7 +845,7 @@ void IUIScene_CreativeMenu::staticCtor() { // potionsGroup); // } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) ECreative_Inventory_Groups miscGroup[] = {eCreativeInventory_Misc}; ECreative_Inventory_Groups debugMiscGroup[] = { eCreativeInventory_ArtToolsMisc}; @@ -1057,7 +1022,7 @@ void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu* menu, } } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugArtToolsOn()) { if (m_debugGroupsCount > 0) { startIndex = 0; @@ -1104,7 +1069,7 @@ void IUIScene_CreativeMenu::TabSpec::populateMenu(AbstractContainerMenu* menu, } unsigned int IUIScene_CreativeMenu::TabSpec::getPageCount() { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugArtToolsOn()) { return (int)ceil((float)(m_staticItems + m_debugItems) / m_staticPerPage); diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_EnchantingMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_EnchantingMenu.cpp index 7604b4b0d..8e932e713 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_EnchantingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_EnchantingMenu.cpp @@ -95,12 +95,6 @@ void IUIScene_EnchantingMenu::handleOtherClicked(int iPad, int buttonNum, bool quickKey) { int index = -1; // Old xui code -#if 0 - HXUIOBJ hFocusObject = GetFocus(iPad); - if(hFocusObject == m_enchant1->m_hObj) index = 0; - else if(hFocusObject == m_enchant2->m_hObj) index = 1; - else if(hFocusObject == m_enchant3->m_hObj) index = 2; -#endif switch (eSection) { case eSectionEnchantButton1: diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp index 7b4e90e14..e96bd4c91 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_PauseMenu.cpp @@ -14,12 +14,8 @@ int IUIScene_PauseMenu::ExitGameDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; -#else IUIScene_PauseMenu* pScene = dynamic_cast( ui.GetSceneFromCallbackId((std::size_t)pParam)); -#endif // Results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { @@ -31,12 +27,8 @@ int IUIScene_PauseMenu::ExitGameDialogReturned( int IUIScene_PauseMenu::ExitGameSaveDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; -#else IUIScene_PauseMenu* pScene = dynamic_cast( ui.GetSceneFromCallbackId((std::size_t)pParam)); -#endif // Exit with or without saving // Decline means save in this dialog @@ -56,21 +48,6 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned( ->getDLCInfoParentPack(); // tPack->getDLCPack(); if (!pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture, L"")) { -#if 0 - // upsell - ULONGLONG ullOfferID_Full; - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - app.GetDLCFullOfferIDForPackID( - pDLCTexPack->getDLCParentPackId(), &ullOfferID_Full); - - // tell sentient about the upsell of the full version of the - // skin pack - TelemetryManager->RecordUpsellPresented( - iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; @@ -105,9 +82,6 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned( &IUIScene_PauseMenu::ExitGameAndSaveReturned, pParam); return 0; } else { -#if 0 || 0 - StorageManager.SetSaveDisabled(false); -#endif MinecraftServer::getInstance()->setSaveOnExit(true); } } else { @@ -132,12 +106,8 @@ int IUIScene_PauseMenu::ExitGameSaveDialogReturned( int IUIScene_PauseMenu::ExitGameAndSaveReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { // 4J-PB - we won't come in here if we have a trial texture pack -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; -#else IUIScene_PauseMenu* pScene = dynamic_cast( ui.GetSceneFromCallbackId((std::size_t)pParam)); -#endif // results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { @@ -146,9 +116,6 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned( // StorageManager.GetSaveUniqueNumber(&saveOrCheckpointId); // SentientManager.RecordLevelSaveOrCheckpoint(ProfileManager.GetPrimaryPad(), // saveOrCheckpointId); -#if 0 || 0 - StorageManager.SetSaveDisabled(false); -#endif if (pScene) pScene->SetIgnoreInput(true); MinecraftServer::getInstance()->setSaveOnExit(true); // flag a app action of exit game @@ -183,20 +150,11 @@ int IUIScene_PauseMenu::ExitGameAndSaveReturned( int IUIScene_PauseMenu::ExitGameDeclineSaveReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; -#else IUIScene_PauseMenu* pScene = dynamic_cast( ui.GetSceneFromCallbackId((std::size_t)pParam)); -#endif // results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { -#if 0 || 0 - // Don't do this here, as it will still try and save some things even - // though it shouldn't! - // StorageManager.SetSaveDisabled(false); -#endif if (pScene) pScene->SetIgnoreInput(true); MinecraftServer::getInstance()->setSaveOnExit(false); // flag a app action of exit game @@ -231,139 +189,8 @@ int IUIScene_PauseMenu::ExitGameDeclineSaveReturned( int IUIScene_PauseMenu::WarningTrialTexturePackReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { -#if 0 || 0 || 0 - if (result == C4JStorage::EMessage_ResultAccept) { - if (!ProfileManager.IsSignedInLive(iPad)) { - // you're not signed in to PSN! - } else { - // 4J-PB - need to check this user can access the store - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - iPad, true, NULL, &bContentRestricted, NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - } else { - // need to get info on the pack to see if the user has already - // downloaded it - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - // retrieve the store name for the skin pack - DLCPack* pDLCPack = - pDLCTexPack - ->getDLCInfoParentPack(); // tPack->getDLCPack(); - const char* pchPackName = - wstringtofilename(pDLCPack->getName()); - app.DebugPrintf("Texture Pack - %s\n", pchPackName); - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo((char*)pchPackName); - - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // find the info on the skin pack - // we have to retrieve the skuid from the store info, it - // can't be hardcoded since Sony may change it. So we assume - // the first sku for the product is the one we want -#if 0 - sprintf(chName, "%s", pSONYDLCInfo->chDLCKeyname); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), - pSONYDLCInfo->chDLCKeyname); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - // 4J-PB - need to check for an empty store -#if 0 || 0 || 0 - if (app.CheckForEmptyStore(iPad) == false) -#endif - { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } - } - } - } -#endif // - -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - if (ProfileManager.IsSignedIn(iPad)) { - if (ProfileManager.IsSignedInLive(iPad)) { - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - DLCPack* pDLCPack = pDLCTexPack->getDLCInfoParentPack(); - - DLC_INFO* pDLCInfo = app.GetDLCInfoForProductName( - const_cast(pDLCPack->getName().c_str())); - - StorageManager.InstallOffer( - 1, const_cast(pDLCInfo->wsProductId.c_str()), - NULL, NULL); - - // the license change coming in when the offer has been - // installed will cause this scene to refresh - } else { - // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no - // active network connection user is unable to convert from - // Trial to Full texture pack and is not messaged why. - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } - } - } - -#endif - -#if 0 - IUIScene_PauseMenu* pScene = (IUIScene_PauseMenu*)pParam; - - // pScene->m_bIgnoreInput = false; - pScene->ShowScene(true); - if (result == C4JStorage::EMessage_ResultAccept) { - if (ProfileManager.IsSignedIn(iPad)) { - ULONGLONG ullIndexA[1]; - - TexturePack* tPack = Minecraft::GetInstance()->skins->getSelected(); - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - // Need to get the parent packs id, since this may be one of many - // child packs with their own ids - app.GetDLCFullOfferIDForPackID(pDLCTexPack->getDLCParentPackId(), - &ullIndexA[0]); - - // need to allow downloads here, or the player would need to quit - // the game to let the download of a texture pack happen. This might - // affect the network traffic, since the download could take all the - // bandwidth... - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); - - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - } - } else { - TelemetryManager->RecordUpsellResponded( - iPad, eSet_UpsellID_Texture_DLC, - (pScene->m_pDLCPack->getPurchaseOfferId() & 0xFFFFFFFF), - eSen_UpsellOutcome_Declined); - } -#endif return 0; } @@ -400,10 +227,6 @@ int IUIScene_PauseMenu::SaveWorldThreadProc(void* lpParameter) { if (!MinecraftServer::serverHalted() && !app.GetChangingSessionType()) app.SetGameStarted(true); -#if 0 || 0 - if (app.GetGameHostOption(eGameHostOption_DisableSaving)) - StorageManager.SetSaveDisabled(true); -#endif } HRESULT hr = S_OK; @@ -459,38 +282,12 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) { IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; exitReasonTitleId = IDS_CONNECTION_FAILED; break; -#if 0 || 0 - case DisconnectPacket:: - eDisconnect_ContentRestricted_AllLocal: - exitReasonStringId = - IDS_CONTENT_RESTRICTION_MULTIPLAYER; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; - case DisconnectPacket:: - eDisconnect_ContentRestricted_Single_Local: - exitReasonStringId = IDS_CONTENT_RESTRICTION; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif -#if 0 - case DisconnectPacket::eDisconnect_NoUGC_Remote: - exitReasonStringId = - IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif case DisconnectPacket::eDisconnect_NoFlying: exitReasonStringId = IDS_DISCONNECTED_FLYING; break; case DisconnectPacket::eDisconnect_Quitting: exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT; break; -#if 0 - case DisconnectPacket::eDisconnect_NetworkError: - exitReasonStringId = IDS_ERROR_NETWORK_EXIT; - exitReasonTitleId = IDS_ERROR_NETWORK_TITLE; - break; -#endif case DisconnectPacket::eDisconnect_NoFriendsInGame: exitReasonStringId = IDS_DISCONNECTED_NO_FRIENDS_IN_GAME; @@ -516,19 +313,7 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) { exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL; exitReasonTitleId = IDS_CANTJOIN_TITLE; break; -#if 0 - case DisconnectPacket::eDisconnect_ExitedGame: - exitReasonTitleId = IDS_EXIT_GAME; - exitReasonStringId = IDS_DISCONNECTED_EXITED_GAME; - break; -#endif -#if 0 || 0 || 0 - case DisconnectPacket::eDisconnect_NATMismatch: - exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif default: exitReasonStringId = IDS_CONNECTION_LOST_SERVER; } @@ -598,33 +383,9 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) { IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; exitReasonTitleId = IDS_CONNECTION_FAILED; break; -#if 0 || 0 - case DisconnectPacket::eDisconnect_ContentRestricted_AllLocal: - exitReasonStringId = IDS_CONTENT_RESTRICTION_MULTIPLAYER; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; - case DisconnectPacket:: - eDisconnect_ContentRestricted_Single_Local: - exitReasonStringId = IDS_CONTENT_RESTRICTION; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif -#if 0 - case DisconnectPacket::eDisconnect_NoUGC_Remote: - exitReasonStringId = - IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif case DisconnectPacket::eDisconnect_Quitting: exitReasonStringId = IDS_DISCONNECTED_SERVER_QUIT; break; -#if 0 - case DisconnectPacket::eDisconnect_NetworkError: - exitReasonStringId = IDS_ERROR_NETWORK_EXIT; - exitReasonTitleId = IDS_ERROR_NETWORK_TITLE; - break; -#endif case DisconnectPacket::eDisconnect_NoMultiplayerPrivilegesJoin: exitReasonStringId = IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT; break; @@ -640,12 +401,6 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) { exitReasonStringId = IDS_DISCONNECTED_SERVER_FULL; exitReasonTitleId = IDS_CANTJOIN_TITLE; break; -#if 0 || 0 || 0 - case DisconnectPacket::eDisconnect_NATMismatch: - exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH; - exitReasonTitleId = IDS_CONNECTION_FAILED; - break; -#endif default: exitReasonStringId = IDS_DISCONNECTED; } @@ -690,27 +445,14 @@ void IUIScene_PauseMenu::_ExitWorld(void* lpParameter) { app.SetReallyChangingSessionType(false); pMinecraft->exitingWorldRightNow = false; -#if 0 || 0 - // Make sure we don't think saving is disabled in the menus - StorageManager.SetSaveDisabled(false); -#endif } int IUIScene_PauseMenu::SaveGameDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { // results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { -#if 0 || 0 - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, uiIDA, 2, - iPad, &IUIScene_PauseMenu::EnableAutosaveDialogReturned, pParam); -#else // flag a app action of save game app.SetAction(iPad, eAppAction_SaveGame); -#endif } return 0; } diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp index 54319c799..daa700ae9 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_StartGame.cpp @@ -50,16 +50,8 @@ void IUIScene_StartGame::HandleDLCMountingComplete() { for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) { bTexturePackAlreadyListed = false; -#if 0 || 0 || 0 - char* pchName = app.GetDLCInfoTextures(i); - pDLCInfo = app.GetDLCInfo(pchName); -#elif 0 - pDLCInfo = app.GetDLCInfoForFullOfferID( - const_cast(app.GetDLCInfoTexturesFullOffer(i).c_str())); -#else ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); pDLCInfo = app.GetDLCInfoForFullOfferID(ull); -#endif for (unsigned int i = 0; i < texturePacksCount; ++i) { TexturePack* tp = pMinecraft->skins->getTexturePackByIndex(i); if (pDLCInfo->iConfig == tp->getDLCParentPackId()) { @@ -257,32 +249,11 @@ int IUIScene_StartGame::UnlockTexturePackReturned( if (result == C4JStorage::EMessage_ResultAccept) { if (ProfileManager.IsSignedIn(iPad)) { -#if 0 //|| 0 - ULONGLONG ullIndexA[1]; - DLC_INFO* pDLCInfo = app.GetDLCInfoForTrialOfferID( - pScene->m_pDLCPack->getPurchaseOfferId()); - - if (pDLCInfo != NULL) { - ullIndexA[0] = pDLCInfo->ullOfferID_Full; - } else { - ullIndexA[0] = pScene->m_pDLCPack->getPurchaseOfferId(); - } - - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); -#elif 0 - // StorageManager.InstallOffer(1,StorageManager.GetOffer(iIndex).wszProductID,NULL,NULL); -#endif // the license change coming in when the offer has been installed // will cause this scene to refresh } } else { -#if 0 - TelemetryManager->RecordUpsellResponded( - iPad, eSet_UpsellID_Texture_DLC, - (pScene->m_pDLCPack->getPurchaseOfferId() & 0xFFFFFFFF), - eSen_UpsellOutcome_Declined); -#endif } pScene->m_bIgnoreInput = false; @@ -294,64 +265,6 @@ int IUIScene_StartGame::TexturePackDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { IUIScene_StartGame* pClass = (IUIScene_StartGame*)pParam; -#if 0 - // Exit with or without saving - // Decline means install full version of the texture pack in this dialog - if (result == C4JStorage::EMessage_ResultDecline || - result == C4JStorage::EMessage_ResultAccept) { - // we need to enable background downloading for the DLC - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); - - ULONGLONG ullOfferID_Full; - ULONGLONG ullIndexA[1]; - CXuiCtrl4JList::LIST_ITEM_INFO ListItem; - // get the current index of the list, and then get the data - ListItem = pClass->m_pTexturePacksList->GetData( - pClass->m_currentTexturePackIndex); - app.GetDLCFullOfferIDForPackID(ListItem.iData, &ullOfferID_Full); - - if (result == C4JStorage::EMessage_ResultAccept) // Full version - { - ullIndexA[0] = ullOfferID_Full; - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - - } else // trial version - { - // if there is no trial version, this is a Cancel - DLC_INFO* pDLCInfo = app.GetDLCInfoForFullOfferID(ullOfferID_Full); - if (pDLCInfo->ullOfferID_Trial != 0LL) { - ullIndexA[0] = pDLCInfo->ullOfferID_Trial; - StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); - } - } - } -#elif 0 - // Get the product id from the texture pack id - if (result == C4JStorage::EMessage_ResultAccept) { - if (ProfileManager.IsSignedIn(iPad)) { - if (ProfileManager.IsSignedInLive(iPad)) { - std::wstring ProductId; - app.GetDLCFullOfferIDForPackID( - pClass->m_MoreOptionsParams.dwTexturePack, ProductId); - - StorageManager.InstallOffer( - 1, const_cast(ProductId.c_str()), NULL, NULL); - - // the license change coming in when the offer has been - // installed will cause this scene to refresh - } else { - // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no - // active network connection user is unable to convert from - // Trial to Full texture pack and is not messaged why. - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestMessageBox(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad, NULL, NULL, app.GetStringTable()); - } - } - } - -#endif pClass->m_bIgnoreInput = false; return 0; } diff --git a/Minecraft.Client/Platform/Common/UI/IUIScene_TradingMenu.cpp b/Minecraft.Client/Platform/Common/UI/IUIScene_TradingMenu.cpp index b079d5998..002725781 100644 --- a/Minecraft.Client/Platform/Common/UI/IUIScene_TradingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/IUIScene_TradingMenu.cpp @@ -53,9 +53,6 @@ bool IUIScene_TradingMenu::handleKeyDown(int iPad, int iAction, bool bRepeat) { handled = true; break; case ACTION_MENU_A: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (!m_activeOffers.empty()) { int selectedShopItem = (m_selectedSlot + m_offersStartIndex); if (selectedShopItem < m_activeOffers.size()) { diff --git a/Minecraft.Client/Platform/Common/UI/UI.h b/Minecraft.Client/Platform/Common/UI/UI.h index fb47e1bf2..528c9342d 100644 --- a/Minecraft.Client/Platform/Common/UI/UI.h +++ b/Minecraft.Client/Platform/Common/UI/UI.h @@ -38,9 +38,6 @@ #include "UIControl_SpaceIndicatorBar.h" #include "UIControl_BeaconEffectButton.h" -#if 0 -#include "UIControl_Touch.h" -#endif #include "UIScene_HUD.h" #include "UIComponent_Panorama.h" @@ -117,9 +114,6 @@ #include "UIScene_InGameInfoMenu.h" #include "UIScene_InGameHostOptionsMenu.h" #include "UIScene_InGamePlayerOptionsMenu.h" -#if 0 || 0 -#include "UIScene_InGameSaveManagementMenu.h" -#endif #include "UIScene_TeleportMenu.h" #include "UIScene_EndPoem.h" #include "UIScene_EULA.h" diff --git a/Minecraft.Client/Platform/Common/UI/UIComponent_DebugUIMarketingGuide.cpp b/Minecraft.Client/Platform/Common/UI/UIComponent_DebugUIMarketingGuide.cpp index 3135927c6..bc24f4746 100644 --- a/Minecraft.Client/Platform/Common/UI/UIComponent_DebugUIMarketingGuide.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIComponent_DebugUIMarketingGuide.cpp @@ -12,17 +12,7 @@ UIComponent_DebugUIMarketingGuide::UIComponent_DebugUIMarketingGuide( IggyDataValue value[1]; value[0].type = IGGY_DATATYPE_number; value[0].number = (F64)0; // WIN64 -#if 0 - value[0].number = (F64)1; -#elif 0 - value[0].number = (F64)2; -#elif 0 - value[0].number = (F64)3; -#elif 0 - value[0].number = (F64)4; -#elif 0 - value[0].number = (F64)5; -#elif defined _WINDOWS64 || defined __linux__ +#if defined(_WINDOWS64) || defined(__linux__) value[0].number = (F64)0; #endif IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, diff --git a/Minecraft.Client/Platform/Common/UI/UIComponent_PressStartToPlay.cpp b/Minecraft.Client/Platform/Common/UI/UIComponent_PressStartToPlay.cpp index 2f752d1bb..caf942753 100644 --- a/Minecraft.Client/Platform/Common/UI/UIComponent_PressStartToPlay.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIComponent_PressStartToPlay.cpp @@ -24,21 +24,7 @@ UIComponent_PressStartToPlay::UIComponent_PressStartToPlay(int iPad, // 4J-JEV: This object is persistent, so this string needs to be able to // handle language changes. -#if 0 - m_labelPressStart.init((UIString)[] { - return replaceAll(app.GetString(IDS_PRESS_X_TO_JOIN), - L"{*CONTROLLER_VK_A*}", - app.GetVKReplacement(VK_PAD_A)); - }); -#elif 0 - m_labelPressStart.init((UIString)[] { - return replaceAll(app.GetString(IDS_PRESS_START_TO_JOIN), - L"{*CONTROLLER_VK_START*}", - app.GetVKReplacement(VK_PAD_START)); - }); -#else m_labelPressStart.init(IDS_PRESS_START_TO_JOIN); -#endif m_controlSaveIcon.setVisible(false); m_controlPressStartPanel.setVisible(false); @@ -148,13 +134,5 @@ void UIComponent_PressStartToPlay::showSaveIcon(bool show) { } void UIComponent_PressStartToPlay::showPlayerDisplayName(bool show) { -#if 0 - if (show) { - m_playerDisplayName.setLabel( - ProfileManager.GetDisplayName(ProfileManager.GetPrimaryPad())); - } - m_playerDisplayName.setVisible(show); -#else m_playerDisplayName.setVisible(false); -#endif } \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.cpp b/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.cpp index c2daa58ad..3b3f7a743 100644 --- a/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.cpp @@ -13,24 +13,7 @@ UIComponent_Tooltips::UIComponent_Tooltips(int iPad, void* initData, // Setup all the Iggy references we need for this scene initialiseMovie(); -#if 0 - // initialise vita touch controls with ids - for (unsigned int i = 0; i < ETouchInput_Count; ++i) { - m_TouchController[i].init(i); - } -#endif -#if 0 || 0 || 0 - if (InputManager.IsCircleCrossSwapped()) { - IggyDataValue result; - IggyDataValue value[1]; - value[0].type = IGGY_DATATYPE_boolean; - value[0].boolval = true; - IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, - IggyPlayerRootPath(getMovie()), - m_funcSetABSwap, 1, value); - } -#endif } std::wstring UIComponent_Tooltips::getMoviePath() { @@ -59,7 +42,6 @@ F64 UIComponent_Tooltips::getSafeZoneHalfWidth() { float safeWidth = 0.0f; -#if 1 // 85% safezone for tooltips in either SD mode if (!RenderManager.IsHiDef()) { // 85% safezone @@ -68,7 +50,6 @@ F64 UIComponent_Tooltips::getSafeZoneHalfWidth() { // 90% safezone safeWidth = width * (0.1f / 2); } -#endif return safeWidth; } @@ -331,105 +312,12 @@ void UIComponent_Tooltips::_Relayout() { IggyPlayerRootPath(getMovie()), m_funcUpdateLayout, 0, NULL); -#if 0 - // rebuild touchboxes - ui.TouchBoxRebuild(this); -#endif } -#if 0 -void UIComponent_Tooltips::handleTouchInput(unsigned int iPad, S32 x, S32 y, - int iId, bool bPressed, - bool bRepeat, bool bReleased) { - // app.DebugPrintf("ToolTip Touch ID = %i\n", iId); - bool handled = false; - - // 4J - TomK no tooltips no touch! - if ((!ui.GetMenuDisplayed(ProfileManager.GetPrimaryPad())) && - (app.GetGameSettings(ProfileManager.GetPrimaryPad(), - eGameSetting_Tooltips) == 0)) - return; - - // perform action on release - if (bReleased) { - switch (iId) { - case ETouchInput_Touch_A: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_X\n", - iId); - if (InputManager.IsCircleCrossSwapped()) - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_O); - else - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_X); - break; - case ETouchInput_Touch_B: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_O\n", - iId); - if (InputManager.IsCircleCrossSwapped()) - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_X); - else - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_O); - break; - case ETouchInput_Touch_X: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_SQUARE\n", - iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_SQUARE); - break; - case ETouchInput_Touch_Y: - app.DebugPrintf( - "ToolTip Map Touch to _PSV_JOY_BUTTON_TRIANGLE\n", iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_TRIANGLE); - break; - case ETouchInput_Touch_LT: - /* not in use on vita */ - app.DebugPrintf("ToolTip no action\n", iId); - break; - case ETouchInput_Touch_RightTrigger: - app.DebugPrintf("ToolTip no action\n", iId); - /* no action */ - break; - case ETouchInput_Touch_LeftBumper: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_L1\n", - iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_L1); - break; - case ETouchInput_Touch_RightBumper: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_R1\n", - iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_R1); - break; - case ETouchInput_Touch_LeftStick: - app.DebugPrintf("ToolTip no action\n", iId); - /* no action */ - break; - case ETouchInput_Touch_RightStick: - app.DebugPrintf( - "ToolTip Map Touch to _PSV_JOY_BUTTON_DPAD_DOWN\n", iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_DPAD_DOWN); - break; - case ETouchInput_Touch_Select: - app.DebugPrintf("ToolTip Map Touch to _PSV_JOY_BUTTON_SELECT\n", - iId); - InputManager.MapTouchInput(iPad, _PSV_JOY_BUTTON_SELECT); - break; - } - } -} -#endif void UIComponent_Tooltips::handleReload() { app.DebugPrintf("UIComponent_Tooltips::handleReload\n"); -#if 0 || 0 || 0 - if (InputManager.IsCircleCrossSwapped()) { - IggyDataValue result; - IggyDataValue value[1]; - value[0].type = IGGY_DATATYPE_boolean; - value[0].boolval = true; - IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, - IggyPlayerRootPath(getMovie()), - m_funcSetABSwap, 1, value); - } -#endif for (unsigned int i = 0; i < eToolTipNumButtons; ++i) { _SetTooltip(i, m_tooltipValues[i].iString, m_tooltipValues[i].show, diff --git a/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.h b/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.h index 1405bade0..d8b134ac1 100644 --- a/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.h +++ b/Minecraft.Client/Platform/Common/UI/UIComponent_Tooltips.h @@ -24,44 +24,8 @@ protected: IggyName m_funcSetTooltip, m_funcSetOpacity, m_funcSetABSwap, m_funcUpdateLayout; -#if 0 - enum ETouchInput { - ETouchInput_Touch_A, - ETouchInput_Touch_B, - ETouchInput_Touch_X, - ETouchInput_Touch_Y, - ETouchInput_Touch_LT, - ETouchInput_Touch_RightTrigger, - ETouchInput_Touch_LeftBumper, - ETouchInput_Touch_RightBumper, - ETouchInput_Touch_LeftStick, - ETouchInput_Touch_RightStick, - ETouchInput_Touch_Select, - - ETouchInput_Count, - }; - UIControl_Touch m_TouchController[ETouchInput_Count]; -#endif UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) -#if 0 - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_A], "Touch_A") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_B], "Touch_B") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_X], "Touch_X") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_Y], "Touch_Y") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LT], "Touch_LT") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightTrigger], - "Touch_RightTrigger") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LeftBumper], - "Touch_LeftBumper") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightBumper], - "Touch_RightBumper") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_LeftStick], - "Touch_LeftStick") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_RightStick], - "Touch_RightStick") - UI_MAP_ELEMENT(m_TouchController[ETouchInput_Touch_Select], "Touch_Select") -#endif UI_MAP_NAME(m_funcSetTooltip, L"SetToolTip") UI_MAP_NAME(m_funcSetOpacity, L"SetOpacity") UI_MAP_NAME(m_funcSetABSwap, L"SetABSwap") @@ -118,8 +82,4 @@ private: bool m_overrideSFX[XUSER_MAX_COUNT][ACTION_MAX_MENU]; -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIComponent_TutorialPopup.cpp b/Minecraft.Client/Platform/Common/UI/UIComponent_TutorialPopup.cpp index da796fc7c..9f24a1357 100644 --- a/Minecraft.Client/Platform/Common/UI/UIComponent_TutorialPopup.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIComponent_TutorialPopup.cpp @@ -343,54 +343,6 @@ std::wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, std::wstring UIComponent_TutorialPopup::_SetImage(std::wstring& desc) { // 4J Stu - Unused -#if 0 - bool imageShowAtStart = m_image.IsShown(); - - std::wstring openTag(L"{*IMAGE*}"); - std::wstring closeTag(L"{*/IMAGE*}"); - int imageTagStartPos = (int)desc.find(openTag); - int imageStartPos = imageTagStartPos + (int)openTag.length(); - if( imageTagStartPos > 0 && imageStartPos < (int)desc.length() ) - { - int imageEndPos = (int)desc.find( closeTag, imageStartPos ); - - if(imageEndPos > imageStartPos && imageEndPos < (int)desc.length() ) - { - std::wstring id = desc.substr(imageStartPos, imageEndPos - imageStartPos); - m_image.SetImagePath( id.c_str() ); - m_image.SetShow( true ); - - desc.replace(imageTagStartPos, imageEndPos - imageTagStartPos + closeTag.length(), L""); - } - } - else - { - // hide the icon slot - m_image.SetShow( false ); - } - - bool imageShowAtEnd = m_image.IsShown(); - if(imageShowAtStart != imageShowAtEnd) - { - float fHeight, fWidth, fIconHeight, fDescHeight, fDescWidth; - m_image.GetBounds(&fWidth,&fIconHeight); - GetBounds(&fWidth,&fHeight); - - - // 4J Stu - For some reason when we resize the scene it resets the size of the HTML control - // We don't want that to happen, so get it's size before and set it back after - m_description.GetBounds(&fDescWidth,&fDescHeight); - if(imageShowAtEnd) - { - SetBounds(fWidth, fHeight + fIconHeight); - } - else - { - SetBounds(fWidth, fHeight - fIconHeight); - } - m_description.SetBounds(fDescWidth, fDescHeight); - } -#endif return desc; } diff --git a/Minecraft.Client/Platform/Common/UI/UIControl.cpp b/Minecraft.Client/Platform/Common/UI/UIControl.cpp index 3973f6534..fa31261e5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl.cpp @@ -42,19 +42,6 @@ bool UIControl::setupControl(UIScene* scene, IggyValuePath* parent, return res; } -#if 0 -void UIControl::UpdateControl() { - F64 fx, fy, fwidth, fheight; - IggyValueGetF64RS(getIggyValuePath(), m_nameXPos, NULL, &fx); - IggyValueGetF64RS(getIggyValuePath(), m_nameYPos, NULL, &fy); - IggyValueGetF64RS(getIggyValuePath(), m_nameWidth, NULL, &fwidth); - IggyValueGetF64RS(getIggyValuePath(), m_nameHeight, NULL, &fheight); - m_x = (S32)fx; - m_y = (S32)fy; - m_width = (S32)Math::round(fwidth); - m_height = (S32)Math::round(fheight); -} -#endif // 0 void UIControl::ReInit() { if (m_lastOpacity != 1.0f) { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl.h b/Minecraft.Client/Platform/Common/UI/UIControl.h index 01f5416c4..36922bc3e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl.h +++ b/Minecraft.Client/Platform/Common/UI/UIControl.h @@ -59,11 +59,6 @@ public: virtual bool setupControl(UIScene* scene, IggyValuePath* parent, const std::string& controlName); -#if 0 - void UpdateControl(); - void setHidden(bool bHidden) { m_bHidden = bHidden; } - bool getHidden(void) { return m_bHidden; } -#endif IggyValuePath* getIggyValuePath(); diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_Button.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_Button.cpp index 965e6182c..0ea1ad14d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_Button.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_Button.cpp @@ -36,18 +36,6 @@ void UIControl_Button::init(UIString label, int id) { IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 2, value); -#if 0 - // 4J-PB - add this button to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Error: - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_Button::ReInit() { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.cpp index a85b268e4..fbb845b13 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.cpp @@ -35,17 +35,6 @@ void UIControl_ButtonList::init(int id) { IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 1, value); -#if 0 - // 4J-PB - add this buttonlist to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_ButtonList::ReInit() { @@ -162,43 +151,6 @@ void UIControl_ButtonList::setButtonLabel(int iButtonId, m_funcSetButtonLabel, 2, value); } -#if 0 -void UIControl_ButtonList::SetTouchFocus(S32 iX, S32 iY, bool bRepeat) { - IggyDataValue result; - IggyDataValue value[3]; - - value[0].type = IGGY_DATATYPE_number; - value[0].number = iX; - value[1].type = IGGY_DATATYPE_number; - value[1].number = iY; - value[2].type = IGGY_DATATYPE_boolean; - value[2].boolval = bRepeat; - - IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, - getIggyValuePath(), - m_funcSetTouchFocus, 3, value); -} - -bool UIControl_ButtonList::CanTouchTrigger(S32 iX, S32 iY) { - IggyDataValue result; - IggyDataValue value[2]; - - value[0].type = IGGY_DATATYPE_number; - value[0].number = iX; - value[1].type = IGGY_DATATYPE_number; - value[1].number = iY; - - IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, - getIggyValuePath(), - m_funcCanTouchTrigger, 2, value); - - S32 bCanTouchTrigger = false; - if (result.type == IGGY_DATATYPE_boolean) { - bCanTouchTrigger = (bool)result.boolval; - } - return bCanTouchTrigger; -} -#endif void UIControl_DynamicButtonList::tick() { UIControl_ButtonList::tick(); diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.h b/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.h index 5bdc61a84..9372eba33 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.h +++ b/Minecraft.Client/Platform/Common/UI/UIControl_ButtonList.h @@ -39,10 +39,6 @@ public: void setButtonLabel(int iButtonId, const std::wstring& label); -#if 0 - void SetTouchFocus(S32 iX, S32 iY, bool bRepeat); - bool CanTouchTrigger(S32 iX, S32 iY); -#endif }; class UIControl_DynamicButtonList : public UIControl_ButtonList { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_CheckBox.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_CheckBox.cpp index 455956cd0..6aff18ebb 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_CheckBox.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_CheckBox.cpp @@ -44,17 +44,6 @@ void UIControl_CheckBox::init(UIString label, int id, bool checked) { IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 3, value); -#if 0 - // 4J-TomK - add checkbox to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } bool UIControl_CheckBox::IsChecked() { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_DynamicLabel.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_DynamicLabel.cpp index d7d3bd485..99788e345 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_DynamicLabel.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_DynamicLabel.cpp @@ -42,17 +42,6 @@ void UIControl_DynamicLabel::addText(const std::wstring& text, void UIControl_DynamicLabel::ReInit() { UIControl_Base::ReInit(); } void UIControl_DynamicLabel::SetupTouch() { -#if 0 - // 4J-TomK - add this dynamic label to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_DynamicLabel::TouchScroll(S32 iY, bool bActive) { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_HTMLLabel.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_HTMLLabel.cpp index e2cf23631..7391db915 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_HTMLLabel.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_HTMLLabel.cpp @@ -48,17 +48,6 @@ void UIControl_HTMLLabel::setLabel(const std::string& label) { } void UIControl_HTMLLabel::SetupTouch() { -#if 0 - // 4J-TomK - add this dynamic label to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_HTMLLabel::TouchScroll(S32 iY, bool bActive) { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.cpp index ed926eb89..029ddab23 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.cpp @@ -16,10 +16,6 @@ bool UIControl_LeaderboardList::setupControl(UIScene* scene, m_funcResetLeaderboard = registerFastName(L"ResetLeaderboard"); m_funcSetupTitles = registerFastName(L"SetupTitles"); m_funcSetColumnIcon = registerFastName(L"SetColumnIcon"); -#if 0 - m_funcSetTouchFocus = registerFastName(L"SetTouchFocus"); - m_bTouchInitialised = false; -#endif return success; } @@ -91,18 +87,6 @@ void UIControl_LeaderboardList::initLeaderboard(int iFirstFocus, getIggyValuePath(), m_funcInitLeaderboard, 3, value); -#if 0 - // 4J-PB - add this button to the vita touch box list - if (!m_bTouchInitialised) { - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - ui.TouchBoxAdd(this, m_parentScene); - break; - } - m_bTouchInitialised = true; - } -#endif } void UIControl_LeaderboardList::setColumnIcon(int iColumn, int iType) { @@ -232,20 +216,3 @@ void UIControl_LeaderboardList::addDataSet( getIggyValuePath(), m_funcAddDataSet, 12, value); } -#if 0 -void UIControl_LeaderboardList::SetTouchFocus(S32 iX, S32 iY, bool bRepeat) { - IggyDataValue result; - IggyDataValue value[3]; - - value[0].type = IGGY_DATATYPE_number; - value[0].number = iX; - value[1].type = IGGY_DATATYPE_number; - value[1].number = iY; - value[2].type = IGGY_DATATYPE_boolean; - value[2].boolval = bRepeat; - - IggyResult out = IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, - getIggyValuePath(), - m_funcSetTouchFocus, 3, value); -} -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.h b/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.h index 6f44cf100..3b9444c5e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.h +++ b/Minecraft.Client/Platform/Common/UI/UIControl_LeaderboardList.h @@ -7,10 +7,6 @@ private: IggyName m_funcInitLeaderboard, m_funcAddDataSet; IggyName m_funcResetLeaderboard; IggyName m_funcSetupTitles, m_funcSetColumnIcon; -#if 0 - IggyName m_funcSetTouchFocus; - bool m_bTouchInitialised; -#endif public: enum ELeaderboardIcons { e_ICON_TYPE_IGGY = 0, @@ -48,7 +44,4 @@ public: const std::wstring& col4, const std::wstring& col5, const std::wstring& col6); -#if 0 - void SetTouchFocus(S32 iX, S32 iY, bool bRepeat); -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_PlayerSkinPreview.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_PlayerSkinPreview.cpp index 50975304e..f0b94d8db 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_PlayerSkinPreview.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_PlayerSkinPreview.cpp @@ -302,7 +302,7 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer* renderer, double x, glTranslatef((float)x, (float)y, (float)z); // float bob = getBob(mob, a); -#ifdef SKIN_PREVIEW_BOB_ANIM +#if defined(SKIN_PREVIEW_BOB_ANIM) float bob = (m_bobTick + a) / 2; ++m_bobTick; @@ -326,13 +326,9 @@ void UIControl_PlayerSkinPreview::render(EntityRenderer* renderer, double x, // 4J - TomK - pull up character a bit more to make sure extra geo around // feet doesn't cause rendering problems on PSVita -#if 0 - glTranslatef(0, -24 * _scale - 1.0f / 16.0f, 0); -#else glTranslatef(0, -24 * _scale - 0.125f / 16.0f, 0); -#endif -#ifdef SKIN_PREVIEW_WALKING_ANIM +#if defined(SKIN_PREVIEW_WALKING_ANIM) m_walkAnimSpeedO = m_walkAnimSpeed; m_walkAnimSpeed += (0.1f - m_walkAnimSpeed) * 0.4f; m_walkAnimPos += m_walkAnimSpeed; diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_Slider.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_Slider.cpp index 4d8dba439..6b21ad0c2 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_Slider.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_Slider.cpp @@ -55,17 +55,6 @@ void UIControl_Slider::init(UIString label, int id, int min, int max, IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 5, value); -#if 0 - // 4J-TomK - add slider to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_Slider::handleSliderMove(int newValue) { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_TextInput.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_TextInput.cpp index c33f45897..f047f96ed 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_TextInput.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_TextInput.cpp @@ -39,17 +39,6 @@ void UIControl_TextInput::init(UIString label, int id) { IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 2, value); -#if 0 - // 4J-TomK - add this buttonlist to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_TextInput::ReInit() { diff --git a/Minecraft.Client/Platform/Common/UI/UIControl_TexturePackList.cpp b/Minecraft.Client/Platform/Common/UI/UIControl_TexturePackList.cpp index c7e70f8dd..415111a6b 100644 --- a/Minecraft.Client/Platform/Common/UI/UIControl_TexturePackList.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIControl_TexturePackList.cpp @@ -43,17 +43,6 @@ void UIControl_TexturePackList::init(const std::wstring& label, int id) { IggyPlayerCallMethodRS(m_parentScene->getMovie(), &result, getIggyValuePath(), m_initFunc, 2, value); -#if 0 - // 4J-TomK - add this texturepack list to the vita touch box list - - switch (m_parentScene->GetParentLayer()->m_iLayer) { - case eUILayer_Fullscreen: - case eUILayer_Scene: - case eUILayer_HUD: - ui.TouchBoxAdd(this, m_parentScene); - break; - } -#endif } void UIControl_TexturePackList::addPack(int id, diff --git a/Minecraft.Client/Platform/Common/UI/UIController.cpp b/Minecraft.Client/Platform/Common/UI/UIController.cpp index 6de31edc2..75efb9cfc 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIController.cpp @@ -12,26 +12,23 @@ #include "../../Minecraft.Client/Player/MultiPlayerLocalPlayer.h" #include "../../Minecraft.Client/UI/Screens/TitleScreen.h" #include "UIFontData.h" -#if 0 -#include -#endif // 4J Stu - Enable this to override the Iggy Allocator // #define ENABLE_IGGY_ALLOCATOR // #define EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR // #define ENABLE_IGGY_EXPLORER -#ifdef ENABLE_IGGY_EXPLORER +#if defined(ENABLE_IGGY_EXPLORER) #include "../../Minecraft.Client/Platform/Windows64/Iggy/include/iggyexpruntime.h" #endif // #define ENABLE_IGGY_PERFMON -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) #define PM_ORIGIN_X 24 #define PM_ORIGIN_Y 34 -#if defined __WINDOWS64 +#if defined(__WINDOWS64) #include "../../Minecraft.Client/Platform/Windows64/Iggy/include/iggyperfmon.h" #endif @@ -99,7 +96,7 @@ static void RADLINK TraceCallback(void* user_callback_data, Iggy* player, app.DebugPrintf(app.USER_UI, (char*)utf8_string); } -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) static void* RADLINK perf_malloc(void* handle, U32 size) { return malloc(size); } @@ -107,7 +104,7 @@ static void* RADLINK perf_malloc(void* handle, U32 size) { static void RADLINK perf_free(void* handle, void* ptr) { return free(ptr); } #endif -#ifdef EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR +#if defined(EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR) extern "C" void* __real_malloc(size_t t); extern "C" void __real_free(void* t); #endif @@ -119,7 +116,7 @@ static void* RADLINK AllocateFunction(void* alloc_callback_user_data, size_t* size_returned) { UIController* controller = (UIController*)alloc_callback_user_data; EnterCriticalSection(&controller->m_Allocatorlock); -#ifdef EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR +#if defined(EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR) void* alloc = __real_malloc(size_requested); #else void* alloc = malloc(size_requested); @@ -142,7 +139,7 @@ static void RADLINK DeallocateFunction(void* alloc_callback_user_data, allocations.erase(ptr); app.DebugPrintf(app.USER_SR, "Freeing %d, new total %d\n", size, UIController::iggyAllocCount); -#ifdef EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR +#if defined(EXCLUDE_IGGY_ALLOCATIONS_FROM_HEAP_INSPECTOR) __real_free(ptr); #else free(ptr); @@ -165,14 +162,13 @@ UIController::UIController() { // updateCurrentLanguage is going to be called. m_eCurrentFont = m_eTargetFont = eFont_NotLoaded; -#ifdef ENABLE_IGGY_ALLOCATOR +#if defined(ENABLE_IGGY_ALLOCATOR) InitializeCriticalSection(&m_Allocatorlock); #endif // 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 || 0 || 0 || \ - defined(__linux__) +#if defined(_WINDOWS64) || defined(__linux__) m_fScreenWidth = 1920.0f; m_fScreenHeight = 1080.0f; m_bScreenWidthSetup = true; @@ -212,9 +208,6 @@ UIController::UIController() { InitializeCriticalSection(&m_registeredCallbackScenesCS); // m_bSysUIShowing=false; m_bSystemUIShowing = false; -#if 0 - m_bTouchscreenPressed = false; -#endif if (!ms_bReloadSkinCSInitialised) { // MGH - added to prevent crash loading Iggy movies while the skins were @@ -243,7 +236,7 @@ void UIController::preInit(S32 width, S32 height) { m_fScreenHeight = height; m_bScreenWidthSetup = true; -#ifdef ENABLE_IGGY_ALLOCATOR +#if defined(ENABLE_IGGY_ALLOCATOR) IggyAllocator allocator; allocator.user_callback_data = this; allocator.mem_alloc = &AllocateFunction; @@ -276,7 +269,7 @@ void UIController::postInit() { m_groups[i] = new UIGroup((EUIGroup)i, i - 1); } -#ifdef ENABLE_IGGY_EXPLORER +#if defined(ENABLE_IGGY_EXPLORER) iggy_explorer = IggyExpCreate( "127.0.0.1", 9190, malloc(IGGYEXP_MIN_STORAGE), IGGYEXP_MIN_STORAGE); if (iggy_explorer == NULL) { @@ -288,7 +281,7 @@ void UIController::postInit() { } #endif -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) m_iggyPerfmonEnabled = false; iggy_perfmon = IggyPerfmonCreate(perf_malloc, perf_free, NULL); IggyInstallPerfmon(iggy_perfmon); @@ -301,10 +294,6 @@ UIController::EFont UIController::getFontForLanguage(int language) { switch (language) { case XC_LANGUAGE_JAPANESE: return eFont_Japanese; -#if 0 - case XC_LANGUAGE_SCHINESE: - return eFont_SimpChinese; -#endif case XC_LANGUAGE_TCHINESE: return eFont_TradChinese; case XC_LANGUAGE_KOREAN: @@ -316,31 +305,10 @@ UIController::EFont UIController::getFontForLanguage(int language) { UITTFFont* UIController::createFont(EFont fontLanguage) { switch (fontLanguage) { -#if 0 || 0 || 0 - case eFont_Japanese: - return new UITTFFont("Mojangles_TTF_jaJP", - "Common/Media/font/JPN/DF-DotDotGothic16.ttf", - 0x203B); // JPN - // case eFont_SimpChinese: Simplified Chinese is unsupported. - case eFont_TradChinese: - return new UITTFFont("Mojangles_TTF_cnTD", - "Common/Media/font/CHT/DFTT_R5.TTC", - 0x203B); // CHT - case eFont_Korean: - return new UITTFFont("Mojangles_TTF_koKR", - "Common/Media/font/KOR/candadite2.ttf", - 0x203B); // KOR -#else case eFont_Japanese: return new UITTFFont("Mojangles_TTF_jaJP", "Common/Media/font/JPN/DFGMaruGothic-Md.ttf", 0x2022); // JPN -#if 0 - case eFont_SimpChinese: - return new UITTFFont("Mojangled_TTF_cnCN", - "Common/Media/font/CHS/MSYH.ttf", - 0x2022); // CHS -#endif case eFont_TradChinese: return new UITTFFont("Mojangles_TTF_cnTD", "Common/Media/font/CHT/DFHeiMedium-B5.ttf", @@ -349,7 +317,6 @@ UITTFFont* UIController::createFont(EFont fontLanguage) { return new UITTFFont("Mojangles_TTF_koKR", "Common/Media/font/KOR/BOKMSD.ttf", 0x2022); // KOR -#endif // 4J-JEV, Cyrillic characters have been added to this font now, // (4/July/14) XC_LANGUAGE_RUSSIAN and XC_LANGUAGE_GREEK: default: @@ -489,29 +456,12 @@ void UIController::tick() { void UIController::loadSkins() { std::wstring platformSkinPath = L""; -#if 0 - platformSkinPath = L"skinPS3.swf"; -#elif 0 - platformSkinPath = L"skinVita.swf"; -#elif defined(_WINDOWS64) || defined(__linux__) +#if defined(_WINDOWS64) || defined(__linux__) if (m_fScreenHeight == 1080.0f) { platformSkinPath = L"skinHDWin.swf"; } else { platformSkinPath = L"skinWin.swf"; } -#elif 0 - if (m_fScreenHeight == 1080.0f) { - platformSkinPath = L"skinHDDurango.swf"; - } else { - platformSkinPath = L"skinDurango.swf"; - } -#elif 0 - if (m_fScreenHeight == 1080.0f) { - platformSkinPath = L"skinHDOrbis.swf"; - } else { - platformSkinPath = L"skinOrbis.swf"; - } - #endif // Every platform has one of these, so nothing shared if (m_fScreenHeight == 1080.0f) { @@ -522,34 +472,13 @@ void UIController::loadSkins() { loadSkin(platformSkinPath, L"platformskin.swf"); } -#if 0 || 0 - m_iggyLibraries[eLibrary_GraphicsDefault] = - loadSkin(L"skinGraphics.swf", L"skinGraphics.swf"); - m_iggyLibraries[eLibrary_GraphicsHUD] = - loadSkin(L"skinGraphicsHud.swf", L"skinGraphicsHud.swf"); - m_iggyLibraries[eLibrary_GraphicsInGame] = - loadSkin(L"skinGraphicsInGame.swf", L"skinGraphicsInGame.swf"); - m_iggyLibraries[eLibrary_GraphicsTooltips] = - loadSkin(L"skinGraphicsTooltips.swf", L"skinGraphicsTooltips.swf"); - m_iggyLibraries[eLibrary_GraphicsLabels] = - loadSkin(L"skinGraphicsLabels.swf", L"skinGraphicsLabels.swf"); - m_iggyLibraries[eLibrary_Labels] = - loadSkin(L"skinLabels.swf", L"skinLabels.swf"); - m_iggyLibraries[eLibrary_InGame] = - loadSkin(L"skinInGame.swf", L"skinInGame.swf"); - m_iggyLibraries[eLibrary_HUD] = loadSkin(L"skinHud.swf", L"skinHud.swf"); - m_iggyLibraries[eLibrary_Tooltips] = - loadSkin(L"skinTooltips.swf", L"skinTooltips.swf"); - m_iggyLibraries[eLibrary_Default] = loadSkin(L"skin.swf", L"skin.swf"); -#endif -#if (defined(_WINDOWS64) || 0 || 0 || \ - defined(__linux__)) +#if defined(_WINDOWS64) || defined(__linux__) #if defined(_WINDOWS64) // 4J Stu - Load the 720/480 skins so that we have something to fallback on // during development -#ifndef _FINAL_BUILD +#if !defined(_FINAL_BUILD) m_iggyLibraries[eLibraryFallback_GraphicsDefault] = loadSkin(L"skinGraphics.swf", L"skinGraphics.swf"); m_iggyLibraries[eLibraryFallback_GraphicsHUD] = @@ -592,7 +521,7 @@ void UIController::loadSkins() { m_iggyLibraries[eLibrary_Tooltips] = loadSkin(L"skinHDTooltips.swf", L"skinHDTooltips.swf"); m_iggyLibraries[eLibrary_Default] = loadSkin(L"skinHD.swf", L"skinHD.swf"); -#endif // HD platforms +#endif } IggyLibrary UIController::loadSkin(const std::wstring& skinPath, @@ -608,7 +537,7 @@ IggyLibrary UIController::loadSkin(const std::wstring& skinPath, convSkinName.data(), (void*)baFile.data, baFile.length, NULL); delete[] baFile.data; -#ifdef _DEBUG +#if defined(_DEBUG) IggyMemoryUseInfo memoryInfo; rrbool res; int iteration = 0; @@ -646,7 +575,7 @@ void UIController::ReloadSkin() { m_iggyLibraries[i] = IGGY_INVALID_LIBRARY; } -#if defined _WINDOWS64 || defined __linux__ +#if defined(_WINDOWS64) || defined(__linux__) // 4J Stu - Don't load on a thread on windows. I haven't investigated this // in detail, so a quick fix reloadSkinThreadProc(this); @@ -698,7 +627,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 !(defined(_WINDOWS64) || defined(__linux__)) controller->NavigateBack(0, false, eUIScene_COUNT, eUILayer_Tooltips); #endif LeaveCriticalSection(&ms_reloadSkinCS); @@ -723,13 +652,8 @@ void UIController::CleanUpSkinReload() { if (!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) { if (!Minecraft::GetInstance()->skins->getSelected()->hasAudio()) { -#if 0 - const unsigned int result = - StorageManager.UnmountInstalledDLC(L"TPACK"); -#else const unsigned int result = StorageManager.UnmountInstalledDLC("TPACK"); -#endif } } @@ -767,7 +691,7 @@ void UIController::tickInput() { // If system/commerce UI up, don't handle input // if(!m_bSysUIShowing && !m_bSystemUIShowing) if (!m_bSystemUIShowing) { -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) if (m_iggyPerfmonEnabled) { if (InputManager.ButtonPressed(ProfileManager.GetPrimaryPad(), ACTION_MENU_STICK_PRESS)) @@ -785,65 +709,12 @@ void UIController::handleInput() { // For each user, loop over each key type and send messages based on the // state for (unsigned int iPad = 0; iPad < XUSER_MAX_COUNT; ++iPad) { -#if 0 - // 4J-JEV: Added exception for primary play who migh've uttered speech - // commands. - if (iPad != ProfileManager.GetPrimaryPad() && - (!InputManager.IsPadConnected(iPad) || - !InputManager.IsPadLocked(iPad))) - continue; -#endif for (unsigned int key = 0; key <= ACTION_MAX_MENU; ++key) { handleKeyPress(iPad, key); } -#if 0 - // CD - Vita requires key press 40 - select [MINECRAFT_ACTION_GAME_INFO] - handleKeyPress(iPad, MINECRAFT_ACTION_GAME_INFO); -#endif } -#if 0 - if (!app.GetGameStarted()) { - bool repeat = false; - int firstUnfocussedUnhandledPad = -1; - - // For durango, check for unmapped controllers - for (unsigned int iPad = XUSER_MAX_COUNT; - iPad < (XUSER_MAX_COUNT + InputManager.MAX_GAMEPADS); ++iPad) { - if (InputManager.IsPadLocked(iPad) || - !InputManager.IsPadConnected(iPad)) - continue; - - for (unsigned int key = 0; key <= ACTION_MAX_MENU; ++key) { - bool pressed = InputManager.ButtonPressed(iPad, key); // Toggle - bool released = - InputManager.ButtonReleased(iPad, key); // Toggle - - if (pressed || released) { - bool handled = false; - - // Send the key to the fullscreen group first - m_groups[(int)eUIGroup_Fullscreen]->handleInput( - iPad, key, repeat, pressed, released, handled); - - if (firstUnfocussedUnhandledPad < 0 && - !m_groups[(int)eUIGroup_Fullscreen]->HasFocus(iPad)) { - firstUnfocussedUnhandledPad = iPad; - } - } - } - } - - if (ProfileManager.GetLockedProfile() >= 0 && - !InputManager.IsPadLocked(ProfileManager.GetLockedProfile()) && - firstUnfocussedUnhandledPad >= 0) { - ProfileManager.RequestSignInUI(false, false, false, false, true, - NULL, NULL, - firstUnfocussedUnhandledPad); - } - } -#endif } void UIController::handleKeyPress(unsigned int iPad, unsigned int key) { @@ -852,147 +723,6 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key) { bool released = false; // Toggle bool repeat = false; -#if 0 - if (key == ACTION_MENU_OK) { - bool bTouchScreenInput = false; - - // check the touchscreen - - // 4J-PB - use the touchscreen for quickselect - SceTouchData* pTouchData = InputManager.GetTouchPadData(iPad, false); - - if ((m_bTouchscreenPressed == false) && pTouchData->reportNum == 1) { - // no active touch? clear active and highlighted touch UI elements - m_ActiveUIElement = NULL; - m_HighlightedUIElement = NULL; - - // fullscreen first - UIScene* pScene = - m_groups[(int)eUIGroup_Fullscreen]->getCurrentScene(); - // also check tooltip scene if we're not touching anything in the - // main scene - UIScene* pToolTips = - m_groups[(int)eUIGroup_Fullscreen]->getTooltips(); - if (pScene) { - // scene touch check - if (TouchBoxHit(pScene, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = pressed = m_bTouchscreenPressed = true; - bTouchScreenInput = true; - } - // tooltip touch check - else if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = pressed = m_bTouchscreenPressed = true; - bTouchScreenInput = true; - } - } else { - pScene = m_groups[(EUIGroup)(iPad + 1)]->getCurrentScene(); - pToolTips = m_groups[(int)iPad + 1]->getTooltips(); - if (pScene) { - // scene touch check - if (TouchBoxHit(pScene, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = pressed = m_bTouchscreenPressed = true; - bTouchScreenInput = true; - } - // tooltip touch check (if scene exists but not component - // has been touched) - else if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = pressed = m_bTouchscreenPressed = true; - bTouchScreenInput = true; - } - } else if (pToolTips) { - // tooltip touch check (if scene does not exist) - if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = pressed = m_bTouchscreenPressed = true; - bTouchScreenInput = true; - } - } - } - } else if (m_bTouchscreenPressed && pTouchData->reportNum == 1) { - // fullscreen first - UIScene* pScene = - m_groups[(int)eUIGroup_Fullscreen]->getCurrentScene(); - // also check tooltip scene if we're not touching anything in the - // main scene - UIScene* pToolTips = - m_groups[(int)eUIGroup_Fullscreen]->getTooltips(); - if (pScene) { - // scene touch check - if (TouchBoxHit(pScene, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = true; - bTouchScreenInput = true; - } - // tooltip touch check (if scene exists but not component has - // been touched) - else if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = true; - bTouchScreenInput = true; - } - } else { - pScene = m_groups[(EUIGroup)(iPad + 1)]->getCurrentScene(); - pToolTips = m_groups[(int)iPad + 1]->getTooltips(); - if (pScene) { - // scene touch check - if (TouchBoxHit(pScene, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = true; - bTouchScreenInput = true; - } - // tooltip touch check (if scene exists but not component - // has been touched) - else if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = true; - bTouchScreenInput = true; - } - } else if (pToolTips) { - // tooltip touch check (if scene does not exist) - if (TouchBoxHit(pToolTips, pTouchData->report[0].x, - pTouchData->report[0].y)) { - down = true; - bTouchScreenInput = true; - } - } - } - } else if (m_bTouchscreenPressed && pTouchData->reportNum == 0) { - // released - bTouchScreenInput = true; - m_bTouchscreenPressed = false; - released = true; - } - - if (pressed) { - // Start repeat timer - m_actionRepeatTimer[iPad][key] = - GetTickCount() + UI_REPEAT_KEY_DELAY_MS; - } else if (released) { - // Stop repeat timer - m_actionRepeatTimer[iPad][key] = 0; - } else if (down) { - // Check is enough time has elapsed to be a repeat key - std::uint32_t currentTime = GetTickCount(); - if (m_actionRepeatTimer[iPad][key] > 0 && - currentTime > m_actionRepeatTimer[iPad][key]) { - repeat = true; - pressed = true; - m_actionRepeatTimer[iPad][key] = - currentTime + UI_REPEAT_KEY_REPEAT_RATE_MS; - } - } - - // handle touch input - HandleTouchInput(iPad, key, pressed, repeat, released); - - // ignore any other presses if the touchscreen has been used - if (bTouchScreenInput) return; - } -#endif down = InputManager.ButtonDown(iPad, key); pressed = InputManager.ButtonPressed(iPad, key); // Toggle @@ -1020,85 +750,15 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key) { } } -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) if (pressed && !repeat && key == ACTION_MENU_STICK_PRESS) { m_iggyPerfmonEnabled = !m_iggyPerfmonEnabled; } #endif // 4J Stu - Removed this function -#if 0 -#if 0 - //if ( pressed && - // !repeat && - // //app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<PrintTotalMemoryUsage(totalStatic, totalDynamic); - } - for(unsigned int i = 0; i < eLibrary_Count; ++i) - { - int64_t libraryStatic = 0; - int64_t libraryDynamic = 0; - - if(m_iggyLibraries[i] != IGGY_INVALID_LIBRARY) - { - - IggyMemoryUseInfo memoryInfo; - rrbool res; - int iteration = 0; - while(res = IggyDebugGetMemoryUseInfo ( NULL , - m_iggyLibraries[i] , - "" , - 0 , - iteration , - &memoryInfo )) - { - libraryStatic += memoryInfo.static_allocation_bytes; - libraryDynamic += memoryInfo.dynamic_allocation_bytes; - totalStatic += memoryInfo.static_allocation_bytes; - totalDynamic += memoryInfo.dynamic_allocation_bytes; - ++iteration; - } - } - - app.DebugPrintf(app.USER_SR, "Library static: %dB , Library dynamic: %d, ID: %d\n", libraryStatic, libraryDynamic, i); - } - app.DebugPrintf(app.USER_SR, "Total static: %d , Total dynamic: %d\n", totalStatic, totalDynamic); - app.DebugPrintf(app.USER_SR, "\n\nEND TOTAL SWF MEMORY USAGE\n"); - app.DebugPrintf(app.USER_SR, "********************************\n\n"); - } - else -#endif -#endif #endif // #endif if (repeat || pressed || released) { @@ -1148,7 +808,7 @@ void UIController::renderScenes() { PIXEndNamedEvent(); -#ifdef ENABLE_IGGY_PERFMON +#if defined(ENABLE_IGGY_PERFMON) if (m_iggyPerfmonEnabled) { IggyPerfmonPad pm_pad; @@ -1276,23 +936,13 @@ void UIController::setupCustomDrawGameState() { m_customRenderingClearRect.top = LONG_MAX; m_customRenderingClearRect.bottom = LONG_MIN; -#if defined _WINDOWS64 || 0 +#if defined(_WINDOWS64) PIXBeginNamedEvent(0, "StartFrame"); RenderManager.StartFrame(); PIXEndNamedEvent(); gdraw_D3D11_setViewport_4J(); -#elif 0 +#elif defined(__linux__) RenderManager.StartFrame(); -#elif 0 - RenderManager.StartFrame(); -#elif defined __linux__ - RenderManager.StartFrame(); -#elif 0 - RenderManager.StartFrame(false); - // Set up a viewport for the render that matches Iggy's own viewport, apart - // form using an opengl-style z-range (Iggy uses a DX-style range on PS4), - // so that the renderer orthographic projection will work - gdraw_orbis_setViewport_4J(); #endif RenderManager.Set_matrixDirty(); @@ -1324,15 +974,6 @@ void UIController::setupCustomDrawMatrices(UIScene* scene, float sceneHeight = (float)scene->getRenderHeight(); LONG left, right, top, bottom; -#if 0 - if (!RenderManager.IsHiDef() && !RenderManager.IsWidescreen()) { - // 4J Stu - Our SD target on PS3 is double width - left = m_tileOriginX + - (sceneWidth + customDrawRegion->mat[(0 * 4) + 3] * sceneWidth); - right = left + ((sceneWidth * customDrawRegion->mat[0])) * - customDrawRegion->x1; - } else -#endif { left = m_tileOriginX + @@ -1388,7 +1029,7 @@ void UIController::setupCustomDrawGameStateAndMatrices( } void UIController::endCustomDrawGameState() { -#if 0 || defined(__linux__) +#if defined(__linux__) RenderManager.Clear(GL_DEPTH_BUFFER_BIT); #else RenderManager.Clear(GL_DEPTH_BUFFER_BIT, &m_customRenderingClearRect); @@ -1461,14 +1102,9 @@ GDrawTexture* RADLINK UIController::TextureSubstitutionCreateCallback( // 4J Stu - All our flash controls that allow replacing textures use // a special 64x64 symbol Force this size here so that our images // don't get scaled wildly -#if (0 || 0) - *width = 96; - *height = 96; -#else *width = 64; *height = 64; -#endif *destroy_callback_data = (void*)(intptr_t)id; app.DebugPrintf("Found substitution texture %ls (%d) - %dx%d\n", @@ -1699,12 +1335,7 @@ void UIController::NavigateToHomeMenu() { // { // pDLCTexPack->m_pSoundBank->Destroy(); // } -#if 0 - const unsigned int result = - StorageManager.UnmountInstalledDLC(L"TPACK"); -#else const unsigned int result = StorageManager.UnmountInstalledDLC("TPACK"); -#endif app.DebugPrintf("Unmount result is %d\n", result); } @@ -1715,7 +1346,7 @@ void UIController::NavigateToHomeMenu() { m_navigateToHomeOnReload = true; } else { ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_MainMenu); -#ifdef ENABLE_JAVA_GUIS +#if defined(ENABLE_JAVA_GUIS) pMinecraft->setScreen(new TitleScreen()); #endif } @@ -1948,13 +1579,6 @@ void UIController::SetMenuDisplayed(int iPad, bool bVal) { m_bMenuToBeClosed[iPad] = true; m_iCountDown[iPad] = 10; -#if 0 - // 4J-JEV: When in-game, allow player to toggle the 'Pause' and - // 'IngameInfo' menus via Kinnect. - if (Minecraft::GetInstance()->running) - InputManager.SetEnabledGtcButtons( - _360_GTC_MENU | _360_GTC_PAUSE | _360_GTC_VIEW); -#endif } } } @@ -2029,16 +1653,9 @@ void UIController::SetTooltips(unsigned int iPad, int iA, int iB, int iX, EUIGroup group; // 4J-PB - strip out any that are not applicable on the platform -#if 1 if (iX == IDS_TOOLTIPS_SELECTDEVICE) iX = -1; if (iX == IDS_TOOLTIPS_CHANGEDEVICE) iX = -1; -#if 0 || 0 || 0 - if (iY == IDS_TOOLTIPS_VIEW_GAMERCARD) iY = -1; - if (iY == IDS_TOOLTIPS_VIEW_GAMERPROFILE) iY = -1; - -#endif -#endif if (app.GetGameStarted()) { // If the game isn't running treat as user 0, otherwise map index @@ -2191,15 +1808,6 @@ void UIController::HandleDLCInstalled(int iPad) { } } -#if 0 -void UIController::HandleDLCLicenseChange() { - for (unsigned int i = 0; i < eUIGroup_COUNT; ++i) { - app.DebugPrintf("UIController::HandleDLCLicenseChange - m_groups[%d]\n", - i); - m_groups[i]->HandleDLCLicenseChange(); - } -} -#endif void UIController::HandleTMSDLCFileRetrieved(int iPad) { app.DebugPrintf( @@ -2267,7 +1875,6 @@ void UIController::SetTutorialDescription(int iPad, TutorialPopupInfo* info) { } } -#if 1 void UIController::RemoveInteractSceneReference(int iPad, UIScene* scene) { EUIGroup group; if ((iPad != 255) && (iPad >= 0)) @@ -2278,7 +1885,6 @@ void UIController::RemoveInteractSceneReference(int iPad, UIScene* scene) { m_groups[(int)group]->getTutorialPopup()->RemoveInteractSceneReference( scene); } -#endif void UIController::SetTutorialVisible(int iPad, bool visible) { EUIGroup group; @@ -2333,10 +1939,8 @@ void UIController::UpdatePlayerBasePositions() { // we don't need Changing the viewport to fullscreen for users that // no longer exist is SLOW This should probably be on all platforms, // but I don't have time to test them all just now! -#if 1 m_groups[idx + 1]->SetViewportType( C4JRender::VIEWPORT_TYPE_FULLSCREEN); -#endif DisplayGamertag(idx, false); } } @@ -2378,7 +1982,7 @@ void UIController::UpdateTrialTimer(unsigned int iPad) { timeTicks = m_dwTrialTimerLimitSecs - timeTicks; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (true) #else // display the time - only if there's less than 3 minutes @@ -2430,7 +2034,6 @@ void UIController::ShowAutosaveCountdownTimer(bool show) { } void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds) { -#if !(0 || 0) wchar_t wcAutosaveCountdown[100]; swprintf(wcAutosaveCountdown, 100, app.GetString(IDS_AUTOSAVE_COUNTDOWN), uiSeconds); @@ -2438,7 +2041,6 @@ void UIController::UpdateAutosaveCountdownTimer(unsigned int uiSeconds) { m_groups[(int)eUIGroup_Fullscreen] ->getPressStartToPlay() ->setTrialTimer(wcAutosaveCountdown); -#endif } void UIController::ShowSavingMessage(unsigned int iPad, @@ -2470,7 +2072,7 @@ void UIController::SetWinUserIndex(unsigned int iPad) { m_winUserIndex = iPad; } unsigned int UIController::GetWinUserIndex() { return m_winUserIndex; } void UIController::ShowUIDebugConsole(bool show) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (show) { m_uiDebugConsole = @@ -2485,7 +2087,7 @@ void UIController::ShowUIDebugConsole(bool show) { } void UIController::ShowUIDebugMarketingGuide(bool show) { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (show) { m_uiDebugMarketingGuide = @@ -2608,24 +2210,10 @@ C4JStorage::EMessageResult UIController::RequestUGCMessageBox( // Default pad to primary player if (iPad == -1) iPad = ProfileManager.GetPrimaryPad(); -#if 0 - // Show the vague UGC system message in addition to our message - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad); - return C4JStorage::EMessage_ResultAccept; -#elif 0 - ProfileManager.ShowSystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, iPad); - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - return ui.RequestAlertMessage(title, IDS_CHAT_RESTRICTION_UGC, uiIDA, 1, - iPad, Func, lpParam); -#else unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; return ui.RequestAlertMessage(title, message, uiIDA, 1, iPad, Func, lpParam); -#endif } C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox( @@ -2638,7 +2226,7 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox( } if (message == -1) { -#if 0 || defined(_WINDOWS64) || defined(__linux__) +#if defined(_WINDOWS64) || defined(__linux__) // IDS_CONTENT_RESTRICTION doesn't exist on XB1 message = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE; #else @@ -2649,21 +2237,10 @@ C4JStorage::EMessageResult UIController::RequestContentRestrictedMessageBox( // Default pad to primary player if (iPad == -1) iPad = ProfileManager.GetPrimaryPad(); -#if 0 - // Show the vague UGC system message in addition to our message - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_UGC_RESTRICTION, iPad); - return C4JStorage::EMessage_ResultAccept; -#elif 0 - ProfileManager.ShowSystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_AGE_RESTRICTION, iPad); - return C4JStorage::EMessage_ResultAccept; -#else unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; return ui.RequestAlertMessage(title, message, uiIDA, 1, iPad, Func, lpParam); -#endif } void UIController::setFontCachingCalculationBuffer(int length) { @@ -2675,7 +2252,7 @@ void UIController::setFontCachingCalculationBuffer(int length) { draw call is not large enough, Iggy will crash or otherwise behave incorrectly. */ -#if 0 || 0 || defined _WIN64 || defined __linux__ +#if defined(_WIN64) || defined(__linux__) static const int CHAR_SIZE = 24; #else static const int CHAR_SIZE = 16; @@ -2700,526 +2277,9 @@ UIScene* UIController::FindScene(EUIScene sceneType) { for (int i = 0; i < eUIGroup_COUNT; i++) { pScene = m_groups[i]->FindScene(sceneType); -#if 0 - if (pScene != NULL) return pScene; -#else if (pScene != nullptr) return pScene; -#endif } return pScene; } -#if 0 - -void UIController::TouchBoxAdd(UIControl* pControl, UIScene* pUIScene) { - EUIGroup eUIGroup = pUIScene->GetParentLayerGroup(); - EUILayer eUILayer = pUIScene->GetParentLayer()->m_iLayer; - EUIScene eUIscene = pUIScene->getSceneType(); - - TouchBoxAdd(pControl, eUIGroup, eUILayer, eUIscene, - pUIScene->GetMainPanel()); -} - -void UIController::TouchBoxAdd(UIControl* pControl, EUIGroup eUIGroup, - EUILayer eUILayer, EUIScene eUIscene, - UIControl* pMainPanelControl) { - UIELEMENT* puiElement = new UIELEMENT; - puiElement->pControl = pControl; - - S32 iControlWidth = pControl->getWidth(); - S32 iControlHeight = pControl->getHeight(); - S32 iMainPanelOffsetX = 0; - S32 iMainPanelOffsetY = 0; - - // 4J-TomK add main panel offset if controls do not live in the root scene - if (pMainPanelControl) { - iMainPanelOffsetX = pMainPanelControl->getXPos(); - iMainPanelOffsetY = pMainPanelControl->getYPos(); - } - - // 4J-TomK override control width / height where needed - if (puiElement->pControl->getControlType() == UIControl::eSlider) { - // Sliders are never scaled but masked, so we have to get the real width - // from AS - UIControl_Slider* pSlider = (UIControl_Slider*)puiElement->pControl; - iControlWidth = pSlider->GetRealWidth(); - } else if (puiElement->pControl->getControlType() == - UIControl::eTexturePackList) { - // The origin of the TexturePackList is NOT in the top left corner but - // where the slot area starts. therefore we need the height of the slot - // area itself. - UIControl_TexturePackList* pTexturePackList = - (UIControl_TexturePackList*)puiElement->pControl; - iControlHeight = pTexturePackList->GetRealHeight(); - } else if (puiElement->pControl->getControlType() == - UIControl::eDynamicLabel) { - // The height and width of this control changes per how to play page - UIControl_DynamicLabel* pDynamicLabel = - (UIControl_DynamicLabel*)puiElement->pControl; - iControlWidth = pDynamicLabel->GetRealWidth(); - iControlHeight = pDynamicLabel->GetRealHeight(); - } else if (puiElement->pControl->getControlType() == - UIControl::eHTMLLabel) { - // The height and width of this control changes per how to play page - UIControl_HTMLLabel* pHtmlLabel = - (UIControl_HTMLLabel*)puiElement->pControl; - iControlWidth = pHtmlLabel->GetRealWidth(); - iControlHeight = pHtmlLabel->GetRealHeight(); - } - - puiElement->x1 = - (S32)((float)pControl->getXPos() + (float)iMainPanelOffsetX); - puiElement->y1 = - (S32)((float)pControl->getYPos() + (float)iMainPanelOffsetY); - puiElement->x2 = (S32)(((float)pControl->getXPos() + (float)iControlWidth + - (float)iMainPanelOffsetX)); - puiElement->y2 = (S32)(((float)pControl->getYPos() + (float)iControlHeight + - (float)iMainPanelOffsetY)); - - if (puiElement->pControl->getControlType() == UIControl::eNoControl) { - app.DebugPrintf("NO CONTROL!"); - } - - if (puiElement->x1 == puiElement->x2 || puiElement->y1 == puiElement->y2) { - app.DebugPrintf("NOT adding touchbox %d,%d,%d,%d\n", puiElement->x1, - puiElement->y1, puiElement->x2, puiElement->y2); - } else { - app.DebugPrintf("Adding touchbox %d,%d,%d,%d\n", puiElement->x1, - puiElement->y1, puiElement->x2, puiElement->y2); - m_TouchBoxes[eUIGroup][eUILayer][eUIscene].push_back(puiElement); - } -} - -void UIController::TouchBoxRebuild(UIScene* pUIScene) { - EUIGroup eUIGroup = pUIScene->GetParentLayerGroup(); - EUILayer eUILayer = pUIScene->GetParentLayer()->m_iLayer; - EUIScene eUIscene = pUIScene->getSceneType(); - - // if we delete an element, it's possible that the scene has re-arranged all - // the elements, so we need to rebuild the boxes - ui.TouchBoxesClear(pUIScene); - - // rebuild boxes - AUTO_VAR(itEnd, pUIScene->GetControls()->end()); - for (AUTO_VAR(it, pUIScene->GetControls()->begin()); it != itEnd; it++) { - UIControl* control = (UIControl*)*it; - - if (control->getControlType() == UIControl::eButton || - control->getControlType() == UIControl::eSlider || - control->getControlType() == UIControl::eCheckBox || - control->getControlType() == UIControl::eTexturePackList || - control->getControlType() == UIControl::eButtonList || - control->getControlType() == UIControl::eTextInput || - control->getControlType() == UIControl::eDynamicLabel || - control->getControlType() == UIControl::eHTMLLabel || - control->getControlType() == UIControl::eLeaderboardList || - control->getControlType() == UIControl::eTouchControl) { - if (control->getVisible()) { - // 4J-TomK update the control (it might have been moved by flash - // / AS) - control->UpdateControl(); - - ui.TouchBoxAdd(control, eUIGroup, eUILayer, eUIscene, - pUIScene->GetMainPanel()); - } - } - } -} - -void UIController::TouchBoxesClear(UIScene* pUIScene) { - EUIGroup eUIGroup = pUIScene->GetParentLayerGroup(); - EUILayer eUILayer = pUIScene->GetParentLayer()->m_iLayer; - EUIScene eUIscene = pUIScene->getSceneType(); - - AUTO_VAR(itEnd, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].end()); - for (AUTO_VAR(it, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].begin()); - it != itEnd; it++) { - UIELEMENT* element = (UIELEMENT*)*it; - delete element; - } - m_TouchBoxes[eUIGroup][eUILayer][eUIscene].clear(); -} - -bool UIController::TouchBoxHit(UIScene* pUIScene, S32 x, S32 y) { - EUIGroup eUIGroup = pUIScene->GetParentLayerGroup(); - EUILayer eUILayer = pUIScene->GetParentLayer()->m_iLayer; - EUIScene eUIscene = pUIScene->getSceneType(); - - // 4J-TomK let's do the transformation from touch resolution to screen - // resolution here, so our touchbox values always are in screen resolution! - x *= (m_fScreenWidth / 1920.0f); - y *= (m_fScreenHeight / 1080.0f); - - if (m_TouchBoxes[eUIGroup][eUILayer][eUIscene].size() > 0) { - AUTO_VAR(itEnd, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].end()); - for (AUTO_VAR(it, m_TouchBoxes[eUIGroup][eUILayer][eUIscene].begin()); - it != itEnd; it++) { - UIELEMENT* element = (UIELEMENT*)*it; - if (element->pControl->getHidden() == false && - element->pControl->getVisible()) // ignore removed controls - { - if ((x >= element->x1) && (x <= element->x2) && - (y >= element->y1) && (y <= element->y2)) { - if (!m_bTouchscreenPressed) { - app.DebugPrintf( - "SET m_ActiveUIElement (Layer: %i) at x = %i y = " - "%i\n", - (int)eUILayer, (int)x, (int)y); - m_ActiveUIElement = element; - } - // remember the currently highlighted element - m_HighlightedUIElement = element; - - return true; - } - } - } - } - - // app.DebugPrintf("MISS at x = %i y = %i\n", (int)x, (int)y); - m_HighlightedUIElement = NULL; - return false; -} - -// -// Handle Touch Input -// -void UIController::HandleTouchInput(unsigned int iPad, unsigned int key, - bool bPressed, bool bRepeat, - bool bReleased) { - // no input? no handling! - if (!bPressed && !bRepeat && !bReleased) { - // override for instand repeat without delay! - if (m_bTouchscreenPressed && m_ActiveUIElement && - (m_ActiveUIElement->pControl->getControlType() == - UIControl::eSlider || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eButtonList || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eTexturePackList || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eDynamicLabel || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eHTMLLabel || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eLeaderboardList || - m_ActiveUIElement->pControl->getControlType() == - UIControl::eTouchControl)) - bRepeat = true; // the above controls need to be controllable - // without having the finger over them - else - return; - } - - SceTouchData* pTouchData = InputManager.GetTouchPadData(iPad, false); - S32 x = pTouchData->report[0].x * (m_fScreenWidth / 1920.0f); - S32 y = pTouchData->report[0].y * (m_fScreenHeight / 1080.0f); - - if (bPressed && !bRepeat && !bReleased) // PRESSED HANDLING - { - app.DebugPrintf("touch input pressed\n"); - switch (m_ActiveUIElement->pControl->getControlType()) { - case UIControl::eButton: - // set focus - UIControl_Button* pButton = - (UIControl_Button*)m_ActiveUIElement->pControl; - pButton->getParentScene()->SetFocusToElement( - m_ActiveUIElement->pControl->getId()); - // override bPressed to false. we only want the button to - // trigger on touch release! - bPressed = false; - break; - case UIControl::eSlider: - // set focus - UIControl_Slider* pSlider = - (UIControl_Slider*)m_ActiveUIElement->pControl; - pSlider->getParentScene()->SetFocusToElement( - m_ActiveUIElement->pControl->getId()); - break; - case UIControl::eCheckBox: - // set focus - UIControl_CheckBox* pCheckbox = - (UIControl_CheckBox*)m_ActiveUIElement->pControl; - pCheckbox->getParentScene()->SetFocusToElement( - m_ActiveUIElement->pControl->getId()); - // override bPressed. we only want the checkbox to trigger on - // touch release! - bPressed = false; - break; - case UIControl::eButtonList: - // set focus to list - UIControl_ButtonList* pButtonList = - (UIControl_ButtonList*)m_ActiveUIElement->pControl; - // pButtonList->getParentScene()->SetFocusToElement(m_ActiveUIElement->pControl->getId()); - // tell list where we tapped it so it can set focus to the - // correct button - pButtonList->SetTouchFocus((float)x, (float)y, false); - // override bPressed. we only want the ButtonList to trigger on - // touch release! - bPressed = false; - break; - case UIControl::eTexturePackList: - // set focus to list - UIControl_TexturePackList* pTexturePackList = - (UIControl_TexturePackList*)m_ActiveUIElement->pControl; - pTexturePackList->getParentScene()->SetFocusToElement( - m_ActiveUIElement->pControl->getId()); - // tell list where we tapped it so it can set focus to the - // correct texture pack - pTexturePackList->SetTouchFocus( - (float)x - (float)m_ActiveUIElement->x1, - (float)y - (float)m_ActiveUIElement->y1, false); - // override bPressed. we only want the TexturePack List to - // trigger on touch release! - bPressed = false; - break; - case UIControl::eTextInput: - // set focus - UIControl_TextInput* pTextInput = - (UIControl_TextInput*)m_ActiveUIElement->pControl; - pTextInput->getParentScene()->SetFocusToElement( - m_ActiveUIElement->pControl->getId()); - // override bPressed to false. we only want the textinput to - // trigger on touch release! - bPressed = false; - break; - case UIControl::eDynamicLabel: - // handle dynamic label scrolling - UIControl_DynamicLabel* pDynamicLabel = - (UIControl_DynamicLabel*)m_ActiveUIElement->pControl; - pDynamicLabel->TouchScroll(y, true); - // override bPressed to false - bPressed = false; - break; - case UIControl::eHTMLLabel: - // handle dynamic label scrolling - UIControl_HTMLLabel* pHtmlLabel = - (UIControl_HTMLLabel*)m_ActiveUIElement->pControl; - pHtmlLabel->TouchScroll(y, true); - // override bPressed to false - bPressed = false; - break; - case UIControl::eLeaderboardList: - // set focus to list - UIControl_LeaderboardList* pLeaderboardList = - (UIControl_LeaderboardList*)m_ActiveUIElement->pControl; - // tell list where we tapped it so it can set focus to the - // correct button - pLeaderboardList->SetTouchFocus((float)x, (float)y, false); - // override bPressed. we only want the ButtonList to trigger on - // touch release! - bPressed = false; - break; - case UIControl::eTouchControl: - // pass on touch input to relevant parent scene so we can handle - // it there! - m_ActiveUIElement->pControl->getParentScene()->handleTouchInput( - iPad, x, y, m_ActiveUIElement->pControl->getId(), bPressed, - bRepeat, bReleased); - // override bPressed to false - bPressed = false; - break; - default: - app.DebugPrintf("PRESSED - UNHANDLED UI ELEMENT\n"); - break; - } - } else if (bRepeat) // REPEAT HANDLING - { - switch (m_ActiveUIElement->pControl->getControlType()) { - case UIControl::eButton: - /* no action */ - break; - case UIControl::eSlider: - // handle slider movement - UIControl_Slider* pSlider = - (UIControl_Slider*)m_ActiveUIElement->pControl; - float fNewSliderPos = - ((float)x - (float)m_ActiveUIElement->x1) / - (float)pSlider->GetRealWidth(); - pSlider->SetSliderTouchPos(fNewSliderPos); - break; - case UIControl::eCheckBox: - /* no action */ - bRepeat = false; - bPressed = false; - break; - case UIControl::eButtonList: - // handle button list scrolling - UIControl_ButtonList* pButtonList = - (UIControl_ButtonList*)m_ActiveUIElement->pControl; - pButtonList->SetTouchFocus((float)x, (float)y, true); - break; - case UIControl::eTexturePackList: - // handle texturepack list scrolling - UIControl_TexturePackList* pTexturePackList = - (UIControl_TexturePackList*)m_ActiveUIElement->pControl; - pTexturePackList->SetTouchFocus( - (float)x - (float)m_ActiveUIElement->x1, - (float)y - (float)m_ActiveUIElement->y1, true); - break; - case UIControl::eTextInput: - /* no action */ - bRepeat = false; - bPressed = false; - break; - case UIControl::eDynamicLabel: - // handle dynamic label scrolling - UIControl_DynamicLabel* pDynamicLabel = - (UIControl_DynamicLabel*)m_ActiveUIElement->pControl; - pDynamicLabel->TouchScroll(y, true); - // override bPressed & bRepeat to false - bPressed = false; - bRepeat = false; - break; - case UIControl::eHTMLLabel: - // handle dynamic label scrolling - UIControl_HTMLLabel* pHtmlLabel = - (UIControl_HTMLLabel*)m_ActiveUIElement->pControl; - pHtmlLabel->TouchScroll(y, true); - // override bPressed & bRepeat to false - bPressed = false; - bRepeat = false; - break; - case UIControl::eLeaderboardList: - // handle button list scrolling - UIControl_LeaderboardList* pLeaderboardList = - (UIControl_LeaderboardList*)m_ActiveUIElement->pControl; - pLeaderboardList->SetTouchFocus((float)x, (float)y, true); - break; - case UIControl::eTouchControl: - // override bPressed to false - bPressed = false; - // pass on touch input to relevant parent scene so we can handle - // it there! - m_ActiveUIElement->pControl->getParentScene()->handleTouchInput( - iPad, x, y, m_ActiveUIElement->pControl->getId(), bPressed, - bRepeat, bReleased); - // override bRepeat to false - bRepeat = false; - break; - default: - app.DebugPrintf("REPEAT - UNHANDLED UI ELEMENT\n"); - break; - } - } - if (bReleased) // RELEASED HANDLING - { - app.DebugPrintf("touch input released\n"); - switch (m_ActiveUIElement->pControl->getControlType()) { - case UIControl::eButton: - // trigger button on release (ONLY if the finger is still on - // it!) - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) - bPressed = true; - break; - case UIControl::eSlider: - /* no action */ - break; - case UIControl::eCheckBox: - // trigger checkbox on release (ONLY if the finger is still on - // it!) - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) { - UIControl_CheckBox* pCheckbox = - (UIControl_CheckBox*)m_ActiveUIElement->pControl; - if (pCheckbox->IsEnabled()) // only proceed if checkbox is - // enabled! - pCheckbox->TouchSetCheckbox(!pCheckbox->IsChecked()); - } - bReleased = false; - break; - case UIControl::eButtonList: - // trigger buttonlist on release (ONLY if the finger is still on - // it!) - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) { - UIControl_ButtonList* pButtonList = - (UIControl_ButtonList*)m_ActiveUIElement->pControl; - if (pButtonList->CanTouchTrigger(x, y)) bPressed = true; - } - break; - case UIControl::eTexturePackList: - // trigger texturepack list on release (ONLY if the finger is - // still on it!) - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) { - UIControl_TexturePackList* pTexturePackList = - (UIControl_TexturePackList*)m_ActiveUIElement->pControl; - if (pTexturePackList->CanTouchTrigger( - (float)x - (float)m_ActiveUIElement->x1, - (float)y - (float)m_ActiveUIElement->y1)) - bPressed = true; - } - break; - case UIControl::eTextInput: - // trigger TextInput on release (ONLY if the finger is still on - // it!) - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) - bPressed = true; - break; - case UIControl::eDynamicLabel: - // handle dynamic label scrolling - UIControl_DynamicLabel* pDynamicLabel = - (UIControl_DynamicLabel*)m_ActiveUIElement->pControl; - pDynamicLabel->TouchScroll(y, false); - break; - case UIControl::eHTMLLabel: - // handle dynamic label scrolling - UIControl_HTMLLabel* pHtmlLabel = - (UIControl_HTMLLabel*)m_ActiveUIElement->pControl; - pHtmlLabel->TouchScroll(y, false); - break; - case UIControl::eLeaderboardList: - /* no action */ - break; - case UIControl::eTouchControl: - // trigger only if touch is released over the same component! - if (m_HighlightedUIElement && - m_ActiveUIElement->pControl == - m_HighlightedUIElement->pControl) { - // pass on touch input to relevant parent scene so we can - // handle it there! - m_ActiveUIElement->pControl->getParentScene() - ->handleTouchInput(iPad, x, y, - m_ActiveUIElement->pControl->getId(), - bPressed, bRepeat, bReleased); - } - // override bReleased to false - bReleased = false; - break; - default: - app.DebugPrintf("RELEASED - UNHANDLED UI ELEMENT\n"); - break; - } - } - - // only proceed if there's input to be handled - if (bPressed || bRepeat || bReleased) { - SendTouchInput(iPad, key, bPressed, bRepeat, bReleased); - } -} - -void UIController::SendTouchInput(unsigned int iPad, unsigned int key, - bool bPressed, bool bRepeat, bool bReleased) { - bool handled = false; - - // Send the key to the fullscreen group first - m_groups[(int)eUIGroup_Fullscreen]->handleInput( - iPad, key, bRepeat, bPressed, bReleased, handled); - if (!handled) { - // If it's not been handled yet, then pass the event onto the players - // specific group - m_groups[(iPad + 1)]->handleInput(iPad, key, bRepeat, bPressed, - bReleased, handled); - } -} - -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIController.h b/Minecraft.Client/Platform/Common/UI/UIController.h index 9d6ae1435..218204bc3 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.h +++ b/Minecraft.Client/Platform/Common/UI/UIController.h @@ -74,17 +74,6 @@ public: private: // 4J-PB - ui element type for PSVita touch control -#if 0 - - typedef struct { - UIControl* pControl; - S32 x1, y1, x2, y2; - } UIELEMENT; - // E3 - Fine for now, but we need to make this better! - std::vector m_TouchBoxes[eUIGroup_COUNT][eUILayer_COUNT] - [eUIScene_COUNT]; - bool m_bTouchscreenPressed; -#endif // 4J Stu - These should be in the order that they reference each other // (i.e. they can only reference one with a lower value in the enum) enum ELibraries { @@ -100,10 +89,10 @@ private: eLibrary_Tooltips, eLibrary_Default, -#if (defined(_WINDOWS64)) +#if defined(_WINDOWS64) // 4J Stu - Load the 720/480 skins so that we have something to fallback on // during development -#ifndef _FINAL_BUILD +#if !defined(_FINAL_BUILD) eLibraryFallback_Platform, eLibraryFallback_GraphicsDefault, eLibraryFallback_GraphicsHUD, @@ -181,23 +170,6 @@ private: public: UIController(); -#if 0 - void TouchBoxAdd(UIControl* pControl, UIScene* pUIScene); - bool TouchBoxHit(UIScene* pUIScene, S32 x, S32 y); - void TouchBoxesClear(UIScene* pUIScene); - void TouchBoxRebuild(UIScene* pUIScene); - - void HandleTouchInput(unsigned int iPad, unsigned int key, bool bPressed, - bool bRepeat, bool bReleased); - void SendTouchInput(unsigned int iPad, unsigned int key, bool bPressed, - bool bRepeat, bool bReleased); - -private: - void TouchBoxAdd(UIControl* pControl, EUIGroup eUIGroup, EUILayer eUILayer, - EUIScene eUIscene, UIControl* pMainPanelControl); - UIELEMENT* m_ActiveUIElement; - UIELEMENT* m_HighlightedUIElement; -#endif protected: UIGroup* m_groups[eUIGroup_COUNT]; @@ -383,9 +355,6 @@ public: virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(int iPad); -#if 0 - virtual void HandleDLCLicenseChange(); -#endif virtual void HandleTMSDLCFileRetrieved(int iPad); virtual void HandleTMSBanFileRetrieved(int iPad); virtual void HandleInventoryUpdated(int iPad); diff --git a/Minecraft.Client/Platform/Common/UI/UIEnums.h b/Minecraft.Client/Platform/Common/UI/UIEnums.h index def283ca3..7ddb081e2 100644 --- a/Minecraft.Client/Platform/Common/UI/UIEnums.h +++ b/Minecraft.Client/Platform/Common/UI/UIEnums.h @@ -5,11 +5,9 @@ enum EUIGroup { eUIGroup_Fullscreen, eUIGroup_Player1, -#if 1 eUIGroup_Player2, eUIGroup_Player3, eUIGroup_Player4, -#endif eUIGroup_COUNT, @@ -19,7 +17,7 @@ enum EUIGroup { // Defines the layers in a UI group (lower numbers ticked first, rendered last // (ie on top)) enum EUILayer { -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) eUILayer_Debug, #endif eUILayer_Tooltips, @@ -103,9 +101,6 @@ enum EUIScene { eUIScene_HorseMenu, eUIScene_FireworksMenu, -#if 0 -// eUIScene_TransferToXboxOne, -#endif // **************************************** // **************************************** @@ -116,7 +111,6 @@ enum EUIScene { // CConsoleMinecraftApp::NavigateToScene There are quite a few so you need to // check them all Also update UILayer::updateFocusState -#if 1 // Anything non-xbox should be added here. The ordering of scenes above is // required for sentient reporting on xbox 360 to continue to be accurate eUIComponent_Panorama, @@ -133,13 +127,12 @@ enum EUIScene { eUIScene_EULA, eUIScene_InGameSaveManagementMenu, eUIScene_LanguageSelector, -#endif // ndef 0 -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) eUIScene_DebugOverlay, eUIScene_DebugItemEditor, #endif -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) eUIScene_DebugCreateSchematic, eUIScene_DebugSetCamera, #endif @@ -232,10 +225,6 @@ enum EHowToPlayPage { eHowToPlay_NetherPortal, eHowToPlay_TheEnd, -#if 0 - eHowToPlay_SocialMedia, - eHowToPlay_BanList, -#endif eHowToPlay_HostOptions, eHowToPlay_NumPages }; diff --git a/Minecraft.Client/Platform/Common/UI/UIFontData.cpp b/Minecraft.Client/Platform/Common/UI/UIFontData.cpp index 411b0e703..85f96687e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIFontData.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIFontData.cpp @@ -9,11 +9,7 @@ SFontData SFontData::Mojangles_7 = { /* Font Name */ "Mojangles7", -#if 0 - /* filename */ L"/font/Mojangles_7.png", -#else /* Filename */ L"/TitleUpdate/res/font/Mojangles_7.png", -#endif /* Glyph count */ FONTSIZE, /* Codepoints */ SFontData::Codepoints, @@ -39,11 +35,7 @@ SFontData SFontData::Mojangles_11 = { /* Font Name */ "Mojangles11", -#if 0 - /* filename */ L"/font/Mojangles_11.png", -#else /* Filename */ L"/TitleUpdate/res/font/Mojangles_11.png", -#endif /* Glyph count */ FONTSIZE, /* Codepoints */ SFontData::Codepoints, @@ -762,7 +754,7 @@ CFontData::CFontData(SFontData& sFontData, int* pbRawImage) } // DEBUG // -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) for (int i = 0; i < sFontData.m_uiGlyphCount; i++) { int unicode = getUnicode(i), unicodeChar = 32, row, col; if (32 < unicode && unicode < 127 && unicode != 0x0025) { diff --git a/Minecraft.Client/Platform/Common/UI/UIGroup.cpp b/Minecraft.Client/Platform/Common/UI/UIGroup.cpp index d664b0ce9..a9c0d3316 100644 --- a/Minecraft.Client/Platform/Common/UI/UIGroup.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIGroup.cpp @@ -17,9 +17,6 @@ UIGroup::UIGroup(EUIGroup group, int iPad) { for (unsigned int i = 0; i < eUILayer_COUNT; ++i) { m_layers[i] = new UILayer(this); -#if 0 - m_layers[i]->m_iLayer = (EUILayer)i; -#endif } m_tooltips = @@ -188,18 +185,6 @@ bool UIGroup::HasFocus(int iPad) { return hasFocus; } -#if 0 -UIScene* UIGroup::getCurrentScene() { - UIScene* pScene; - for (unsigned int i = 0; i < eUILayer_COUNT; ++i) { - pScene = m_layers[i]->getCurrentScene(); - - if (pScene != NULL) return pScene; - } - - return NULL; -} -#endif // INPUT void UIGroup::handleInput(int iPad, int key, bool repeat, bool pressed, @@ -273,15 +258,6 @@ void UIGroup::HandleDLCInstalled() { } } -#if 0 -void UIGroup::HandleDLCLicenseChange() { - // Ignore this group if the player isn't signed in - if (m_iPad >= 0 && !ProfileManager.IsSignedIn(m_iPad)) return; - for (unsigned int i = 0; i < eUILayer_COUNT; ++i) { - m_layers[i]->HandleDLCLicenseChange(); - } -} -#endif void UIGroup::HandleMessage(EUIMessage message, void* data) { // Ignore this group if the player isn't signed in @@ -369,11 +345,7 @@ UIScene* UIGroup::FindScene(EUIScene sceneType) { for (int i = 0; i < eUILayer_COUNT; i++) { pScene = m_layers[i]->FindScene(sceneType); -#if 0 - if (pScene != NULL) return pScene; -#else if (pScene != nullptr) return pScene; -#endif } return pScene; diff --git a/Minecraft.Client/Platform/Common/UI/UIGroup.h b/Minecraft.Client/Platform/Common/UI/UIGroup.h index 103fce732..e0c46fdc5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIGroup.h +++ b/Minecraft.Client/Platform/Common/UI/UIGroup.h @@ -37,9 +37,6 @@ private: public: UIGroup(EUIGroup group, int iPad); -#if 0 - EUIGroup GetGroup() { return m_group; } -#endif UIComponent_Tooltips* getTooltips() { return m_tooltips; } UIComponent_TutorialPopup* getTutorialPopup() { return m_tutorialPopup; } UIScene_HUD* getHUD() { return m_hud; } @@ -83,10 +80,6 @@ public: void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled); -#if 0 - // Current active scene - UIScene* getCurrentScene(); -#endif // FOCUS bool getFocusState(); @@ -104,9 +97,6 @@ public: virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(); -#if 0 - virtual void HandleDLCLicenseChange(); -#endif virtual void HandleMessage(EUIMessage message, void* data); bool IsFullscreenGroup(); diff --git a/Minecraft.Client/Platform/Common/UI/UILayer.cpp b/Minecraft.Client/Platform/Common/UI/UILayer.cpp index 7896c1fff..204852864 100644 --- a/Minecraft.Client/Platform/Common/UI/UILayer.cpp +++ b/Minecraft.Client/Platform/Common/UI/UILayer.cpp @@ -173,7 +173,7 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void* initData) { UIScene* newScene = NULL; switch (scene) { // Debug -#ifdef _DEBUG_MENUS_ENABLED +#if defined(_DEBUG_MENUS_ENABLED) case eUIScene_DebugOverlay: newScene = new UIScene_DebugOverlay(iPad, initData, this); break; @@ -301,12 +301,6 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void* initData) { newScene = new UIScene_InGamePlayerOptionsMenu(iPad, initData, this); break; -#if 0 || 0 - case eUIScene_InGameSaveManagementMenu: - newScene = - new UIScene_InGameSaveManagementMenu(iPad, initData, this); - break; -#endif case eUIScene_TeleportMenu: newScene = new UIScene_TeleportMenu(iPad, initData, this); break; @@ -540,10 +534,6 @@ void UILayer::removeComponent(EUIScene scene) { for (AUTO_VAR(compIt, m_components.begin()); compIt != m_components.end();) { if ((*compIt)->getSceneType() == scene) { -#if 0 - // remove any touchboxes - ui.TouchBoxesClear((*compIt)); -#endif m_scenesToDelete.push_back((*compIt)); (*compIt)->handleDestroy(); // For anything that might // require the pointer be valid @@ -557,10 +547,6 @@ void UILayer::removeComponent(EUIScene scene) { } void UILayer::removeScene(UIScene* scene) { -#if 0 - // remove any touchboxes - ui.TouchBoxesClear(scene); -#endif AUTO_VAR(newEnd, std::remove(m_sceneStack.begin(), m_sceneStack.end(), scene)); @@ -586,10 +572,6 @@ void UILayer::closeAllScenes() { temp.insert(temp.end(), m_sceneStack.begin(), m_sceneStack.end()); m_sceneStack.clear(); for (AUTO_VAR(it, temp.begin()); it != temp.end(); ++it) { -#if 0 - // remove any touchboxes - ui.TouchBoxesClear(*it); -#endif m_scenesToDelete.push_back(*it); (*it)->handleDestroy(); // For anything that might require the pointer // be valid @@ -645,9 +627,7 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */) { // (and likely Vita), but I'm removing it on XboxOne so that we // can avoid the scene creation time (which can be >0.5s) since // we have the memory to spare -#if 1 m_scenesToDestroy.push_back(scene); -#endif } if (scene->getSceneType() == eUIScene_SettingsOptionsMenu) { @@ -711,20 +691,6 @@ bool UILayer::updateFocusState(bool allowedFocus /* = false */) { return m_hasFocus; } -#if 0 -UIScene* UILayer::getCurrentScene() { - // Note: reverse iterator, the last element is the top of the stack - for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) { - UIScene* scene = *it; - // 4J-PB - only used on Vita, so iPad 0 is fine - if (scene->hasFocus(0) && scene->canHandleInput()) { - return scene; - } - } - - return NULL; -} -#endif void UILayer::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled) { @@ -767,14 +733,6 @@ void UILayer::HandleDLCInstalled() { } } -#if 0 -void UILayer::HandleDLCLicenseChange() { - for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) { - UIScene* topScene = *it; - topScene->HandleDLCLicenseChange(); - } -} -#endif void UILayer::HandleMessage(EUIMessage message, void* data) { for (AUTO_VAR(it, m_sceneStack.rbegin()); it != m_sceneStack.rend(); ++it) { diff --git a/Minecraft.Client/Platform/Common/UI/UILayer.h b/Minecraft.Client/Platform/Common/UI/UILayer.h index a26bd74b7..4be635713 100644 --- a/Minecraft.Client/Platform/Common/UI/UILayer.h +++ b/Minecraft.Client/Platform/Common/UI/UILayer.h @@ -17,12 +17,7 @@ private: std::vector m_scenesToDestroy; // A list of scenes where we want to dump the swf -#if 0 - std::unordered_map, std::hash> - m_componentRefCount; -#else std::unordered_map> m_componentRefCount; -#endif public: bool m_hasFocus; // True if the layer "has focus", should be the only layer @@ -33,9 +28,6 @@ public: bool m_bIgnoreAutosaveMenuDisplayed; bool m_bIgnorePlayerJoinMenuDisplayed; -#if 0 - EUILayer m_iLayer; -#endif UIGroup* m_parentGroup; @@ -76,10 +68,6 @@ public: // INPUT void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled); -#if 0 - // Current active scene - UIScene* getCurrentScene(); -#endif // FOCUS bool updateFocusState(bool allowedFocus = false); @@ -90,9 +78,6 @@ public: virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(); -#if 0 - virtual void HandleDLCLicenseChange(); -#endif virtual void HandleMessage(EUIMessage message, void* data); void handleUnlockFullVersion(); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene.cpp b/Minecraft.Client/Platform/Common/UI/UIScene.cpp index 225912a67..39ee814c0 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene.cpp @@ -117,7 +117,6 @@ F64 UIScene::getSafeZoneHalfHeight() { float safeHeight = 0.0f; -#if 1 if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) { // 90% safezone safeHeight = height * (0.15f / 2); @@ -125,7 +124,6 @@ F64 UIScene::getSafeZoneHalfHeight() { // 90% safezone safeHeight = height * (0.1f / 2); } -#endif return safeHeight; } @@ -133,7 +131,6 @@ F64 UIScene::getSafeZoneHalfWidth() { float width = ui.getScreenWidth(); float safeWidth = 0.0f; -#if 1 if (!RenderManager.IsHiDef() && RenderManager.IsWidescreen()) { // 85% safezone safeWidth = width * (0.15f / 2); @@ -141,7 +138,6 @@ F64 UIScene::getSafeZoneHalfWidth() { // 90% safezone safeWidth = width * (0.1f / 2); } -#endif return safeWidth; } @@ -223,23 +219,6 @@ void UIScene::initialiseMovie() { m_bUpdateOpacity = true; } -#if 0 -void UIScene::SetFocusToElement(int iID) { - IggyDataValue result; - IggyDataValue value[1]; - - value[0].type = IGGY_DATATYPE_number; - value[0].number = iID; - - IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, - IggyPlayerRootPath(getMovie()), - m_funcSetFocus, 1, value); - - // also trigger handle focus change (just in case if anything else in - // relation needs updating!) - _handleFocusChange(iID, 0); -} -#endif bool UIScene::mapElementsAndNames() { m_rootPath = IggyPlayerRootPath(swf); @@ -262,18 +241,7 @@ void UIScene::loadMovie() { // were being reloaded std::wstring moviePath = getMoviePath(); -#if 0 - if (RenderManager.IsWidescreen()) { - moviePath.append(L"720.swf"); - m_loadedResolution = eSceneResolution_720; - } else { - moviePath.append(L"480.swf"); - m_loadedResolution = eSceneResolution_480; - } -#elif 0 - moviePath.append(L"Vita.swf"); - m_loadedResolution = eSceneResolution_Vita; -#elif defined _WINDOWS64 +#if defined(_WINDOWS64) if (ui.getScreenHeight() == 720) { moviePath.append(L"720.swf"); m_loadedResolution = eSceneResolution_720; @@ -304,7 +272,7 @@ void UIScene::loadMovie() { if (!app.hasArchiveFile(moviePath)) { app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n", moviePath.c_str()); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif app.FatalLoadError(); @@ -320,7 +288,7 @@ void UIScene::loadMovie() { if (!swf) { app.DebugPrintf("ERROR: Failed to load iggy scene!\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif app.FatalLoadError(); @@ -340,31 +308,6 @@ void UIScene::loadMovie() { IggyPlayerSetUserdata(swf, this); // #ifdef _DEBUG -#if 0 - IggyMemoryUseInfo memoryInfo; - rrbool res; - int iteration = 0; - int64_t totalStatic = 0; - int64_t totalDynamic = 0; - while(res = IggyDebugGetMemoryUseInfo ( swf , - NULL , - 0 , - 0 , - iteration , - &memoryInfo )) - { - totalStatic += memoryInfo.static_allocation_bytes; - totalDynamic += memoryInfo.dynamic_allocation_bytes; - app.DebugPrintf(app.USER_SR, "%ls - %.*s static: %d ( %d ) dynamic: %d ( %d )\n", moviePath.c_str(), memoryInfo.subcategory_stringlen, memoryInfo.subcategory, - memoryInfo.static_allocation_bytes, memoryInfo.static_allocation_count, memoryInfo.dynamic_allocation_bytes, memoryInfo.dynamic_allocation_count); - ++iteration; - //if(memoryInfo.static_allocation_bytes > 0) getDebugMemoryUseRecursive(moviePath, memoryInfo); - - } - - app.DebugPrintf(app.USER_SR, "%ls - Total: %d, Expected: %d, Diff: %d\n", moviePath.c_str(), totalStatic + totalDynamic, afterTick - beforeLoad, (afterTick - beforeLoad) - (totalStatic + totalDynamic)); - -#endif LeaveCriticalSection(&UIController::ms_reloadSkinCS); } @@ -498,15 +441,6 @@ void UIScene::removeControl(UIControl_Base* control, bool centreScene) { IggyPlayerRootPath(getMovie()), m_funcRemoveObject, 2, value); -#if 0 - // update the button positions since they may have changed - UpdateSceneControls(); - - // mark the button as removed - control->setHidden(true); - // remove it from the touchboxes - ui.TouchBoxRebuild(control->getParentScene()); -#endif } void UIScene::slideLeft() { @@ -592,18 +526,9 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion* region, int list = m_parentLayer->m_parentGroup->getCommandBufferList(); bool useCommandBuffers = false; -#if 0 - useCommandBuffers = true; - - // 4J Stu - Temporary until we fix the glint animation which - // needs updated if we are just replaying a command buffer - m_needsCacheRendered = true; -#endif if (!useCommandBuffers || m_needsCacheRendered) { -#if (!0) && (!0) if (useCommandBuffers) RenderManager.CBuffStart(list, true); -#endif PIXBeginNamedEvent(0, "Draw uncached"); ui.setupCustomDrawMatrices(this, customDrawRegion); _customDrawSlotControl(customDrawRegion, iPad, item, fAlpha, @@ -627,15 +552,11 @@ void UIScene::customDrawSlotControl(IggyCustomDrawCallbackRegion* region, delete drawData; } PIXEndNamedEvent(); -#if 1 if (useCommandBuffers) RenderManager.CBuffEnd(); -#endif } m_cachedSlotDraw.clear(); -#if 1 if (useCommandBuffers) RenderManager.CBuffCall(list); -#endif // Finish GDraw and anything else that needs to be finalised ui.endCustomDraw(region); @@ -790,17 +711,12 @@ void UIScene::navigateBack() { if (m_parentLayer == NULL) { // app.DebugPrintf("A scene is trying to navigate back, but it's // parent layer is NULL!\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) // __debugbreak(); #endif } else { // m_parentLayer->removeScene(this); -#if 0 - if (ui.GetTopScene(0)) - InputManager.SetEnabledGtcButtons( - ui.GetTopScene(0)->getDefaultGtcButtons()); -#endif } } @@ -860,9 +776,6 @@ void UIScene::loseFocus() { } void UIScene::handleGainFocus(bool navBack) { -#if 0 - InputManager.SetEnabledGtcButtons(this->getDefaultGtcButtons()); -#endif } void UIScene::updateTooltips() { @@ -894,9 +807,6 @@ int UIScene::convertGameActionToIggyKeycode(int action) { // TODO: This action to key mapping should probably use the control mapping int keycode = -1; switch (action) { -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_A: keycode = IGGY_KEYCODE_ENTER; break; @@ -931,11 +841,6 @@ int UIScene::convertGameActionToIggyKeycode(int action) { keycode = IGGY_KEYCODE_PAGE_UP; break; case ACTION_MENU_PAGEDOWN: -#if 0 - if (!InputManager.IsVitaTV()) { - keycode = IGGY_KEYCODE_F6; - } else -#endif { keycode = IGGY_KEYCODE_PAGE_DOWN; } @@ -989,7 +894,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handlePress did not have the correct number of " "arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -998,7 +903,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { call->arguments[1].type != IGGY_DATATYPE_number) { app.DebugPrintf( "Arguments for handlePress were not of the correct type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1010,7 +915,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleFocusChange did not have the correct " "number of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1020,7 +925,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Arguments for handleFocusChange were not of the correct " "type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1033,7 +938,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleInitFocus did not have the correct number " "of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1042,7 +947,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { call->arguments[1].type != IGGY_DATATYPE_number) { app.DebugPrintf( "Arguments for handleInitFocus were not of the correct type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1055,7 +960,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleCheckboxToggled did not have the correct " "number of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1065,7 +970,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Arguments for handleCheckboxToggled were not of the correct " "type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1078,7 +983,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleSliderMove did not have the correct number " "of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1088,7 +993,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Arguments for handleSliderMove were not of the correct " "type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1101,7 +1006,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleAnimationEnd did not have the correct " "number of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1114,7 +1019,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleSelectionChanged did not have the correct " "number of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1123,7 +1028,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Arguments for handleSelectionChanged were not of the correct " "type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1139,7 +1044,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Callback for handleRequestMoreData did not have the " "correct number of arguments\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1149,7 +1054,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) { app.DebugPrintf( "Arguments for handleRequestMoreData were not of the " "correct type\n"); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) __debugbreak(); #endif return; @@ -1213,15 +1118,6 @@ int UIScene::getControlFocus() { return m_iFocusControl; } void UIScene::setBackScene(UIScene* scene) { m_backScene = scene; } UIScene* UIScene::getBackScene() { return m_backScene; } -#if 0 -void UIScene::UpdateSceneControls() { - AUTO_VAR(itEnd, GetControls()->end()); - for (AUTO_VAR(it, GetControls()->begin()); it != itEnd; it++) { - UIControl* control = (UIControl*)*it; - control->UpdateControl(); - } -} -#endif void UIScene::HandleMessage(EUIMessage message, void* data) {} diff --git a/Minecraft.Client/Platform/Common/UI/UIScene.h b/Minecraft.Client/Platform/Common/UI/UIScene.h index f35c145a9..d6c92fe66 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene.h @@ -112,13 +112,6 @@ public: int getRenderWidth() { return m_renderWidth; } int getRenderHeight() { return m_renderHeight; } -#if 0 - UILayer* GetParentLayer() { return m_parentLayer; } - EUIGroup GetParentLayerGroup() { - return m_parentLayer->m_parentGroup->GetGroup(); - } - std::vector* GetControls() { return &m_controls; } -#endif protected: virtual F64 getSafeZoneHalfHeight(); @@ -148,10 +141,6 @@ public: virtual void tick(); IggyName registerFastName(const std::wstring& name); -#if 0 - void SetFocusToElement(int iID); - void UpdateSceneControls(); -#endif protected: void addTimer(int id, int ms); void killTimer(int id); @@ -273,9 +262,6 @@ public: UIScene* getBackScene(); virtual void HandleDLCMountingComplete() {} virtual void HandleDLCInstalled() {} -#if 0 - virtual void HandleDLCLicenseChange() {} -#endif virtual void HandleMessage(EUIMessage message, void* data); @@ -292,9 +278,6 @@ public: } protected: -#if 0 - virtual long long getDefaultGtcButtons() { return _360_GTC_BACK; } -#endif size_t GetCallbackUniqueId(); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_AbstractContainerMenu.cpp index ea0f65b3f..79abdad25 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_AbstractContainerMenu.cpp @@ -14,9 +14,6 @@ UIScene_AbstractContainerMenu::UIScene_AbstractContainerMenu( // success or fail ui.OverrideSFX(m_iPad, ACTION_MENU_A, true); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, true); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_X, true); ui.OverrideSFX(m_iPad, ACTION_MENU_Y, true); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true); @@ -58,9 +55,6 @@ void UIScene_AbstractContainerMenu::handleDestroy() { ui.OverrideSFX(m_iPad, ACTION_MENU_A, false); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, false); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_X, false); ui.OverrideSFX(m_iPad, ACTION_MENU_Y, false); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false); @@ -113,21 +107,6 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, m_fPanelMinY = fPanelY; m_fPanelMaxY = fPanelY + fPanelHeight; -#if 0 - // we need to map the touchpad rectangle to the UI rectangle. While it works - // great for the creative menu, it is much too sensitive for the smaller - // menus. - // X coordinate of the touch point (0 to 1919) - // Y coordinate of the touch point (0 to 941: DUALSHOCK®4 wireless - // controllers and the CUH-ZCT1J/CAP-ZCT1J/CAP-ZCT1U controllers for the - // PlayStation®4 development tool, 0 to 753: JDX-1000x series controllers - // for the PlayStation®4 development tool,) - m_fTouchPadMulX = fPanelWidth / 1919.0f; - m_fTouchPadMulY = fPanelHeight / 941.0f; - m_fTouchPadDeadZoneX = 15.0f * m_fTouchPadMulX; - m_fTouchPadDeadZoneY = 15.0f * m_fTouchPadMulY; - -#endif // 4J-PB - need to limit this in splitscreen if (app.GetLocalPlayerCount() > 1) { @@ -172,7 +151,7 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad, IggyEventResult result; IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result); -#ifdef USE_POINTER_ACCEL +#if defined(USE_POINTER_ACCEL) m_fPointerVelX = 0.0f; m_fPointerVelY = 0.0f; m_fPointerAccelX = 0.0f; @@ -193,10 +172,6 @@ void UIScene_AbstractContainerMenu::tick() { IggyMakeEventMouseMove(&mouseEvent, x, y); // 4J Stu - This seems to be broken on Durango, so do it ourself -#if 0 - // mouseEvent.x = x; - // mouseEvent.y = y; -#endif IggyEventResult result; IggyPlayerDispatchEventRS(getMovie(), &mouseEvent, &result); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_AnvilMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_AnvilMenu.cpp index 8d044a023..6a11deb2a 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_AnvilMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_AnvilMenu.cpp @@ -309,32 +309,10 @@ int UIScene_AnvilMenu::KeyboardCompleteCallback(void* lpParam, bool bRes) { void UIScene_AnvilMenu::handleEditNamePressed() { setIgnoreInput(true); -#if 0 || 0 || 0 - int language = XGetLanguage(); - switch (language) { - case XC_LANGUAGE_JAPANESE: - case XC_LANGUAGE_KOREAN: - case XC_LANGUAGE_TCHINESE: - InputManager.RequestKeyboard( - app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(), - m_iPad, 30, &UIScene_AnvilMenu::KeyboardCompleteCallback, this, - C_4JInput::EKeyboardMode_Default); - break; - default: - // 4J Stu - Use a different keyboard for non-asian languages so we - // don't have prediction on - InputManager.RequestKeyboard( - app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(), - m_iPad, 30, &UIScene_AnvilMenu::KeyboardCompleteCallback, this, - C_4JInput::EKeyboardMode_Alphabet_Extended); - break; - } -#else InputManager.RequestKeyboard(app.GetString(IDS_TITLE_RENAME), m_textInputAnvil.getLabel(), m_iPad, 30, &UIScene_AnvilMenu::KeyboardCompleteCallback, this, C_4JInput::EKeyboardMode_Default); -#endif } void UIScene_AnvilMenu::setEditNameValue(const std::wstring& name) { @@ -379,14 +357,8 @@ void UIScene_AnvilMenu::showCross(bool show) { } void UIScene_AnvilMenu::handleDestroy() { -#if 0 - app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n"); -#endif // another player destroyed the anvil, so shut down the keyboard if it is // displayed -#if (0 || 0 || 0) - InputManager.DestroyKeyboard(); -#endif UIScene_AbstractContainerMenu::handleDestroy(); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.cpp index a764e1c34..2acf72e7d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.cpp @@ -28,12 +28,6 @@ UIScene_ConnectingProgress::UIScene_ConnectingProgress(int iPad, m_buttonConfirm.init(app.GetString(IDS_CONFIRM_OK), eControl_Confirm); m_buttonConfirm.setVisible(false); -#if 0 - if(app.GetLocalPlayerCount()>1) - { - app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad,false); - } -#endif m_showTooltips = param->showTooltips; m_runFailTimer = param->setFailTimer; @@ -63,9 +57,6 @@ void UIScene_ConnectingProgress::tick() { Minecraft* pMinecraft = Minecraft::GetInstance(); pMinecraft->removeLocalPlayerIdx(m_iPad); -#if 0 - ProfileManager.RemoveGamepadFromGame(m_iPad); -#endif } } @@ -107,9 +98,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) { if (pMinecraft->m_connectionFailed[m_iPad] || !g_NetworkManager.IsInSession()) { -#if 0 - app.RemoveBackScene(m_iPad); -#endif int exitReasonStringId; switch (pMinecraft->m_connectionFailedReason[m_iPad]) { @@ -130,20 +118,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) { exitReasonStringId = IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_SINGLE_LOCAL; break; -#if 0 || 0 - case DisconnectPacket::eDisconnect_ContentRestricted_AllLocal: - exitReasonStringId = IDS_CONTENT_RESTRICTION_MULTIPLAYER; - break; - case DisconnectPacket::eDisconnect_ContentRestricted_Single_Local: - exitReasonStringId = IDS_CONTENT_RESTRICTION; - break; -#endif -#if 0 - case DisconnectPacket::eDisconnect_NoUGC_Remote: - exitReasonStringId = - IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_REMOTE; - break; -#endif case DisconnectPacket::eDisconnect_NoFlying: exitReasonStringId = IDS_DISCONNECTED_FLYING; break; @@ -156,11 +130,6 @@ void UIScene_ConnectingProgress::handleTimerComplete(int id) { case DisconnectPacket::eDisconnect_OutdatedClient: exitReasonStringId = IDS_DISCONNECTED_CLIENT_OLD; break; -#if 0 || 0 || 0 - case DisconnectPacket::eDisconnect_NATMismatch: - exitReasonStringId = IDS_DISCONNECTED_NAT_TYPE_MISMATCH; - break; -#endif default: exitReasonStringId = IDS_CONNECTION_LOST_SERVER; break; @@ -219,9 +188,6 @@ void UIScene_ConnectingProgress::handleInput(int iPad, int key, bool repeat, // } // break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { sendInputToMovie(key, repeat, pressed, released); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.h b/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.h index 9942fbe71..f31d7a6be 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_ConnectingProgress.h @@ -44,9 +44,6 @@ protected: // TODO: This should be pure virtual in this class virtual std::wstring getMoviePath(); -#if 0 - virtual long long getDefaultGtcButtons() { return 0; } -#endif public: // INPUT diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.cpp index 5aaeed8fe..7fb7e28a6 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.cpp @@ -13,16 +13,8 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, IggyDataValue result; IggyDataValue value[1]; value[0].type = IGGY_DATATYPE_number; -#if 0 || defined(_WIN64) +#if defined(_WIN64) value[0].number = (F64)0; -#elif 0 - value[0].number = (F64)1; -#elif 0 - value[0].number = (F64)2; -#elif 0 - value[0].number = (F64)3; -#elif 0 - value[0].number = (F64)4; #endif IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, IggyPlayerRootPath(getMovie()), @@ -44,17 +36,11 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, !bNotInGame && Minecraft::GetInstance()->localplayers[m_iPad] && Minecraft::GetInstance()->localplayers[m_iPad]->abilities.mayfly; -#if 1 -#if 0 - // no buttons to initialise if we're running this on PS4 remote play - if (!InputManager.UsingRemoteVita()) -#endif { m_buttonLayouts[0].init(L"1", eControl_Button0); m_buttonLayouts[1].init(L"2", eControl_Button1); m_buttonLayouts[2].init(L"3", eControl_Button2); } -#endif m_checkboxInvert.init( app.GetString(IDS_INVERT_LOOK), eControl_InvertLook, @@ -69,24 +55,15 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, int iSelected = app.GetGameSettings(m_iPad, eGameSetting_ControlScheme); -#if 1 LPWSTR layoutString = new wchar_t[128]; swprintf(layoutString, 128, L"%ls : %ls", app.GetString(IDS_CURRENT_LAYOUT), app.GetString(m_iSchemeTextA[iSelected])); -#if 0 - if (!InputManager.UsingRemoteVita()) -#endif { m_labelCurrentLayout.init(layoutString); } -#endif m_iCurrentNavigatedControlsLayout = iSelected; -#if 0 - // don't set controller layout if we're entering the PS4 remote play scene - if (!InputManager.UsingRemoteVita()) -#endif { IggyDataValue result; IggyDataValue value[1]; @@ -97,13 +74,6 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, m_funcSetControllerLayout, 1, value); } -#if 0 - // Set mapping to Vita mapping - if (InputManager.UsingRemoteVita()) m_iCurrentNavigatedControlsLayout = 3; -#elif 0 - // Set mapping to Vita mapping - if (InputManager.IsVitaTV()) m_iCurrentNavigatedControlsLayout = 1; -#endif for (unsigned int i = 0; i < e_PadCOUNT; ++i) { m_labelsPad[i].init(L""); @@ -115,16 +85,6 @@ UIScene_ControlsMenu::UIScene_ControlsMenu(int iPad, void* initData, } std::wstring UIScene_ControlsMenu::getMoviePath() { -#if 0 - if (InputManager.UsingRemoteVita()) { - return L"ControlsRemotePlay"; - } else -#endif -#if 0 - if (InputManager.IsVitaTV()) { - return L"ControlsTV"; - } else -#endif if (app.GetLocalPlayerCount() > 1) { return L"ControlsSplit"; } else { @@ -157,9 +117,6 @@ void UIScene_ControlsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { // CD - Added for audio ui.PlayUISFX(eSFX_Press); @@ -201,9 +158,6 @@ void UIScene_ControlsMenu::handlePress(F64 controlId, F64 childId) { swprintf(layoutString, 128, L"%ls : %ls", app.GetString(IDS_CURRENT_LAYOUT), app.GetString(m_iSchemeTextA[control])); -#if 0 - if (!InputManager.UsingRemoteVita()) -#endif { m_labelCurrentLayout.setLabel(layoutString); } @@ -268,11 +222,7 @@ void UIScene_ControlsMenu::PositionAllText(int iPad) { } bool layoutHasDpadFly; -#if 0 - layoutHasDpadFly = m_iCurrentNavigatedControlsLayout == 1; -#else layoutHasDpadFly = m_iCurrentNavigatedControlsLayout == 0; -#endif // If we're in controls mode 1, and creative mode show the dpad for Creative // Mode @@ -296,13 +246,7 @@ void UIScene_ControlsMenu::PositionText(int iPad, int iTextID, if (uiVal & _360_JOY_BUTTON_Y) PositionTextDirect(iPad, iTextID, e_PadY, true); if (uiVal & _360_JOY_BUTTON_BACK) { -#if 0 - PositionTextDirect( - iPad, iTextID, - (InputManager.UsingRemoteVita() ? e_PadTouch : e_PadBack), true); -#else PositionTextDirect(iPad, iTextID, e_PadBack, true); -#endif } if (uiVal & _360_JOY_BUTTON_START) PositionTextDirect(iPad, iTextID, e_PadStart, true); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.h index bbdf555f4..49e782e3c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_ControlsMenu.h @@ -51,10 +51,6 @@ private: IggyName m_funcSetPlatform, m_funcSetControllerLayout; UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) -#if 1 -#if 0 - if (!InputManager.UsingRemoteVita()) -#endif { UI_MAP_ELEMENT(m_labelCurrentLayout, "CurrentLayout") @@ -62,7 +58,6 @@ private: UI_MAP_ELEMENT(m_buttonLayouts[1], "Button2") UI_MAP_ELEMENT(m_buttonLayouts[2], "Button3") } -#endif UI_MAP_ELEMENT(m_labelsPad[e_PadBack], "LabelBack") UI_MAP_ELEMENT(m_labelsPad[e_PadLT], "LabelLT") diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp index 69f947f3e..3f493b6b8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.cpp @@ -5,10 +5,6 @@ #include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h" #include "UIScene_CraftingMenu.h" -#if 0 -#define GAME_CRAFTING_TOUCHUPDATE_TIMER_ID 0 -#define GAME_CRAFTING_TOUCHUPDATE_TIMER_TIME 100 -#endif UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData, UILayer* parentLayer) @@ -121,7 +117,7 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData, } } -#ifdef _TO_BE_IMPLEMENTED +#if defined(_TO_BE_IMPLEMENTED) XuiSetTimer(m_hObj, IGNORE_KEYPRESS_TIMERID, IGNORE_KEYPRESS_TIME); #endif @@ -164,9 +160,6 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData, // success or fail ui.OverrideSFX(m_iPad, ACTION_MENU_A, true); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, true); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true); ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, true); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, true); @@ -178,13 +171,6 @@ UIScene_CraftingMenu::UIScene_CraftingMenu(int iPad, void* _initData, // CheckRecipesAvailable UpdateTooltips(); -#if 0 - // initialise vita touch controls with ids - for (unsigned int i = 0; i < ETouchInput_Count; ++i) { - m_TouchInput[i].init(i); - } - ui.TouchBoxRebuild(this); -#endif } void UIScene_CraftingMenu::handleDestroy() { @@ -210,9 +196,6 @@ void UIScene_CraftingMenu::handleDestroy() { ui.OverrideSFX(m_iPad, ACTION_MENU_A, false); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, false); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false); ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, false); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, false); @@ -246,123 +229,6 @@ std::wstring UIScene_CraftingMenu::getMoviePath() { } } -#if 0 -UIControl* UIScene_CraftingMenu::GetMainPanel() { return &m_controlMainPanel; } - -void UIScene_CraftingMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, - int iId, bool bPressed, - bool bRepeat, bool bReleased) { - // perform action on release - if (bPressed) { - if (iId == ETouchInput_CraftingHSlots) { - m_iCraftingSlotTouchStartY = y; - } - } else if (bRepeat) { - if (iId == ETouchInput_CraftingHSlots) { - if (y >= m_iCraftingSlotTouchStartY + - m_TouchInput[ETouchInput_CraftingHSlots] - .getHeight()) // scroll list down - { - if (iVSlotIndexA[1] == - (CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1)) { - iVSlotIndexA[1] = 0; - } else { - iVSlotIndexA[1]++; - } - ui.PlayUISFX(eSFX_Focus); - - UpdateVerticalSlots(); - UpdateHighlight(); - - m_iCraftingSlotTouchStartY = y; - } else if (y <= m_iCraftingSlotTouchStartY - - m_TouchInput[ETouchInput_CraftingHSlots] - .getHeight()) // scroll list up - { - if (iVSlotIndexA[1] == 0) { - iVSlotIndexA[1] = - CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1; - } else { - iVSlotIndexA[1]--; - } - ui.PlayUISFX(eSFX_Focus); - - UpdateVerticalSlots(); - UpdateHighlight(); - - m_iCraftingSlotTouchStartY = y; - } - } - } else if (bReleased) { - if (iId >= ETouchInput_TouchPanel_0 && - iId <= ETouchInput_TouchPanel_6) // Touch Change Group - { - m_iGroupIndex = iId; - // turn on the new group - showTabHighlight(m_iGroupIndex, true); - - m_iCurrentSlotHIndex = 0; - m_iCurrentSlotVIndex = 1; - CheckRecipesAvailable(); - // reset the vertical slots - iVSlotIndexA[0] = CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1; - iVSlotIndexA[1] = 0; - iVSlotIndexA[2] = 1; - ui.PlayUISFX(eSFX_Focus); - UpdateVerticalSlots(); - UpdateHighlight(); - setGroupText(GetGroupNameText(m_pGroupA[m_iGroupIndex])); - } else if (iId == ETouchInput_CraftingHSlots) // Touch Change Slot - { - int iMaxHSlots = 0; - if (m_iContainerType == RECIPE_TYPE_3x3) { - iMaxHSlots = m_iMaxHSlot3x3C; - } else { - iMaxHSlots = m_iMaxHSlot2x2C; - } - - int iNewSlot = - (x - m_TouchInput[ETouchInput_CraftingHSlots].getXPos() - - m_controlMainPanel.getXPos()) / - m_TouchInput[ETouchInput_CraftingHSlots].getHeight(); - - int iOldHSlot = m_iCurrentSlotHIndex; - - m_iCurrentSlotHIndex = iNewSlot; - if (m_iCurrentSlotHIndex >= m_iCraftablesMaxHSlotC) - m_iCurrentSlotHIndex = 0; - m_iCurrentSlotVIndex = 1; - // clear the indices - iVSlotIndexA[0] = CanBeMadeA[m_iCurrentSlotHIndex].iCount - 1; - iVSlotIndexA[1] = 0; - iVSlotIndexA[2] = 1; - - UpdateVerticalSlots(); - UpdateHighlight(); - // re-enable the old hslot - if (CanBeMadeA[iOldHSlot].iCount > 0) { - setShowCraftHSlot(iOldHSlot, true); - } - ui.PlayUISFX(eSFX_Focus); - } - } -} - -void UIScene_CraftingMenu::handleTouchBoxRebuild() { - addTimer(GAME_CRAFTING_TOUCHUPDATE_TIMER_ID, - GAME_CRAFTING_TOUCHUPDATE_TIMER_TIME); -} - -void UIScene_CraftingMenu::handleTimerComplete(int id) { - if (id == GAME_CRAFTING_TOUCHUPDATE_TIMER_ID) { - // we cannot rebuild touch boxes in an iggy callback because it requires - // further iggy calls - GetMainPanel()->UpdateControl(); - ui.TouchBoxRebuild(this); - killTimer(GAME_CRAFTING_TOUCHUPDATE_TIMER_ID); - } -} -#endif void UIScene_CraftingMenu::handleReload() { m_slotListInventory.addSlots( diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h index 21b5f826b..fb2ce18e7 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CraftingMenu.h @@ -63,13 +63,6 @@ public: virtual void customDraw(IggyCustomDrawCallbackRegion* region); -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); - virtual UIControl* GetMainPanel(); - virtual void handleTouchBoxRebuild(); - virtual void handleTimerComplete(int id); -#endif protected: UIControl m_controlMainPanel; @@ -88,22 +81,6 @@ protected: IggyName m_funcMoveSelector, m_funcSelectVerticalItem, m_funcSetActiveTab; IggyName m_funcShowPanelDisplay, m_funcShowIngredientSlot; -#if 0 - enum ETouchInput { - ETouchInput_TouchPanel_0, - ETouchInput_TouchPanel_1, - ETouchInput_TouchPanel_2, - ETouchInput_TouchPanel_3, - ETouchInput_TouchPanel_4, - ETouchInput_TouchPanel_5, - ETouchInput_TouchPanel_6, - ETouchInput_CraftingHSlots, - - ETouchInput_Count, - }; - UIControl_Touch m_TouchInput[ETouchInput_Count]; - S32 m_iCraftingSlotTouchStartY; -#endif UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) UI_MAP_ELEMENT(m_controlMainPanel, "MainPanel") @@ -158,17 +135,6 @@ protected: UI_MAP_NAME(m_funcShowPanelDisplay, L"showPanelDisplay") UI_MAP_NAME(m_funcShowIngredientSlot, L"ShowIngredient") -#if 0 - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_0], "TouchPanel_0") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_1], "TouchPanel_1") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_2], "TouchPanel_2") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_3], "TouchPanel_3") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_4], "TouchPanel_4") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_5], "TouchPanel_5") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_TouchPanel_6], "TouchPanel_6") - UI_MAP_ELEMENT(m_TouchInput[ETouchInput_CraftingHSlots], - "TouchPanel_CraftingHSlots") -#endif UI_END_MAP_CHILD_ELEMENTS() UI_END_MAP_ELEMENTS_AND_NAMES() diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp index ace2d19f8..39dd3e911 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.cpp @@ -12,10 +12,8 @@ #include "../../Minecraft.World/Level/Storage/LevelType.h" #include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h" -#if 0 -#endif -#ifdef _WINDOWS64 +#if defined(_WINDOWS64) #include #include "../../Minecraft.Client/Platform/Windows64/Resource.h" @@ -263,14 +261,8 @@ UIControl* UIScene_CreateWorldMenu::GetMainPanel() { } void UIScene_CreateWorldMenu::handleDestroy() { -#if 0 - app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n"); -#endif // shut down the keyboard if it is displayed -#if (0 || 0 || 0) - InputManager.DestroyKeyboard(); -#endif } void UIScene_CreateWorldMenu::tick() { @@ -287,52 +279,8 @@ void UIScene_CreateWorldMenu::tick() { m_bShowTexturePackDescription = false; } -#if 0 - // check the status of the PSPlus common dialog - switch (sceNpCommerceDialogUpdateStatus()) { - case SCE_COMMON_DIALOG_STATUS_FINISHED: { - SceNpCommerceDialogResult Result; - sceNpCommerceDialogGetResult(&Result); - sceNpCommerceDialogTerminate(); - - if (Result.authorized) { - ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(), - &Result); - // they just became a PSPlus member - checkStateAndStartGame(); - } else { - // continue offline? - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - - // Give the player a warning about the texture pack missing - ui.RequestAlertMessage( - IDS_PLAY_OFFLINE, IDS_NO_PLAYSTATIONPLUS, uiIDA, 1, - ProfileManager.GetPrimaryPad(), - &UIScene_CreateWorldMenu::ContinueOffline, - dynamic_cast(this)); - } - } break; - default: - break; - } -#endif } -#if 0 -int UIScene_CreateWorldMenu::ContinueOffline( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam; - - // results switched for this dialog - if (result == C4JStorage::EMessage_ResultAccept) { - pClass->m_MoreOptionsParams.bOnlineGame = false; - pClass->checkStateAndStartGame(); - } - return 0; -} - -#endif void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, @@ -349,20 +297,8 @@ void UIScene_CreateWorldMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif // 4J-JEV: Inform user why their game must be offline. -#if 0 - if (pressed && controlHasFocus(m_checkboxOnline.getId()) && - !m_checkboxOnline.IsEnabled()) { - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: @@ -426,13 +362,6 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) { UpdateCurrentTexturePack((int)childId); } break; case eControl_NewWorld: { -#if 0 - if (m_MoreOptionsParams.bOnlineGame) { - m_bIgnoreInput = true; - ProfileManager.CheckMultiplayerPrivileges( - m_iPad, true, &checkPrivilegeCallback, this); - } else -#endif { StartSharedLaunchFlow(); } @@ -441,19 +370,6 @@ void UIScene_CreateWorldMenu::handlePress(F64 controlId, F64 childId) { } } -#if 0 -void UIScene_CreateWorldMenu::checkPrivilegeCallback(void* lpParam, - bool hasPrivilege, - int iPad) { - UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)lpParam; - - if (hasPrivilege) { - pClass->StartSharedLaunchFlow(); - } else { - pClass->m_bIgnoreInput = false; - } -} -#endif void UIScene_CreateWorldMenu::StartSharedLaunchFlow() { Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -547,26 +463,8 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() { else */ { // upsell -#if 0 - DLC_INFO* pDLCInfo = app.GetDLCInfoForTrialOfferID( - m_pDLCPack->getPurchaseOfferId()); - ULONGLONG ullOfferID_Full; - if (pDLCInfo != NULL) { - ullOfferID_Full = pDLCInfo->ullOfferID_Full; - } else { - ullOfferID_Full = - pTexturePack->getDLCPack()->getPurchaseOfferId(); - } - - // tell sentient about the upsell of the full version of the - // texture pack - TelemetryManager->RecordUpsellPresented( - m_iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif - -#if 0 || defined(_WINDOWS64) +#if defined(_WINDOWS64) // trial pack warning unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -574,29 +472,12 @@ void UIScene_CreateWorldMenu::StartSharedLaunchFlow() { IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad, &TrialTexturePackWarningReturned, this); -#elif 0 || 0 || 0 - // trial pack warning - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, - IDS_USING_TRIAL_TEXUREPACK_WARNING, - uiIDA, 2, m_iPad, - &TrialTexturePackWarningReturned, this); #endif -#if 0 || 0 - StorageManager.SetSaveDisabled(true); -#endif return; } } } -#if 0 || 0 - app.SetGameHostOption(eGameHostOption_DisableSaving, - m_MoreOptionsParams.bDisableSaving ? 1 : 0); - StorageManager.SetSaveDisabled(m_MoreOptionsParams.bDisableSaving); -#endif checkStateAndStartGame(); } @@ -617,15 +498,6 @@ void UIScene_CreateWorldMenu::handleSliderMove(F64 sliderId, F64 currentValue) { } void UIScene_CreateWorldMenu::handleTimerComplete(int id) { -#if 0 - // we cannot rebuild touch boxes in an iggy callback because it requires - // further iggy calls - if (m_bRebuildTouchBoxes) { - GetMainPanel()->UpdateControl(); - ui.TouchBoxRebuild(this); - m_bRebuildTouchBoxes = false; - } -#endif switch (id) { case GAME_CREATE_ONLINE_TIMER_ID: { @@ -662,46 +534,6 @@ void UIScene_CreateWorldMenu::handleTimerComplete(int id) { } } break; // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 - case CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID: { - // also check for any new texture packs info being available - // for each item in the mem list, check it's in the data list - - CXuiCtrl4JList::LIST_ITEM_INFO ListInfo; - // for each iConfig, check if the data is available, and add it to - // the List, then remove it from the viConfig - for (int i = 0; i < m_iTexturePacksNotInstalled; i++) { - if (m_iConfigA[i] != -1) { - unsigned int dwBytes = 0; - std::uint8_t* pbData = NULL; - // app.DebugPrintf("Retrieving iConfig %d from - // TPD\n",m_iConfigA[i]); - - app.GetTPD(m_iConfigA[i], &pbData, &dwBytes); - - ZeroMemory(&ListInfo, - sizeof(CXuiCtrl4JList::LIST_ITEM_INFO)); - if (dwBytes > 0 && pbData) { - unsigned int dwImageBytes = 0; - std::uint8_t* pbImageData = NULL; - - app.GetFileFromTPD(eTPDFileType_Icon, pbData, dwBytes, - &pbImageData, &dwImageBytes); - ListInfo.fEnabled = TRUE; - ListInfo.iData = m_iConfigA[i]; - HRESULT hr = XuiCreateTextureBrushFromMemory( - pbImageData, dwImageBytes, &ListInfo.hXuiBrush); - app.DebugPrintf("Adding texturepack %d from TPD\n", - m_iConfigA[i]); - - m_pTexturePacksList->AddData(ListInfo); - - m_iConfigA[i] = -1; - } - } - } - } break; -#endif }; } @@ -753,118 +585,14 @@ void UIScene_CreateWorldMenu::checkStateAndStartGame() { // If this is an online game but not all players are signed in to Live, // stop! if (isOnlineGame && !isSignedInLive) { -#if 0 - assert(iPadNotSignedInLive != -1); - - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else { - m_bIgnoreInput = true; - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_CANCEL; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - iPadNotSignedInLive, - &UIScene_CreateWorldMenu::MustSignInReturnedPSN, this); - } - return; -/* 4J-PB - Add this after release -#elif 0 - m_bIgnoreInput=false; - // Determine why they're not "signed in live" - if -(ProfileManager.IsSignedInPSN(ProfileManager.GetPrimaryPad())) - { - // Signed in to PSN but not connected (no internet -access) UINT uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_PRO_CURRENTLY_NOT_ONLINE_TITLE, -IDS_PRO_PSNOFFLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); - } - else - { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, -IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; - }*/ -#else m_bIgnoreInput = false; unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; -#endif } -#if 0 - - bool bPlayStationPlus = true; - int iPadWithNoPlaystationPlus = 0; - if (isOnlineGame && isSignedInLive) { - for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - if (ProfileManager.IsSignedIn(i) && - (i == primaryPad || isLocalMultiplayerAvailable)) { - if (ProfileManager.HasPlayStationPlus(i) == false) { - bPlayStationPlus = false; - iPadWithNoPlaystationPlus = i; - break; - } - } - } - - if (bPlayStationPlus == false) { - m_bIgnoreInput = false; - - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we don't - // know if the player has PS Plus yet (if it can't connect to - // the PS Plus server). - UINT uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return; - } - - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - std::int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_PLAY_OFFLINE; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, - // app.GetStringTable(),NULL,0,false); - return; - } - } -#endif unsigned int uiIDA[2]; if (m_bGameModeCreative == true || @@ -903,13 +631,6 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; ProfileManager.AllowedPlayerCreatedContent( ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed); -#if 0 || 0 - if (isOnlineGame && isSignedInLive) { - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, NULL, - &bContentRestricted, NULL); - } -#endif noUGC = !pccAllowed && !pccFriendsAllowed; @@ -925,44 +646,6 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; m_bIgnoreInput = false; ui.RequestContentRestrictedMessageBox(); } -#if 0 - else if (bPlayStationPlus == false) { - m_bIgnoreInput = false; - - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we - // don't know if the player has PS Plus yet (if it can't - // connect to the PS Plus server). - UINT uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return; - } - - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - std::int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = - ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_PLAY_OFFLINE; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, - // app.GetStringTable(),NULL,0,false); - } -#endif else { // ProfileManager.RequestSignInUI(false, false, false, true, // false,&CScene_MultiGameCreate::StartGame_SignInReturned, @@ -984,61 +667,7 @@ IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return; m_bIgnoreInput = false; ui.RequestContentRestrictedMessageBox(); } -#if 0 - else if (isOnlineGame && isSignedInLive && - (bPlayStationPlus == false)) { - m_bIgnoreInput = false; - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we - // don't know if the player has PS Plus yet (if it can't - // connect to the PS Plus server). - UINT uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return; - } - - setVisible(true); - - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - std::int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = - ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_PLAY_OFFLINE; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_CreateWorldMenu::PSPlusReturned,this, - // app.GetStringTable(),NULL,0,false); - } -#endif else { -#if 0 || 0 - if (isOnlineGame) { - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &chatRestricted, - NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); - } - } -#endif CreateGame(this, 0); } } @@ -1059,14 +688,6 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - if (SQRNetworkManager_AdHoc_Vita:: - GetAdhocStatus()) // && - // pClass->m_MoreOptionsParams.bOnlineGame) - isClientSide = true; - } -#endif // 0 bool isPrivate = pClass->m_MoreOptionsParams.bInviteOnly ? true : false; @@ -1190,7 +811,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, pClass->m_MoreOptionsParams.bDoDaylightCycle); app.SetGameHostOption(eGameHostOption_WasntSaveOwner, false); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) app.SetGameHostOption(eGameHostOption_WorldSize, pClass->m_MoreOptionsParams.worldSize + 1); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN @@ -1205,7 +826,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, param->settings = app.GetGameHostOption(eGameHostOption_All); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) switch (pClass->m_MoreOptionsParams.worldSize) { case 0: // Classic @@ -1237,9 +858,7 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, param->hellScale = HELL_LEVEL_MAX_SCALE; #endif -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; @@ -1300,35 +919,6 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void* pParam, // If this is an online game but not all players are signed in to // Live, stop! if (isOnlineGame && !isSignedInLive) { -#if 0 - assert(iPadNotSignedInLive != -1); - - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - pClass->m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else { - pClass->m_bIgnoreInput = true; - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_CANCEL; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, iPadNotSignedInLive, - &UIScene_CreateWorldMenu::MustSignInReturnedPSN, - pClass); - } - return 0; -#else pClass->m_bIgnoreInput = false; unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -1336,7 +926,6 @@ int UIScene_CreateWorldMenu::StartGame_SignInReturned(void* pParam, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return 0; -#endif } // Check if user-created content is allowed, as we cannot play @@ -1431,22 +1020,6 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned( IDS_NO_USER_CREATED_CONTENT_PRIVILEGE_CREATE, uiIDA, 1, ProfileManager.GetPrimaryPad()); } else { -#if 0 || 0 - bool isOnlineGame = ProfileManager.IsSignedInLive( - ProfileManager.GetPrimaryPad()) && - pClass->m_MoreOptionsParams.bOnlineGame; - if (isOnlineGame) { - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &chatRestricted, - NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); - } - } -#endif CreateGame(pClass, 0); } } @@ -1456,52 +1029,6 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned( return 0; } -#if 0 -int UIScene_CreateWorldMenu::MustSignInReturnedPSN( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu*)pParam; - pClass->m_bIgnoreInput = false; - - if (result == C4JStorage::EMessage_ResultAccept) { - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false, - iPad); - } - - return 0; -} - -// int UIScene_CreateWorldMenu::PSPlusReturned(void *pParam,int -// iPad,C4JStorage::EMessageResult result) -// { -// std::int32_t iResult; -// UIScene_CreateWorldMenu *pClass = (UIScene_CreateWorldMenu *)pParam; -// -// // continue offline, or upsell PS Plus? -// if(result==C4JStorage::EMessage_ResultDecline) -// { -// // upsell psplus -// std::int32_t iResult=sceNpCommerceDialogInitialize(); -// -// SceNpCommerceDialogParam param; -// sceNpCommerceDialogParamInitialize(¶m); -// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS; -// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; -// param.userId = ProfileManager.getUserID(pClass->m_iPad); -// -// iResult=sceNpCommerceDialogOpen(¶m); -// } -// else if(result==C4JStorage::EMessage_ResultAccept) -// { -// // continue offline -// pClass->m_MoreOptionsParams.bOnlineGame=false; -// pClass->checkStateAndStartGame(); -// } -// -// pClass->m_bIgnoreInput=false; -// return 0; -// } -#endif void UIScene_CreateWorldMenu::handleTouchBoxRebuild() { m_bRebuildTouchBoxes = true; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h index 14ec250d0..d2c17aa08 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreateWorldMenu.h @@ -80,10 +80,6 @@ private: void StartSharedLaunchFlow(); bool IsLocalMultiplayerAvailable(); -#if 0 - static void checkPrivilegeCallback(void* lpParam, bool hasPrivilege, - int iPad); -#endif protected: static int KeyboardCompleteWorldNameCallback(void* lpParam, @@ -98,12 +94,6 @@ protected: static int MustSignInReturnedPSN(void* pParam, int iPad, C4JStorage::EMessageResult result); -#if 0 - // static int PSPlusReturned(void *pParam,int - // iPad,C4JStorage::EMessageResult result); - static int ContinueOffline(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif virtual void checkStateAndStartGame(); }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp index 8d48c5fc1..449a27945 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp @@ -9,10 +9,6 @@ #include "../../Minecraft.World/Headers/net.minecraft.world.inventory.h" #include "../../Minecraft.World/Headers/net.minecraft.world.item.h" -#if 0 -#define GAME_CREATIVE_TOUCHUPDATE_TIMER_ID 0 -#define GAME_CREATIVE_TOUCHUPDATE_TIMER_TIME 100 -#endif UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void* _initData, UILayer* parentLayer) @@ -59,12 +55,6 @@ UIScene_CreativeMenu::UIScene_CreativeMenu(int iPad, void* _initData, m_curTab = eCreativeInventoryTab_COUNT; switchTab(eCreativeInventoryTab_BuildingBlocks); -#if 0 - // initialise vita touch controls with ids - for (unsigned int i = 0; i < ETouchInput_Count; ++i) { - m_TouchInput[i].init(i); - } -#endif } std::wstring UIScene_CreativeMenu::getMoviePath() { @@ -75,61 +65,6 @@ std::wstring UIScene_CreativeMenu::getMoviePath() { } } -#if 0 -UIControl* UIScene_CreativeMenu::GetMainPanel() { return &m_controlMainPanel; } - -void UIScene_CreativeMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, - int iId, bool bPressed, - bool bRepeat, bool bReleased) { - // perform action on release - if (bReleased) { - if (iId >= eCreativeInventoryTab_BuildingBlocks && - iId <= eCreativeInventoryTab_Misc) { - switchTab((ECreativeInventoryTabs)iId); - ui.PlayUISFX(eSFX_Focus); - } - } - if (bRepeat && iId == ETouchInput_TouchSlider && - specs[m_curTab]->getPageCount() > 1) { - // calculate relative touch position on slider - float fPosition = - ((float)y - (float)m_TouchInput[ETouchInput_TouchSlider].getYPos() - - m_controlMainPanel.getYPos()) / - (float)m_TouchInput[ETouchInput_TouchSlider].getHeight(); - - // clamp - if (fPosition > 1) - fPosition = 1.0f; - else if (fPosition < 0) - fPosition = 0.0f; - - // calculate page position according to page count - int iCurrentPage = - Math::round(fPosition * (specs[m_curTab]->getPageCount() - 1)); - - // set tab page - m_tabPage[m_curTab] = iCurrentPage; - - // update tab - switchTab(m_curTab); - } -} - -void UIScene_CreativeMenu::handleTouchBoxRebuild() { - addTimer(GAME_CREATIVE_TOUCHUPDATE_TIMER_ID, - GAME_CREATIVE_TOUCHUPDATE_TIMER_TIME); -} - -void UIScene_CreativeMenu::handleTimerComplete(int id) { - if (id == GAME_CREATIVE_TOUCHUPDATE_TIMER_ID) { - // we cannot rebuild touch boxes in an iggy callback because it requires - // further iggy calls - GetMainPanel()->UpdateControl(); - ui.TouchBoxRebuild(this); - killTimer(GAME_CREATIVE_TOUCHUPDATE_TIMER_ID); - } -} -#endif void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection, int buttonNum, bool quickKey) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.h index 6d715b422..f355a124e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.h @@ -28,12 +28,7 @@ protected: ETouchInput_Count, }; -#if 0 - // 4J - TomK - this only needs to be a touch component on vita! - UIControl_Touch m_TouchInput[ETouchInput_Count]; -#else UIControl_Base m_TouchInput[ETouchInput_Count]; -#endif UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene_AbstractContainerMenu) UI_BEGIN_MAP_CHILD_ELEMENTS(m_controlMainPanel) @@ -77,13 +72,6 @@ public: virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled); -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); - virtual UIControl* GetMainPanel(); - virtual void handleTouchBoxRebuild(); - virtual void handleTimerComplete(int id); -#endif private: // IUIScene_CreativeMenu diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_Credits.cpp index 9651a7694..dff150ff5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Credits.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Credits.cpp @@ -85,40 +85,15 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = { {L"Harry Gordon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Thomas Kronberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 - {L"Ian le Bruce", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Andy West", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Gordon McLean", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#endif -#if 0 - // 4J-PB - Aaron didn't want to be in the credits { L"Aaron Puzey", - // NO_TRANSLATED_STRING, NO_TRANSLATED_STRING,eSmallText - // }, - {L"Chris Dawson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#endif {L"%ls", IDS_CREDITS_ART, NO_TRANSLATED_STRING, eLargeText}, {L"David Keningale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 - {L"Pat McGovern", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#endif {L"Alan Redmond", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 - {L"Julian Laing", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"Caitlin Goodale", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Scott Sutherland", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, -#endif {L"Chris Reeves", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Kate Wright", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Michael Hansen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 - {L"Kate Flavell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#endif {L"Donald Robertson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Jamie Keddie", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, @@ -130,9 +105,6 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = { {L"%ls", IDS_CREDITS_QA, NO_TRANSLATED_STRING, eLargeText}, {L"Steven Gary Woodward", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 - {L"Richard Black", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#endif {L"George Vaughan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line @@ -142,546 +114,24 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = { {L"Roni Percy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Anne Clarke", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"Anthony Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, -#if 0 -// credits are in the XUI file -#elif 0 - // font credits - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText}, - -#elif 0 - // font credits - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText}, - -#elif 0 - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"Xbox LIVE Arcade Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eExtraLargeText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%s", IDS_CREDITS_LEADPRODUCER, NO_TRANSLATED_STRING, eLargeText}, - {L"Roger Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_PRODUCER, NO_TRANSLATED_STRING, eLargeText}, - {L"Stuart Platt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Riccardo Lenzi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_LEADTESTER, NO_TRANSLATED_STRING, eLargeText}, - {L"Bill Brown (Insight Global)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Brandon McCurry (Insight Global)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Hakim Ronaque, Joe Dunavant", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Paul Loynd, Jeffery Stephens", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Rial Lerum (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_DESIGNTEAM, NO_TRANSLATED_STRING, eLargeText}, - {L"Craig Leigh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_DEVELOPMENTTEAM, NO_TRANSLATED_STRING, eLargeText}, - {L"Scott Guest", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jeff \"Dextor\" Blazier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Yukie Yamaguchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jason Hewitt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_RELEASEMANAGEMENT, NO_TRANSLATED_STRING, eLargeText}, - {L"Isaac Aubrey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jordan Forbes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Josh Mulanax", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Shogo Ishii (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Tyler Keenan (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Joshua Bullard (TekSystems)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"GTO-E Compliance", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"Dominic Gara", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"James Small", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"%s", IDS_CREDITS_EXECPRODUCER, NO_TRANSLATED_STRING, eLargeText}, - {L"Mark Coates", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Avi Ben-Menahem", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Earnest Yuen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"%s", IDS_CREDITS_XBLADIRECTOR, NO_TRANSLATED_STRING, eLargeText}, - {L"Ted Woolsey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_BIZDEV, NO_TRANSLATED_STRING, eLargeText}, - {L"Cherie Lutz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Peter Zetterberg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_PORTFOLIODIRECTOR, NO_TRANSLATED_STRING, eLargeText}, - {L"Chris Charla", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_PRODUCTMANAGER, NO_TRANSLATED_STRING, eLargeText}, - {L"Daniel McConnell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_MARKETING, NO_TRANSLATED_STRING, eLargeText}, - {L"Brandon Wells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michael Wolf", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"John Dongelmans", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_COMMUNITYMANAGER, NO_TRANSLATED_STRING, eLargeText}, - {L"Alex Hebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_REDMONDLOC, NO_TRANSLATED_STRING, eLargeText}, - {L"Zeb Wedell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Gabriella Mittiga (Pactera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Scott Fielding (Global Studio Consulting)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Yong Zhao (Hisoft Envisage Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Shogo Ishii (Insight Global)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_EUROPELOC, NO_TRANSLATED_STRING, eLargeText}, - {L"Gerard Dunne", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Ricardo Cordoba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Magali Lucchini", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Malika Kherfi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Lizzy Untermann", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Ian Walsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Alfonsina Mossello (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Marika Mauri (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Nobuhiro Izumisawa (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Sebastien Faucon (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Jose Manuel Martinez (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Montse Garcia (Keywords International Ltd)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_ASIALOC, NO_TRANSLATED_STRING, eLargeText}, - {L"Takashi Sasaki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Changseon Ha", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Shinya Muto (Zip Global Corporation)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Hiroshi Hosoda (Zip Global Corporation)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Natsuko Kudo (Zip Global Corporation)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Yong-Hong Park (Zip Global Corporation)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Yuko Yoshida (Zip Global Corporation)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_USERRESEARCH, NO_TRANSLATED_STRING, eLargeText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"User Research Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"Tim Nichols", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"User Research Engineer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"Michael Medlock", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Kristie Fisher", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%s", IDS_CREDITS_MGSCENTRAL, NO_TRANSLATED_STRING, eLargeText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"Test Team Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, - {L"Dan Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_MILESTONEACCEPT, NO_TRANSLATED_STRING, eLargeText}, - {L"Justin Davis (VMC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Microsoft Studios Sentient Development Team", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eLargeText}, - {L"Ellery Charlson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Frank Klier", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jason Ronald", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Cullen Waters", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Steve Jackson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Barath Vasudevan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Derek Mantey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Henry Sterchi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Scott Fintel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Soren Hannibal Nielsen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Meetali Goel (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Uladzimir Sadouski (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING, eLargeText}, - - {L"Allan Murphy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Allison Bokone", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Alvin Chen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Arthur Yung", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Brian Tyler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Daniel Taylor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Dave Reed", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Duoc Nguyen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Eric Voreis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Evelyn Thomas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jeff Braunstein", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jolynn Carpenter", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Justin Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Kareem Choudhry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Kevin Cogger", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Kevin La Chapelle", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Luc Rancourt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Matt Bronder", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michael Siebert", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Mike Harsh", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Mike Sterling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Nick Rapp", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Orr Keshet", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Paul Hellyar", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Peter Giffin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Richard Moe", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Scott Selfon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Stephane St-Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Steve Spiller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Steven Trombetta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Theo Michel", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Tina Lemire", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Tom Miller", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Travis St. Onge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - - {L"Brianna Witherspoon (Nytec Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Jim Pekola (Xtreme Consulting Group Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Greg Hjertager", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Masha Reutovski (Nytec Inc)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Chris Henry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Matt Golz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Chris Gaffney (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jared Barnhill (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Laura Hawkins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"2nd Cavalry", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"GTO Bug Bash Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Oliver Miyashita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Kevin Salcedo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Nick Bodenham", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Chris Giggins", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Ben Board", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Peter Choi", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Andy Su (CompuCom Systems Inc.)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"David Boker ", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Josh Bliggenstorfer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Paul Amer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Louise Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Karin Behland (Aquent LLC)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"John Bruno", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Phil Spencer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"John Smith", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Christi Davisson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jacob Farley (Aditi)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Chad Stringer (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Rick Rispoli (Collabera)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Test by Experis", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eExtraLargeText}, - {L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING, eLargeText}, - {L"Matt Brown", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Gavin Kennedy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_SRTESTLEAD, NO_TRANSLATED_STRING, eLargeText}, - {L"Lloyd Bell", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Tim Attuquayefio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING, eLargeText}, - {L"Byron R. Monzon", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Marta Alombro", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_SDET, NO_TRANSLATED_STRING, eLargeText}, - {L"Valeriy Novytskyy", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING, eLargeText}, - {L"Allyson Burk", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"David Scott", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"John Shearer", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_ADDITIONALSTE, NO_TRANSLATED_STRING, eLargeText}, - {L"Chris Merritt", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Kimberlee Lyles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Eric Ranz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Russ Allen", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING, eLargeText}, - {L"Michael Arvat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Josh Breese", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"April Culberson", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jason Fox", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Clayton K. Hopper", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Matthew Howells", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Alan Hume", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jacob Martin", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Kevin Lourigan", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Tyler Lovemark", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"%s", IDS_CREDITS_RISE_LUGO, NO_TRANSLATED_STRING, eSmallText}, - {L"Ryan Naegeli", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Isaac Price", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Masha Reutovski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Brad Shockey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jonathan Tote", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Marc Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Gillian Williams", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jeffrey Woito", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Tyler Young", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jae Yslas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Amanda Swalling", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Ben Dienes", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Chris Kent", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Dustin Lukas", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Emily Lovering", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Nick Fowler", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - // EVEN MORE CREDITS - {L"Test by Lionbridge", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eExtraLargeText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%s", IDS_CREDITS_TESTMANAGER, NO_TRANSLATED_STRING, eLargeText}, - {L"Blazej Zawadzki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_TESTLEAD, NO_TRANSLATED_STRING, eLargeText}, - {L"Jakub Garwacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Kamil Lahti", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Mariusz Gelnicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Karol Falak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Lukasz Watroba", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"%s", IDS_CREDITS_PROJECT, NO_TRANSLATED_STRING, eLargeText}, - {L"Artur Grochowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Grzegorz Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Lukasz Derewonko", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Michal Celej", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"Senior Test Engineers", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Arkadiusz Szczytowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Rafal Rawski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - - {L"%s", IDS_CREDITS_TESTASSOCIATES, NO_TRANSLATED_STRING, eLargeText}, - {L"Adrian Klepacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Aleksander Pietraszak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - - {L"Arkadiusz Kala", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Arkadiusz Sykula", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Bartlomiej Kmita", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jakub Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jan Prejs", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jedrzej Kucharek", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Kamil Dabrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Maciej Urlo", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Maciej Wygoda", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Marcin Piasecki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Marcin Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Marek Latacz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michal Biernat", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michal Krupinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Michal Warchal", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michal Wascinski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Michal Zbrzezniak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Milosz Maciejewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Pawel Kumanowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Przemyslaw Malinowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Tomasz Dabrowicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Tomasz Trzebiatowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Wojciech Kujawa", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - - {L"Blazej Kohorewicz", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Damian Mielnik", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Dariusz Nowakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Dominik Rzeznicki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jacek Piotrowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jakub Rybacki", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jakub Wozniakowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Jaroslaw Radzio", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Kamil Kaczor", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Karolina Szymanska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Konrad Mady", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Krzysztof Galazka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Ludwik Miszta", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Lukasz Kwiatkowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Marcin Krzysiak", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Mateusz Szymanski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Michal Maslany", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Michal Nyszka", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Norbert Jankowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Piotr Daszewski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Radoslaw Kozlowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Tomasz Kalowski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"%s", IDS_CREDITS_SPECIALTHANKS, NO_TRANSLATED_STRING, eLargeText}, - {L"David Hickey", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Sean Kellogg", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Adam Keating", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Jerzy Tyminski", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Paulina Sliwinska", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - - {L"Test by Shield", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eExtraLargeText}, - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"GTO Shared Service Test Manager", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eLargeText}, - {L"Natahri Felton", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Shield Test Lead", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"Matt Giddings", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"Shield IT Support", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eLargeText}, - {L"David Grant (Compucom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Primary Team", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, - {L"Alex Chen (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Alex Hunte (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Brian Boye (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Bridgette Cummins (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Chris Carleson (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Christopher Hermey (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"David Hendrickson (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Ioana Preda (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Jessica Jenkins (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Johnathan Ochs (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Michael Upham (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Nicholas Johansson (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Nicholas Starner (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - {L"Torr Vickers (Volt)", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, - {L"Victoria Bruder (CompuCom Systems Inc)", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, - -#elif defined(_WIN64) -#elif 0 - // font credits - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"%ls", IDS_DYNAFONT, NO_TRANSLATED_STRING, eLargeText}, - +#if defined(_WIN64) #endif -#if 1 // Miles & Iggy credits {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line {L"", CREDIT_ICON, eCreditIcon_Iggy, eSmallText}, // extra blank line {L"Uses Iggy.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#if 0 - {L"Copyright (C) 2009-2013 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#else {L"Copyright (C) 2009-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#endif {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line {L"", CREDIT_ICON, eCreditIcon_Miles, eSmallText}, // extra blank line {L"Uses Miles Sound System.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#if 0 - {L"Copyright (C) 1991-2013 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#else {L"Copyright (C) 1991-2014 by RAD Game Tools, Inc.", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#endif -#if 0 - {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, - eSmallText}, // extra blank line - {L"", CREDIT_ICON, eCreditIcon_Dolby, eSmallText}, // extra blank line - {L"Dolby and the double-D symbol", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, // extra blank line - {L"are trademarks of Dolby Laboratories.", NO_TRANSLATED_STRING, - NO_TRANSLATED_STRING, eSmallText}, // extra blank line -#endif -#endif }; UIScene_Credits::UIScene_Credits(int iPad, void* initData, UILayer* parentLayer) @@ -821,9 +271,6 @@ void UIScene_Credits::handleInput(int iPad, int key, bool repeat, bool pressed, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: sendInputToMovie(key, repeat, pressed, released); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Credits.h b/Minecraft.Client/Platform/Common/UI/UIScene_Credits.h index d96b5e9d1..8eaf95be9 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Credits.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Credits.h @@ -10,21 +10,9 @@ #define DYNAMODE_FONT_CREDITS_COUNT 2 #define PS3_DOLBY_CREDIT 4 -#if 0 -#define MAX_CREDIT_STRINGS \ - (PS3_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \ - DYNAMODE_FONT_CREDITS_COUNT + PS3_DOLBY_CREDIT) -#elif 0 -#define MAX_CREDIT_STRINGS \ - (PS4_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \ - DYNAMODE_FONT_CREDITS_COUNT) -#elif 0 || defined _WINDOWS64 || defined __linux__ +#if defined(_WINDOWS64) || defined(__linux__) #define MAX_CREDIT_STRINGS \ (XBOXONE_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT) -#elif 0 -#define MAX_CREDIT_STRINGS \ - (PSVITA_CREDITS_COUNT + MILES_AND_IGGY_CREDITS_COUNT + \ - DYNAMODE_FONT_CREDITS_COUNT) #endif class UIScene_Credits : public UIScene { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.cpp index 9624bb7d0..fa6e79170 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.cpp @@ -1,8 +1,5 @@ #include "../../Minecraft.World/Platform/stdafx.h" #include "UI.h" -#if 0 || 0 -#include "../Network/Sony/SonyCommerce.h" -#endif #include "UIScene_DLCMainMenu.h" #define PLAYER_ONLINE_TIMER_ID 0 @@ -19,58 +16,23 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void* initData, m_labelOffers.init(IDS_DOWNLOADABLE_CONTENT_OFFERS); m_buttonListOffers.init(eControl_OffersList); -#if 0 || 0 - // load any local DLC images - app.LoadLocalDLCImages(); -#endif -#if 0 || 0 || 0 - // show a timer on this menu - m_Timer.setVisible(true); - - m_bCategoriesShown = false; -#endif if (m_loadedResolution == eSceneResolution_1080) { m_labelXboxStore.init(L""); } -#if 0 - m_Timer.setVisible(false); - - m_buttonListOffers.addItem(IDS_DLC_MENU_SKINPACKS, e_DLC_SkinPack); - m_buttonListOffers.addItem(IDS_DLC_MENU_TEXTUREPACKS, e_DLC_TexturePacks); - m_buttonListOffers.addItem(IDS_DLC_MENU_MASHUPPACKS, e_DLC_MashupPacks); - - app.AddDLCRequest(e_Marketplace_Content); // content is skin packs, texture - // packs and mash-up packs - // we also need to mount the local DLC so we can tell what's been purchased - app.StartInstallDLCProcess(iPad); -#endif TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0); -#if 0 || 0 - app.GetCommerce()->ShowPsStoreIcon(); -#endif -#if (0 || 0 || 0) - addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME); -#endif } UIScene_DLCMainMenu::~UIScene_DLCMainMenu() { // Alert the app the we no longer want to be informed of ethernet // connections app.SetLiveLinkRequired(false); -#if 0 || 0 - app.FreeLocalDLCImages(); -#endif -#if 0 - // 4J-JEV: Have to switch back to user preferred languge now. - setLanguageOverride(true); -#endif } std::wstring UIScene_DLCMainMenu::getMoviePath() { return L"DLCMainMenu"; } @@ -90,16 +52,10 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat, switch (key) { case ACTION_MENU_CANCEL: if (pressed) { -#if 0 || 0 - app.GetCommerce()->HidePsStoreIcon(); -#endif navigateBack(); } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: @@ -125,9 +81,7 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) { // Xbox One will have requested the marketplace content - there is // only that type -#if 1 app.AddDLCRequest((eDLCMarketplaceType)iIndex, true); -#endif killTimer(PLAYER_ONLINE_TIMER_ID); ui.NavigateToScene(m_iPad, eUIScene_DLCOffersMenu, param); break; @@ -136,37 +90,12 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) { } void UIScene_DLCMainMenu::handleTimerComplete(int id) { -#if (0 || 0 || 0) - switch (id) { - case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) == - false) { - // check the player hasn't gone offline - // If they have, bring up the PSN warning and exit from the - // leaderboards - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_CONNECTION_LOST, - g_NetworkManager.CorrectErrorIDS( - IDS_CONNECTION_LOST_LIVE_NO_EXIT), - uiIDA, 1, ProfileManager.GetPrimaryPad(), - UIScene_DLCMainMenu::ExitDLCMainMenu, this); - } -#endif - break; - } -#endif } int UIScene_DLCMainMenu::ExitDLCMainMenu(void* pParam, int iPad, C4JStorage::EMessageResult result) { UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam; -#if 0 || 0 - app.GetCommerce()->HidePsStoreIcon(); -#endif pClass->navigateBack(); return 0; @@ -179,55 +108,10 @@ void UIScene_DLCMainMenu::handleGainFocus(bool navBack) { if (navBack) { // add the timer back in -#if (0 || 0 || 0) - addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME); -#endif } } void UIScene_DLCMainMenu::tick() { UIScene::tick(); -#if 0 || 0 || 0 - if ((m_bCategoriesShown == false) && - (app.GetCommerceCategoriesRetrieved())) { - // disable the timer display on this menu - m_Timer.setVisible(false); - m_bCategoriesShown = true; - - // add the categories to the list box - SonyCommerce::CategoryInfo* pCategories = app.GetCategoryInfo(); - std::list::iterator iter = - pCategories->subCategories.begin(); - SonyCommerce::CategoryInfoSub category; - for (int i = 0; i < pCategories->countOfSubCategories; i++) { - // add a button in with the subcategory - category = (SonyCommerce::CategoryInfoSub)(*iter); - - std::string teststring = category.categoryName; - m_buttonListOffers.addItem(teststring, i); - - iter++; - } - - // set the focus to the first thing in the categories if there are any - if (pCategories->countOfSubCategories > 0) { - m_buttonListOffers.setFocus(true); - } else { -#if 0 || 0 || 0 - app.CheckForEmptyStore(ProfileManager.GetPrimaryPad()); -#endif - // need to display text to say no downloadable content available yet - m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES)); - -#if 0 - // 4J-JEV: TRC Requirement (R4055), need to display this system - // message. - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_EMPTY_STORE, - ProfileManager.GetPrimaryPad()); -#endif - } - } -#endif } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.h index 2062ebdd9..1dac3ff48 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCMainMenu.h @@ -23,9 +23,6 @@ private: static int ExitDLCMainMenu(void* pParam, int iPad, C4JStorage::EMessageResult result); -#if 0 || 0 || 0 - bool m_bCategoriesShown; -#endif public: UIScene_DLCMainMenu(int iPad, void* initData, UILayer* parentLayer); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp index 9091e416c..0ccc9baa2 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.cpp @@ -2,13 +2,7 @@ #include "UI.h" #include "UIScene_DLCOffersMenu.h" #include "../../../../Minecraft.World/Util/StringHelpers.h" -#if 0 || 0 || 0 -#include "Common/Network/Sony/SonyHttp.h" -#endif -#if 0 -#include "PSVita/Network/SonyCommerce_Vita.h" -#endif #define PLAYER_ONLINE_TIMER_ID 0 #define PLAYER_ONLINE_TIMER_TIME 100 @@ -21,9 +15,6 @@ UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void* initData, m_iProductInfoIndex = param->iType; m_iCurrentDLC = 0; m_iTotalDLC = 0; -#if 0 || 0 || 0 - m_pvProductInfo = NULL; -#endif m_bAddAllDLCButtons = true; // Setup all the Iggy references we need for this scene @@ -46,28 +37,9 @@ UIScene_DLCOffersMenu::UIScene_DLCOffersMenu(int iPad, void* initData, m_labelXboxStore.init(L""); } -#if 0 - m_pNoImageFor_DLC = NULL; - // If we don't yet have this DLC, we need to display a timer - m_bDLCRequiredIsRetrieved = false; - m_bIgnorePress = true; - m_bSelectionChanged = true; - // display a timer - m_Timer.setVisible(true); -#endif -#if 0 - // sceNpCommerceShowPsStoreIcon(SCE_NP_COMMERCE_PS_STORE_ICON_CENTER); -#endif -#if (0 || 0 || 0) - addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME); -#endif - -#if 0 - ui.TouchBoxRebuild(this); -#endif } UIScene_DLCOffersMenu::~UIScene_DLCOffersMenu() { @@ -77,37 +49,12 @@ UIScene_DLCOffersMenu::~UIScene_DLCOffersMenu() { } void UIScene_DLCOffersMenu::handleTimerComplete(int id) { -#if (0 || 0 || 0) - switch (id) { - case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) == - false) { - // check the player hasn't gone offline - // If they have, bring up the PSN warning and exit from the DLC - // menu - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_CONNECTION_LOST, - g_NetworkManager.CorrectErrorIDS( - IDS_CONNECTION_LOST_LIVE_NO_EXIT), - uiIDA, 1, ProfileManager.GetPrimaryPad(), - UIScene_DLCOffersMenu::ExitDLCOffersMenu, this); - } -#endif - break; - } -#endif } int UIScene_DLCOffersMenu::ExitDLCOffersMenu( void* pParam, int iPad, C4JStorage::EMessageResult result) { UIScene_DLCOffersMenu* pClass = (UIScene_DLCOffersMenu*)pParam; -#if 0 || 0 - app.GetCommerce()->HidePsStoreIcon(); -#endif ui.NavigateToHomeMenu(); // iPad,eUIScene_MainMenu); return 0; @@ -142,9 +89,6 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: @@ -175,7 +119,7 @@ void UIScene_DLCOffersMenu::handleInput(int iPad, int key, bool repeat, case ACTION_MENU_LEFT: /* -#ifdef _DEBUG +#if defined(_DEBUG) static int iTextC=0; switch(iTextC) { @@ -233,52 +177,11 @@ AB"); break; void UIScene_DLCOffersMenu::handlePress(F64 controlId, F64 childId) { switch ((int)controlId) { case eControl_OffersList: { -#if 0 || 0 || 0 - // buy the DLC - - std::vector::iterator it = - m_pvProductInfo->begin(); - std::string teststring; - for (int i = 0; i < childId; i++) { - it++; - } - - SonyCommerce::ProductInfo info = *it; - -#if 0 - // is the item purchasable? - if (info.purchasabilityFlag == 1) { - // can be bought - app.Checkout(info.skuId); - } else { - if ((info.annotation & - (SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CANNOT_PURCHASE_AGAIN | - SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CAN_PURCHASE_AGAIN)) != - 0) { - app.DownloadAlreadyPurchased(info.skuId); - } - } -#else // 0 - // is the item purchasable? - if (info.purchasabilityFlag == - SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) { - // can be bought - app.Checkout(info.skuId); - } else { - app.DownloadAlreadyPurchased(info.skuId); - } -#endif // 0 -#elif 0 - int iIndex = (int)childId; - StorageManager.InstallOffer( - 1, StorageManager.GetOffer(iIndex).wszProductID, NULL, NULL); -#else int iIndex = (int)childId; uint64_t ullIndexA[1]; ullIndexA[0] = StorageManager.GetOffer(iIndex).qwOfferID; StorageManager.InstallOffer(1, ullIndexA, NULL, NULL); -#endif } break; } } @@ -288,598 +191,14 @@ void UIScene_DLCOffersMenu::handleSelectionChanged(F64 selectedId) {} void UIScene_DLCOffersMenu::handleFocusChange(F64 controlId, F64 childId) { app.DebugPrintf("UIScene_DLCOffersMenu::handleFocusChange\n"); -#if 0 - // set this here on Vita, in case we've came from a touch screen press. - // Fixes bug #5794 - if ((int)controlId == eControl_OffersList) { - m_bProductInfoShown = false; - m_iCurrentDLC = (int)childId; - } -#endif -#if 0 - m_bSelectionChanged = true; // to tell the tick to update the display - // 4J-PB can't call settexturename from a callback - /*if(m_buttonListOffers.hasFocus() && (childId>-1)) - { - int iIndex = (int)childId; - MARKETPLACE_CONTENTOFFER_INFO xOffer = - StorageManager.GetOffer(iIndex); UpdateDisplay(xOffer); - }*/ -#endif -#if 0 || 0 - if (m_pvProductInfo) { - m_bIsSelected = true; - std::vector::iterator it = - m_pvProductInfo->begin(); - std::string teststring; - for (int i = 0; i < childId; i++) { - it++; - } - - SonyCommerce::ProductInfo info = *it; - if (info.purchasabilityFlag == SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) { - m_bHasPurchased = false; - } else { - m_bHasPurchased = true; - } - - updateTooltips(); - } -#endif } void UIScene_DLCOffersMenu::tick() { UIScene::tick(); -#if 0 || 0 || 0 - - if (m_bAddAllDLCButtons) { - // need to fill out all the dlc buttons - - if ((m_bProductInfoShown == false) && - app.GetCommerceProductListRetrieved() && - app.GetCommerceProductListInfoRetrieved()) { - m_bAddAllDLCButtons = false; - // add the categories to the list box - if (m_pvProductInfo == NULL) { - m_pvProductInfo = app.GetProductList(m_iProductInfoIndex); - if (m_pvProductInfo == NULL) { - m_iTotalDLC = 0; - // need to display text to say no downloadable content - // available yet - m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES)); - - m_bProductInfoShown = true; - return; - } else - m_iTotalDLC = m_pvProductInfo->size(); - } - - std::vector::iterator it = - m_pvProductInfo->begin(); - std::string teststring; - bool bFirstItemSet = false; - for (int i = 0; i < m_iTotalDLC; i++) { - SonyCommerce::ProductInfo info = *it; - - if (strncmp(info.productName, "Minecraft ", 10) == 0) { - teststring = &info.productName[10]; - - } else { - teststring = info.productName; - } - - bool bDLCIsAvailable = false; - -#if 0 - // is the item purchasable? - if (info.purchasabilityFlag == 1) { - // can be bought - app.DebugPrintf("Adding DLC (%s) - not bought\n", - teststring.c_str()); - m_buttonListOffers.addItem(teststring, false, i); - bDLCIsAvailable = true; - } else { - if ((info.annotation & - (SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CANNOT_PURCHASE_AGAIN | - SCE_NP_COMMERCE2_SKU_ANN_PURCHASED_CAN_PURCHASE_AGAIN)) != - 0) { - app.DebugPrintf("Adding DLC (%s) - bought\n", - teststring.c_str()); - m_buttonListOffers.addItem(teststring, true, i); - bDLCIsAvailable = true; - } - } -#else // 0 - // is the item purchasable? - if (info.purchasabilityFlag == - SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) { - // can be bought - m_buttonListOffers.addItem(teststring, false, i); - bDLCIsAvailable = true; - } else { - m_buttonListOffers.addItem(teststring, true, i); - bDLCIsAvailable = true; - } -#endif // 0 - - // set the other details for the first item - if (bDLCIsAvailable && (bFirstItemSet == false)) { - bFirstItemSet = true; - - // 4J-PB - info.longDescription isn't null terminated - char chLongDescription - [SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN + 1]; - memcpy(chLongDescription, info.longDescription, - SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN); - chLongDescription - [SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN] = 0; - m_labelHTMLSellText.setLabel(chLongDescription); - - if (info.ui32Price == 0) { - m_labelPriceTag.setLabel( - app.GetString(IDS_DLC_PRICE_FREE)); - } else { - teststring = info.price; - m_labelPriceTag.setLabel(teststring); - } - - // get the image - if we haven't already - std::wstring textureName = filenametowstring(info.imageUrl); - - if (hasRegisteredSubstitutionTexture(textureName) == - false) { - PBYTE pbImageData; - int iImageDataBytes = 0; - bool bDeleteData; -#if 0 - // check the local files first - SONYDLC* pSONYDLCInfo = - app.GetSONYDLCInfoFromKeyname(info.productId); - - // does the DLC info have an image? - if (pSONYDLCInfo && pSONYDLCInfo->dwImageBytes != 0) { - pbImageData = pSONYDLCInfo->pbImageData; - iImageDataBytes = pSONYDLCInfo->dwImageBytes; - bDeleteData = - false; // we'll clean up the local LDC images - } else -#endif - if (info.imageUrl[0] != 0) { - SonyHttp::getDataFromURL(info.imageUrl, - (void**)&pbImageData, - &iImageDataBytes); - bDeleteData = true; - } - - if (iImageDataBytes != 0) { - // set the image - registerSubstitutionTexture( - textureName, pbImageData, iImageDataBytes, - bDeleteData); - m_bitmapIconOfferImage.setTextureName(textureName); - // 4J Stu - Don't delete this - // delete [] pbImageData; - } else { - m_bitmapIconOfferImage.setTextureName(L""); - } - } else { - m_bitmapIconOfferImage.setTextureName(textureName); - } - } - it++; - } - - if (bFirstItemSet == false) { - // we were not able to add any items to the list - m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES)); - } else { - // set the focus to the first thing in the categories if there - // are any - if (m_pvProductInfo->size() > 0) { - m_buttonListOffers.setFocus(true); - } else { - // need to display text to say no downloadable content - // available yet - m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES)); - } - } - - m_Timer.setVisible(false); - m_bProductInfoShown = true; - } - } else { -#if 0 - // MGH - fixes bug 5768 on Vita - should be extended properly to work - // for other platforms - if ((SonyCommerce_Vita::getPurchasabilityUpdated()) && - app.GetCommerceProductListRetrieved() && - app.GetCommerceProductListInfoRetrieved() && m_iTotalDLC > 0) { - { - std::vector::iterator it = - m_pvProductInfo->begin(); - for (int i = 0; i < m_iTotalDLC; i++) { - SonyCommerce::ProductInfo info = *it; - // is the item purchasable? - if (info.purchasabilityFlag == - SCE_TOOLKIT_NP_COMMERCE_NOT_PURCHASED) { - // can be bought - m_buttonListOffers.showTick(i, false); - } else { - m_buttonListOffers.showTick(i, true); - } - it++; - } - } - } -#endif - - // just update the details based on what the current selection is / - // TomK-4J - don't proceed if total DLC is 0 (bug 4757) - if ((m_bProductInfoShown == false) && - app.GetCommerceProductListRetrieved() && - app.GetCommerceProductListInfoRetrieved() && m_iTotalDLC > 0) { - std::vector::iterator it = - m_pvProductInfo->begin(); - std::string teststring; - for (int i = 0; i < m_iCurrentDLC; i++) { - it++; - } - - SonyCommerce::ProductInfo info = *it; - - // 4J-PB - info.longDescription isn't null terminated - char chLongDescription - [SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN + 1]; - memcpy(chLongDescription, info.longDescription, - SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN); - chLongDescription[SCE_NP_COMMERCE2_PRODUCT_LONG_DESCRIPTION_LEN] = - 0; - m_labelHTMLSellText.setLabel(chLongDescription); - - if (info.ui32Price == 0) { - m_labelPriceTag.setLabel(app.GetString(IDS_DLC_PRICE_FREE)); - } else { - teststring = info.price; - m_labelPriceTag.setLabel(teststring); - } - - // get the image - - // then retrieve from the web - std::wstring textureName = filenametowstring(info.imageUrl); - - if (hasRegisteredSubstitutionTexture(textureName) == false) { - PBYTE pbImageData; - int iImageDataBytes = 0; - bool bDeleteData; -#if 0 - // check the local files first - SONYDLC* pSONYDLCInfo = - app.GetSONYDLCInfoFromKeyname(info.productId); - - // does the DLC info have an image? - if (pSONYDLCInfo->dwImageBytes != 0) { - pbImageData = pSONYDLCInfo->pbImageData; - iImageDataBytes = pSONYDLCInfo->dwImageBytes; - bDeleteData = false; // we'll clean up the local LDC images - } else -#endif - { - SonyHttp::getDataFromURL( - info.imageUrl, (void**)&pbImageData, &iImageDataBytes); - bDeleteData = true; - } - - if (iImageDataBytes != 0) { - // set the image - registerSubstitutionTexture(textureName, pbImageData, - iImageDataBytes, bDeleteData); - m_bitmapIconOfferImage.setTextureName(textureName); - - // 4J Stu - Don't delete this - // delete [] pbImageData; - } else { - m_bitmapIconOfferImage.setTextureName(L""); - } - } else { - m_bitmapIconOfferImage.setTextureName(textureName); - } - m_bProductInfoShown = true; - m_Timer.setVisible(false); - } - } -#elif 0 - if (m_bAddAllDLCButtons) { - // Is the DLC we're looking for available? - if (!m_bDLCRequiredIsRetrieved) { - // DLCContentRetrieved is to see if the type of content has been - // retrieved - and on Durango there is only type 0 - - // XMARKETPLACE_OFFERING_TYPE_CONTENT - if (app.DLCContentRetrieved(e_Marketplace_Content)) { - m_bDLCRequiredIsRetrieved = true; - - // Retrieve the info - GetDLCInfo(app.GetDLCOffersCount(), false); - m_bIgnorePress = false; - m_bAddAllDLCButtons = false; - - // hide the timer - m_Timer.setVisible(false); - } - } - } - - // have to wait until we have the offers - if (m_bSelectionChanged && m_bDLCRequiredIsRetrieved) { - // need to update text and icon - if (m_buttonListOffers.hasFocus() && (getControlChildFocus() > -1)) { - int iIndex = getControlChildFocus(); - MARKETPLACE_CONTENTOFFER_INFO xOffer = - StorageManager.GetOffer(iIndex); - - if (!ui.UsingBitmapFont()) // 4J-JEV: Replace characters we don't - // have. - { - for (int i = 0; xOffer.wszCurrencyPrice[i] != 0; i++) { - WCHAR* c = &xOffer.wszCurrencyPrice[i]; - if (*c == L'\u20A9') - *c = L'\uFFE6'; // Korean Won. - else if (*c == L'\u00A5') - *c = L'\uFFE5'; // Japanese Yen. - } - } - - if (UpdateDisplay(xOffer)) { - // image was available - m_bSelectionChanged = false; - } - } - } - -// if(m_bBitmapOfferIconDisplayed==false) -// { -// // do we have it yet? -// if -// } -// retrieve the icons for the DLC -// if(m_vIconRetrieval.size()>0) -// { -// // for each icon, request it, and remove it from the list -// // the callback for the retrieval will update the display if -// needed -// -// AUTO_VAR(itEnd, m_vIconRetrieval.end()); -// for (AUTO_VAR(it, m_vIconRetrieval.begin()); it != itEnd; it++) -// { -// -// } -// -// } -#endif } -#if 0 -void UIScene_DLCOffersMenu::GetDLCInfo(int iOfferC, bool bUpdateOnly) { - MARKETPLACE_CONTENTOFFER_INFO xOffer; - int iCount = 0; - bool bNoDLCToDisplay = true; - unsigned int uiDLCCount = 0; - if (bUpdateOnly) // Just update the info on the current list - { - } else { - // clear out the list - m_buttonListOffers.clearList(); - // need to reorder the DLC display according to dlc uiSortIndex - SORTINDEXSTRUCT* OrderA = new SORTINDEXSTRUCT[iOfferC]; - - for (int i = 0; i < iOfferC; i++) { - xOffer = StorageManager.GetOffer(i); - // Check that this is in the list of known DLC - DLC_INFO* pDLC = app.GetDLCInfoForFullOfferID(xOffer.wszProductID); - - if (pDLC != NULL) { - OrderA[uiDLCCount].uiContentIndex = i; - OrderA[uiDLCCount++].uiSortIndex = pDLC->uiSortIndex; - } else { - app.DebugPrintf("Unknown offer - %ls\n", xOffer.wszOfferName); - } - } - - qsort(OrderA, uiDLCCount, sizeof(SORTINDEXSTRUCT), OrderSortFunction); - - for (int i = 0; i < uiDLCCount; i++) { - xOffer = StorageManager.GetOffer(OrderA[i].uiContentIndex); - - // Check that this is in the list of known DLC - DLC_INFO* pDLC = app.GetDLCInfoForFullOfferID(xOffer.wszProductID); - - if (pDLC == NULL) { - // skip this one - app.DebugPrintf("Unknown offer - %ls\n", xOffer.wszOfferName); - continue; - } - - if (pDLC->eDLCType == (eDLCContentType)m_iProductInfoIndex) { - std::wstring wstrTemp = xOffer.wszOfferName; - - // 4J-PB - Rog requested we remove the Minecraft at the start of - // the name. It's required for the Bing search, but gets in the - // way here - app.DebugPrintf("Adding %ls at %d\n", wstrTemp.c_str(), i); - - if (wcsncmp(L"Minecraft ", wstrTemp.c_str(), 10) == 0) { - app.DebugPrintf("Removing Minecraft from name\n"); - WCHAR* pwchNewName = (WCHAR*)wstrTemp.c_str(); - wstrTemp = &pwchNewName[10]; - } - -#if 0 - // 4J-PB - the hasPurchased comes from the local installed - // package info find the DLC in the installed packages - XCONTENT_DATA* pContentData = - StorageManager.GetInstalledDLC(xOffer.wszProductID); - - if (pContentData != NULL) { - m_buttonListOffers.addItem(wstrTemp, - !pContentData->bTrialLicense, - OrderA[i].uiContentIndex); - } else { - m_buttonListOffers.addItem(wstrTemp, false, - OrderA[i].uiContentIndex); - } -#else - m_buttonListOffers.addItem(wstrTemp, xOffer.fUserHasPurchased, - OrderA[i].uiContentIndex); -#endif - - // add the required image to the retrieval queue - m_vIconRetrieval.push_back(pDLC->wchBanner); - - /** 4J JEV: - * We've filtered results out from the list, need to keep track - * of the 'actual' list index. - */ - iCount++; - } - } - - // Check if there is nothing to display, and display the default - // "nothing available at this time" - if (iCount > 0) { - bNoDLCToDisplay = false; - xOffer = StorageManager.GetOffer(OrderA[0].uiContentIndex); - // m_buttonListOffers.setCurrentSelection(0); - - UpdateDisplay(xOffer); - } - delete OrderA; - } - - // turn off the timer display - // m_Timer.SetShow(FALSE); - if (bNoDLCToDisplay) { - // set the default text - - wchar_t formatting[40]; - std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); - // swprintf(formatting, 40, L"", - // m_bIsSD?12:14); wstrTemp = formatting + wstrTemp; - - m_labelHTMLSellText.setLabel(wstrTemp); - m_labelPriceTag.setVisible(false); - } -} - -int UIScene_DLCOffersMenu::OrderSortFunction(const void* a, const void* b) { - return ((SORTINDEXSTRUCT*)b)->uiSortIndex - - ((SORTINDEXSTRUCT*)a)->uiSortIndex; -} - -void UIScene_DLCOffersMenu::UpdateTooltips( - MARKETPLACE_CONTENTOFFER_INFO& xOffer) { - m_bHasPurchased = xOffer.fUserHasPurchased; - m_bIsSelected = true; - updateTooltips(); -} - -bool UIScene_DLCOffersMenu::UpdateDisplay( - MARKETPLACE_CONTENTOFFER_INFO& xOffer) { - bool bImageAvailable = false; -#if 0 - DLC_INFO* dlc = app.GetDLCInfoForFullOfferID(xOffer.wszProductID); -#else - DLC_INFO* dlc = app.GetDLCInfoForFullOfferID(xOffer.wszOfferName); -#endif - - if (dlc != NULL) { - WCHAR* cString = dlc->wchBanner; - - // is the file in the local DLC images? - // is the file in the TMS XZP? - // int iIndex = app.GetLocalTMSFileIndex(cString, true); - - if (dlc->dwImageBytes != 0) { - // app.LoadLocalTMSFile(cString); - - // set the image - no delete - registerSubstitutionTexture(cString, dlc->pbImageData, - dlc->dwImageBytes, false); - m_bitmapIconOfferImage.setTextureName(cString); - bImageAvailable = true; - } else { - bool bPresent = app.IsFileInMemoryTextures(cString); - if (!bPresent) { - // Image has not come in yet - // Set the item monitored in the timer, so we can set the image - // when it comes in - m_pNoImageFor_DLC = dlc; - - app.AddTMSPPFileTypeRequest(dlc->eDLCType, true); - bImageAvailable = false; - // m_bitmapIconOfferImage.setTextureName(L""); - } else { - if (hasRegisteredSubstitutionTexture(cString) == false) { - BYTE* pData = NULL; - DWORD dwSize = 0; - app.GetMemFileDetails(cString, &pData, &dwSize); - // set the image -#if 0 - registerSubstitutionTexture(cString, pData, dwSize); -#else - registerSubstitutionTexture(cString, pData, dwSize, true); -#endif - m_bitmapIconOfferImage.setTextureName(cString); - } else { - m_bitmapIconOfferImage.setTextureName(cString); - } - bImageAvailable = true; - } - } - - m_labelHTMLSellText.setLabel(xOffer.wszSellText); - - // set the price info - m_labelPriceTag.setVisible(true); - m_labelPriceTag.setLabel(xOffer.wszCurrencyPrice); - - UpdateTooltips(xOffer); - } else { - wchar_t formatting[40]; - std::wstring wstrTemp = app.GetString(IDS_NO_DLCOFFERS); - m_labelHTMLSellText.setLabel(wstrTemp.c_str()); - m_labelPriceTag.setVisible(false); - } - - return bImageAvailable; -} -#endif - -#if 0 -void UIScene_DLCOffersMenu::HandleDLCLicenseChange() { - // flag an update of the display - int iOfferC = app.GetDLCOffersCount(); - - GetDLCInfo(iOfferC, false); -} -#endif // 0 - -#if 0 -void UIScene_DLCOffersMenu::HandleDLCInstalled() { - app.DebugPrintf(4, "UIScene_DLCOffersMenu::HandleDLCInstalled\n"); - - // m_buttonListOffers.clearList(); - // m_bAddAllDLCButtons=true; - // m_bProductInfoShown=false; -} - -// void UIScene_DLCOffersMenu::HandleDLCMountingComplete() -// { -// app.DebugPrintf(4,"UIScene_SkinSelectMenu::HandleDLCMountingComplete\n"); -//} - -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.h index 6382f198b..6c53da943 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DLCOffersMenu.h @@ -52,42 +52,13 @@ public: virtual void handleSelectionChanged(F64 selectedId); virtual void handleFocusChange(F64 controlId, F64 childId); virtual void handleTimerComplete(int id); -#if 0 - virtual void HandleDLCInstalled(); -#endif -#if 0 - virtual void HandleDLCLicenseChange(); -#endif private: -#if 0 - void GetDLCInfo(int iOfferC, bool bUpdateOnly = false); - void UpdateTooltips(MARKETPLACE_CONTENTOFFER_INFO& xOffer); - bool UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer); - - static int OrderSortFunction(const void* a, const void* b); - - bool m_bIgnorePress; - bool m_bDLCRequiredIsRetrieved; - DLC_INFO* m_pNoImageFor_DLC; - - typedef struct { - unsigned int uiContentIndex; - unsigned int uiSortIndex; - } SORTINDEXSTRUCT; - - std::vector m_vIconRetrieval; - bool m_bSelectionChanged; - -#endif bool m_bProductInfoShown; int m_iProductInfoIndex; int m_iCurrentDLC; int m_iTotalDLC; bool m_bAddAllDLCButtons; -#if 0 || 0 || 0 - std::vector* m_pvProductInfo; -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp index 25b268a38..c5668671c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.cpp @@ -63,9 +63,6 @@ void UIScene_DeathMenu::handleInput(int iPad, int key, bool repeat, handled = true; break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: sendInputToMovie(key, repeat, pressed, released); @@ -79,9 +76,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { case eControl_Respawn: m_bIgnoreInput = true; app.SetAction(m_iPad, eAppAction_Respawn); -#if 0 - // InputManager.SetEnabledGtcButtons(_360_GTC_MENU|_360_GTC_PAUSE|_360_GTC_VIEW); -#endif break; case eControl_ExitGame: { Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -101,28 +95,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { TelemetryManager->RecordLevelExit( m_iPad, eSen_LevelExitStatus_Failed); -#if 0 || 0 - if (g_NetworkManager.IsHost() && - StorageManager.GetSaveDisabled()) { - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_EXIT_GAME_SAVE; - uiIDA[2] = IDS_EXIT_GAME_NO_SAVE; - - ui.RequestAlertMessage( - IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3, - m_iPad, - &IUIScene_PauseMenu::ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } else { - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2, - m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } - -#else if (StorageManager.GetSaveDisabled()) { uiIDA[0] = IDS_CONFIRM_CANCEL; uiIDA[1] = IDS_CONFIRM_OK; @@ -153,7 +125,6 @@ void UIScene_DeathMenu::handlePress(F64 controlId, F64 childId) { (LPVOID)GetCallbackUniqueId()); } } -#endif } else { TelemetryManager->RecordLevelExit( m_iPad, eSen_LevelExitStatus_Failed); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.h index 167d25526..9e3e115f5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DeathMenu.h @@ -34,7 +34,4 @@ public: protected: void handlePress(F64 controlId, F64 childId); -#if 0 - virtual long long getDefaultGtcButtons() { return 0; } -#endif }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_EULA.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_EULA.cpp index e19134a21..abafb30e7 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_EULA.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_EULA.cpp @@ -13,33 +13,7 @@ UIScene_EULA::UIScene_EULA(int iPad, void* initData, UILayer* parentLayer) m_buttonConfirm.init(app.GetString(IDS_TOOLTIPS_ACCEPT), eControl_Confirm); -#if 0 || 0 || 0 - std::wstring EULA = app.GetString(IDS_EULA); - EULA.append(L"\r\n"); - -#if 0 - if (app.IsEuropeanSKU()) { - EULA.append(app.GetString(IDS_EULA_SCEE)); - // if it's the BD build - if (StorageManager.GetBootTypeDisc()) { - EULA.append(app.GetString(IDS_EULA_SCEE_BD)); - } - } else if (app.IsAmericanSKU()) { - EULA.append(app.GetString(IDS_EULA_SCEA)); - } -#elif 0 - if (app.IsEuropeanSKU()) { - EULA.append(app.GetString(IDS_EULA_SCEE)); - // 4J-PB - we can't tell if it's a disc or digital version, so let's - // show this anyway - EULA.append(app.GetString(IDS_EULA_SCEE_BD)); - } else if (app.IsAmericanSKU()) { - EULA.append(app.GetString(IDS_EULA_SCEA)); - } -#endif -#else std::wstring EULA = L""; -#endif std::vector paragraphs; int lastIndex = 0; @@ -69,9 +43,6 @@ UIScene_EULA::UIScene_EULA(int iPad, void* initData, UILayer* parentLayer) // ui.setFontCachingCalculationBuffer(20000); -#if 0 - ui.TouchBoxRebuild(this); -#endif } UIScene_EULA::~UIScene_EULA() { @@ -89,18 +60,10 @@ void UIScene_EULA::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled) { if (m_bIgnoreInput) return; -#if 0 - // ignore all players except player 0 - it's their profile that is currently - // being used - if (iPad != 0) return; -#endif ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); switch (key) { -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_OK: case ACTION_MENU_DOWN: case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_EULA.h b/Minecraft.Client/Platform/Common/UI/UIScene_EULA.h index 9b478d37b..8f6650b80 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_EULA.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_EULA.h @@ -24,9 +24,7 @@ public: virtual EUIScene getSceneType() { return eUIScene_EULA; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif virtual void updateTooltips(); protected: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_EndPoem.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_EndPoem.cpp index 94e4476fc..16e547d48 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_EndPoem.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_EndPoem.cpp @@ -17,20 +17,6 @@ UIScene_EndPoem::UIScene_EndPoem(int iPad, void* initData, UILayer* parentLayer) // 4J Stu - Don't need these, the AS handles the scrolling and makes it look // nice -#if 0 - std::wstring halfScreenLineBreaks; - - if(RenderManager.IsHiDef()) - { - // HD - 17 line page - halfScreenLineBreaks = L"










"; - } - else - { - // 480 - 14 line page - halfScreenLineBreaks = L"







"; - } -#endif // wchar_t startTags[64]; // swprintf(startTags,64,L"Run(); threadStarted = true; -#if 0 - ui.TouchBoxRebuild(this); -#endif -#if 0 - ui.ShowPlayerDisplayname(false); -#endif } UIScene_FullscreenProgress::~UIScene_FullscreenProgress() { @@ -198,9 +192,6 @@ void UIScene_FullscreenProgress::tick() { m_buttonConfirm.setVisible(true); // 4J-TomK - rebuild touch after confirm button made visible // again -#if 0 - ui.TouchBoxRebuild(this); -#endif updateTooltips(); } else { if (m_bWasCancelled) { @@ -287,9 +278,6 @@ void UIScene_FullscreenProgress::handleInput(int iPad, int key, bool repeat, switch (key) { case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { sendInputToMovie(key, repeat, pressed, released); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_HUD.h b/Minecraft.Client/Platform/Common/UI/UIScene_HUD.h index 51d9d1760..a008880c8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_HUD.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_HUD.h @@ -178,11 +178,6 @@ public: protected: void handleTimerComplete(int id); -#if 0 - virtual long long getDefaultGtcButtons() { - return _360_GTC_PAUSE | _360_GTC_MENU | _360_GTC_VIEW; - } -#endif private: void repositionHud(); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_HelpAndOptionsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_HelpAndOptionsMenu.cpp index f5418af59..ce63aa6ca 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_HelpAndOptionsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_HelpAndOptionsMenu.cpp @@ -26,23 +26,13 @@ UIScene_HelpAndOptionsMenu::UIScene_HelpAndOptionsMenu(int iPad, void* initData, // We don't have a reinstall content, so remove the button removeControl(&m_buttons[BUTTON_HAO_REINSTALL], false); -#ifdef _FINAL_BUILD +#if defined(_FINAL_BUILD) removeControl(&m_buttons[BUTTON_HAO_DEBUG], false); #else if (!app.DebugSettingsOn()) removeControl(&m_buttons[BUTTON_HAO_DEBUG], false); #endif -#if 0 - // 4J-PB - in order to buy the skin packs, we need the signed offer ids for - // them, which we get in the availability info we need to retrieve this info - // though, so do it here - app.AddDLCRequest(e_Marketplace_Content); // content is skin packs, texture - // packs and mash-up packs - - // we also need to mount the local DLC so we can tell what's been purchased - app.StartInstallDLCProcess(iPad); -#endif // 4J-PB - do not need a storage device to see this menu - just need one // when you choose to re-install them @@ -112,7 +102,7 @@ void UIScene_HelpAndOptionsMenu::updateComponents() { } void UIScene_HelpAndOptionsMenu::handleReload() { -#ifdef _FINAL_BUILD +#if defined(_FINAL_BUILD) removeControl(&m_buttons[BUTTON_HAO_DEBUG], false); #else if (!app.DebugSettingsOn()) @@ -178,9 +168,6 @@ void UIScene_HelpAndOptionsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif // CD - Added for audio if (pressed) { ui.PlayUISFX(eSFX_Press); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlay.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlay.cpp index b6a339480..e36862e38 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlay.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlay.cpp @@ -49,10 +49,6 @@ static UIScene_HowToPlay::SHowToPlayPageDef gs_aPageDefs[eHowToPlay_NumPages] = {IDS_HOW_TO_PLAY_DROPPERS, 0, 0}, // eHowToPlay_Droppers {IDS_HOW_TO_PLAY_NETHERPORTAL, 0, 0}, // eHowToPlay_NetherPortal {IDS_HOW_TO_PLAY_THEEND, 0, 0}, // eHowToPlay_NetherPortal -#if 0 - {IDS_HOW_TO_PLAY_SOCIALMEDIA, 0, 0}, // eHowToPlay_SocialMedia - {IDS_HOW_TO_PLAY_BANLIST, 0, 0}, // eHowToPlay_BanList -#endif {IDS_HOW_TO_PLAY_HOSTOPTIONS, 0, 0}, // eHowToPlay_HostOptions }; @@ -86,10 +82,6 @@ int gs_pageToFlashMapping[eHowToPlay_NumPages] = { 16, // eHowToPlay_NetherPortal, 17, // eHowToPlay_TheEnd, -#if 0 - 18, // eHowToPlay_SocialMedia, - 19, // eHowToPlay_BanList, -#endif 20, // eHowToPlay_HostOptions, }; @@ -190,13 +182,6 @@ void UIScene_HowToPlay::updateTooltips() { int firstPage = eHowToPlay_WhatsNew; // 4J Stu - Add back for future platforms -#if 0 - // No What's New for the first PS4 and Xbox One builds - if(true) - { - ++firstPage; - } -#endif int iA = -1; int iX = -1; @@ -228,9 +213,6 @@ void UIScene_HowToPlay::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_A: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { // Next page int iNextPage = (int)(m_eCurrPage) + 1; @@ -247,18 +229,6 @@ void UIScene_HowToPlay::handleInput(int iPad, int key, bool repeat, int iPrevPage = (int)(m_eCurrPage)-1; // 4J Stu - Add back for future platforms -#if 0 - // No What's New for the first PS4 and Xbox One builds - if(true) - { - if ( iPrevPage >= 0 && !((iPrevPage==eHowToPlay_WhatsNew))) - { - StartPage( ( EHowToPlayPage )( iPrevPage ) ); - ui.PlayUISFX(eSFX_Press); - } - } - else -#endif { if (iPrevPage >= 0) { StartPage((EHowToPlayPage)(iPrevPage)); @@ -292,10 +262,6 @@ void UIScene_HowToPlay::StartPage(EHowToPlayPage ePage) { // replaceAll(replacedText,L"{*TITLE_UPDATE_NAME*}",app.GetString(IDS_TITLE_UPDATE_NAME)); replacedText = replaceAll(replacedText, L"{*KICK_PLAYER_DESCRIPTION*}", app.GetString(IDS_KICK_PLAYER_DESCRIPTION)); -#if 0 - replacedText = replaceAll(replacedText, L"{*PLATFORM_NAME*}", - app.GetString(IDS_PLATFORM_NAME)); -#endif replacedText = replaceAll(replacedText, L"{*BACK_BUTTON*}", app.GetString(IDS_BACK_BUTTON)); replacedText = @@ -363,7 +329,4 @@ void UIScene_HowToPlay::StartPage(EHowToPlayPage ePage) { TelemetryManager->RecordMenuShown(m_iPad, eUIScene_HowToPlay, (ETelemetry_HowToPlay_SubMenuId)ePage); -#if 0 - ui.TouchBoxRebuild(this); -#endif } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.cpp index 7ba49fba0..54854d4fe 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.cpp @@ -28,10 +28,6 @@ unsigned int UIScene_HowToPlayMenu::m_uiHTPButtonNameA[] = { IDS_HOW_TO_PLAY_MENU_NETHERPORTAL, // eHTPButton_NetherPortal, IDS_HOW_TO_PLAY_MENU_THEEND, // eHTPButton_TheEnd, -#if 0 - IDS_HOW_TO_PLAY_MENU_SOCIALMEDIA, // eHTPButton_SocialMedia, - IDS_HOW_TO_PLAY_MENU_BANLIST, // eHTPButton_BanningLevels, -#endif IDS_HOW_TO_PLAY_MENU_HOSTOPTIONS, // eHTPButton_HostOptions, }; @@ -52,9 +48,6 @@ unsigned int UIScene_HowToPlayMenu::m_uiHTPSceneA[] = { eHowToPlay_Droppers, eHowToPlay_NetherPortal, eHowToPlay_TheEnd, -#if 0 - eHowToPlay_SocialMedia, eHowToPlay_BanList, -#endif eHowToPlay_HostOptions, }; @@ -68,17 +61,6 @@ UIScene_HowToPlayMenu::UIScene_HowToPlayMenu(int iPad, void* initData, for (unsigned int i = 0; i < eHTPButton_Max; ++i) { // 4J Stu - Re-add for future platforms -#if 0 - // No What's New - if(true) - { - if(!(i==eHTPButton_WhatsNew) ) - { - m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i);//iCount++); - } - } - else -#endif { m_buttonListHowTo.addItem(app.GetString(m_uiHTPButtonNameA[i]), i); // iCount++); @@ -118,17 +100,6 @@ void UIScene_HowToPlayMenu::updateComponents() { void UIScene_HowToPlayMenu::handleReload() { for (unsigned int i = 0; i < eHTPButton_Max; ++i) { // 4J Stu - Re-add for future platforms -#if 0 - // No What's New - if(true) - { - if(!(i==eHTPButton_WhatsNew) ) - { - m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i); - } - } - else -#endif { m_buttonListHowTo.addItem(app.GetString(m_uiHTPButtonNameA[i]), i); } } @@ -150,9 +121,6 @@ void UIScene_HowToPlayMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.h index 1bd99c96a..21f4a44d6 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_HowToPlayMenu.h @@ -32,10 +32,6 @@ private: eHTPButton_Droppers, eHTPButton_NetherPortal, eHTPButton_TheEnd, -#if 0 - eHTPButton_SocialMedia, - eHTPButton_BanningLevels, -#endif eHTPButton_HostOptions, eHTPButton_Max, }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameHostOptionsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameHostOptionsMenu.cpp index 958c4cf48..c16ac4976 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameHostOptionsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameHostOptionsMenu.cpp @@ -164,9 +164,6 @@ void UIScene_InGameHostOptionsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp index a0a1e9655..132b0182c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.cpp @@ -88,9 +88,6 @@ void UIScene_InGameInfoMenu::updateTooltips() { } if (g_NetworkManager.IsLocalGame()) keyX = -1; -#if 0 - if (CGameNetworkManager::usingAdhocMode()) keyX = -1; -#endif INetworkPlayer* selectedPlayer = g_NetworkManager.GetPlayerBySmallId( m_players[m_playerList.getCurrentSelection()]->m_smallId); @@ -111,8 +108,7 @@ void UIScene_InGameInfoMenu::updateTooltips() { bool editingHost = selectedPlayer->IsHost(); if ((cheats && (m_isHostPlayer || !editingHost)) || (!trust && (m_isHostPlayer || !editingHost)) -#if (!defined(_CONTENT_PACKAGE) && !defined(_FINAL_BUILD) && \ - defined(_DEBUG_MENUS_ENABLED)) +#if !defined(_CONTENT_PACKAGE) && !defined(_FINAL_BUILD) && defined(_DEBUG_MENUS_ENABLED) || (m_isHostPlayer && editingHost) #endif ) { @@ -127,10 +123,6 @@ void UIScene_InGameInfoMenu::updateTooltips() { } } -#if 0 || 0 - if (m_iPad == ProfileManager.GetPrimaryPad()) - ikeyY = IDS_TOOLTIPS_GAME_INVITES; -#else if (!m_buttonGameOptions.hasFocus()) { // if the player is me, then view gamer profile if (selectedPlayer != NULL && selectedPlayer->IsLocal() && @@ -140,7 +132,6 @@ void UIScene_InGameInfoMenu::updateTooltips() { ikeyY = IDS_TOOLTIPS_VIEW_GAMERCARD; } } -#endif ui.SetTooltips(m_iPad, keyA, IDS_TOOLTIPS_BACK, keyX, ikeyY); } @@ -246,36 +237,6 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_Y: -#if 0 || 0 - if (pressed && iPad == ProfileManager.GetPrimaryPad()) { -#if 0 - // are we offline? - if (!ProfileManager.IsSignedInLive(iPad)) { - // get them to sign in to online - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, ProfileManager.GetPrimaryPad(), - &UIScene_InGameInfoMenu::MustSignInReturnedPSN, this); - } else -#endif - { -#if 0 - SQRNetworkManager_Orbis::RecvInviteGUI(); -#else // 0 - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf( - "sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, - ret); -#endif - } - } -#else if (pressed && m_playerList.hasFocus() && (m_playerList.getItemCount() > 0) && @@ -285,33 +246,20 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, if (player != NULL) { PlayerUID uid = player->GetUID(); if (uid != INVALID_XUID) { -#if 0 - PSVITA_STUBBED; -#else ProfileManager.ShowProfileCard(iPad, uid); -#endif } } } -#endif break; case ACTION_MENU_X: if (pressed && !repeat && !g_NetworkManager.IsLocalGame()) { -#if 0 - if (CGameNetworkManager::usingAdhocMode() == false) - g_NetworkManager.SendInviteGUI(iPad); -#else g_NetworkManager.SendInviteGUI(iPad); -#endif } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: case ACTION_MENU_PAGEUP: @@ -347,8 +295,7 @@ void UIScene_InGameInfoMenu::handlePress(F64 controlId, F64 childId) { bool editingHost = selectedPlayer->IsHost(); if ((cheats && (m_isHostPlayer || !editingHost)) || (!trust && (m_isHostPlayer || !editingHost)) -#if (!defined(_CONTENT_PACKAGE) && !defined(_FINAL_BUILD) && \ - defined(_DEBUG_MENUS_ENABLED)) +#if !defined(_CONTENT_PACKAGE) && !defined(_FINAL_BUILD) && defined(_DEBUG_MENUS_ENABLED) || (m_isHostPlayer && editingHost) #endif ) { @@ -486,7 +433,7 @@ UIScene_InGameInfoMenu::PlayerInfo* UIScene_InGameInfoMenu::BuildPlayerInfo( info->m_smallId = player->GetSmallId(); std::wstring playerName = L""; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { playerName = L"WWWWWWWWWWWWWWWW"; @@ -517,44 +464,3 @@ UIScene_InGameInfoMenu::PlayerInfo* UIScene_InGameInfoMenu::BuildPlayerInfo( return info; } -#if 0 || 0 -int UIScene_InGameInfoMenu::MustSignInReturnedPSN( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_InGameInfoMenu* pClass = (UIScene_InGameInfoMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass); -#else // 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_InGameInfoMenu::ViewInvites_SignInReturned, pClass); -#endif - } - - return 0; -} - -int UIScene_InGameInfoMenu::ViewInvites_SignInReturned(void* pParam, - bool bContinue, - int iPad) { - if (bContinue == true) { - // Check if we're signed in to LIVE - if (ProfileManager.IsSignedInLive(iPad)) { -#if 0 - SQRNetworkManager_Orbis::RecvInviteGUI(); -#elif 0 - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", - ret, ret); -#else // 0 - SQRNetworkManager_Vita::RecvInviteGUI(); -#endif - } - } - return 0; -} -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.h index 876128c96..a607efb09 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameInfoMenu.h @@ -69,10 +69,4 @@ public: private: PlayerInfo* BuildPlayerInfo(INetworkPlayer* player); -#if 0 || 0 || 0 - static int MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int ViewInvites_SignInReturned(void* pParam, bool bContinue, - int iPad); -#endif }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp index e20037da0..6afad8866 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGamePlayerOptionsMenu.cpp @@ -84,8 +84,7 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu( } if (m_editingSelf) { -#if (defined(_CONTENT_PACKAGE) || \ - defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED)) +#if defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED) removeControl(&m_checkboxes[eControl_Op], true); #else m_checkboxes[eControl_Op].init( @@ -280,9 +279,6 @@ UIScene_InGamePlayerOptionsMenu::UIScene_InGamePlayerOptionsMenu( g_NetworkManager.RegisterPlayerChangedCallback( m_iPad, &UIScene_InGamePlayerOptionsMenu::OnPlayerChanged, this); -#if 0 - ui.TouchBoxRebuild(this); -#endif } std::wstring UIScene_InGamePlayerOptionsMenu::getMoviePath() { @@ -319,8 +315,7 @@ void UIScene_InGamePlayerOptionsMenu::handleReload() { } if (m_editingSelf) { -#if (defined(_CONTENT_PACKAGE) || \ - defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED)) +#if defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED) removeControl(&m_checkboxes[eControl_Op], true); #endif @@ -411,8 +406,7 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, bool cheats = app.GetGameHostOption(eGameHostOption_CheatsEnabled) != 0; if (m_editingSelf) { -#if (defined(_CONTENT_PACKAGE) || \ - defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED)) +#if defined(_CONTENT_PACKAGE) || defined(_FINAL_BUILD) && !defined(_DEBUG_MENUS_ENABLED) #else Player::setPlayerGamePrivilege( m_playerPrivileges, @@ -548,9 +542,6 @@ void UIScene_InGamePlayerOptionsMenu::handleInput(int iPad, int key, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp index ca181d64a..ac1e4cfa3 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.cpp @@ -2,9 +2,6 @@ #include "UI.h" #include "UIScene_InGameSaveManagementMenu.h" -#if 0 || 0 -#include -#endif namespace { int InGameSaveManagementThumbnailReturnedThunk(void* lpParam, @@ -59,10 +56,6 @@ UIScene_InGameSaveManagementMenu::UIScene_InGameSaveManagementMenu( m_labelSavesListTitle.init(app.GetString(IDS_SAVE_INCOMPLETE_DELETE_SAVES)); m_controlSavesTimer.setVisible(true); -#if 0 || 0 - m_spaceIndicatorSaves.init(L"", eControl_SpaceIndicator, 0, - (4LL * 1024LL * 1024LL * 1024LL)); -#endif m_bUpdateSaveSize = false; m_bAllLoaded = false; @@ -74,11 +67,6 @@ UIScene_InGameSaveManagementMenu::UIScene_InGameSaveManagementMenu( m_saveDetails = NULL; m_iSaveDetailsCount = 0; -#if 0 || 0 || 0 || \ - 0 - // Always clear the saves when we enter this menu - StorageManager.ClearSavesInfo(); -#endif // block input if we're waiting for DLC to install, and wipe the saves list. // The end of dlc mounting custom message will fill the list again @@ -90,15 +78,6 @@ UIScene_InGameSaveManagementMenu::UIScene_InGameSaveManagementMenu( Initialise(); } -#if 0 - if (CGameNetworkManager::usingAdhocMode() && - SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) { - g_NetworkManager - .startAdhocMatching(); // create the client matching context and - // clear out the friends list - } - -#endif // If we're not ignoring input, then we aren't still waiting for the DLC to // mount, and can now check for corrupt dlc. Otherwise this will happen when @@ -214,24 +193,6 @@ void UIScene_InGameSaveManagementMenu::tick() { m_iSaveDetailsCount = m_pSaveDetails->iSaveC; for (unsigned int i = 0; i < m_pSaveDetails->iSaveC; ++i) { -#if 0 - m_spaceIndicatorSaves.addSave( - m_pSaveDetails->SaveInfoA[i].totalSize); -#elif 0 - m_spaceIndicatorSaves.addSave( - m_pSaveDetails->SaveInfoA[i].blocksUsed * (32 * 1024)); -#endif -#if 0 - m_buttonListSaves.addItem( - m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, L""); - - m_saveDetails[i].saveId = i; - memcpy(m_saveDetails[i].UTF16SaveName, - m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, 128); - memcpy(m_saveDetails[i].UTF16SaveFilename, - m_pSaveDetails->SaveInfoA[i].UTF16SaveFilename, - MAX_SAVEFILENAME_LENGTH); -#else m_buttonListSaves.addItem( m_pSaveDetails->SaveInfoA[i].UTF8SaveTitle, L""); @@ -241,7 +202,6 @@ void UIScene_InGameSaveManagementMenu::tick() { memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH); -#endif } m_controlSavesTimer.setVisible(false); @@ -274,13 +234,7 @@ void UIScene_InGameSaveManagementMenu::tick() { if (!m_bExitScene) { // convert to utf16 std::uint16_t u16Message[MAX_SAVEFILENAME_LENGTH]; -#if 0 - // Already utf16 on durango - memcpy( - u16Message, - m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, - MAX_SAVEFILENAME_LENGTH); -#elif defined(_WINDOWS64) +#if defined(_WINDOWS64) int result = ::MultiByteToWideChar( CP_UTF8, // convert from UTF-8 MB_ERR_INVALID_CHARS, // error on invalid chars @@ -299,12 +253,6 @@ void UIScene_InGameSaveManagementMenu::tick() { srcmax = MAX_SAVEFILENAME_LENGTH; dstmax = MAX_SAVEFILENAME_LENGTH; -#if 0 - L10nResult lres = UTF8stoUTF16s( - (uint8_t*)m_saveDetails[m_iRequestingThumbnailId] - .UTF8SaveFilename, - &srcmax, u16Message, &dstmax); -#else SceCesUcsContext context; sceCesUcsContextInit(&context); @@ -313,7 +261,6 @@ void UIScene_InGameSaveManagementMenu::tick() { (uint8_t*)m_saveDetails[m_iRequestingThumbnailId] .UTF8SaveFilename, srcmax, &srclen, u16Message, dstmax, &dstlen); -#endif #endif if (m_saveDetails[m_iRequestingThumbnailId].pbThumbnailData) { registerSubstitutionTexture( @@ -406,18 +353,11 @@ void UIScene_InGameSaveManagementMenu::handleInput(int iPad, int key, switch (key) { case ACTION_MENU_CANCEL: if (pressed) { -#if 0 || 0 || 0 - m_bExitScene = true; -#else navigateBack(); -#endif handled = true; } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: case ACTION_MENU_PAGEUP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.h index 6118502ce..704b4ae86 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_InGameSaveManagementMenu.h @@ -8,9 +8,6 @@ class UIScene_InGameSaveManagementMenu : public UIScene { private: enum EControls { eControl_SavesList, -#if 0 || 0 - eControl_SpaceIndicator, -#endif }; enum EState { @@ -28,9 +25,6 @@ protected: UIControl_SaveList m_buttonListSaves; UIControl_Label m_labelSavesListTitle; UIControl m_controlSavesTimer; -#if 0 || 0 - UIControl_SpaceIndicatorBar m_spaceIndicatorSaves; -#endif private: UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) @@ -40,9 +34,6 @@ private: UI_MAP_ELEMENT(m_controlSavesTimer, "SavesTimer") -#if 0 || 0 - UI_MAP_ELEMENT(m_spaceIndicatorSaves, "SaveSizeBar") -#endif UI_END_MAP_ELEMENTS_AND_NAMES() int m_iState; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp index 5b0281b43..40eb8388c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.cpp @@ -2,7 +2,7 @@ #include "UI.h" #include "UIScene_Intro.h" -#ifndef _ENABLEIGGY +#if !defined(_ENABLEIGGY) static int s_introTickCount = 0; #endif @@ -12,34 +12,16 @@ UIScene_Intro::UIScene_Intro(int iPad, void* initData, UILayer* parentLayer) initialiseMovie(); m_bIgnoreNavigate = false; m_bAnimationEnded = false; -#ifndef _ENABLEIGGY +#if !defined(_ENABLEIGGY) s_introTickCount = 0; #endif bool bSkipESRB = false; bool bChina = false; -#if 0 || 0 || 0 - bSkipESRB = app.GetProductSKU() != e_sku_SCEA; -#elif 0 || 0 - bSkipESRB = !ProfileManager.LocaleIsUSorCanada(); -#endif -#if 0 - bChina = ProfileManager.LocaleIsChina(); -#endif // 4J Stu - These map to values in the Actionscript #if defined(_WINDOWS64) || defined(__linux__) int platformIdx = 0; -#elif 0 - int platformIdx = 1; -#elif 0 - int platformIdx = 2; -#elif 0 - int platformIdx = 3; -#elif 0 - int platformIdx = 4; -#elif 0 - int platformIdx = 5; #endif IggyDataValue result; @@ -57,10 +39,6 @@ UIScene_Intro::UIScene_Intro(int iPad, void* initData, UILayer* parentLayer) IggyPlayerRootPath(getMovie()), m_funcSetIntroPlatform, 3, value); -#if 0 - // initialise vita touch controls with ids - m_TouchToSkip.init(0); -#endif } std::wstring UIScene_Intro::getMoviePath() { return L"Intro"; } @@ -71,91 +49,21 @@ void UIScene_Intro::handleInput(int iPad, int key, bool repeat, bool pressed, switch (key) { case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (!m_bIgnoreNavigate) { m_bIgnoreNavigate = true; // ui.NavigateToHomeMenu(); -#if 0 || 0 || 0 - - // has the user seen the EULA already ? We need their options - // file loaded for this - C4JStorage::eOptionsCallback eStatus = - app.GetOptionsCallbackStatus(0); - switch (eStatus) { - case C4JStorage::eOptions_Callback_Read: - case C4JStorage::eOptions_Callback_Read_FileNotFound: - // we've either read it, or it wasn't found - if (app.GetGameSettings( - 0, eGameSetting_PS3_EULA_Read) == 0) { - ui.NavigateToScene(0, eUIScene_EULA); - } else { - ui.NavigateToScene(0, eUIScene_SaveMessage); - } - break; - default: - ui.NavigateToScene(0, eUIScene_EULA); - break; - } -#elif 0 - ui.NavigateToScene(0, eUIScene_MainMenu); -#else ui.NavigateToScene(0, eUIScene_SaveMessage); -#endif } break; } } -#if 0 -void UIScene_Intro::handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, - bool bReleased) { - if (bReleased) { - bool handled = false; - handleInput(iPad, ACTION_MENU_OK, false, true, false, handled); - } -} -#endif void UIScene_Intro::handleAnimationEnd() { if (!m_bIgnoreNavigate) { m_bIgnoreNavigate = true; // ui.NavigateToHomeMenu(); -#if 0 || 0 || 0 - // has the user seen the EULA already ? We need their options file - // loaded for this - C4JStorage::eOptionsCallback eStatus = app.GetOptionsCallbackStatus(0); - switch (eStatus) { - case C4JStorage::eOptions_Callback_Read: - case C4JStorage::eOptions_Callback_Read_FileNotFound: - // we've either read it, or it wasn't found - if (app.GetGameSettings(0, eGameSetting_PS3_EULA_Read) == 0) { - ui.NavigateToScene(0, eUIScene_EULA); - } else { - ui.NavigateToScene(0, eUIScene_SaveMessage); - } - break; - default: - ui.NavigateToScene(0, eUIScene_EULA); - break; - } - -#elif 0 - // Don't navigate to the main menu if we don't have focus, as we could - // have the quadrant sign-in or a join game timer screen running, and - // then when Those finish they'll give the main menu focus which clears - // the signed in players and therefore breaks transitioning into the - // game - if (hasFocus(m_iPad)) { - ui.NavigateToScene(0, eUIScene_MainMenu); - } else { - m_bAnimationEnded = true; - } -#else ui.NavigateToScene(0, eUIScene_SaveMessage); -#endif } } @@ -168,7 +76,7 @@ void UIScene_Intro::handleGainFocus(bool navBack) { } } -#ifndef _ENABLEIGGY +#if !defined(_ENABLEIGGY) void UIScene_Intro::tick() { // Call base tick first (processes Iggy ticking) UIScene::tick(); @@ -186,4 +94,4 @@ void UIScene_Intro::tick() { ui.NavigateToScene(0, eUIScene_MainMenu); } } -#endif \ No newline at end of file +#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.h b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.h index 1018b241c..44c614b0a 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Intro.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Intro.h @@ -8,13 +8,7 @@ private: bool m_bAnimationEnded; IggyName m_funcSetIntroPlatform; -#if 0 - UIControl_Touch m_TouchToSkip; -#endif UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) -#if 0 - UI_MAP_ELEMENT(m_TouchToSkip, "TouchToSkip") -#endif UI_MAP_NAME(m_funcSetIntroPlatform, L"SetIntroPlatform") UI_END_MAP_ELEMENTS_AND_NAMES() @@ -24,16 +18,11 @@ public: virtual EUIScene getSceneType() { return eUIScene_Intro; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif protected: virtual std::wstring getMoviePath(); -#if 0 - virtual long long getDefaultGtcButtons() { return 0; } -#endif public: // INPUT @@ -43,12 +32,8 @@ public: virtual void handleAnimationEnd(); virtual void handleGainFocus(bool navBack); -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); -#endif -#ifndef _ENABLEIGGY +#if !defined(_ENABLEIGGY) virtual void tick(); #endif }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp index a74c4e69c..49c139366 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.cpp @@ -28,9 +28,6 @@ void UIScene_JoinMenu::updateTooltips() { int iA = -1; int iY = -1; if (getControlFocus() == eControl_GamePlayers) { -#if 0 - iY = IDS_TOOLTIPS_VIEW_GAMERCARD; -#endif } else { iA = IDS_TOOLTIPS_SELECT; } @@ -53,51 +50,6 @@ void UIScene_JoinMenu::tick() { m_buttonListPlayers.init(eControl_GamePlayers); -#if 0 || 0 || 0 - for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++) { - if (m_selectedSession->data.players[i] != NULL) { -#ifndef _CONTENT_PACKAGE - if (app.DebugSettingsOn() && - (app.GetGameSettingsDebugMask() & - (1L << eDebugSetting_DebugLeaderboards))) { - m_buttonListPlayers.addItem(L"WWWWWWWWWWWWWWWW"); - } else -#endif - { - std::string playerName( - m_selectedSession->data.players[i].getOnlineID()); - -#if 1 - // Append guest number (any players in an online game not - // signed into PSN are guests) - if (m_selectedSession->data.players[i].isSignedIntoPSN() == - false) { - char suffix[5]; - sprintf( - suffix, " (%d)", - m_selectedSession->data.players[i].getQuadrant() + - 1); - playerName.append(suffix); - } -#endif - m_buttonListPlayers.addItem(playerName); - } - } else { - // Leave the loop when we hit the first NULL player - break; - } - } -#elif 0 - for (int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++) { - if (m_selectedSession->searchResult.m_playerNames[i].size()) { - m_buttonListPlayers.addItem( - m_selectedSession->searchResult.m_playerNames[i]); - } else { - // Leave the loop when we hit the first empty player name - break; - } - } -#endif m_labelLabels[eLabel_Difficulty].init( app.GetString(IDS_LABEL_DIFFICULTY)); @@ -238,14 +190,8 @@ void UIScene_JoinMenu::tick() { // network manager so this is the best we can do unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; -#if 0 - ui.RequestErrorMessage(IDS_CONNECTION_FAILED, - IDS_DISCONNECTED_SERVER_QUIT, uiIDA, 1, m_iPad, - ErrorDialogReturned, this); -#else ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, m_iPad, ErrorDialogReturned, this); -#endif } UIScene::tick(); @@ -289,28 +235,12 @@ void UIScene_JoinMenu::handleInput(int iPad, int key, bool repeat, bool pressed, handled = true; } break; -#if 0 - case ACTION_MENU_Y: - if (m_selectedSession != NULL && - getControlFocus() == eControl_GamePlayers && - m_buttonListPlayers.getItemCount() > 0) { - PlayerUID uid = m_selectedSession->searchResult.m_playerXuids - [m_buttonListPlayers.getCurrentSelection()]; - if (uid != INVALID_XUID) - ProfileManager.ShowProfileCard( - ProfileManager.GetLockedProfile(), uid); - } - break; -#endif case ACTION_MENU_OK: if (getControlFocus() != eControl_GamePlayers) { sendInputToMovie(key, repeat, pressed, released); } handled = true; break; -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: case ACTION_MENU_PAGEUP: @@ -329,12 +259,7 @@ void UIScene_JoinMenu::handlePress(F64 controlId, F64 childId) { // CD - Added for audio ui.PlayUISFX(eSFX_Press); -#if 0 - ProfileManager.CheckMultiplayerPrivileges( - m_iPad, true, &checkPrivilegeCallback, this); -#else StartSharedLaunchFlow(); -#endif } break; case eControl_GamePlayers: break; @@ -349,21 +274,6 @@ void UIScene_JoinMenu::handleFocusChange(F64 controlId, F64 childId) { updateTooltips(); } -#if 0 -void UIScene_JoinMenu::checkPrivilegeCallback(void* lpParam, bool hasPrivilege, - int iPad) { - UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)lpParam; - - pClass->m_bIgnoreInput = false; - if (pClass) { - if (hasPrivilege) { - pClass->StartSharedLaunchFlow(); - } else { - pClass->m_bIgnoreInput = false; - } - } -} -#endif void UIScene_JoinMenu::StartSharedLaunchFlow() { if (!app.IsLocalMultiplayerAvailable()) { @@ -440,33 +350,12 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { isSignedInLive = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()); -#if 0 - if (CGameNetworkManager::usingAdhocMode() && - SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) - isSignedInLive = true; -#endif } } // If this is an online game but not all players are signed in to Live, // stop! if (!isSignedInLive) { -#if 0 - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - pClass->m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else -#endif { pClass->m_bIgnoreInput = false; unsigned int uiIDA[1]; @@ -484,23 +373,10 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { bool pccAllowed = true; bool pccFriendsAllowed = true; -#if 0 || 0 - if (isSignedInLive) { - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &noUGC, NULL, NULL); - } -#else ProfileManager.AllowedPlayerCreatedContent( ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed); if (!pccAllowed && !pccFriendsAllowed) noUGC = true; -#endif -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - noPrivileges = false; - noUGC = false; - } -#endif if (noUGC) { pClass->setVisible(true); @@ -520,16 +396,6 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass) { IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); } else { -#if 0 || 0 - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &chatRestricted, NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); - } -#endif CGameNetworkManager::eJoinGameResult result = g_NetworkManager.JoinGame( pClass->m_selectedSession, dwLocalUsersMask); @@ -582,7 +448,7 @@ void UIScene_JoinMenu::handleTimerComplete(int id) { selectedPlayerXUID) selectedIndex = i; playersList.InsertItems(i, 1); -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.h index 142464ea3..14d32eba4 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_JoinMenu.h @@ -84,10 +84,6 @@ protected: void StartSharedLaunchFlow(); -#if 0 - static void checkPrivilegeCallback(void* lpParam, bool hasPrivilege, - int iPad); -#endif static int StartGame_SignInReturned(void* pParam, bool, int); static void JoinGame(UIScene_JoinMenu* pClass); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_Keyboard.h b/Minecraft.Client/Platform/Common/UI/UIScene_Keyboard.h index 3f55f47de..be01bc5ec 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_Keyboard.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_Keyboard.h @@ -73,9 +73,7 @@ public: // Returns true if this scene has focus for the pad passed in // virtual bool hasFocus(int iPad) { return false; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif // Returns true if lower scenes in this scenes layer, or in any layer below // this scenes layers should be hidden diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.cpp index 0b0954340..d32aed2b8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.cpp @@ -89,9 +89,6 @@ void UIScene_LanguageSelector::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.h b/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.h index 28533a138..09935308f 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LanguageSelector.h @@ -16,15 +16,9 @@ #define HAS_LANGUAGE_KO_KR(exp) exp, #define HAS_LANGUAGE_CN_TW(exp) exp, -#if 0 -#define HAS_LANGUAGE_CN_CN(exp) exp, -#define HAS_LANGUAGE_SK_SK(exp) exp, -#define HAS_LANGUAGE_CZ_CZ(exp) exp, -#else #define HAS_LANGUAGE_CN_CN(exp) #define HAS_LANGUAGE_SK_SK(exp) #define HAS_LANGUAGE_CZ_CZ(exp) -#endif #define HAS_LANGUAGE_DA_DK(exp) exp, #define HAS_LANGUAGE_FI_FI(exp) exp, @@ -35,11 +29,7 @@ #define HAS_LANGUAGE_NB_NO(exp) exp, #define HAS_LANGUAGE_EL_GR(exp) exp, -#if 0 || 0 || 0 -#define HAS_LANGUAGE_TR_TR(exp) exp, -#else #define HAS_LANGUAGE_TR_TR(exp) -#endif class UIScene_LanguageSelector : public UIScene { public: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index be5dd4c34..9b9d1869f 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -5,7 +5,7 @@ #define GAME_CREATE_ONLINE_TIMER_ID 0 #define GAME_CREATE_ONLINE_TIMER_TIME 100 -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) int m_iWorldSizeTitleA[4] = { IDS_WORLD_SIZE_TITLE_CLASSIC, IDS_WORLD_SIZE_TITLE_SMALL, @@ -26,7 +26,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu( IggyDataValue result; -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) IggyDataValue value[2]; value[0].type = IGGY_DATATYPE_number; value[0].number = m_params->bGenerateOptions ? 0 : 1; @@ -145,7 +145,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu( m_labelRandomSeed.init(app.GetString(IDS_CREATE_NEW_WORLD_RANDOM_SEED)); m_editSeed.init(m_params->seed, eControl_EditSeed); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) m_labelWorldSize.init(app.GetString(IDS_WORLD_SIZE)); m_sliderWorldSize.init( app.GetString(m_iWorldSizeTitleA[m_params->worldSize]), @@ -179,7 +179,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu( m_params->bGenerateOptions ? TAB_WORLD_OPTIONS : TAB_GAME_OPTIONS; // set the default text -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) std::wstring wsText = L""; if (m_params->bGenerateOptions) { wsText = app.GetString(IDS_GAMEOPTION_SEED); @@ -204,13 +204,6 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu( addTimer(GAME_CREATE_ONLINE_TIMER_ID, GAME_CREATE_ONLINE_TIMER_TIME); -#if 0 - // initialise vita tab controls with ids - m_TouchTabWorld.init(ETouchInput_TabWorld); - m_TouchTabGame.init(ETouchInput_TabGame); - - ui.TouchBoxRebuild(this); -#endif m_bIgnoreInput = false; } @@ -279,14 +272,8 @@ void UIScene_LaunchMoreOptionsMenu::tick() { } void UIScene_LaunchMoreOptionsMenu::handleDestroy() { -#if 0 - app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n"); -#endif // so shut down the keyboard if it is displayed -#if (0 || 0 || 0) - InputManager.DestroyKeyboard(); -#endif } void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat, @@ -307,23 +294,7 @@ void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif // 4J-JEV: Inform user why their game must be offline. -#if 0 - { - UIControl_CheckBox* checkboxOnline = - &m_checkboxes[eLaunchCheckbox_Online]; - if (pressed && controlHasFocus(checkboxOnline->getId()) && - !checkboxOnline->IsEnabled()) { - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } - } -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: @@ -351,39 +322,6 @@ void UIScene_LaunchMoreOptionsMenu::handleInput(int iPad, int key, bool repeat, } } -#if 0 -void UIScene_LaunchMoreOptionsMenu::handleTouchInput(unsigned int iPad, S32 x, - S32 y, int iId, - bool bPressed, - bool bRepeat, - bool bReleased) { - if (bPressed) { - switch (iId) { - case ETouchInput_TabWorld: - case ETouchInput_TabGame: - // Toggle tab index - int iNewTabIndex = (iId == ETouchInput_TabWorld) ? 0 : 1; - if (m_tabIndex != iNewTabIndex) { - m_tabIndex = iNewTabIndex; - updateTooltips(); - IggyDataValue result; - IggyResult out = IggyPlayerCallMethodRS( - getMovie(), &result, IggyPlayerRootPath(getMovie()), - m_funcChangeTab, 0, NULL); - } - ui.TouchBoxRebuild(this); - break; - } - } -} - -UIControl* UIScene_LaunchMoreOptionsMenu::GetMainPanel() { - if (m_tabIndex == 0) - return &m_worldOptions; - else - return &m_gameOptions; -} -#endif void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, bool selected) { @@ -429,7 +367,7 @@ void UIScene_LaunchMoreOptionsMenu::handleCheckboxToggled(F64 controlId, case eLaunchCheckbox_BonusChest: m_params->bBonusChest = selected; break; -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) case eLaunchCheckbox_DisableSaving: m_params->bDisableSaving = selected; break; @@ -526,7 +464,7 @@ void UIScene_LaunchMoreOptionsMenu::handleFocusChange(F64 controlId, case eControl_EditSeed: stringId = IDS_GAMEOPTION_SEED; break; -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) case eControl_WorldSize: stringId = IDS_GAMEOPTION_WORLD_SIZE; break; @@ -592,14 +530,8 @@ int UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback(void* lpParam, pClass->m_bIgnoreInput = false; // 4J HEG - No reason to set value if keyboard was cancelled if (bRes) { -#if 0 - // CD - Changed to 2048 [SCE_IME_MAX_TEXT_LENGTH] - uint16_t pchText[2048]; - ZeroMemory(pchText, 2048 * sizeof(uint16_t)); -#else uint16_t pchText[128]; ZeroMemory(pchText, 128 * sizeof(uint16_t)); -#endif InputManager.GetText(pchText); pClass->m_editSeed.setLabel((wchar_t*)pchText); pClass->m_params->seed = (wchar_t*)pchText; @@ -613,37 +545,11 @@ void UIScene_LaunchMoreOptionsMenu::handlePress(F64 controlId, F64 childId) { switch ((int)controlId) { case eControl_EditSeed: { m_bIgnoreInput = true; -#if 0 - int language = XGetLanguage(); - switch (language) { - case XC_LANGUAGE_JAPANESE: - case XC_LANGUAGE_KOREAN: - case XC_LANGUAGE_TCHINESE: - InputManager.RequestKeyboard( - app.GetString(IDS_CREATE_NEW_WORLD_SEED), - m_editSeed.getLabel(), 0, 60, - &UIScene_LaunchMoreOptionsMenu:: - KeyboardCompleteSeedCallback, - this, C_4JInput::EKeyboardMode_Default); - break; - default: - // 4J Stu - Use a different keyboard for non-asian languages - // so we don't have prediction on - InputManager.RequestKeyboard( - app.GetString(IDS_CREATE_NEW_WORLD_SEED), - m_editSeed.getLabel(), 0, 60, - &UIScene_LaunchMoreOptionsMenu:: - KeyboardCompleteSeedCallback, - this, C_4JInput::EKeyboardMode_Alphabet_Extended); - break; - } -#else InputManager.RequestKeyboard( app.GetString(IDS_CREATE_NEW_WORLD_SEED), m_editSeed.getLabel(), 0, 60, &UIScene_LaunchMoreOptionsMenu::KeyboardCompleteSeedCallback, this, C_4JInput::EKeyboardMode_Default); -#endif } break; } } @@ -653,7 +559,7 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, int value = (int)currentValue; switch ((int)sliderId) { case eControl_WorldSize: -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) m_sliderWorldSize.handleSliderMove(value); m_params->worldSize = value; m_sliderWorldSize.setLabel( @@ -661,7 +567,7 @@ void UIScene_LaunchMoreOptionsMenu::handleSliderMove(F64 sliderId, #endif break; case eControl_WorldResize: -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) EGameHostOptionWorldSize changedSize = EGameHostOptionWorldSize(value + 1); if (changedSize >= m_params->currentWorldSize) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.h index 4efa4e351..f0f487fe8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LaunchMoreOptionsMenu.h @@ -41,16 +41,6 @@ private: eControl_Count }; -#if 0 - enum ETouchInput { - ETouchInput_TabWorld = eControl_Count, - ETouchInput_TabGame, - - ETouchInput_Count - }; - UIControl_Touch m_TouchTabWorld, m_TouchTabGame; - UIControl m_controlWorldPanel, m_controlGamePanel; -#endif UIControl m_gameOptions, m_worldOptions; UIControl_CheckBox m_checkboxes[eLaunchCheckboxes_Count]; UIControl_Label m_labelWorldOptions, m_labelGameOptions, m_labelDescription; @@ -68,9 +58,6 @@ private: UI_MAP_ELEMENT(m_gameOptions, "GameOptions") UI_BEGIN_MAP_CHILD_ELEMENTS(m_gameOptions) -#if 0 - UI_MAP_ELEMENT(m_TouchTabGame, "TouchTabGame") -#endif UI_MAP_ELEMENT(m_labelDescription_GameOptions, "Description_GameOptions") UI_MAP_ELEMENT(m_checkboxes[eLaunchCheckbox_Online], "CheckboxOnline") @@ -96,9 +83,6 @@ private: UI_MAP_ELEMENT(m_worldOptions, "WorldOptions") UI_BEGIN_MAP_CHILD_ELEMENTS(m_worldOptions) -#if 0 - UI_MAP_ELEMENT(m_TouchTabWorld, "TouchTabWorld") -#endif UI_MAP_ELEMENT(m_labelDescription_WorldOptions, "Description_WorldOptions") UI_MAP_ELEMENT(m_labelSeed, "Seed") @@ -174,9 +158,4 @@ private: bool m_bUpdateOnline; // If true, update online settings on next tick void UpdateOnline(); -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); - virtual UIControl* GetMainPanel(); -#endif //0 }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp index e4f276797..aeac47186 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -113,9 +113,6 @@ UIScene_LeaderboardsMenu::UIScene_LeaderboardsMenu(int iPad, void* initData, ReadStats(-1); -#if (0 || 0 || 0) - addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME); -#endif } UIScene_LeaderboardsMenu::~UIScene_LeaderboardsMenu() { @@ -128,58 +125,6 @@ void UIScene_LeaderboardsMenu::updateTooltips() { int iTooltipFriendRequest = -1; int iTooltipGamerCardOrProfile = -1; -#if 0 - // if( m_leaderboard.m_entries.size() > 0 ) - if (m_leaderboard.m_totalEntryCount > 0) { - unsigned int selection = m_newSel; - - // If the selected user is me, don't show Send Friend Request, and show - // the gamer profile, not the gamer card - - // Check that the index is actually within range of the data we've got - // before accessing the m_leaderboard.m_entries array - int idx = selection - GetEntryStartIndex(); - if ((idx < 0) || (idx >= m_leaderboard.m_entries.size())) { - return; - } - if (m_leaderboard.m_entries[idx].m_bPlayer) { - iTooltipGamerCardOrProfile = IDS_TOOLTIPS_VIEW_GAMERPROFILE; - } else { - iTooltipGamerCardOrProfile = IDS_TOOLTIPS_VIEW_GAMERCARD; - -#if 0 - // if we're on the friends filter, then don't show the Send Friend - // Request - if (!m_currentFilter == LeaderboardManager::eFM_Friends) -#endif - { - // check the entry we're on - if (m_leaderboard.m_entries.size() > 0) { - if (selection >= GetEntryStartIndex() && - selection < (GetEntryStartIndex() + - m_leaderboard.m_entries.size())) { -#if 0 - if ((m_leaderboard - .m_entries[selection - - (m_leaderboard.m_entryStartIndex - - 1)] - .m_bFriend == false) && - (m_leaderboard - .m_entries[selection - - (m_leaderboard.m_entryStartIndex - - 1)] - .m_bRequestedFriend == false)) -#endif - { - iTooltipFriendRequest = - IDS_TOOLTIPS_SEND_FRIEND_REQUEST; - } - } - } - } - } - } -#endif ui.SetTooltips(m_iPad, iTooltipFriendRequest, IDS_TOOLTIPS_BACK, IDS_TOOLTIPS_CHANGE_FILTER, iTooltipGamerCardOrProfile); @@ -318,31 +263,6 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, sendInputToMovie(key, repeat, pressed, released); -#if 0 - if( key == ACTION_MENU_PAGEUP ) - { - m_newTop = m_listGamers.GetTopItem() - 10; - - if( m_newTop < 0 ) - m_newTop = 0; - - m_newSel = m_newTop; - } - else - { - - m_newTop = m_listGamers.GetTopItem() + 10; - - if( m_newTop+10 > (int)m_leaderboard.m_totalEntryCount ) - { - m_newTop = m_leaderboard.m_totalEntryCount - 10; - if( m_newTop < 0 ) - m_newTop = 0; - } - - m_newSel = m_newTop; - } -#endif } handled = true; } break; @@ -389,73 +309,9 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, handled = true; } break; case ACTION_MENU_Y: { -#if 0 - // Show gamercard - // if( m_leaderboard.m_entries.size() > 0 ) - if (m_leaderboard.m_totalEntryCount > 0) { - unsigned int selection = m_newSel; - if (selection >= GetEntryStartIndex() && - selection < (GetEntryStartIndex() + - m_leaderboard.m_entries.size())) { - PlayerUID uid = - m_leaderboard - .m_entries[selection - GetEntryStartIndex()] - .m_xuid; - if (uid != INVALID_XUID) { - ProfileManager.ShowProfileCard( - ProfileManager.GetLockedProfile(), uid); - ui.PlayUISFX(eSFX_Press); - } - } - } -#endif handled = true; } break; case ACTION_MENU_A: { -#if 0 - // Send friend request if the filter mode is not friend, and they're - // not a friend or a pending friend -#if 0 - if (m_currentFilter != LeaderboardManager::eFM_Friends) -#endif - { - if (m_leaderboard.m_entries.size() > 0) { - unsigned int selection = m_newSel; - if (selection >= GetEntryStartIndex() && - selection < (GetEntryStartIndex() + - m_leaderboard.m_entries.size())) { - // If not the player and neither currently a friend or - // requested to be a friend - if (!m_leaderboard - .m_entries[selection - GetEntryStartIndex()] - .m_bPlayer -#if 0 - && - !m_leaderboard - .m_entries[selection - - (m_leaderboard.m_entryStartIndex - - 1)] - .m_bFriend && - !m_leaderboard - .m_entries[selection - - (m_leaderboard.m_entryStartIndex - - 1)] - .m_bRequestedFriend -#endif - ) { - PlayerUID xuid = - m_leaderboard - .m_entries[selection - GetEntryStartIndex()] - .m_xuid; - if (xuid != INVALID_XUID) { - ProfileManager.ShowAddFriend(m_iPad, xuid); - ui.PlayUISFX(eSFX_Press); - } - } - } - } - } -#endif handled = true; } break; } @@ -634,14 +490,10 @@ bool UIScene_LeaderboardsMenu::RetrieveStats() { if (m_leaderboard.m_totalEntryCount == 0) { m_leaderboard.m_entries.clear(); -#if 0 - m_leaderboard.m_totalEntryCount = m_numStats; -#else m_leaderboard.m_totalEntryCount = (m_currentFilter == LeaderboardManager::eFM_Friends) ? m_newEntriesCount : m_numStats; -#endif if (m_leaderboard.m_totalEntryCount == 0 || m_newEntriesCount == 0) { // LeaderboardManager::Instance()->SetStatsRetrieved(false); @@ -780,16 +632,8 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( } } -#if 0 - // m_name can be unicode characters somehow for Japan - should use - // m_onlineID - std::wstring wstr = convStringToWstring(statsRow->m_uid.getOnlineID()); - swprintf(leaderboardEntry->m_gamerTag, XUSER_NAME_SIZE, L"%ls", - wstr.c_str()); -#else memcpy(leaderboardEntry->m_gamerTag, statsRow->m_name.data(), statsRow->m_name.size() * sizeof(wchar_t)); -#endif // Copy the other columns for (unsigned int i = 0; i < statsRow->m_statsSize; i++) { @@ -799,7 +643,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( unsigned int displayValue = leaderboardEntry->m_columns[i]; if (displayValue > 99999) displayValue = 99999; swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%u", displayValue); -#ifdef _DEBUG +#if defined(_DEBUG) // app.DebugPrintf("Value - %d\n",leaderboardEntry->m_columns[i]); #endif } else { @@ -814,14 +658,14 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( iDigitC++; } -#ifdef _DEBUG +#if defined(_DEBUG) // app.DebugPrintf("Value - %d\n",leaderboardEntry->m_columns[i]); #endif if (iDigitC < 4) { // m swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%um", leaderboardEntry->m_columns[i]); -#ifdef _DEBUG +#if defined(_DEBUG) // app.DebugPrintf("Display - %um\n", // leaderboardEntry->m_columns[i]); #endif @@ -829,7 +673,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( // km with a .X swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.1fkm", ((float)leaderboardEntry->m_columns[i]) / 1000.f); -#ifdef _DEBUG +#if defined(_DEBUG) // app.DebugPrintf("Display - %.1fkm\n", // ((float)leaderboardEntry->m_columns[i])/1000.f); #endif @@ -837,7 +681,7 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( // bigger than that, so no decimal point swprintf(leaderboardEntry->m_wcColumns[i], 12, L"%.0fkm", ((float)leaderboardEntry->m_columns[i]) / 1000.f); -#ifdef _DEBUG +#if defined(_DEBUG) // app.DebugPrintf("Display - %.0fkm\n", // ((float)leaderboardEntry->m_columns[i])/1000.f); #endif @@ -845,48 +689,6 @@ void UIScene_LeaderboardsMenu::CopyLeaderboardEntry( } } -#if 0 - // Is the player - PlayerUID myXuid; - ProfileManager.GetXUID(ProfileManager.GetPrimaryPad(), &myXuid, true); - if (statsRow->m_uid == myXuid) { - leaderboardEntry->m_bPlayer = true; - leaderboardEntry->m_bOnline = false; - leaderboardEntry->m_bFriend = false; - leaderboardEntry->m_bRequestedFriend = false; - } else { - leaderboardEntry->m_bPlayer = false; - leaderboardEntry->m_bOnline = false; - leaderboardEntry->m_bFriend = false; - leaderboardEntry->m_bRequestedFriend = false; - -#if 0 - // Check for friend status - for (unsigned int friendIndex = 0; friendIndex < m_numFriends; - ++friendIndex) { - if (m_friends[friendIndex].xuid == statsRow->m_uid) { - if ((m_friends[friendIndex].dwFriendState & - (XONLINE_FRIENDSTATE_FLAG_SENTREQUEST | - XONLINE_FRIENDSTATE_FLAG_RECEIVEDREQUEST)) == 0) { - // Is friend, might be online - leaderboardEntry->m_bFriend = true; - leaderboardEntry->m_bOnline = - (m_friends[friendIndex].dwFriendState & - XONLINE_FRIENDSTATE_FLAG_ONLINE); - leaderboardEntry->m_bRequestedFriend = false; - } else { - // Friend request sent but not accepted yet - leaderboardEntry->m_bOnline = false; - leaderboardEntry->m_bFriend = false; - leaderboardEntry->m_bRequestedFriend = true; - } - - break; - } - } -#endif - } -#endif } void UIScene_LeaderboardsMenu::PopulateLeaderboard( @@ -969,8 +771,7 @@ void UIScene_LeaderboardsMenu::PopulateLeaderboard( m_labelEntries.setLabel(entriesBuffer); // Show the no results message -#if !(0 || \ - defined(_WINDOWS64)) // 4J Stu - Temp to get the win build running, but +#if !defined(_WINDOWS64) // so we check this for other platforms if (ret == LeaderboardManager::eStatsReturn_NetworkError) m_labelInfo.setLabel(app.GetString(IDS_ERROR_NETWORK)); @@ -1049,28 +850,6 @@ void UIScene_LeaderboardsMenu::handleRequestMoreData(F64 startIndex, bool up) { } void UIScene_LeaderboardsMenu::handleTimerComplete(int id) { -#if (0 || 0 || 0) - switch (id) { - case PLAYER_ONLINE_TIMER_ID: -#ifndef _WINDOWS64 - if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) == - false) { - // check the player hasn't gone offline - // If they have, bring up the PSN warning and exit from the - // leaderboards - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - C4JStorage::EMessageResult result = ui.RequestErrorMessage( - IDS_CONNECTION_LOST, - g_NetworkManager.CorrectErrorIDS( - IDS_CONNECTION_LOST_LIVE_NO_EXIT), - uiIDA, 1, ProfileManager.GetPrimaryPad(), - UIScene_LeaderboardsMenu::ExitLeaderboards, this); - } -#endif - break; - } -#endif } int UIScene_LeaderboardsMenu::ExitLeaderboards( diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp index 88296d0bf..be6778cef 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.cpp @@ -7,21 +7,11 @@ #include "../../Minecraft.Client/MinecraftServer.h" #include "../../Minecraft.World/Level/Storage/LevelSettings.h" #include "../../Minecraft.World/Util/StringHelpers.h" -#if 0 || 0 || 0 -#include "../Network/Sony/SonyHttp.h" -#endif #include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h" -#if 0 || 0 -#include -#endif #define GAME_CREATE_ONLINE_TIMER_ID 0 #define GAME_CREATE_ONLINE_TIMER_TIME 100 // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 -#define CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID 1 -#define CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME 50 -#endif namespace { int LoadMenuThumbnailReturnedThunk(void* lpParam, std::uint8_t* thumbnailData, @@ -197,70 +187,6 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void* initData, m_labelCreatedMode.setLabel(app.GetString(IDS_CREATED_IN_SURVIVAL)); } } else { -#if 0 || 0 || 0 || \ - 0 - // convert to utf16 - uint16_t u16Message[MAX_SAVEFILENAME_LENGTH]; - size_t srclen, dstlen; - srclen = MAX_SAVEFILENAME_LENGTH; - dstlen = MAX_SAVEFILENAME_LENGTH; -#if 0 - L10nResult lres = - UTF8stoUTF16s((uint8_t*)params->saveDetails->UTF8SaveFilename, - &srclen, u16Message, &dstlen); -#elif 0 - // Already utf16 on durango - memcpy(u16Message, params->saveDetails->UTF16SaveFilename, - MAX_SAVEFILENAME_LENGTH); -#else // 0 - { - SceCesUcsContext Context; - sceCesUcsContextInit(&Context); - uint32_t utf8Len, utf16Len; - sceCesUtf8StrToUtf16Str( - &Context, (uint8_t*)params->saveDetails->UTF8SaveFilename, - srclen, &utf8Len, u16Message, dstlen, &utf16Len); - } -#endif - m_thumbnailName = (wchar_t*)u16Message; - if (params->saveDetails->pbThumbnailData) { - m_pbThumbnailData = params->saveDetails->pbThumbnailData; - m_uiThumbnailSize = params->saveDetails->dwThumbnailSize; - m_bSaveThumbnailReady = true; - } else { - app.DebugPrintf("Requesting the save thumbnail\n"); - // set the save to load - PSAVE_DETAILS pSaveDetails = StorageManager.ReturnSavesInfo(); -#if 0 - // On Durango, we have an extra flag possible with - // LoadSaveDataThumbnail, which if true will force the loading of - // this thumbnail even if the save data isn't sync'd from the cloud - // at this stage. This could mean that there could be a pretty large - // delay before the callback happens, in this case. - C4JStorage::ESaveGameState eLoadStatus = - StorageManager.LoadSaveDataThumbnail( - &pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex], - &LoadSaveDataThumbnailReturned, - (void*)GetCallbackUniqueId(), true); -#else - C4JStorage::ESaveGameState eLoadStatus = - StorageManager.LoadSaveDataThumbnail( - &pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex], - &LoadSaveDataThumbnailReturned, - (void*)GetCallbackUniqueId()); -#endif - m_bShowTimer = true; - } -#if 0 - m_labelGameName.init(params->saveDetails->UTF16SaveName); -#else - wchar_t wSaveName[128]; - ZeroMemory(wSaveName, 128 * sizeof(wchar_t)); - mbstowcs(wSaveName, params->saveDetails->UTF8SaveName, - strlen(params->saveDetails->UTF8SaveName) + 1); // plus null - m_labelGameName.init(wSaveName); -#endif -#endif } TelemetryManager->RecordMenuShown(m_iPad, eUIScene_LoadMenu, 0); @@ -295,96 +221,8 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void* initData, m_texturePackList.selectSlot(m_currentTexturePackIndex); // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 - // 4J-PB - there may be texture packs we don't have, so use the info - // from TMS for this - - // 4J-PB - Any texture packs available that we don't have installed? -#if 0 || 0 - if (!m_bAvailableTexturePacksChecked && - app.GetCommerceProductListRetrieved() && - app.GetCommerceProductListInfoRetrieved()) -#else - if (!m_bAvailableTexturePacksChecked) -#endif - { - DLC_INFO* pDLCInfo = NULL; - - // first pass - look to see if there are any that are not in the - // list - bool bTexturePackAlreadyListed; - bool bNeedToGetTPD = false; - - for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); - ++i) { - bTexturePackAlreadyListed = false; -#if 0 || 0 - char* pchName = app.GetDLCInfoTextures(i); - pDLCInfo = app.GetDLCInfo(pchName); -#else - ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); - pDLCInfo = app.GetDLCInfoForFullOfferID(ull); -#endif - - for (unsigned int i = 0; i < texturePacksCount; ++i) { - TexturePack* tp = - pMinecraft->skins->getTexturePackByIndex(i); - if (pDLCInfo && - pDLCInfo->iConfig == tp->getDLCParentPackId()) { - bTexturePackAlreadyListed = true; - } - } - if (bTexturePackAlreadyListed == false) { - // some missing - bNeedToGetTPD = true; - - m_iTexturePacksNotInstalled++; - } - } - - if (bNeedToGetTPD == true) { - // add a TMS request for them - app.DebugPrintf( - "+++ Adding TMSPP request for texture pack data\n"); - app.AddTMSPPFileTypeRequest(e_DLC_TexturePackData); - m_iConfigA = new int[m_iTexturePacksNotInstalled]; - m_iTexturePacksNotInstalled = 0; - - for (unsigned int i = 0; - i < app.GetDLCInfoTexturesOffersCount(); ++i) { - bTexturePackAlreadyListed = false; -#if 0 || 0 - char* pchName = app.GetDLCInfoTextures(i); - pDLCInfo = app.GetDLCInfo(pchName); -#else - ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); - pDLCInfo = app.GetDLCInfoForFullOfferID(ull); -#endif - - if (pDLCInfo) { - for (unsigned int i = 0; i < texturePacksCount; ++i) { - TexturePack* tp = - pMinecraft->skins->getTexturePackByIndex(i); - if (pDLCInfo && - pDLCInfo->iConfig == tp->getDLCParentPackId()) { - bTexturePackAlreadyListed = true; - } - } - if (bTexturePackAlreadyListed == false) { - m_iConfigA[m_iTexturePacksNotInstalled++] = - pDLCInfo->iConfig; - } - } - } - } - } -#endif } -#if 0 - addTimer(CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID, - CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME); -#endif if (params) delete params; addTimer(GAME_CREATE_ONLINE_TIMER_ID, GAME_CREATE_ONLINE_TIMER_TIME); @@ -438,9 +276,6 @@ void UIScene_LoadMenu::tick() { m_pbThumbnailData, m_uiThumbnailSize, (unsigned char*)&szSeed, uiHostOptions, bHostOptionsRead, m_MoreOptionsParams.dwTexturePack); -#if 0 || 0 - sscanf_s(szSeed, "%I64d", &m_seed); -#endif // #ifdef _DEBUG // // dump out the thumbnail @@ -542,7 +377,7 @@ void UIScene_LoadMenu::tick() { m_bGameModeCreative = true; m_iGameModeId = GameType::CREATIVE->getId(); break; -#ifdef _ADVENTURE_MODE_ENABLED +#if defined(_ADVENTURE_MODE_ENABLED) case 2: // Adventure m_buttonGamemode.setLabel( app.GetString(IDS_GAMEMODE_ADVENTURE)); @@ -602,53 +437,10 @@ void UIScene_LoadMenu::tick() { eUIScene_QuadrantSignin, &info); } -#if 0 - // check the status of the PSPlus common dialog - switch (sceNpCommerceDialogUpdateStatus()) { - case SCE_COMMON_DIALOG_STATUS_FINISHED: { - SceNpCommerceDialogResult Result; - sceNpCommerceDialogGetResult(&Result); - sceNpCommerceDialogTerminate(); - - if (Result.authorized) { - ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(), - &Result); - // they just became a PSPlus member - LoadDataComplete(this); - } else { - // continue offline? - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - - // Give the player a warning about the texture pack missing - ui.RequestAlertMessage(IDS_PLAY_OFFLINE, IDS_NO_PLAYSTATIONPLUS, - uiIDA, 1, ProfileManager.GetPrimaryPad(), - &UIScene_LoadMenu::ContinueOffline, - this); - } - } break; - default: - break; - } -#endif UIScene::tick(); } -#if 0 -int UIScene_LoadMenu::ContinueOffline(void* pParam, int iPad, - C4JStorage::EMessageResult result) { - UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam; - - // results switched for this dialog - if (result == C4JStorage::EMessage_ResultAccept) { - pClass->m_MoreOptionsParams.bOnlineGame = false; - pClass->LoadDataComplete(pClass); - } - return 0; -} - -#endif void UIScene_LoadMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled) { @@ -665,20 +457,8 @@ void UIScene_LoadMenu::handleInput(int iPad, int key, bool repeat, bool pressed, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif // 4J-JEV: Inform user why their game must be offline. -#if 0 - if (pressed && controlHasFocus(m_checkboxOnline.getId()) && - !m_checkboxOnline.IsEnabled()) { - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: @@ -719,7 +499,7 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId) { m_bGameModeCreative = true; break; case 1: // Creative -#ifdef _ADVENTURE_MODE_ENABLED +#if defined(_ADVENTURE_MODE_ENABLED) m_buttonGamemode.setLabel( app.GetString(IDS_GAMEMODE_ADVENTURE)); m_iGameModeId = GameType::ADVENTURE->getId(); @@ -742,13 +522,6 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId) { UpdateCurrentTexturePack((int)childId); } break; case eControl_LoadWorld: { -#if 0 - if (m_MoreOptionsParams.bOnlineGame) { - m_bIgnoreInput = true; - ProfileManager.CheckMultiplayerPrivileges( - m_iPad, true, &checkPrivilegeCallback, this); - } else -#endif { StartSharedLaunchFlow(); } @@ -756,18 +529,6 @@ void UIScene_LoadMenu::handlePress(F64 controlId, F64 childId) { }; } -#if 0 -void UIScene_LoadMenu::checkPrivilegeCallback(void* lpParam, bool hasPrivilege, - int iPad) { - UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)lpParam; - - if (hasPrivilege) { - pClass->StartSharedLaunchFlow(); - } else { - pClass->m_bIgnoreInput = false; - } -} -#endif void UIScene_LoadMenu::StartSharedLaunchFlow() { Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -861,26 +622,8 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() { else */ { // upsell -#if 0 - DLC_INFO* pDLCInfo = app.GetDLCInfoForTrialOfferID( - m_pDLCPack->getPurchaseOfferId()); - ULONGLONG ullOfferID_Full; - if (pDLCInfo != NULL) { - ullOfferID_Full = pDLCInfo->ullOfferID_Full; - } else { - ullOfferID_Full = - pTexturePack->getDLCPack()->getPurchaseOfferId(); - } - - // tell sentient about the upsell of the full version of the - // texture pack - TelemetryManager->RecordUpsellPresented( - m_iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif - -#if defined(_WINDOWS64) || 0 +#if defined(_WINDOWS64) // trial pack warning unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -888,65 +631,14 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() { IDS_USING_TRIAL_TEXUREPACK_WARNING, uiIDA, 1, m_iPad, &TrialTexturePackWarningReturned, this); -#elif 0 || 0 || 0 - // trial pack warning - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - ui.RequestAlertMessage(IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, - IDS_USING_TRIAL_TEXUREPACK_WARNING, - uiIDA, 2, m_iPad, - &TrialTexturePackWarningReturned, this); #endif -#if 0 || 0 - StorageManager.SetSaveDisabled(true); -#endif return; } } } app.SetGameHostOption(eGameHostOption_WasntSaveOwner, (!m_bIsSaveOwner)); -#if 0 || 0 - app.SetGameHostOption(eGameHostOption_DisableSaving, - m_MoreOptionsParams.bDisableSaving ? 1 : 0); - StorageManager.SetSaveDisabled(m_MoreOptionsParams.bDisableSaving); - - int newWorldSize = 0; - int newHellScale = 0; - switch (m_MoreOptionsParams.newWorldSize) { - case e_worldSize_Unknown: - newWorldSize = 0; - newHellScale = 0; - break; - case e_worldSize_Classic: - newWorldSize = LEVEL_WIDTH_CLASSIC; - newHellScale = HELL_LEVEL_SCALE_CLASSIC; - break; - case e_worldSize_Small: - newWorldSize = LEVEL_WIDTH_SMALL; - newHellScale = HELL_LEVEL_SCALE_SMALL; - break; - case e_worldSize_Medium: - newWorldSize = LEVEL_WIDTH_MEDIUM; - newHellScale = HELL_LEVEL_SCALE_MEDIUM; - break; - case e_worldSize_Large: - newWorldSize = LEVEL_WIDTH_LARGE; - newHellScale = HELL_LEVEL_SCALE_LARGE; - break; - default: - assert(0); - break; - } - bool bUseMoat = !m_MoreOptionsParams.newWorldSizeOverwriteEdges; - app.SetGameNewWorldSize(newWorldSize, bUseMoat); - app.SetGameNewHellScale(newHellScale); - app.SetGameHostOption(eGameHostOption_WorldSize, - m_MoreOptionsParams.newWorldSize); - -#endif #if TO_BE_IMPLEMENTED // Reset the background downloading, in case we changed it by attempting to @@ -988,15 +680,6 @@ void UIScene_LoadMenu::handleSliderMove(F64 sliderId, F64 currentValue) { void UIScene_LoadMenu::handleTouchBoxRebuild() { m_bRebuildTouchBoxes = true; } void UIScene_LoadMenu::handleTimerComplete(int id) { -#if 0 - // we cannot rebuild touch boxes in an iggy callback because it requires - // further iggy calls - if (m_bRebuildTouchBoxes) { - GetMainPanel()->UpdateControl(); - ui.TouchBoxRebuild(this); - m_bRebuildTouchBoxes = false; - } -#endif switch (id) { case GAME_CREATE_ONLINE_TIMER_ID: { @@ -1038,62 +721,6 @@ void UIScene_LoadMenu::handleTimerComplete(int id) { } } break; // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 - case CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID: { -#if 0 || 0 - for (int i = 0; i < m_iTexturePacksNotInstalled; i++) { - if (m_iConfigA[i] != -1) { - DLC_INFO* pDLCInfo = - app.GetDLCInfoFromTPackID(m_iConfigA[i]); - - if (pDLCInfo) { - // retrieve the image - if we haven't already - std::wstring textureName = - filenametowstring(pDLCInfo->chImageURL); - - if (hasRegisteredSubstitutionTexture(textureName) == - false) { - std::uint8_t* pbImageData = NULL; - int iImageDataBytes = 0; - SonyHttp::getDataFromURL(pDLCInfo->chImageURL, - (void**)&pbImageData, - &iImageDataBytes); - - if (iImageDataBytes != 0) { - // set the image - registerSubstitutionTexture( - textureName, pbImageData, iImageDataBytes, - true); - // add an item in - m_texturePackList.addPack(m_iConfigA[i], - textureName); - m_iConfigA[i] = -1; - } - } else { - // already have the image, so add an item in - m_texturePackList.addPack(m_iConfigA[i], - textureName); - m_iConfigA[i] = -1; - } - } - } - } - - bool bAllDone = true; - for (int i = 0; i < m_iTexturePacksNotInstalled; i++) { - if (m_iConfigA[i] != -1) { - bAllDone = false; - } - } - - if (bAllDone) { - // kill this timer - killTimer(CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID); - } -#endif - - } break; -#endif } } @@ -1101,9 +728,6 @@ void UIScene_LoadMenu::LaunchGame(void) { // stop the timer running that causes a check for new texture packs in TMS // but not installed, since this will run all through the load game, and // will crash if it tries to create an hbrush -#if 0 - killTimer(CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID); -#endif if ((m_bGameModeCreative == true || m_bHasBeenInCreative) || m_MoreOptionsParams.bHostPrivileges == true) { @@ -1137,14 +761,12 @@ void UIScene_LoadMenu::LaunchGame(void) { // set the save to load PSAVE_DETAILS pSaveDetails = StorageManager.ReturnSavesInfo(); -#if 1 app.DebugPrintf( "Loading save s [%s]\n", pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex] .UTF8SaveTitle, pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex] .UTF8SaveFilename); -#endif C4JStorage::ESaveGameState eLoadStatus = StorageManager.LoadSaveData( &pSaveDetails @@ -1189,13 +811,11 @@ void UIScene_LoadMenu::LaunchGame(void) { } else { // set the save to load PSAVE_DETAILS pSaveDetails = StorageManager.ReturnSavesInfo(); -#if 1 app.DebugPrintf("Loading save %s [%s]\n", pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex] .UTF8SaveTitle, pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex] .UTF8SaveFilename); -#endif C4JStorage::ESaveGameState eLoadStatus = StorageManager.LoadSaveData( &pSaveDetails->SaveInfoA[(int)m_iSaveGameInfoIndex], @@ -1250,14 +870,12 @@ int UIScene_LoadMenu::ConfirmLoadReturned(void* pParam, int iPad, } else { // set the save to load PSAVE_DETAILS pSaveDetails = StorageManager.ReturnSavesInfo(); -#if 1 app.DebugPrintf( "Loading save %s [%s]\n", pSaveDetails->SaveInfoA[(int)pClass->m_iSaveGameInfoIndex] .UTF8SaveTitle, pSaveDetails->SaveInfoA[(int)pClass->m_iSaveGameInfoIndex] .UTF8SaveFilename); -#endif C4JStorage::ESaveGameState eLoadStatus = StorageManager.LoadSaveData( &pSaveDetails->SaveInfoA[(int)pClass->m_iSaveGameInfoIndex], @@ -1310,33 +928,6 @@ int UIScene_LoadMenu::LoadDataComplete(void* pParam) { // If this is an online game but not all players are signed in to Live, // stop! if (isOnlineGame && !isSignedInLive) { -#if 0 - assert(iPadNotSignedInLive != -1); - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - pClass->m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else { - pClass->m_bIgnoreInput = true; - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_CANCEL; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - iPadNotSignedInLive, - &UIScene_LoadMenu::MustSignInReturnedPSN, pClass); - } - return 0; -#else pClass->m_bIgnoreInput = false; unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -1344,7 +935,6 @@ int UIScene_LoadMenu::LoadDataComplete(void* pParam) { IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return 0; -#endif } // Check if user-created content is allowed, as we cannot play @@ -1356,28 +946,7 @@ int UIScene_LoadMenu::LoadDataComplete(void* pParam) { ProfileManager.AllowedPlayerCreatedContent( ProfileManager.GetPrimaryPad(), false, &pccAllowed, &pccFriendsAllowed); -#if 0 || 0 - if (isOnlineGame) { - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, NULL, - &bContentRestricted, NULL); - } -#endif -#if 0 - bool bPlayStationPlus = true; - int iPadWithNoPlaystationPlus = 0; - for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - if (ProfileManager.IsSignedIn(i) && - ((i == iPrimaryPad) || isLocalMultiplayerAvailable)) { - if (!ProfileManager.HasPlayStationPlus(i)) { - bPlayStationPlus = false; - iPadWithNoPlaystationPlus = i; - break; - } - } - } -#endif noUGC = !pccAllowed && !pccFriendsAllowed; if (!isOnlineGame || !isLocalMultiplayerAvailable) { @@ -1393,61 +962,8 @@ int UIScene_LoadMenu::LoadDataComplete(void* pParam) { ui.RequestContentRestrictedMessageBox(); pClass->m_bIgnoreInput = false; } -#if 0 - else if (isOnlineGame && (bPlayStationPlus == false)) { - pClass->setVisible(true); - pClass->m_bIgnoreInput = false; - - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we - // don't know if the player has PS Plus yet (if it can't - // connect to the PS Plus server). - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return 0; - } - - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = - ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_PLAY_OFFLINE; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, - // app.GetStringTable(),NULL,0,false); - } -#endif else { -#if 0 || 0 - if (isOnlineGame) { - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), false, &chatRestricted, - NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - ProfileManager.GetPrimaryPad()); - } - } -#endif int localUsersMask = CGameNetworkManager::GetLocalPlayerMask( ProfileManager.GetPrimaryPad()); @@ -1468,46 +984,6 @@ int UIScene_LoadMenu::LoadDataComplete(void* pParam) { ui.RequestContentRestrictedMessageBox(); pClass->m_bIgnoreInput = false; } -#if 0 - else if (bPlayStationPlus == false) { - pClass->setVisible(true); - pClass->m_bIgnoreInput = false; - - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we - // don't know if the player has PS Plus yet (if it can't - // connect to the PS Plus server). - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return 0; - } - - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = - ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_PLAY_OFFLINE; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadMenu::PSPlusReturned,pClass, - // app.GetStringTable(),NULL,0,false); - } -#endif else { pClass->m_bRequestQuadrantSignin = true; } @@ -1535,11 +1011,6 @@ int UIScene_LoadMenu::LoadSaveDataReturned(void* pParam, bool bIsCorrupt, pClass->m_bIsCorrupt = bIsCorrupt; -#if 0 || 0 || 0 - if (app.GetGameHostOption(eGameHostOption_WasntSaveOwner)) { - bIsOwner = false; - } -#endif if (bIsOwner) { LoadDataComplete(pClass); @@ -1547,15 +1018,6 @@ int UIScene_LoadMenu::LoadSaveDataReturned(void* pParam, bool bIsCorrupt, // messagebox pClass->m_bIgnoreInput = false; -#if 0 || 0 || 0 - // show the message that trophies are disabled - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage( - IDS_SAVEDATA_COPIED_TITLE, IDS_SAVEDATA_COPIED_TEXT, uiIDA, 1, - pClass->m_iPad, &UIScene_LoadMenu::TrophyDialogReturned, pClass); - app.SetGameHostOption(eGameHostOption_WasntSaveOwner, true); -#endif } return 0; @@ -1616,14 +1078,6 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, bool isClientSide = ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && pClass->m_MoreOptionsParams.bOnlineGame; -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - if (SQRNetworkManager_AdHoc_Vita:: - GetAdhocStatus()) // && - // pClass->m_MoreOptionsParams.bOnlineGame) - isClientSide = true; - } -#endif // 0 bool isPrivate = (app.GetGameSettings(pClass->m_iPad, eGameSetting_InviteOnly) > 0) @@ -1686,7 +1140,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, app.SetGameHostOption(eGameHostOption_DoDaylightCycle, pClass->m_MoreOptionsParams.bDoDaylightCycle); -#ifdef _LARGE_WORLDS +#if defined(_LARGE_WORLDS) app.SetGameHostOption(eGameHostOption_WorldSize, pClass->m_MoreOptionsParams.worldSize + 1); // 0 is GAME_HOST_OPTION_WORLDSIZE_UNKNOWN @@ -1708,9 +1162,7 @@ void UIScene_LoadMenu::StartGameFromSave(UIScene_LoadMenu* pClass, param->settings = app.GetGameHostOption(eGameHostOption_All); -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; @@ -1783,34 +1235,6 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void* pParam, bool bContinue, // If this is an online game but not all players are signed in to // Live, stop! if (isOnlineGame && !isSignedInLive) { -#if 0 - assert(iPadNotSignedInLive != -1); - - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - pClass->m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else { - pClass->m_bIgnoreInput = true; - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_CANCEL; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, iPadNotSignedInLive, - &UIScene_LoadMenu::MustSignInReturnedPSN, pClass); - } - return 0; -#else pClass->m_bIgnoreInput = false; unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -1818,7 +1242,6 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void* pParam, bool bContinue, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); return 0; -#endif } // Check if user-created content is allowed, as we cannot play @@ -1853,24 +1276,6 @@ int UIScene_LoadMenu::StartGame_SignInReturned(void* pParam, bool bContinue, ProfileManager.GetPrimaryPad()); } } else { -#if 0 || 0 - if (isOnlineGame) { - // show the chat restriction message for all users that it - // applies to - for (unsigned int i = 0; i < XUSER_MAX_COUNT; i++) { - if (ProfileManager.IsSignedInLive(i)) { - bool chatRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - i, false, &chatRestricted, NULL, NULL); - if (chatRestricted) { - ProfileManager.DisplaySystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, - i); - } - } - } - } -#endif // This is NOT called from a storage manager thread, and is in // fact called from the main thread in the Profile library tick. StartGameFromSave(pClass, localUsersMask); @@ -1889,49 +1294,3 @@ void UIScene_LoadMenu::handleGainFocus(bool navBack) { } } -#if 0 -int UIScene_LoadMenu::MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result) { - UIScene_LoadMenu* pClass = (UIScene_LoadMenu*)pParam; - pClass->m_bIgnoreInput = false; - - if (result == C4JStorage::EMessage_ResultAccept) { - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_LoadMenu::StartGame_SignInReturned, pClass, false, iPad); - } - - return 0; -} - -// int UIScene_LoadMenu::PSPlusReturned(void *pParam,int -// iPad,C4JStorage::EMessageResult result) -// { -// std::int32_t iResult; -// UIScene_LoadMenu *pClass = (UIScene_LoadMenu *)pParam; -// -// // continue offline, or upsell PS Plus? -// if(result==C4JStorage::EMessage_ResultDecline) -// { -// // upsell psplus -// iResult=sceNpCommerceDialogInitialize(); -// -// SceNpCommerceDialogParam param; -// sceNpCommerceDialogParamInitialize(¶m); -// param.mode=SCE_NP_COMMERCE_DIALOG_MODE_PLUS; -// param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; -// param.userId = ProfileManager.getUserID(pClass->m_iPad); -// -// -// iResult=sceNpCommerceDialogOpen(¶m); -// } -// else if(result==C4JStorage::EMessage_ResultAccept) -// { -// // continue offline -// pClass->m_MoreOptionsParams.bOnlineGame=false; -// pClass->LoadDataComplete(pClass); -// } -// -// pClass->m_bIgnoreInput=false; -// return 0; -// } -#endif \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.h index b8d20c40d..0cc2d8cb8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadMenu.h @@ -60,9 +60,6 @@ private: bool m_bThumbnailGetFailed; int64_t m_seed; -#if 0 - std::vector* m_pvProductInfo; -#endif // int *m_iConfigA; // track the texture packs that we don't have installed std::uint8_t* m_pbThumbnailData; @@ -105,10 +102,6 @@ private: virtual void checkStateAndStartGame(); void LaunchGame(void); -#if 0 - static void checkPrivilegeCallback(void* lpParam, bool hasPrivilege, - int iPad); -#endif static int ConfirmLoadReturned(void* pParam, int iPad, C4JStorage::EMessageResult result); @@ -125,12 +118,6 @@ private: static int DeleteSaveDataReturned(void* pParam, bool bSuccess); static int MustSignInReturnedPSN(void* pParam, int iPad, C4JStorage::EMessageResult result); -#if 0 - // static int PSPlusReturned(void *pParam,int - // iPad,C4JStorage::EMessageResult result); - static int ContinueOffline(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif public: // 4jcraft: made public for the thunk system we have for thumbnail loading, probably a FIXME for diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp index 2a6176faa..281c3cd8b 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.cpp @@ -15,18 +15,8 @@ #include "../../Minecraft.Client/Textures/Packs/TexturePackRepository.h" #include "../../Minecraft.Client/Textures/Packs/TexturePack.h" #include "../Network/SessionInfo.h" -#if 0 || 0 || 0 -#include "../Network/Sony/SonyHttp.h" -#include "../Network/Sony/SonyRemoteStorage.h" -#endif -#if 0 || 0 -#include -#endif -#if 0 -#include "message_dialog.h" -#endif -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) unsigned long UIScene_LoadOrJoinMenu::m_ulFileSize = 0L; std::wstring UIScene_LoadOrJoinMenu::m_wstrStageText = L""; bool UIScene_LoadOrJoinMenu::m_bSaveTransferRunning = false; @@ -35,23 +25,7 @@ bool UIScene_LoadOrJoinMenu::m_bSaveTransferRunning = false; #define JOIN_LOAD_ONLINE_TIMER_ID 0 #define JOIN_LOAD_ONLINE_TIMER_TIME 100 -#if 0 -#define CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID 3 -#define CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME 50 -#endif -#if 0 -UIScene_LoadOrJoinMenu::ESaveTransferFiles - UIScene_LoadOrJoinMenu::s_eSaveTransferFile; -unsigned long UIScene_LoadOrJoinMenu::s_ulFileSize = 0L; -byteArray UIScene_LoadOrJoinMenu::s_transferData = byteArray(); -std::wstring UIScene_LoadOrJoinMenu::m_wstrStageText = L""; - -#ifdef _DEBUG_MENUS_ENABLED -C4JStorage::SAVETRANSFER_FILE_DETAILS - UIScene_LoadOrJoinMenu::m_debugTransferDetails; -#endif -#endif namespace { int LoadOrJoinThumbnailReturnedThunk(void* lpParam, std::uint8_t* thumbnailData, @@ -122,10 +96,6 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void* initData, m_controlSavesTimer.setVisible(true); m_controlJoinTimer.setVisible(true); -#if 0 || 0 - m_spaceIndicatorSaves.init(L"", eControl_SpaceIndicator, 0, - (4LL * 1024LL * 1024LL * 1024LL)); -#endif m_bUpdateSaveSize = false; m_bAllLoaded = false; @@ -140,41 +110,17 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void* initData, m_bCopying = false; m_bCopyingCancelled = false; -#if 1 m_bSaveTransferCancelled = false; m_bSaveTransferInProgress = false; -#endif m_eAction = eAction_None; m_bMultiplayerAllowed = ProfileManager.IsSignedInLive(m_iPad) && ProfileManager.AllowedToPlayMultiplayer(m_iPad); -#if 0 - // 4J-PB - in order to buy the skin packs & texture packs, we need the - // signed offer ids for them, which we get in the availability info we need - // to retrieve this info though, so do it here - app.AddDLCRequest(e_Marketplace_Content); // content is skin packs, texture - // packs and mash-up packs -#endif int iLB = -1; -#if 0 - XPARTY_USER_LIST partyList; - if ((XPartyGetUserList(&partyList) != XPARTY_E_NOT_IN_PARTY) && - (partyList.dwUserCount > 1)) { - m_bInParty = true; - } else { - m_bInParty = false; - } -#endif - -#if 0 || 0 || 0 || \ - 0 - // Always clear the saves when we enter this menu - StorageManager.ClearSavesInfo(); -#endif // block input if we're waiting for DLC to install, and wipe the saves list. // The end of dlc mounting custom message will fill the list again @@ -186,15 +132,6 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void* initData, Initialise(); } -#if 0 - if (CGameNetworkManager::usingAdhocMode() && - SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) { - g_NetworkManager - .startAdhocMatching(); // create the client matching context and - // clear out the friends list - } - -#endif UpdateGamesList(); @@ -215,74 +152,8 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void* initData, } // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 - // 4J-PB - there may be texture packs we don't have, so use the info from - // TMS for this - DLC_INFO* pDLCInfo = NULL; - - // first pass - look to see if there are any that are not in the list - bool bTexturePackAlreadyListed; - bool bNeedToGetTPD = false; - Minecraft* pMinecraft = Minecraft::GetInstance(); - int texturePacksCount = pMinecraft->skins->getTexturePackCount(); - - for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) { - bTexturePackAlreadyListed = false; -#if 0 || 0 - char* pchDLCName = app.GetDLCInfoTextures(i); - pDLCInfo = app.GetDLCInfo(pchDLCName); -#else - ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); - pDLCInfo = app.GetDLCInfoForFullOfferID(ull); -#endif - for (unsigned int i = 0; i < texturePacksCount; ++i) { - TexturePack* tp = pMinecraft->skins->getTexturePackByIndex(i); - if (pDLCInfo && pDLCInfo->iConfig == tp->getDLCParentPackId()) { - bTexturePackAlreadyListed = true; - } - } - if (bTexturePackAlreadyListed == false) { - // some missing - bNeedToGetTPD = true; - - m_iTexturePacksNotInstalled++; - } - } - - if (bNeedToGetTPD == true) { - // add a TMS request for them - app.DebugPrintf("+++ Adding TMSPP request for texture pack data\n"); - app.AddTMSPPFileTypeRequest(e_DLC_TexturePackData); - m_iConfigA = new int[m_iTexturePacksNotInstalled]; - m_iTexturePacksNotInstalled = 0; - - for (unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i) { - bTexturePackAlreadyListed = false; -#if 0 || 0 - char* pchDLCName = app.GetDLCInfoTextures(i); - pDLCInfo = app.GetDLCInfo(pchDLCName); -#else - ULONGLONG ull = app.GetDLCInfoTexturesFullOffer(i); - pDLCInfo = app.GetDLCInfoForFullOfferID(ull); -#endif - for (unsigned int i = 0; i < texturePacksCount; ++i) { - TexturePack* tp = pMinecraft->skins->getTexturePackByIndex(i); - if (pDLCInfo->iConfig == tp->getDLCParentPackId()) { - bTexturePackAlreadyListed = true; - } - } - if (bTexturePackAlreadyListed == false) { - m_iConfigA[m_iTexturePacksNotInstalled++] = pDLCInfo->iConfig; - } - } - } - - addTimer(CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID, - CHECKFORAVAILABLETEXTUREPACKS_TIMER_TIME); -#endif - -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) m_eSaveTransferState = eSaveTransfer_Idle; #endif } @@ -313,13 +184,6 @@ UIScene_LoadOrJoinMenu::~UIScene_LoadOrJoinMenu() { } void UIScene_LoadOrJoinMenu::updateTooltips() { -#if 0 || 0 || 0 - if (m_eSaveTransferState != eSaveTransfer_Idle) { - // we're in a full screen progress for the save download here, so don't - // change the tooltips - return; - } -#endif // update the tooltips // if the saves list has focus, then we should show the Delete Save tooltip @@ -356,24 +220,12 @@ void UIScene_LoadOrJoinMenu::updateTooltips() { iLB = IDS_TOOLTIPS_PARTY_GAMES; } -#if 0 || 0 || 0 - if (m_iPad == ProfileManager.GetPrimaryPad()) - iY = IDS_TOOLTIPS_GAME_INVITES; -#endif if (ProfileManager.IsFullVersion() == false) { iRB = -1; } else if (StorageManager.GetSaveDisabled()) { -#if 0 - iX = IDS_TOOLTIPS_SELECTDEVICE; -#endif } else { -#if 0 - if (ProfileManager.IsSignedInLive(m_iPad)) { - // Is there a save from 360 on TMS? - iX = IDS_TOOLTIPS_SAVETRANSFER_DOWNLOAD; - } -#elif defined SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) // Is there a save from PS3 or PSVita available? // Sony asked that this be displayed at all times so users are aware of // the functionality. We'll display some text when there's no save @@ -410,9 +262,6 @@ void UIScene_LoadOrJoinMenu::Initialise() { m_pSavesList->SetCurSelVisible(0); #endif } else if (StorageManager.GetSaveDisabled()) { -#if 0 || 0 || 0 - GetSaveInfo(); -#else #if TO_BE_IMPLEMENTED if (StorageManager.GetSaveDeviceSelected(m_iPad)) @@ -429,7 +278,6 @@ void UIScene_LoadOrJoinMenu::Initialise() { m_controlSavesTimer.setVisible(false); } #endif -#endif // supported save-disabled path } else { // 4J-PB - we need to check that there is enough space left to create a // copy of the save (for a rename) @@ -448,14 +296,8 @@ void UIScene_LoadOrJoinMenu::updateComponents() { } void UIScene_LoadOrJoinMenu::handleDestroy() { -#if 0 - app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n"); -#endif // shut down the keyboard if it is displayed -#if (0 || 0 || 0) - InputManager.DestroyKeyboard(); -#endif } void UIScene_LoadOrJoinMenu::handleGainFocus(bool navBack) { @@ -531,8 +373,7 @@ std::wstring UIScene_LoadOrJoinMenu::getMoviePath() { void UIScene_LoadOrJoinMenu::tick() { UIScene::tick(); -#if (0 || 0 || 0 || \ - defined _WINDOWS64 || 0) +#if defined(_WINDOWS64) if (m_bExitScene) // navigate forward or back { if (!m_bRetrievingSaveThumbnails) { @@ -542,33 +383,18 @@ void UIScene_LoadOrJoinMenu::tick() { } // Stop loading thumbnails if we navigate forwards if (hasFocus(m_iPad)) { -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) // if the loadOrJoin menu has focus again, we can clear the saveTransfer // flag now. Added so we can delay the ehternet disconnect till it's // cleaned up if (m_eSaveTransferState == eSaveTransfer_Idle) m_bSaveTransferRunning = false; -#endif -#if 0 || 0 - if (m_bUpdateSaveSize) { - if ((m_iDefaultButtonsC > 0) && - (m_iSaveListIndex >= m_iDefaultButtonsC)) { - m_spaceIndicatorSaves.selectSave(m_iSaveListIndex - - m_iDefaultButtonsC); - } else { - m_spaceIndicatorSaves.selectSave(-1); - } - m_bUpdateSaveSize = false; - } #endif // Display the saves if we have them if (!m_bSavesDisplayed) { m_pSaveDetails = StorageManager.ReturnSavesInfo(); if (m_pSaveDetails != NULL) { // CD - Fix - Adding define for ORBIS/XBOXONE -#if 0 || 0 - m_spaceIndicatorSaves.reset(); -#endif AddDefaultButtons(); m_bSavesDisplayed = true; @@ -586,24 +412,6 @@ void UIScene_LoadOrJoinMenu::tick() { m_iSaveDetailsCount = m_pSaveDetails->iSaveC; for (unsigned int i = 0; i < m_pSaveDetails->iSaveC; ++i) { -#if 0 - m_spaceIndicatorSaves.addSave( - m_pSaveDetails->SaveInfoA[i].totalSize); -#elif 0 - m_spaceIndicatorSaves.addSave( - m_pSaveDetails->SaveInfoA[i].blocksUsed * (32 * 1024)); -#endif -#if 0 - m_buttonListSaves.addItem( - m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, L""); - - m_saveDetails[i].saveId = i; - memcpy(m_saveDetails[i].UTF16SaveName, - m_pSaveDetails->SaveInfoA[i].UTF16SaveTitle, 128); - memcpy(m_saveDetails[i].UTF16SaveFilename, - m_pSaveDetails->SaveInfoA[i].UTF16SaveFilename, - MAX_SAVEFILENAME_LENGTH); -#else m_buttonListSaves.addItem( m_pSaveDetails->SaveInfoA[i].UTF8SaveTitle, L""); @@ -613,7 +421,6 @@ void UIScene_LoadOrJoinMenu::tick() { memcpy(m_saveDetails[i].UTF8SaveFilename, m_pSaveDetails->SaveInfoA[i].UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH); -#endif } m_controlSavesTimer.setVisible(false); @@ -647,13 +454,7 @@ void UIScene_LoadOrJoinMenu::tick() { if (!m_bExitScene) { // convert to utf16 std::uint16_t u16Message[MAX_SAVEFILENAME_LENGTH]; -#if 0 - // Already utf16 on durango - memcpy( - u16Message, - m_saveDetails[m_iRequestingThumbnailId].UTF16SaveFilename, - MAX_SAVEFILENAME_LENGTH); -#elif defined(_WINDOWS64) +#if defined(_WINDOWS64) int result = ::MultiByteToWideChar( CP_UTF8, // convert from UTF-8 MB_ERR_INVALID_CHARS, // error on invalid chars @@ -672,12 +473,6 @@ void UIScene_LoadOrJoinMenu::tick() { srcmax = MAX_SAVEFILENAME_LENGTH; dstmax = MAX_SAVEFILENAME_LENGTH; -#if 0 - L10nResult lres = UTF8stoUTF16s( - (std::uint8_t*)m_saveDetails[m_iRequestingThumbnailId] - .UTF8SaveFilename, - &srcmax, u16Message, &dstmax); -#else SceCesUcsContext context; sceCesUcsContextInit(&context); @@ -686,7 +481,6 @@ void UIScene_LoadOrJoinMenu::tick() { (std::uint8_t*)m_saveDetails[m_iRequestingThumbnailId] .UTF8SaveFilename, srcmax, &srclen, u16Message, dstmax, &dstlen); -#endif #endif if (m_saveDetails[m_iRequestingThumbnailId].pbThumbnailData) { registerSubstitutionTexture( @@ -771,41 +565,8 @@ void UIScene_LoadOrJoinMenu::tick() { } #endif -#if 0 - if (g_NetworkManager.ShouldMessageForFullSession()) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, - uiIDA, 1, ProfileManager.GetPrimaryPad()); - } -#endif // SAVE TRANSFERS -#if 0 - // check the status of the PSPlus common dialog - switch (sceNpCommerceDialogUpdateStatus()) { - case SCE_COMMON_DIALOG_STATUS_FINISHED: { - SceNpCommerceDialogResult Result; - sceNpCommerceDialogGetResult(&Result); - sceNpCommerceDialogTerminate(); - - if (Result.authorized) { - // they just became a PSPlus member - ProfileManager.PsPlusUpdate(ProfileManager.GetPrimaryPad(), - &Result); - - } else { - } - - // 4J-JEV: Fix for PS4 #5148 - [ONLINE] If the user attempts to join - // a game when they do not have Playstation Plus, the title will - // lose all functionality. - m_bIgnoreInput = false; - } break; - default: - break; - } -#endif } void UIScene_LoadOrJoinMenu::GetSaveInfo() { @@ -814,22 +575,9 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo() { // This will return with the number retrieved in uiSaveC if (app.DebugSettingsOn() && app.GetLoadSavesFromFolderEnabled()) { -#if 0 - // We need to make sure this is non-null so that we have an idea of free - // space - m_pSaveDetails = StorageManager.ReturnSavesInfo(); - if (m_pSaveDetails == NULL) { - C4JStorage::ESaveGameState eSGIStatus = - StorageManager.GetSavesInfo(m_iPad, NULL, this, "save"); - } -#endif uiSaveC = 0; -#if 0 - File savesDir(L"GAME:\\Saves"); -#else File savesDir(L"Saves"); -#endif if (savesDir.exists()) { m_saves = savesDir.listFiles(); uiSaveC = (unsigned int)m_saves->size(); @@ -949,11 +697,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, switch (key) { case ACTION_MENU_CANCEL: if (pressed) { -#if 0 || 0 || 0 - m_bExitScene = true; -#else navigateBack(); -#endif handled = true; } break; @@ -970,13 +714,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, ui.PlayUISFX(eSFX_Press); #endif // Save Transfer -#if 0 - if (ProfileManager.IsSignedInLive(m_iPad)) { - UIScene_LoadOrJoinMenu::s_ulFileSize = 0; - LaunchSaveTransfer(); - } -#endif -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) { bool bSignedInLive = ProfileManager.IsSignedInLive(iPad); if (bSignedInLive) { @@ -986,63 +724,6 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, #endif break; case ACTION_MENU_Y: -#if 0 || 0 || 0 - m_eAction = eAction_ViewInvites; - if (pressed && iPad == ProfileManager.GetPrimaryPad()) { -#if 0 - // Check if PSN is unavailable because of age restriction - int npAvailability = ProfileManager.getNPAvailability(iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPad); - - break; - } -#endif - - // are we offline? - if (!ProfileManager.IsSignedInLive(iPad)) { - // get them to sign in to online - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, ProfileManager.GetPrimaryPad(), - &UIScene_LoadOrJoinMenu::MustSignInReturnedPSN, this); - } else { -#if 0 - SQRNetworkManager_Orbis::RecvInviteGUI(); -#elif 0 - SQRNetworkManager_Vita::RecvInviteGUI(); -#else - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf( - "sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, - ret); -#endif - } - } -#elif 0 - if (getControlFocus() == eControl_GamesList && - m_buttonListGames.getItemCount() > 0) { - const int nIndex = m_buttonListGames.getCurrentSelection(); - FriendSessionInfo* pSelectedSession = - m_currentSessions->at(nIndex); - - PlayerUID uid = pSelectedSession->searchResult.m_playerXuids[0]; - if (uid != INVALID_XUID) - ProfileManager.ShowProfileCard( - ProfileManager.GetLockedProfile(), uid); - ui.PlayUISFX(eSFX_Press); - } -#endif // 0 || 0 break; case ACTION_MENU_RIGHT_SCROLL: @@ -1072,16 +753,12 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, uiIDA[1] = IDS_TITLE_RENAMESAVE; uiIDA[2] = IDS_TOOLTIPS_DELETESAVE; int numOptions = 3; -#ifdef SONY_REMOTE_STORAGE_UPLOAD +#if defined(SONY_REMOTE_STORAGE_UPLOAD) if (ProfileManager.IsSignedInLive( ProfileManager.GetPrimaryPad())) { numOptions = 4; uiIDA[3] = IDS_TOOLTIPS_SAVETRANSFER_UPLOAD; } -#endif -#if 0 || 0 - numOptions = 4; - uiIDA[3] = IDS_COPYSAVE; #endif ui.RequestAlertMessage( IDS_TOOLTIPS_SAVEOPTIONS, IDS_TEXT_SAVEOPTIONS, @@ -1129,13 +806,6 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_LEFT_SCROLL: -#if 0 - if (m_bInParty) { - m_bShowingPartyGamesOnly = !m_bShowingPartyGamesOnly; - UpdateGamesList(); - CXuiSceneBase::PlayUISFX(eSFX_Press); - } -#endif break; case ACTION_MENU_LEFT: case ACTION_MENU_RIGHT: { @@ -1151,9 +821,6 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: case ACTION_MENU_PAGEUP: @@ -1176,13 +843,6 @@ int UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback(void* lpParam, // check the name is valid if (ui16Text[0] != 0) { -#if (0 || 0 || 0 || \ - 0) - // open the save and overwrite the metadata - StorageManager.RenameSaveData( - pClass->m_iSaveListIndex - pClass->m_iDefaultButtonsC, ui16Text, - &UIScene_LoadOrJoinMenu::RenameSaveDataReturned, pClass); -#endif } else { pClass->m_bIgnoreInput = false; pClass->updateTooltips(); @@ -1218,7 +878,7 @@ void UIScene_LoadOrJoinMenu::handleFocusChange(F64 controlId, F64 childId) { updateTooltips(); } -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) void UIScene_LoadOrJoinMenu::remoteStorageGetSaveCallback( void* lpParam, SonyRemoteStorage::Status s, int error_code) { app.DebugPrintf("remoteStorageGetCallback err : 0x%08x\n", error_code); @@ -1272,29 +932,6 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId) { eUIScene_LoadMenu, params); } } else { -#if 0 - // check if this is a damaged save - PSAVE_INFO pSaveInfo = - &m_pSaveDetails - ->SaveInfoA[((int)childId) - m_iDefaultButtonsC]; - if (pSaveInfo->thumbnailData == NULL && - pSaveInfo->modifiedTime == - 0) // no thumbnail data and time of zero and zero - // blocks useset for corrupt files - { - // give the option to delete the save - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_CORRUPT_OR_DAMAGED_SAVE_TITLE, - IDS_CORRUPT_OR_DAMAGED_SAVE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned, - this); - - } else -#endif { app.SetTutorialMode(false); @@ -1315,24 +952,6 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId) { params->saveDetails = &m_saveDetails[((int)childId) - m_iDefaultButtonsC]; -#if 0 - // On XB1, saves might need syncing, in which case - // inform the user so they can decide whether they want - // to wait for this to happen - if (m_pSaveDetails - ->SaveInfoA[params->iSaveGameInfoIndex] - .needsSync) { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_SYNC; - uiIDA[1] = IDS_CONFIRM_CANCEL; - - m_loadMenuInitData = params; - ui.RequestAlertMessage( - IDS_LOAD_SAVED_WORLD, IDS_CONFIRM_SYNC_REQUIRED, - uiIDA, 2, ProfileManager.GetPrimaryPad(), - &NeedSyncMessageReturned, this); - } else -#endif { // navigate to the settings scene ui.NavigateToScene(ProfileManager.GetPrimaryPad(), @@ -1364,137 +983,6 @@ void UIScene_LoadOrJoinMenu::handlePress(F64 controlId, F64 childId) { void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) { if (m_buttonListGames.getItemCount() > 0 && gameIndex < m_currentSessions->size()) { -#if 0 || 0 || 0 - // 4J-PB - is the player allowed to join games? - bool noUGC = false; - bool bContentRestricted = false; - - // we're online, since we are joining a game - ProfileManager.GetChatAndContentRestrictions(m_iPad, true, &noUGC, - &bContentRestricted, NULL); - -#if 0 - // 4J Stu - On PS4 we don't restrict playing multiplayer based on chat - // restriction, so remove this check - noUGC = false; - - bool bPlayStationPlus = true; - int iPadWithNoPlaystationPlus = 0; - bool isSignedInLive = true; - int iPadNotSignedInLive = -1; - for (unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) { - if (InputManager.IsPadConnected(i) || - ProfileManager.IsSignedIn(i)) { - if (isSignedInLive && !ProfileManager.IsSignedInLive(i)) { - // Record the first non signed in live pad - iPadNotSignedInLive = i; - } - - isSignedInLive = - isSignedInLive && ProfileManager.IsSignedInLive(i); - if (ProfileManager.HasPlayStationPlus(i) == false) { - bPlayStationPlus = false; - break; - } - } - } -#endif -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - bContentRestricted = false; - noUGC = false; - } -#endif - - if (noUGC) { - // not allowed to join -#if 1 - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - // Not allowed to play online - ui.RequestAlertMessage(IDS_ONLINE_GAME, IDS_CHAT_RESTRICTION_UGC, - uiIDA, 1, m_iPad, NULL, this); -#else - // Not allowed to play online - ProfileManager.ShowSystemMessage( - SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, 0); -#endif - - m_bIgnoreInput = false; - return; - } else if (bContentRestricted) { - ui.RequestContentRestrictedMessageBox(); - - m_bIgnoreInput = false; - return; - } -#if 0 - // If this is an online game but not all players are signed in to Live, - // stop! - else if (!isSignedInLive) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - - // Check if PSN is unavailable because of age restriction - int npAvailability = - ProfileManager.getNPAvailability(iPadNotSignedInLive); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - m_bIgnoreInput = false; - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive if the - // npAvailability isn't SCE_OK - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - iPadNotSignedInLive); - } else { - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPadNotSignedInLive, - &UIScene_LoadOrJoinMenu::MustSignInReturnedPSN, this); - } - return; - } else if (bPlayStationPlus == false) { - if (ProfileManager.RequestingPlaystationPlus( - iPadWithNoPlaystationPlus)) { - // MGH - added this so we don't try and upsell when we don't - // know if the player has PS Plus yet (if it can't connect to - // the PS Plus server). - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestAlertMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - ProfileManager.GetPrimaryPad(), NULL, NULL); - return; - } - - // PS Plus upsell - // 4J-PB - we're not allowed to show the text Playstation Plus - - // have to call the upsell all the time! upsell psplus - std::int32_t iResult = sceNpCommerceDialogInitialize(); - - SceNpCommerceDialogParam param; - sceNpCommerceDialogParamInitialize(¶m); - param.mode = SCE_NP_COMMERCE_DIALOG_MODE_PLUS; - param.features = SCE_NP_PLUS_FEATURE_REALTIME_MULTIPLAY; - param.userId = ProfileManager.getUserID(iPadWithNoPlaystationPlus); - - iResult = sceNpCommerceDialogOpen(¶m); - - // unsigned int uiIDA[2]; - // uiIDA[0]=IDS_CONFIRM_OK; - // uiIDA[1]=IDS_PLAYSTATIONPLUS_SIGNUP; - // ui.RequestMessageBox( - // IDS_FAILED_TO_CREATE_GAME_TITLE, - // IDS_NO_PLAYSTATIONPLUS, - // uiIDA,2,ProfileManager.GetPrimaryPad(),&UIScene_LoadOrJoinMenu::PSPlusReturned,this, - // app.GetStringTable(),NULL,0,false); - - m_bIgnoreInput = false; - return; - } - -#endif -#endif // CScene_MultiGameInfo::JoinMenuInitData *initData = new // CScene_MultiGameInfo::JoinMenuInitData(); @@ -1523,16 +1011,6 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) { // upsell the texture pack // tell sentient about the upsell of the full version of the // skin pack -#if 0 - ULONGLONG ullOfferID_Full; - app.GetDLCFullOfferIDForPackID( - m_initData->selectedSession->data.texturePackParentId, - &ullOfferID_Full); - - TelemetryManager->RecordUpsellPresented( - m_iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_TEXTUREPACK_FULLVERSION; @@ -1548,24 +1026,9 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex) { return; } -#if 0 - if (CGameNetworkManager::usingAdhocMode() && - !SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) { - // not connected to adhoc anymore, must have connected back to - // PSN to buy texture pack so sign in again - SQRNetworkManager_AdHoc_Vita::AttemptAdhocSignIn( - &UIScene_LoadOrJoinMenu::SignInAdhocReturned, this); - return; - } -#endif } m_controlJoinTimer.setVisible(false); -#if 0 - // Reset the background downloading, in case we changed it by attempting - // to download a texture pack - XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_AUTO); -#endif m_bIgnoreInput = true; ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_JoinMenu, @@ -1611,9 +1074,7 @@ void UIScene_LoadOrJoinMenu::LoadLevelGen(LevelGenerationOptions* levelGen) { // pMinecraft->skins->updateUI(); } -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; @@ -1822,16 +1283,6 @@ bool UIScene_LoadOrJoinMenu::DoesGamesListHaveFocus() { void UIScene_LoadOrJoinMenu::handleTimerComplete(int id) { switch (id) { case JOIN_LOAD_ONLINE_TIMER_ID: { -#if 0 - XPARTY_USER_LIST partyList; - - if ((XPartyGetUserList(&partyList) != XPARTY_E_NOT_IN_PARTY) && - (partyList.dwUserCount > 1)) { - m_bInParty = true; - } else { - m_bInParty = false; - } -#endif bool bMultiplayerAllowed = ProfileManager.IsSignedInLive(m_iPad) && @@ -1851,54 +1302,6 @@ void UIScene_LoadOrJoinMenu::handleTimerComplete(int id) { } } break; // 4J-PB - Only Xbox will not have trial DLC patched into the game -#if 0 - case CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID: { -#if 0 || 0 || 0 - for (int i = 0; i < m_iTexturePacksNotInstalled; i++) { - if (m_iConfigA[i] != -1) { - DLC_INFO* pDLCInfo = - app.GetDLCInfoFromTPackID(m_iConfigA[i]); - - if (pDLCInfo) { - // retrieve the image - if we haven't already - std::wstring textureName = - filenametowstring(pDLCInfo->chImageURL); - - if (hasRegisteredSubstitutionTexture(textureName) == - false) { - std::uint8_t* pbImageData = NULL; - int iImageDataBytes = 0; - SonyHttp::getDataFromURL(pDLCInfo->chImageURL, - (void**)&pbImageData, - &iImageDataBytes); - - if (iImageDataBytes != 0) { - // set the image - registerSubstitutionTexture( - textureName, pbImageData, iImageDataBytes, - true); - m_iConfigA[i] = -1; - } - } - } - } - } - - bool bAllDone = true; - for (int i = 0; i < m_iTexturePacksNotInstalled; i++) { - if (m_iConfigA[i] != -1) { - bAllDone = false; - } - } - - if (bAllDone) { - // kill this timer - killTimer(CHECKFORAVAILABLETEXTUREPACKS_TIMER_ID); - } -#endif - - } break; -#endif } } @@ -1940,9 +1343,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk( param->settings = app.GetGameHostOption(eGameHostOption_All); param->savePlatform = savePlatform; -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; @@ -1960,7 +1361,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromDisk( eUIScene_FullscreenProgress, loadingParams); } -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) void UIScene_LoadOrJoinMenu::LoadSaveFromCloud() { wchar_t wFileName[128]; mbstowcs( @@ -2007,9 +1408,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud() { param->savePlatform = app.getRemoteStorage()->getSavePlatform(); param->texturePackId = app.getRemoteStorage()->getSaveTexturePack(); -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif LoadingInputParams* loadingParams = new LoadingInputParams(); loadingParams->func = &CGameNetworkManager::RunNetworkGameThreadProc; @@ -2027,7 +1426,7 @@ void UIScene_LoadOrJoinMenu::LoadSaveFromCloud() { eUIScene_FullscreenProgress, loadingParams); } -#endif // SONY_REMOTE_STORAGE_DOWNLOAD +#endif int UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { @@ -2089,20 +1488,6 @@ int UIScene_LoadOrJoinMenu::RenameSaveDataReturned(void* lpParam, bool bRes) { return 0; } -#if 0 - -void UIScene_LoadOrJoinMenu::LoadRemoteFileFromDisk(char* remoteFilename) { - wchar_t wSaveName[128]; - mbstowcs(wSaveName, remoteFilename, - strlen(remoteFilename) + 1); // plus null - - // processConsoleSave(wSaveName, L"ProcessedSave.bin"); - - // File remoteFile(L"ProcessedSave.bin"); - File remoteFile(wSaveName); - LoadSaveFromDisk(&remoteFile, SAVE_FILE_PLATFORM_PS3); -} -#endif int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { @@ -2114,17 +1499,6 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( case C4JStorage::EMessage_ResultDecline: // rename { pClass->m_bIgnoreInput = true; -#if 0 - // bring up a keyboard - InputManager.RequestKeyboard( - app.GetString(IDS_RENAME_WORLD_TITLE), - (pClass->m_saveDetails[pClass->m_iSaveListIndex - - pClass->m_iDefaultButtonsC]) - .UTF16SaveName, - 0, 25, - &UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback, - pClass, C_4JInput::EKeyboardMode_Default); -#else // bring up a keyboard wchar_t wSaveName[128]; // CD - Fix - We must memset the SaveName @@ -2141,7 +1515,6 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( app.GetString(IDS_RENAME_WORLD_TITLE), wSaveName, 0, 25, &UIScene_LoadOrJoinMenu::KeyboardCompleteWorldNameCallback, pClass, C_4JInput::EKeyboardMode_Default); -#endif } break; case C4JStorage::EMessage_ResultThirdOption: // delete - @@ -2157,7 +1530,7 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( &UIScene_LoadOrJoinMenu::DeleteSaveDialogReturned, pClass); } break; -#ifdef SONY_REMOTE_STORAGE_UPLOAD +#if defined(SONY_REMOTE_STORAGE_UPLOAD) case C4JStorage::EMessage_ResultFourthOption: // upload to cloud { unsigned int uiIDA[2]; @@ -2169,18 +1542,6 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( 2, iPad, &UIScene_LoadOrJoinMenu::SaveTransferDialogReturned, pClass); } break; -#endif // SONY_REMOTE_STORAGE_UPLOAD -#if 0 || 0 - case C4JStorage::EMessage_ResultFourthOption: // copy save - { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - - ui.RequestAlertMessage( - IDS_COPYSAVE, IDS_TEXT_COPY_SAVE, uiIDA, 2, iPad, - &UIScene_LoadOrJoinMenu::CopySaveDialogReturned, pClass); - } break; #endif case C4JStorage::EMessage_Cancelled: @@ -2193,80 +1554,6 @@ int UIScene_LoadOrJoinMenu::SaveOptionsDialogReturned( return 0; } -#if 0 - -int UIScene_LoadOrJoinMenu::SignInAdhocReturned(void* pParam, bool bContinue, - int iPad) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - pClass->m_bIgnoreInput = false; - return 0; -} - -int UIScene_LoadOrJoinMenu::MustSignInTexturePack( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_LoadOrJoinMenu::MustSignInReturnedTexturePack, pClass); - } else { - pClass->m_bIgnoreInput = false; - } - - return 0; -} - -int UIScene_LoadOrJoinMenu::MustSignInReturnedTexturePack(void* pParam, - bool bContinue, - int iPad) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - - int commerceState = app.GetCommerceState(); - while (commerceState != CConsoleMinecraftApp::eCommerce_State_Offline && - commerceState != CConsoleMinecraftApp::eCommerce_State_Online && - commerceState != CConsoleMinecraftApp::eCommerce_State_Error) { - Sleep(10); - commerceState = app.GetCommerceState(); - } - - if (bContinue == true) { - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo( - pClass->m_initData->selectedSession->data.texturePackParentId); - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // we have to retrieve the skuid from the store info, it can't be - // hardcoded since Sony may change it. So we assume the first sku - // for the product is the one we want MGH - keyname in the DLC file - // is 16 chars long, but there's no space for a NULL terminating - // char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - // 4J-PB - need to check for an empty store - if (app.CheckForEmptyStore(iPad) == false) { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } - } - pClass->m_bIgnoreInput = false; - return 0; -} - -#endif int UIScene_LoadOrJoinMenu::TexturePackDialogReturned( void* pParam, int iPad, C4JStorage::EMessageResult result) { @@ -2276,141 +1563,14 @@ int UIScene_LoadOrJoinMenu::TexturePackDialogReturned( if (result == C4JStorage::EMessage_ResultAccept) { // we need to enable background downloading for the DLC XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_ALWAYS_ALLOW); -#if 0 || 0 || 0 -#if 0 - if (!ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) && - CGameNetworkManager::usingAdhocMode()) { - // get them to sign in to online - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, ProfileManager.GetPrimaryPad(), - &UIScene_LoadOrJoinMenu::MustSignInTexturePack, pClass); - return; - } -#endif - - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo( - pClass->m_initData->selectedSession->data.texturePackParentId); - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // we have to retrieve the skuid from the store info, it can't be - // hardcoded since Sony may change it. So we assume the first sku - // for the product is the one we want MGH - keyname in the DLC file - // is 16 chars long, but there's no space for a NULL terminating - // char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - // 4J-PB - need to check for an empty store - if (app.CheckForEmptyStore(iPad) == false) { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } -#endif - -#if 0 - if (ProfileManager.IsSignedIn(iPad)) { - if (ProfileManager.IsSignedInLive(iPad)) { - std::wstring ProductId; - app.GetDLCFullOfferIDForPackID( - pClass->m_initData->selectedSession->data - .texturePackParentId, - ProductId); - - StorageManager.InstallOffer(1, (WCHAR*)ProductId.c_str(), NULL, - NULL); - } else { - // 4J-JEV: Fix for XB1: #165863 - XR-074: Compliance: With no - // active network connection user is unable to convert from - // Trial to Full texture pack and is not messaged why. - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, - iPad); - } - } -#endif } pClass->m_bIgnoreInput = false; return 0; } -#if 0 || 0 || 0 -int UIScene_LoadOrJoinMenu::MustSignInReturnedPSN( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_LoadOrJoinMenu::PSN_SignInReturned, pClass); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_LoadOrJoinMenu::PSN_SignInReturned, pClass); -#else - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_LoadOrJoinMenu::PSN_SignInReturned, pClass, false, iPad); -#endif - } else { - pClass->m_bIgnoreInput = false; - } - - return 0; -} - -int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void* pParam, bool bContinue, - int iPad) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - if (bContinue == true) { - switch (pClass->m_eAction) { - case eAction_ViewInvites: - // Check if we're signed in to LIVE - if (ProfileManager.IsSignedInLive(iPad)) { -#if 0 - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf( - "sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, - ret); -#elif 0 - SQRNetworkManager_Vita::RecvInviteGUI(); -#else - SQRNetworkManager_Orbis::RecvInviteGUI(); -#endif - } - break; - case eAction_JoinGame: - pClass->CheckAndJoinGame(pClass->m_iGameListIndex); - break; - } - } else { - pClass->m_bIgnoreInput = false; - } - return 0; -} -#endif - -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) void UIScene_LoadOrJoinMenu::LaunchSaveTransfer() { LoadingInputParams* loadingParams = new LoadingInputParams(); @@ -2499,9 +1659,6 @@ bool g_bForceVitaSaveWipe = false; int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { m_bSaveTransferRunning = true; -#if 0 - StorageManager.SetSaveTransferInProgress(true); -#endif Compression::UseDefaultThreadStorage(); UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)lpParameter; pClass->m_saveTransferDownloadCancelled = false; @@ -2597,13 +1754,6 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { ZeroMemory(bTextMetadata, 88); unsigned int hostOptions = app.getRemoteStorage()->getSaveHostOptions(); -#if 0 - app.SetGameHostOption( - hostOptions, eGameHostOption_WorldSize, - e_worldSize_Classic); // force the classic world size on, - // otherwise it's unknown and we - // can't expand -#endif int iTextMetadataBytes = app.CreateImageTextData( bTextMetadata, app.getRemoteStorage()->getSaveSeed(), true, hostOptions, app.getRemoteStorage()->getSaveTexturePack()); @@ -2735,18 +1885,10 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { "CrossSaveGetSavesInfoCallback failed - couldn't find " "save\n"); } else { -#if 0 - // ignore the CRC on PS3 - C4JStorage::ESaveGameState eLoadStatus = - StorageManager.LoadSaveData( - &pSaveDetails->SaveInfoA[saveInfoIndex], - &LoadCrossSaveDataCallback, pClass, true); -#else C4JStorage::ESaveGameState eLoadStatus = StorageManager.LoadSaveData( &pSaveDetails->SaveInfoA[saveInfoIndex], &LoadCrossSaveDataCallback, pClass); -#endif if (eLoadStatus == C4JStorage::ESaveGame_Load) { pClass->m_eSaveTransferState = eSaveTransfer_LoadingSaveFromDisc; @@ -2801,7 +1943,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { dwDataSizeSaveImage, bTextMetadata, iTextMetadataBytes); } -#ifdef SPLIT_SAVES +#if defined(SPLIT_SAVES) ConsoleSaveFileOriginal oldFormatSave( wSaveName, ba.data, ba.length, false, app.getRemoteStorage()->getSavePlatform()); @@ -2845,13 +1987,6 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { // that will ultimately delete the directory level storage & // therefore the ConsoleSaveSplit instance, which needs to be // around until all the sub files have completed saving. -#if 0 || 0 - while (StorageManager.GetSaveState() != - C4JStorage::ESaveGame_Idle) { - Sleep(10); - StorageManager.Tick(); - } -#endif delete pSave; @@ -2960,15 +2095,7 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { errorMessage = IDS_ERROR_NETWORK; // show "A network error has // occurred." -#if 0 - if (!ProfileManager.isSignedInPSN( - ProfileManager.GetPrimaryPad())) { - errorMessage = - IDS_PRO_NOTONLINE_TEXT; // show "not signed - // into PSN" - } -#endif -#ifdef __VITA__ +#if defined(__VITA__) if (!ProfileManager.IsSignedInPSN( ProfileManager.GetPrimaryPad())) { errorMessage = @@ -2998,9 +2125,6 @@ int UIScene_LoadOrJoinMenu::DownloadSonyCrossSaveThreadProc(void* lpParameter) { Sleep(50); } m_bSaveTransferRunning = false; -#if 0 - StorageManager.SetSaveTransferInProgress(false); -#endif return 0; } @@ -3031,7 +2155,7 @@ void UIScene_LoadOrJoinMenu::CancelSaveTransferCallback(void* lpParam) { #endif -#ifdef SONY_REMOTE_STORAGE_UPLOAD +#if defined(SONY_REMOTE_STORAGE_UPLOAD) void UIScene_LoadOrJoinMenu::LaunchSaveUpload() { LoadingInputParams* loadingParams = new LoadingInputParams(); @@ -3198,644 +2322,7 @@ int UIScene_LoadOrJoinMenu::SaveTransferDialogReturned( } return 0; } -#endif // SONY_REMOTE_STORAGE_UPLOAD - -#if 0 -void UIScene_LoadOrJoinMenu::LaunchSaveTransfer() { - SaveTransferStateContainer* stateContainer = - new SaveTransferStateContainer(); - stateContainer->m_iProgress = 0; - stateContainer->m_bSaveTransferInProgress = false; - stateContainer->m_bSaveTransferCancelled = false; - stateContainer->m_iPad = m_iPad; - stateContainer->m_eSaveTransferState = C4JStorage::eSaveTransfer_Idle; - stateContainer->m_pClass = this; - - LoadingInputParams* loadingParams = new LoadingInputParams(); - loadingParams->func = - &UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc; - loadingParams->lpParam = stateContainer; - - UIFullscreenProgressCompletionData* completionData = - new UIFullscreenProgressCompletionData(); - completionData->bShowBackground = TRUE; - completionData->bShowLogo = TRUE; - completionData->type = e_ProgressCompletion_NavigateBackToScene; - completionData->iPad = DEFAULT_XUI_MENU_USER; - completionData->bRequiresUserAction = TRUE; - loadingParams->completionData = completionData; - - loadingParams->cancelFunc = - &UIScene_LoadOrJoinMenu::CancelSaveTransferCallback; - loadingParams->m_cancelFuncParam = stateContainer; - loadingParams->cancelText = IDS_TOOLTIPS_CANCEL; - - ui.NavigateToScene(m_iPad, eUIScene_FullscreenProgress, loadingParams); -} - -int UIScene_LoadOrJoinMenu::DownloadXbox360SaveThreadProc(void* lpParameter) { - Compression::UseDefaultThreadStorage(); - - SaveTransferStateContainer* pStateContainer = - (SaveTransferStateContainer*)lpParameter; - Minecraft* pMinecraft = Minecraft::GetInstance(); - ConsoleSaveFile* pSave = NULL; - - while (StorageManager.SaveTransferClearState() != - C4JStorage::eSaveTransfer_Idle) { - Sleep(5); - } - - pStateContainer->m_bSaveTransferInProgress = true; - - UIScene_LoadOrJoinMenu::s_eSaveTransferFile = eSaveTransferFile_Marker; - RequestFileSize(pStateContainer, L"completemarker"); - - while ((pStateContainer->m_eSaveTransferState != - C4JStorage::eSaveTransfer_Idle) && - pStateContainer->m_bSaveTransferInProgress && - !pStateContainer->m_bSaveTransferCancelled) { - switch (pStateContainer->m_eSaveTransferState) { - case C4JStorage::eSaveTransfer_Idle: - break; - case C4JStorage::eSaveTransfer_FileSizeRetrieved: - switch (UIScene_LoadOrJoinMenu::s_eSaveTransferFile) { - case eSaveTransferFile_Marker: - if (UIScene_LoadOrJoinMenu::s_ulFileSize == 0) { - pMinecraft->progressRenderer->progressStage( - IDS_SAVETRANSFER_NONE_FOUND); - pStateContainer->m_eSaveTransferState = - C4JStorage::eSaveTransfer_Idle; - } else { - RequestFileData(pStateContainer, L"completemarker"); - } - break; - case eSaveTransferFile_Metadata: - RequestFileData(pStateContainer, L"metadata"); - break; - case eSaveTransferFile_SaveData: - RequestFileData(pStateContainer, L"savedata"); - break; - }; - break; - case C4JStorage::eSaveTransfer_GettingFileData: - - break; - case C4JStorage::eSaveTransfer_FileDataRetrieved: - switch (UIScene_LoadOrJoinMenu::s_eSaveTransferFile) { - case eSaveTransferFile_Marker: - // MGH - the marker file now contains the save file - // version number if the version is higher than we - // handle, cancel the download. - if (UIScene_LoadOrJoinMenu::s_transferData[0] > - SAVE_FILE_VERSION_NUMBER) { - pMinecraft->progressRenderer->progressStage( - IDS_SAVETRANSFER_NONE_FOUND); - pStateContainer->m_eSaveTransferState = - C4JStorage::eSaveTransfer_Idle; - } else { - UIScene_LoadOrJoinMenu::s_eSaveTransferFile = - eSaveTransferFile_Metadata; - RequestFileSize(pStateContainer, L"metadata"); - } - break; - case eSaveTransferFile_Metadata: { - ByteArrayInputStream bais( - UIScene_LoadOrJoinMenu::s_transferData); - DataInputStream dis(&bais); - - std::wstring saveTitle = dis.readUTF(); - StorageManager.SetSaveTitle(saveTitle.c_str()); - - std::wstring saveUniqueName = dis.readUTF(); - - // 4J Stu - Don't set this any more. We added it so that - // we could share the ban list data for this save - // However if the player downloads the same save - // multiple times, it will overwrite the previous - // version with that filname, and they could have made - // changes to it. - // StorageManager.SetSaveUniqueFilename((wchar_t - // *)saveUniqueName.c_str()); - - int thumbnailSize = dis.readInt(); - if (thumbnailSize > 0) { - byteArray ba(thumbnailSize); - dis.readFully(ba); - - // retrieve the seed value from the image metadata, - // we need to change to host options, then set it - // back again - bool bHostOptionsRead = false; - unsigned int uiHostOptions = 0; - DWORD dwTexturePack; - int64_t seedVal; - - char szSeed[50]; - ZeroMemory(szSeed, 50); - app.GetImageTextData( - ba.data, ba.length, (unsigned char*)&szSeed, - uiHostOptions, bHostOptionsRead, dwTexturePack); - sscanf_s(szSeed, "%I64d", &seedVal); - - app.SetGameHostOption( - uiHostOptions, eGameHostOption_WorldSize, - e_worldSize_Classic); // force the classic - // world size on, - // otherwise it's unknown - // and we can't expand - - BYTE bTextMetadata[88]; - ZeroMemory(bTextMetadata, 88); - - int iTextMetadataBytes = app.CreateImageTextData( - bTextMetadata, seedVal, true, uiHostOptions, - dwTexturePack); - // set the icon and save image - StorageManager.SetSaveImages(ba.data, ba.length, - NULL, 0, bTextMetadata, - iTextMetadataBytes); - - delete ba.data; - } - - UIScene_LoadOrJoinMenu::s_transferData = byteArray(); - UIScene_LoadOrJoinMenu::s_eSaveTransferFile = - eSaveTransferFile_SaveData; - RequestFileSize(pStateContainer, L"savedata"); - } break; - case eSaveTransferFile_SaveData: { -#ifdef SPLIT_SAVES - if (!pStateContainer->m_bSaveTransferCancelled) { - ConsoleSaveFileOriginal oldFormatSave( - L"Temp name", - UIScene_LoadOrJoinMenu::s_transferData.data, - UIScene_LoadOrJoinMenu::s_transferData.length, - false, SAVE_FILE_PLATFORM_X360); - pSave = new ConsoleSaveFileSplit( - &oldFormatSave, false, - pMinecraft->progressRenderer); - - pMinecraft->progressRenderer->progressStage( - IDS_SAVETRANSFER_STAGE_SAVING); - if (!pStateContainer->m_bSaveTransferCancelled) - pSave->Flush(false, false); - } - pStateContainer->m_eSaveTransferState = - C4JStorage::eSaveTransfer_Saving; - -#else - pSave = new ConsoleSaveFileOriginal( - wSaveName, m_transferData.data, - m_transferData.length, false, - SAVE_FILE_PLATFORM_X360); - pStateContainer->m_eSaveTransferState = - C4JStorage::eSaveTransfer_Converting; -#endif - delete UIScene_LoadOrJoinMenu::s_transferData.data; - UIScene_LoadOrJoinMenu::s_transferData = byteArray(); - } break; - }; - - pStateContainer->m_iProgress = 0; - break; - case C4JStorage::eSaveTransfer_Converting: -#if 0 - pSave->ConvertToLocalPlatform(); - - pMinecraft->progressRenderer->progressStage(IDS_SAVETRANSFER_STAGE_SAVING); - if(!pStateContainer->m_bSaveTransferCancelled) pSave->Flush(false,false); - - pStateContainer->m_iProgress+=1; - if(pStateContainer->m_iProgress==101) - { - pStateContainer->m_eSaveTransferState=C4JStorage::eSaveTransfer_Saving; - pStateContainer->m_iProgress=0; - break; - } - pMinecraft->progressRenderer->progressStagePercentage(pStateContainer->m_iProgress); -#endif - break; - case C4JStorage::eSaveTransfer_Saving: - // On Durango/Orbis, we need to wait for all the asynchronous - // saving processes to complete before destroying the levels, as - // that will ultimately delete the directory level storage & - // therefore the ConsoleSaveSplit instance, which needs to be - // around until all the sub files have completed saving. -#if 0 || 0 - pMinecraft->progressRenderer->progressStage( - IDS_PROGRESS_SAVING_TO_DISC); - - while (StorageManager.GetSaveState() != - C4JStorage::ESaveGame_Idle) { - Sleep(10); - - // 4J Stu - DO NOT tick this here. The main thread should be - // the only place ticking the StorageManager. You WILL get - // crashes. - // StorageManager.Tick(); - } #endif - delete pSave; -#if 0 - pMinecraft->progressRenderer->progressStage( - IDS_SAVE_TRANSFER_DOWNLOAD_AND_CONVERT_COMPLETE); -#endif - pStateContainer->m_eSaveTransferState = - C4JStorage::eSaveTransfer_Idle; - - // wipe the list and repopulate it - if (!pStateContainer->m_bSaveTransferCancelled) - pStateContainer->m_pClass->m_iState = - e_SavesRepopulateAfterTransferDownload; - - // pClass->m_iProgress+=1; - // if(pClass->m_iProgress==101) - //{ - // pClass->m_iProgress=0; - // pClass->m_eSaveTransferState=C4JStorage::eSaveTransfer_Idle; - // pMinecraft->progressRenderer->progressStage( - // IDS_SAVE_TRANSFER_DOWNLOAD_AND_CONVERT_COMPLETE ); - - // break; - //} - // pMinecraft->progressRenderer->progressStagePercentage(pClass->m_iProgress); - - break; - } - Sleep(50); - } - - if (pStateContainer->m_bSaveTransferCancelled) { - wchar_t wcTemp[256]; - - pStateContainer->m_bSaveTransferCancelled = false; - swprintf(wcTemp, app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLED)); - m_wstrStageText = wcTemp; - pMinecraft->progressRenderer->progressStage(m_wstrStageText); - } - - pStateContainer->m_eSaveTransferState = C4JStorage::eSaveTransfer_Idle; - pStateContainer->m_bSaveTransferInProgress = false; - - delete pStateContainer; - - return 0; -} - -void UIScene_LoadOrJoinMenu::RequestFileSize(SaveTransferStateContainer* pClass, - wchar_t* filename) { - Minecraft* pMinecraft = Minecraft::GetInstance(); - - // get the save file size - pMinecraft->progressRenderer->progressStart(IDS_SAVETRANSFER_TITLE_GET); - pMinecraft->progressRenderer->progressStage( - IDS_SAVETRANSFER_STAGE_GET_DETAILS); - -#ifdef _DEBUG_MENUS_ENABLED - if (app.GetLoadSavesFromFolderEnabled()) { - ZeroMemory(&m_debugTransferDetails, - sizeof(C4JStorage::SAVETRANSFER_FILE_DETAILS)); - - File targetFile(std::wstring(L"FakeTMSPP\\").append(filename)); - if (targetFile.exists()) - m_debugTransferDetails.ulFileLen = targetFile.length(); - - SaveTransferReturned(pClass, &m_debugTransferDetails); - } else -#endif - { - do { - pMinecraft->progressRenderer->progressStart( - IDS_SAVETRANSFER_TITLE_GET); - pMinecraft->progressRenderer->progressStage( - IDS_SAVETRANSFER_STAGE_GET_DETAILS); - Sleep(1); - pClass->m_eSaveTransferState = - StorageManager.SaveTransferGetDetails( - pClass->m_iPad, C4JStorage::eGlobalStorage_TitleUser, - filename, &UIScene_LoadOrJoinMenu::SaveTransferReturned, - pClass); - } while (pClass->m_eSaveTransferState == - C4JStorage::eSaveTransfer_Busy && - !pClass->m_bSaveTransferCancelled); - } -} - -void UIScene_LoadOrJoinMenu::RequestFileData(SaveTransferStateContainer* pClass, - wchar_t* filename) { - Minecraft* pMinecraft = Minecraft::GetInstance(); - wchar_t wcTemp[256]; - - pMinecraft->progressRenderer->progressStagePercentage(0); - - swprintf(wcTemp, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA), 0, - UIScene_LoadOrJoinMenu::s_ulFileSize); - m_wstrStageText = wcTemp; - - pMinecraft->progressRenderer->progressStage(m_wstrStageText); - -#ifdef _DEBUG_MENUS_ENABLED - if (app.GetLoadSavesFromFolderEnabled()) { - File targetFile(std::wstring(L"FakeTMSPP\\").append(filename)); - if (targetFile.exists()) { - const std::size_t fileLength = - static_cast(m_debugTransferDetails.ulFileLen); - m_debugTransferDetails.pbData = new std::uint8_t[fileLength]; - - const PortableFileIO::BinaryReadResult readResult = - PortableFileIO::ReadBinaryFile(targetFile.getPath(), - m_debugTransferDetails.pbData, - fileLength); - - assert(readResult.status == PortableFileIO::BinaryReadStatus::ok); - assert(readResult.bytesRead == fileLength); - - if ((readResult.status == PortableFileIO::BinaryReadStatus::ok) && - (readResult.bytesRead == fileLength)) { - SaveTransferReturned(pClass, &m_debugTransferDetails); - } else { - delete[] m_debugTransferDetails.pbData; - m_debugTransferDetails.pbData = NULL; - } - } - } else -#endif - { - do { - pMinecraft->progressRenderer->progressStart( - IDS_SAVETRANSFER_TITLE_GET); - pMinecraft->progressRenderer->progressStage(-1); - Sleep(1); - pClass->m_eSaveTransferState = StorageManager.SaveTransferGetData( - pClass->m_iPad, C4JStorage::eGlobalStorage_TitleUser, filename, - &UIScene_LoadOrJoinMenu::SaveTransferReturned, - &UIScene_LoadOrJoinMenu::SaveTransferUpdateProgress, pClass, - pClass); - } while (pClass->m_eSaveTransferState == - C4JStorage::eSaveTransfer_Busy && - !pClass->m_bSaveTransferCancelled); - } -} - -int UIScene_LoadOrJoinMenu::SaveTransferReturned( - void* lpParam, - C4JStorage::SAVETRANSFER_FILE_DETAILS* pSaveTransferDetails) { - SaveTransferStateContainer* pClass = (SaveTransferStateContainer*)lpParam; - app.DebugPrintf("Save Transfer - size is %d\n", - pSaveTransferDetails->ulFileLen); - - // if the file data is null, then assume this is the file size retrieval - if (pSaveTransferDetails->pbData == NULL) { - pClass->m_eSaveTransferState = - C4JStorage::eSaveTransfer_FileSizeRetrieved; - UIScene_LoadOrJoinMenu::s_ulFileSize = pSaveTransferDetails->ulFileLen; - } else { - delete UIScene_LoadOrJoinMenu::s_transferData.data; - UIScene_LoadOrJoinMenu::s_transferData = byteArray( - pSaveTransferDetails->pbData, UIScene_LoadOrJoinMenu::s_ulFileSize); - pClass->m_eSaveTransferState = - C4JStorage::eSaveTransfer_FileDataRetrieved; - } - - return 0; -} - -int UIScene_LoadOrJoinMenu::SaveTransferUpdateProgress( - void* lpParam, unsigned long ulBytesReceived) { - wchar_t wcTemp[256]; - - SaveTransferStateContainer* pClass = (SaveTransferStateContainer*)lpParam; - Minecraft* pMinecraft = Minecraft::GetInstance(); - - if (pClass->m_bSaveTransferCancelled) // was cancelled - { - pMinecraft->progressRenderer->progressStage( - IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING); - swprintf(wcTemp, app.GetString(IDS_SAVE_TRANSFER_DOWNLOAD_CANCELLING)); - m_wstrStageText = wcTemp; - pMinecraft->progressRenderer->progressStage(m_wstrStageText); - } else { - unsigned int uiProgress = - (unsigned int)(((float)ulBytesReceived / - float(UIScene_LoadOrJoinMenu::s_ulFileSize)) * - 100.0f); - - pMinecraft->progressRenderer->progressStagePercentage(uiProgress); - swprintf(wcTemp, app.GetString(IDS_SAVETRANSFER_STAGE_GET_DATA), - ((float)(ulBytesReceived)) / 1024000.0f, - ((float)UIScene_LoadOrJoinMenu::s_ulFileSize) / 1024000.0f); - m_wstrStageText = wcTemp; - pMinecraft->progressRenderer->progressStage(m_wstrStageText); - } - - return 0; -} - -void UIScene_LoadOrJoinMenu::CancelSaveTransferCallback(void* lpParam) { - SaveTransferStateContainer* pClass = (SaveTransferStateContainer*)lpParam; - - if (!pClass->m_bSaveTransferCancelled) { - StorageManager.CancelSaveTransfer( - UIScene_LoadOrJoinMenu::CancelSaveTransferCompleteCallback, pClass); - - pClass->m_bSaveTransferCancelled = true; - } - // pClass->m_bSaveTransferInProgress=false; -} - -int UIScene_LoadOrJoinMenu::CancelSaveTransferCompleteCallback(void* lpParam) { - SaveTransferStateContainer* pClass = (SaveTransferStateContainer*)lpParam; - // change the state to idle to get the download thread to terminate - pClass->m_eSaveTransferState = C4JStorage::eSaveTransfer_Idle; - return 0; -} - -int UIScene_LoadOrJoinMenu::NeedSyncMessageReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - LoadMenuInitData* params = (LoadMenuInitData*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - // navigate to the settings scene - ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadMenu, - pClass->m_loadMenuInitData); - } else { - delete pClass->m_loadMenuInitData; - pClass->m_bIgnoreInput = false; - } - - return 0; -} - -#endif - -#if 0 -void UIScene_LoadOrJoinMenu::HandleDLCLicenseChange() { - // may have installed Halloween on this menu - app.StartInstallDLCProcess(m_iPad); -} -#endif - -#if 0 || 0 -int UIScene_LoadOrJoinMenu::CopySaveDialogReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_LoadOrJoinMenu* pClass = (UIScene_LoadOrJoinMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - LoadingInputParams* loadingParams = new LoadingInputParams(); - void* uniqueId = reinterpret_cast(pClass->GetCallbackUniqueId()); - loadingParams->func = &UIScene_LoadOrJoinMenu::CopySaveThreadProc; - loadingParams->lpParam = uniqueId; - loadingParams->waitForThreadToDelete = true; - - UIFullscreenProgressCompletionData* completionData = - new UIFullscreenProgressCompletionData(); - completionData->bShowBackground = TRUE; - completionData->bShowLogo = TRUE; - completionData->type = e_ProgressCompletion_NavigateBackToScene; - completionData->iPad = DEFAULT_XUI_MENU_USER; - loadingParams->completionData = completionData; - - loadingParams->cancelFunc = - &UIScene_LoadOrJoinMenu::CancelCopySaveCallback; - loadingParams->m_cancelFuncParam = uniqueId; - loadingParams->cancelText = IDS_TOOLTIPS_CANCEL; - - ui.NavigateToScene(iPad, eUIScene_FullscreenProgress, loadingParams); - } else { - pClass->m_bIgnoreInput = false; - } - - return 0; -} - -int UIScene_LoadOrJoinMenu::CopySaveThreadProc(void* lpParameter) { - Minecraft* pMinecraft = Minecraft::GetInstance(); - pMinecraft->progressRenderer->progressStart(IDS_PROGRESS_COPYING_SAVE); - pMinecraft->progressRenderer->progressStage(-1); - - ui.EnterCallbackIdCriticalSection(); - UIScene_LoadOrJoinMenu* pClass = - (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParameter); - if (pClass) { - pClass->m_bCopying = true; - pClass->m_bCopyingCancelled = false; - ui.LeaveCallbackIdCriticalSection(); - // Copy save data takes two callbacks - one for completion, and one for - // progress. The progress callback also lets us cancel the operation, if - // we return false. - StorageManager.CopySaveData( - &pClass->m_pSaveDetails->SaveInfoA[pClass->m_iSaveListIndex - - pClass->m_iDefaultButtonsC], - UIScene_LoadOrJoinMenu::CopySaveDataReturned, - UIScene_LoadOrJoinMenu::CopySaveDataProgress, lpParameter); - - bool bContinue = true; - do { - Sleep(100); - ui.EnterCallbackIdCriticalSection(); - pClass = (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId( - (size_t)lpParameter); - if (pClass) { - bContinue = pClass->m_bCopying; - } else { - bContinue = false; - } - ui.LeaveCallbackIdCriticalSection(); - } while (bContinue); - } else { - ui.LeaveCallbackIdCriticalSection(); - } - - return 0; -} - -int UIScene_LoadOrJoinMenu::CopySaveDataReturned( - void* lpParam, bool success, C4JStorage::ESaveGameState stat) { - ui.EnterCallbackIdCriticalSection(); - UIScene_LoadOrJoinMenu* pClass = - (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParam); - - if (pClass) { - if (success) { - pClass->m_bCopying = false; - // wipe the list and repopulate it - pClass->m_iState = e_SavesRepopulateAfterDelete; - ui.LeaveCallbackIdCriticalSection(); - } else { -#if 0 - unsigned int uiIDA[1]; - // you cancelled the save on exit after choosing exit and save? You - // go back to the Exit choices then. - uiIDA[0] = IDS_OK; - - if (stat == C4JStorage::ESaveGame_CopyCompleteFailLocalStorage) { - ui.LeaveCallbackIdCriticalSection(); - ui.RequestErrorMessage( - IDS_COPYSAVE_FAILED_TITLE, IDS_COPYSAVE_FAILED_LOCAL, uiIDA, - 1, ProfileManager.GetPrimaryPad(), - CopySaveErrorDialogFinishedCallback, lpParam); - } else if (stat == C4JStorage::ESaveGame_CopyCompleteFailQuota) { - ui.LeaveCallbackIdCriticalSection(); - ui.RequestErrorMessage( - IDS_COPYSAVE_FAILED_TITLE, IDS_COPYSAVE_FAILED_QUOTA, uiIDA, - 1, ProfileManager.GetPrimaryPad(), - CopySaveErrorDialogFinishedCallback, lpParam); - } else { - pClass->m_bCopying = false; - ui.LeaveCallbackIdCriticalSection(); - } -#else - pClass->m_bCopying = false; - ui.LeaveCallbackIdCriticalSection(); -#endif - } - } else { - ui.LeaveCallbackIdCriticalSection(); - } - return 0; -} - -bool UIScene_LoadOrJoinMenu::CopySaveDataProgress(void* lpParam, int percent) { - bool bContinue = false; - ui.EnterCallbackIdCriticalSection(); - UIScene_LoadOrJoinMenu* pClass = - (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParam); - if (pClass) { - bContinue = !pClass->m_bCopyingCancelled; - } - ui.LeaveCallbackIdCriticalSection(); - Minecraft* pMinecraft = Minecraft::GetInstance(); - pMinecraft->progressRenderer->progressStagePercentage(percent); - - return bContinue; -} - -void UIScene_LoadOrJoinMenu::CancelCopySaveCallback(void* lpParam) { - ui.EnterCallbackIdCriticalSection(); - UIScene_LoadOrJoinMenu* pClass = - (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)lpParam); - if (pClass) { - pClass->m_bCopyingCancelled = true; - } - ui.LeaveCallbackIdCriticalSection(); -} - -int UIScene_LoadOrJoinMenu::CopySaveErrorDialogFinishedCallback( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - ui.EnterCallbackIdCriticalSection(); - UIScene_LoadOrJoinMenu* pClass = - (UIScene_LoadOrJoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam); - if (pClass) { - pClass->m_bCopying = false; - } - ui.LeaveCallbackIdCriticalSection(); - - return 0; -} - -#endif // 0 diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.h index bfd2e6867..76da3865c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LoadOrJoinMenu.h @@ -4,21 +4,12 @@ class LevelGenerationOptions; -#if 0 || 0 || 0 -#define SONY_REMOTE_STORAGE_DOWNLOAD -#endif -#if 0 || 0 -#define SONY_REMOTE_STORAGE_UPLOAD -#endif class UIScene_LoadOrJoinMenu : public UIScene { private: enum EControls { eControl_SavesList, eControl_GamesList, -#if 0 || 0 - eControl_SpaceIndicator, -#endif }; enum EState { @@ -46,9 +37,6 @@ protected: UIControl_SaveList m_buttonListGames; UIControl_Label m_labelSavesListTitle, m_labelJoinListTitle, m_labelNoGames; UIControl m_controlSavesTimer, m_controlJoinTimer; -#if 0 || 0 - UIControl_SpaceIndicatorBar m_spaceIndicatorSaves; -#endif private: UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) @@ -62,9 +50,6 @@ private: UI_MAP_ELEMENT(m_controlSavesTimer, "SavesTimer") UI_MAP_ELEMENT(m_controlJoinTimer, "JoinTimer") -#if 0 || 0 - UI_MAP_ELEMENT(m_spaceIndicatorSaves, "SaveSizeBar") -#endif UI_END_MAP_ELEMENTS_AND_NAMES() int m_iDefaultButtonsC; @@ -94,10 +79,8 @@ private: int m_iSaveListIndex; int m_iGameListIndex; // int *m_iConfigA; // track the texture packs that we don't have installed -#if 1 bool m_bSaveTransferInProgress; bool m_bSaveTransferCancelled; -#endif bool m_bUpdateSaveSize; public: @@ -120,9 +103,6 @@ public: virtual EUIScene getSceneType() { return eUIScene_LoadOrJoinMenu; } static void UpdateGamesListCallback(void* pParam); -#if 0 - void HandleDLCLicenseChange(); -#endif virtual void tick(); private: @@ -152,87 +132,21 @@ public: static int DeleteSaveDataReturned(void* lpParam, bool bRes); static int RenameSaveDataReturned(void* lpParam, bool bRes); static int KeyboardCompleteWorldNameCallback(void* lpParam, bool bRes); -#if 0 - static int MustSignInTexturePack(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int MustSignInReturnedTexturePack(void* pParam, bool bContinue, - int iPad); - static int SignInAdhocReturned(void* pParam, bool bContinue, int iPad); -#endif protected: void handlePress(F64 controlId, F64 childId); void LoadLevelGen(LevelGenerationOptions* levelGen); void LoadSaveFromDisk( File* saveFile, ESavePlatform savePlatform = SAVE_FILE_PLATFORM_LOCAL); -#if 0 || 0 || 0 - void LoadSaveFromCloud(); -#endif public: virtual void HandleDLCMountingComplete(); -#if 0 - void LoadRemoteFileFromDisk(char* remoteFilename); -#endif private: void CheckAndJoinGame(int gameIndex); -#if 0 || 0 || 0 - static int MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int PSN_SignInReturned(void* pParam, bool bContinue, int iPad); - static void remoteStorageGetSaveCallback(void* lpParam, - SonyRemoteStorage::Status s, - int error_code); -#endif -#if 0 - // static int PSPlusReturned(void *pParam,int - // iPad,C4JStorage::EMessageResult result); -#endif -#if 0 - typedef struct _SaveTransferStateContainer { - int m_iProgress; - bool m_bSaveTransferInProgress; - bool m_bSaveTransferCancelled; - int m_iPad; - C4JStorage::eSaveTransferState m_eSaveTransferState; - UIScene_LoadOrJoinMenu* m_pClass; - } SaveTransferStateContainer; - enum ESaveTransferFiles { - eSaveTransferFile_Marker, - eSaveTransferFile_Metadata, - eSaveTransferFile_SaveData, - }; - static ESaveTransferFiles s_eSaveTransferFile; - static unsigned long s_ulFileSize; - static byteArray s_transferData; - static std::wstring m_wstrStageText; - LoadMenuInitData* m_loadMenuInitData; -#ifdef _DEBUG_MENUS_ENABLED - static C4JStorage::SAVETRANSFER_FILE_DETAILS m_debugTransferDetails; -#endif - - void LaunchSaveTransfer(); - static int DownloadXbox360SaveThreadProc(void* lpParameter); - static void RequestFileSize(SaveTransferStateContainer* pClass, - wchar_t* filename); - static void RequestFileData(SaveTransferStateContainer* pClass, - wchar_t* filename); - static int SaveTransferReturned( - void* lpParam, - C4JStorage::SAVETRANSFER_FILE_DETAILS* pSaveTransferDetails); - static int SaveTransferUpdateProgress(void* lpParam, - unsigned long ulBytesReceived); - static void CancelSaveTransferCallback(void* lpParam); - static int NeedSyncMessageReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int CancelSaveTransferCompleteCallback(void* lpParam); - -#endif - -#ifdef SONY_REMOTE_STORAGE_DOWNLOAD +#if defined(SONY_REMOTE_STORAGE_DOWNLOAD) enum eSaveTransferState { eSaveTransfer_Idle, eSaveTransfer_Busy, @@ -293,7 +207,7 @@ public: private: #endif -#ifdef SONY_REMOTE_STORAGE_UPLOAD +#if defined(SONY_REMOTE_STORAGE_UPLOAD) enum eSaveUploadState { eSaveUpload_Idle, eSaveUpload_UploadingFileData, @@ -317,15 +231,4 @@ private: void* pParam, int iPad, C4JStorage::EMessageResult result); #endif -#if 0 || 0 - static int CopySaveDialogReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int CopySaveThreadProc(void* lpParameter); - static int CopySaveDataReturned(void* lpParameter, bool success, - C4JStorage::ESaveGameState state); - static bool CopySaveDataProgress(void* lpParam, int percent); - static void CancelCopySaveCallback(void* lpParam); - static int CopySaveErrorDialogFinishedCallback( - void* pParam, int iPad, C4JStorage::EMessageResult result); -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp index a12539dc9..2dbd0e729 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.cpp @@ -6,9 +6,6 @@ #include "../../Minecraft.Client/MinecraftServer.h" #include "UI.h" #include "UIScene_MainMenu.h" -#if 0 -#include -#endif Random* UIScene_MainMenu::random = new Random(); @@ -31,11 +28,6 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void* initData, m_buttons[(int)eControl_PlayGame].init(IDS_PLAY_GAME, eControl_PlayGame); -#if 0 - if (!ProfileManager.IsFullVersion()) - m_buttons[(int)eControl_PlayGame].setLabel(IDS_PLAY_TRIAL_GAME); - app.SetReachedMainMenu(); -#endif m_buttons[(int)eControl_Leaderboards].init(IDS_LEADERBOARDS, eControl_Leaderboards); @@ -56,23 +48,6 @@ UIScene_MainMenu::UIScene_MainMenu(int iPad, void* initData, m_buttons[(int)eControl_Exit].init(app.GetString(IDS_EXIT_GAME), eControl_Exit); -#if 0 || 0 || 0 - // Not allowed to exit from a PS3 game from the game - have to use the PS - // button - removeControl(&m_buttons[(int)eControl_Exit], false); - // We don't have a way to display trophies/achievements, so remove the - // button - removeControl(&m_buttons[(int)eControl_Achievements], false); - m_bLaunchFullVersionPurchase = false; -#endif -#if 0 - // Allowed to not have achievements in the menu - removeControl(&m_buttons[(int)eControl_Achievements], false); - // Not allowed to exit from a Xbox One game from the game - have to use the - // Home button - // removeControl( &m_buttons[(int)eControl_Exit], false ); - m_bWaitingForDLCInfo = false; -#endif doHorizontalResizeCheck(); @@ -124,13 +99,6 @@ void UIScene_MainMenu::updateTooltips() { if (!m_bIgnorePress) { iA = IDS_TOOLTIPS_SELECT; -#if 0 - iX = IDS_TOOLTIPS_CHOOSE_USER; -#elif 0 - if (ProfileManager.IsFullVersion()) { - iX = IDS_TOOLTIP_CHANGE_NETWORK_MODE; - } -#endif } ui.SetTooltips(DEFAULT_XUI_MENU_USER, iA, -1, iX); } @@ -165,9 +133,6 @@ void UIScene_MainMenu::handleGainFocus(bool navBack) { m_bIgnorePress = false; updateTooltips(); -#if 0 - ProfileManager.ClearGameUsers(); -#endif if (navBack && ProfileManager.IsFullVersion()) { // Replace the Unlock Full Game with Downloadable Content @@ -184,15 +149,9 @@ void UIScene_MainMenu::handleGainFocus(bool navBack) { // 4J-PB - remove the "hobo humping" message legal say we can't have, and // the 1080p one for Vita -#if 0 - int splashIndex = - eSplashRandomStart + 2 + - random->nextInt((int)m_splashes.size() - (eSplashRandomStart + 2)); -#else int splashIndex = eSplashRandomStart + 1 + random->nextInt((int)m_splashes.size() - (eSplashRandomStart + 1)); -#endif // Override splash text on certain dates SYSTEMTIME LocalSysTime; @@ -219,18 +178,6 @@ void UIScene_MainMenu::handleGainFocus(bool navBack) { std::wstring UIScene_MainMenu::getMoviePath() { return L"MainMenu"; } void UIScene_MainMenu::handleReload() { -#if 0 || 0 || 0 - // Not allowed to exit from a PS3 game from the game - have to use the PS - // button - removeControl(&m_buttons[(int)eControl_Exit], false); - // We don't have a way to display trophies/achievements, so remove the - // button - removeControl(&m_buttons[(int)eControl_Achievements], false); -#endif -#if 0 - // Allowed to not have achievements in the menu - removeControl(&m_buttons[(int)eControl_Achievements], false); -#endif } void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed, @@ -241,48 +188,17 @@ void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed, if (m_bIgnorePress || (eNavigateWhenReady >= 0)) return; -#if 0 || 0 - // ignore all players except player 0 - it's their profile that is currently - // being used - if (iPad != 0) return; -#endif ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); switch (key) { case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { ProfileManager.SetPrimaryPad(iPad); ProfileManager.SetLockedProfile(-1); sendInputToMovie(key, repeat, pressed, released); } break; -#if 0 - case ACTION_MENU_X: - if (pressed) { - m_bIgnorePress = true; - ProfileManager.RequestSignInUI(false, false, false, false, - false, ChooseUser_SignInReturned, - this, iPad); - } - break; -#endif -#if 0 - case ACTION_MENU_X: - if (pressed && ProfileManager.IsFullVersion()) { - unsigned int uiIDA[2]; - uiIDA[0] = IDS__NETWORK_PSN; - uiIDA[1] = IDS_NETWORK_ADHOC; - ui.RequestErrorMessage( - IDS_SELECT_NETWORK_MODE_TITLE, IDS_SELECT_NETWORK_MODE_TEXT, - uiIDA, 2, XUSER_INDEX_ANY, - &UIScene_MainMenu::SelectNetworkModeReturned, this); - } - break; -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: @@ -294,43 +210,21 @@ void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed, void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) { int primaryPad = ProfileManager.GetPrimaryPad(); -#if 0 - int (*signInReturnedFunc)(void*, const bool, const int iPad, - const int iController) = NULL; -#else int (*signInReturnedFunc)(void*, const bool, const int iPad) = NULL; -#endif switch ((int)controlId) { case eControl_PlayGame: -#if 0 - { - m_bIgnorePress = true; - - // CD - Added for audio - ui.PlayUISFX(eSFX_Press); - - ProfileManager.RefreshChatAndContentRestrictions( - RefreshChatAndContentRestrictionsReturned_PlayGame, this); - } -#else m_eAction = eAction_RunGame; // CD - Added for audio ui.PlayUISFX(eSFX_Press); signInReturnedFunc = &UIScene_MainMenu::CreateLoad_SignInReturned; -#endif break; case eControl_Leaderboards: // CD - Added for audio ui.PlayUISFX(eSFX_Press); -#if 0 - ProfileManager.RefreshChatAndContentRestrictions( - RefreshChatAndContentRestrictionsReturned_Leaderboards, this); -#else m_eAction = eAction_RunLeaderboards; signInReturnedFunc = &UIScene_MainMenu::Leaderboards_SignInReturned; -#endif break; case eControl_Achievements: // CD - Added for audio @@ -364,9 +258,6 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) { IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2, XUSER_INDEX_ANY, &UIScene_MainMenu::ExitGameReturned, this); } else { -#if 0 - ui.ShowPlayerDisplayname(true); -#endif ui.NavigateToScene(primaryPad, eUIScene_TrialExitUpsell); } break; @@ -417,14 +308,6 @@ void UIScene_MainMenu::RunAction(int iPad) { case eAction_RunUnlockOrDLC: RunUnlockOrDLC(iPad); break; -#if 0 - case eAction_RunXboxHelp: - // 4J: Launch the dummy xbox help application. - WXS::User ^ user = - ProfileManager.GetUser(ProfileManager.GetPrimaryPad()); - Windows::Xbox::ApplicationModel::Help::Show(user); - break; -#endif default: break; } @@ -526,13 +409,6 @@ int UIScene_MainMenu::MustSignInReturned(void* pParam, int iPad, &UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass, iPad); break; -#if 0 - case eAction_RunXboxHelp: - ProfileManager.RequestSignInUI( - false, false, true, false, true, - &UIScene_MainMenu::XboxHelp_SignInReturned, pClass, iPad); - break; -#endif default: break; } @@ -552,104 +428,9 @@ int UIScene_MainMenu::MustSignInReturned(void* pParam, int iPad, return 0; } -#if 0 || 0 || 0 -int UIScene_MainMenu::MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result) { - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - // we need to specify local game here to display local and LIVE profiles - // in the list - switch (pClass->m_eAction) { - case eAction_RunLeaderboardsPSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_MainMenu::Leaderboards_SignInReturned, pClass); - break; - case eAction_RunGamePSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_MainMenu::CreateLoad_SignInReturned, pClass); - break; - case eAction_RunUnlockOrDLCPSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass); - break; - } -#elif 0 - switch (pClass->m_eAction) { - case eAction_RunLeaderboardsPSN: - // CD - Must force Ad-Hoc off if they want leaderboard PSN - // sign-in Save settings change - app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0); - // Force off - CGameNetworkManager::setAdhocMode(false); - // Now Sign-in - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_MainMenu::Leaderboards_SignInReturned, pClass); - break; - case eAction_RunGamePSN: - if (CGameNetworkManager::usingAdhocMode()) { - SQRNetworkManager_AdHoc_Vita::AttemptAdhocSignIn( - &UIScene_MainMenu::CreateLoad_SignInReturned, pClass); - } else { - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_MainMenu::CreateLoad_SignInReturned, pClass); - } - break; - case eAction_RunUnlockOrDLCPSN: - // CD - Must force Ad-Hoc off if they want commerce PSN sign-in - // Save settings change - app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0); - // Force off - CGameNetworkManager::setAdhocMode(false); - // Now Sign-in - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass); - break; - } -#else - switch (pClass->m_eAction) { - case eAction_RunLeaderboardsPSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_MainMenu::Leaderboards_SignInReturned, pClass, - true, iPad); - break; - case eAction_RunGamePSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_MainMenu::CreateLoad_SignInReturned, pClass, true, - iPad); - break; - case eAction_RunUnlockOrDLCPSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_MainMenu::UnlockFullGame_SignInReturned, pClass, - true, iPad); - break; - } - -#endif - } else { - if (pClass->m_eAction == eAction_RunGamePSN) { - if (result == C4JStorage::EMessage_Cancelled) - CreateLoad_SignInReturned(pClass, false, 0); - else - CreateLoad_SignInReturned(pClass, true, 0); - } else { - pClass->m_bIgnorePress = false; - } - } - - return 0; -} -#endif - -#if 0 -int UIScene_MainMenu::HelpAndOptions_SignInReturned(void* pParam, - bool bContinue, int iPad, - int iController) -#else int UIScene_MainMenu::HelpAndOptions_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; @@ -664,9 +445,6 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void* pParam, #endif { ProfileManager.SetLockedProfile(ProfileManager.GetPrimaryPad()); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(iPad, eUIScene_HelpAndOptionsMenu); } #if TO_BE_IMPLEMENTED @@ -704,23 +482,9 @@ int UIScene_MainMenu::HelpAndOptions_SignInReturned(void* pParam, return 0; } -#if 0 -int UIScene_MainMenu::ChooseUser_SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) { - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - pClass->m_bIgnorePress = false; - pClass->updateTooltips(); - return 0; -} -#endif -#if 0 -int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) -#else int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; @@ -745,19 +509,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, if (ProfileManager.IsFullVersion()) { bool bSignedInLive = ProfileManager.IsSignedInLive(iPad); -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - if (SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) { - bSignedInLive = true; - } else { - // adhoc mode, but we didn't make the connection, turn - // off adhoc mode, and just go with whatever the regular - // online status is - CGameNetworkManager::setAdhocMode(false); - bSignedInLive = ProfileManager.IsSignedInLive(iPad); - } - } -#endif // Check if we're signed in to LIVE if (bSignedInLive) { @@ -772,43 +523,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, 1); } else { // 4J Stu - Not relevant to PS3 -#if 0 - // if(app.GetTMSDLCInfoRead() - //&& app.GetBanListRead(iPad)) - if (app.GetBanListRead(iPad)) { - Minecraft* pMinecraft = Minecraft::GetInstance(); - pMinecraft->user->name = - convStringToWstring(ProfileManager.GetGamertag( - ProfileManager.GetPrimaryPad())); - - // ensure we've applied this player's settings - app.ApplyGameSettingsChanged(iPad); - -#if 0 - ui.ShowPlayerDisplayname(true); -#endif - proceedToScene(ProfileManager.GetPrimaryPad(), - eUIScene_LoadOrJoinMenu); - } else { - app.SetTMSAction( - iPad, - eTMSAction_TMSPP_RetrieveFiles_RunPlayGame); - - // block all input - pClass->m_bIgnorePress = true; - // We want to hide everything in this scene and - // display a timer until we get a completion for the - // TMS files - // for(int i=0;iupdateTooltips(); - - pClass->m_controlTimer.setVisible(true); - } -#endif #if TO_BE_IMPLEMENTED // check if all the TMS files are loaded if (app.GetTMSDLCInfoRead() && @@ -858,9 +572,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, // ensure we've applied this player's settings app.ApplyGameSettingsChanged(iPad); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu); #endif @@ -874,9 +585,6 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, #else app.DebugPrintf( "Offline Profile returned not implemented\n"); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu); #endif @@ -889,18 +597,7 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, // ensure we've applied this player's settings // app.ApplyGameSettingsChanged(iPad); -#if 0 || 0 || 0 - // ensure we've applied this player's settings - we do have them - // on PS3 - app.ApplyGameSettingsChanged(iPad); -#endif -#if 0 - if (!g_NetworkManager.IsReadyToPlayOrIdle()) { - pClass->m_bLoadTrialOnNetworkManagerReady = true; - ui.NavigateToScene(iPad, eUIScene_Timer); - } else -#endif { // go straight in to the trial level LoadTrial(); @@ -923,13 +620,8 @@ int UIScene_MainMenu::CreateLoad_SignInReturned(void* pParam, bool bContinue, return 0; } -#if 0 -int UIScene_MainMenu::Leaderboards_SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) -#else int UIScene_MainMenu::Leaderboards_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; @@ -953,14 +645,9 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void* pParam, bool bContinue, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1); } else { bool bContentRestricted = false; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions( - iPad, true, NULL, &bContentRestricted, NULL); -#endif if (bContentRestricted) { pClass->m_bIgnorePress = false; -#if !(0 || defined(_WINDOWS64) || \ - 0) // 4J Stu - Temp to get the win build running, but so +#if !defined(_WINDOWS64) // we check this for other platforms // you can't see leaderboards unsigned int uiIDA[1]; @@ -971,9 +658,6 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void* pParam, bool bContinue, #endif } else { ProfileManager.SetLockedProfile(ProfileManager.GetPrimaryPad()); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LeaderboardsMenu); } @@ -993,13 +677,8 @@ int UIScene_MainMenu::Leaderboards_SignInReturned(void* pParam, bool bContinue, return 0; } -#if 0 -int UIScene_MainMenu::Achievements_SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) -#else int UIScene_MainMenu::Achievements_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; @@ -1026,14 +705,8 @@ int UIScene_MainMenu::Achievements_SignInReturned(void* pParam, bool bContinue, return 0; } -#if 0 -int UIScene_MainMenu::UnlockFullGame_SignInReturned(void* pParam, - bool bContinue, int iPad, - int iController) -#else int UIScene_MainMenu::UnlockFullGame_SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; @@ -1060,31 +733,6 @@ int UIScene_MainMenu::UnlockFullGame_SignInReturned(void* pParam, return 0; } -#if 0 -int UIScene_MainMenu::XboxHelp_SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) { - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - - if (bContinue) { - // 4J: Launch the dummy xbox help application. - WXS::User ^ user = - ProfileManager.GetUser(ProfileManager.GetPrimaryPad()); - Windows::Xbox::ApplicationModel::Help::Show(user); - } else { - // unlock the profile - ProfileManager.SetLockedProfile(-1); - for (int i = 0; i < XUSER_MAX_COUNT; i++) { - // if the user is valid, we should set the presence - if (ProfileManager.IsSignedIn(i)) { - ProfileManager.SetCurrentGameActivity(i, CONTEXT_PRESENCE_MENUS, - false); - } - } - } - - return 0; -} -#endif int UIScene_MainMenu::ExitGameReturned(void* pParam, int iPad, C4JStorage::EMessageResult result) { @@ -1099,195 +747,6 @@ int UIScene_MainMenu::ExitGameReturned(void* pParam, int iPad, return 0; } -#if 0 -void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame( - void* pParam) { - int primaryPad = ProfileManager.GetPrimaryPad(); - - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - - int (*signInReturnedFunc)(void*, const bool, const int iPad) = NULL; - - // 4J-PB - Check if there is a patch for the game - pClass->m_errorCode = - ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad()); - - bool bPatchAvailable; - switch (pClass->m_errorCode) { - case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST: - case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED: - bPatchAvailable = true; - break; - default: - bPatchAvailable = false; - break; - } - - if (!bPatchAvailable) { - pClass->m_eAction = eAction_RunGame; - signInReturnedFunc = &UIScene_MainMenu::CreateLoad_SignInReturned; - } else { - pClass->m_bRunGameChosen = true; - pClass->m_bErrorDialogRunning = true; - int32_t ret = sceErrorDialogInitialize(); - if (ret == SCE_OK) { - SceErrorDialogParam param; - sceErrorDialogParamInitialize(¶m); - // 4J-PB - We want to display the option to get the patch now - param.errorCode = - SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED; // pClass->m_errorCode; - ret = sceUserServiceGetInitialUser(¶m.userId); - if (ret == SCE_OK) { - ret = sceErrorDialogOpen(¶m); - } - return; - } - - // unsigned int uiIDA[1]; - // uiIDA[0]=IDS_OK; - // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, - // IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass); - } - - // Check if PSN is unavailable because of age restriction - if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad(), - &UIScene_MainMenu::PlayOfflineReturned, pClass); - - return; - } - - bool confirmUser = false; - - // Note: if no sign in returned func, assume this isn't required - if (signInReturnedFunc != NULL) { - if (ProfileManager.IsSignedIn(primaryPad)) { - if (confirmUser) { - ProfileManager.RequestSignInUI(false, false, true, false, true, - signInReturnedFunc, pClass, - primaryPad); - } else { - pClass->RunAction(primaryPad); - } - } else { - // Ask user to sign in - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - ui.RequestErrorMessage( - IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, - primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass); - } - } -} - -void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_Leaderboards( - void* pParam) { - int primaryPad = ProfileManager.GetPrimaryPad(); - - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - - int (*signInReturnedFunc)(void*, const bool, const int iPad) = NULL; - - // 4J-PB - Check if there is a patch for the game - pClass->m_errorCode = - ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad()); - - bool bPatchAvailable; - switch (pClass->m_errorCode) { - case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST: - case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED: - bPatchAvailable = true; - break; - default: - bPatchAvailable = false; - break; - } - - if (!bPatchAvailable) { - pClass->m_eAction = eAction_RunLeaderboards; - signInReturnedFunc = &UIScene_MainMenu::Leaderboards_SignInReturned; - } else { - int32_t ret = sceErrorDialogInitialize(); - pClass->m_bErrorDialogRunning = true; - if (ret == SCE_OK) { - SceErrorDialogParam param; - sceErrorDialogParamInitialize(¶m); - // 4J-PB - We want to display the option to get the patch now - param.errorCode = - SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED; // pClass->m_errorCode; - ret = sceUserServiceGetInitialUser(¶m.userId); - if (ret == SCE_OK) { - ret = sceErrorDialogOpen(¶m); - } - } - - // unsigned int uiIDA[1]; - // uiIDA[0]=IDS_OK; - // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, - // IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,pClass); - } - - bool confirmUser = false; - - // Update error code - pClass->m_errorCode = - ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad()); - - // Check if PSN is unavailable because of age restriction - if (pClass->m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad(), nullptr, pClass); - - return; - } - - // Note: if no sign in returned func, assume this isn't required - if (signInReturnedFunc != NULL) { - if (ProfileManager.IsSignedIn(primaryPad)) { - if (confirmUser) { - ProfileManager.RequestSignInUI(false, false, true, false, true, - signInReturnedFunc, pClass, - primaryPad); - } else { - pClass->RunAction(primaryPad); - } - } else { - // Ask user to sign in - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - ui.RequestErrorMessage( - IDS_MUST_SIGN_IN_TITLE, IDS_MUST_SIGN_IN_TEXT, uiIDA, 2, - primaryPad, &UIScene_MainMenu::MustSignInReturned, pClass); - } - } -} - -int UIScene_MainMenu::PlayOfflineReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result) { - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - if (pClass->m_eAction == eAction_RunGame) { - CreateLoad_SignInReturned(pClass, true, 0); - } else { - pClass->m_bIgnorePress = false; - } - } else { - pClass->m_bIgnorePress = false; - } - - return 0; -} -#endif void UIScene_MainMenu::RunPlayGame(int iPad) { Minecraft* pMinecraft = Minecraft::GetInstance(); @@ -1318,140 +777,12 @@ void UIScene_MainMenu::RunPlayGame(int iPad) { if (ProfileManager.IsFullVersion()) { // are we offline? bool bSignedInLive = ProfileManager.IsSignedInLive(iPad); -#if 0 - if (app.GetGameSettings(ProfileManager.GetPrimaryPad(), - eGameSetting_PSVita_NetworkModeAdhoc) == - true) { - CGameNetworkManager::setAdhocMode(true); - bSignedInLive = SQRNetworkManager_AdHoc_Vita::GetAdhocStatus(); - app.DebugPrintf("Adhoc mode signed in : %s\n", - bSignedInLive ? "true" : "false"); - } else { - CGameNetworkManager::setAdhocMode(false); - app.DebugPrintf("PSN mode signed in : %s\n", - bSignedInLive ? "true" : "false"); - } - -#endif //0 if (!bSignedInLive) { -#if 0 || 0 - // enable input again - m_bIgnorePress = false; - - // Not sure why 360 doesn't need this, but leaving as 0 - // only for now until we see that it does. Without this, on a - // PS3 offline game, the primary player just gets the default - // Player1234 type name - pMinecraft->user->name = convStringToWstring( - ProfileManager.GetGamertag(ProfileManager.GetPrimaryPad())); - - m_eAction = eAction_RunGamePSN; - // get them to sign in to online - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - -#if 0 - if (CGameNetworkManager::usingAdhocMode()) { - uiIDA[0] = IDS_NETWORK_ADHOC; - // this should be "Connect to adhoc network" - ui.RequestErrorMessage( - IDS_PRO_NOTADHOCONLINE_TITLE, - IDS_PRO_NOTADHOCONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &UIScene_MainMenu::MustSignInReturnedPSN, this); - } else { - /* 4J-PB - Add this after release - // Determine why they're not "signed in live" - if (ProfileManager.IsSignedInPSN(iPad)) - { - m_eAction=eAction_RunGame; - // Signed in to PSN but not connected (no internet - access) - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestMessageBox( IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, iPad, - UIScene_MainMenu::PlayOfflineReturned, this, - app.GetStringTable()); - } - else - { - m_eAction=eAction_RunGamePSN; - // Not signed in to PSN - ui.RequestMessageBox( IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, iPad, - &UIScene_MainMenu::MustSignInReturnedPSN, this, - app.GetStringTable()); return; - } */ - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, ProfileManager.GetPrimaryPad(), - &UIScene_MainMenu::MustSignInReturnedPSN, this); - } -#else - - ui.RequestErrorMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - iPad, &UIScene_MainMenu::MustSignInReturnedPSN, this); -#endif - -#elif 0 - - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(iPad)) { - m_eAction = eAction_RunGame; - // Signed in to PSN but not connected (no internet access) - assert(!ProfileManager.isConnectedToPSN(iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage( - IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, - iPad, UIScene_MainMenu::PlayOfflineReturned, this); - } else { - m_eAction = eAction_RunGamePSN; - // Not signed in to PSN - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, iPad, &UIScene_MainMenu::MustSignInReturnedPSN, - this); - return; - } -#else ProfileManager.SetLockedProfile(iPad); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_LoadOrJoinMenu); -#endif } else { -#if 0 - if (!app.GetBanListRead(iPad)) { - app.SetTMSAction( - iPad, eTMSAction_TMSPP_RetrieveFiles_RunPlayGame); - - // block all input - m_bIgnorePress = true; - // We want to hide everything in this scene and display a - // timer until we get a completion for the TMS files - // for(int - // i=0;im_errorCode; - ret = sceUserServiceGetInitialUser(¶m.userId); - if (ret == SCE_OK) { - ret = sceErrorDialogOpen(¶m); - } - } - - // unsigned int uiIDA[1]; - // uiIDA[0]=IDS_OK; - // ui.RequestMessageBox(IDS_PATCH_AVAILABLE_TITLE, - // IDS_PATCH_AVAILABLE_TEXT, uiIDA, 1, XUSER_INDEX_ANY,NULL,this); - return; - } - - // Check if PSN is unavailable because of age restriction - if (m_errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - m_bIgnorePress = false; - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage( - IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad(), nullptr, this); - - return; - } -#endif // downloadable content if (ProfileManager.IsSignedInLive(iPad)) { if (ProfileManager.IsGuest(iPad)) { @@ -1715,19 +919,11 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) { // this to happen ProfileManager.QuerySigninStatus(); -#if 0 - if (app.GetTMSDLCInfoRead()) -#endif { bool bContentRestricted = false; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions( - iPad, true, NULL, &bContentRestricted, NULL); -#endif if (bContentRestricted) { m_bIgnorePress = false; -#if !(0 || defined(_WINDOWS64) || \ - 0) // 4J Stu - Temp to get the win build running, but so +#if !defined(_WINDOWS64) // we check this for other platforms // you can't see the store unsigned int uiIDA[1]; @@ -1739,35 +935,10 @@ void UIScene_MainMenu::RunUnlockOrDLC(int iPad) { #endif } else { ProfileManager.SetLockedProfile(iPad); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(ProfileManager.GetPrimaryPad(), eUIScene_DLCMainMenu); } } -#if 0 - else { - // Changing to async TMS calls - app.SetTMSAction(iPad, - eTMSAction_TMSPP_RetrieveFiles_DLCMain); - - // block all input - m_bIgnorePress = true; - // We want to hide everything in this scene and display a - // timer until we get a completion for the TMS files - // for(int - // i=0;iRecordUpsellPresented( iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID); ProfileManager.DisplayFullVersionPurchase( false, iPad, eSen_UpsellID_Full_Version_Of_Game); -#endif } } } @@ -1912,152 +1010,15 @@ void UIScene_MainMenu::tick() { if ((eNavigateWhenReady >= 0)) { int lockedProfile = ProfileManager.GetLockedProfile(); -#if 0 - // 4J-JEV: DLC menu contains text localised to system language - // which we can't change. We need to switch to - // this language in-case it uses a different font. - if (eNavigateWhenReady == eUIScene_DLCMainMenu) - setLanguageOverride(false); - - bool isSignedIn; - C4JStorage::eOptionsCallback status; - bool pendingFontChange; - if (lockedProfile >= 0) { - isSignedIn = ProfileManager.IsSignedIn(lockedProfile); - status = app.GetOptionsCallbackStatus(lockedProfile); - pendingFontChange = ui.PendingFontChange(); - - if (status == C4JStorage::eOptions_Callback_Idle) { - // make sure the TMS banned list data is ditched - the player - // may have gone in to help & options, backed out, and signed - // out - app.InvalidateBannedList(lockedProfile); - - // need to ditch any DLCOffers info - StorageManager.ClearDLCOffers(); - app.ClearAndResetDLCDownloadQueue(); - app.ClearDLCInstalled(); - } - } - - if ((lockedProfile >= 0) && isSignedIn && - ((status == C4JStorage::eOptions_Callback_Read) || - (status == C4JStorage::eOptions_Callback_Write)) && - !pendingFontChange) -#endif { app.DebugPrintf("[MainMenu] Navigating away from MainMenu.\n"); ui.NavigateToScene(lockedProfile, (EUIScene)eNavigateWhenReady); eNavigateWhenReady = -1; } -#if 0 - else { - app.DebugPrintf( - "[MainMenu] Delaying navigation: lockedProfile=%i, %s, " - "status=%ls, %s.\n", - lockedProfile, isSignedIn ? "SignedIn" : "SignedOut", - app.toStringOptionsStatus(status).c_str(), - pendingFontChange ? "Pending font change" : "font OK"); - } -#endif } -#if 0 || 0 || 0 - if (m_bLaunchFullVersionPurchase) { - int iCommerceState = app.GetCommerceState(); - // 4J-PB - if there's a commerce error - store down, player can't access - // store - let the DisplayFullVersionPurchase show the error - if ((iCommerceState == CConsoleMinecraftApp::eCommerce_State_Online) || - (iCommerceState == CConsoleMinecraftApp::eCommerce_State_Error)) { - m_bLaunchFullVersionPurchase = false; - m_bIgnorePress = false; - updateTooltips(); - // 4J-PB - need to check this user can access the store - bool bContentRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else { - TelemetryManager->RecordUpsellPresented( - ProfileManager.GetPrimaryPad(), - eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID); - ProfileManager.DisplayFullVersionPurchase( - false, ProfileManager.GetPrimaryPad(), - eSen_UpsellID_Full_Version_Of_Game); - } - } - } - // 4J-PB - check for a trial version changing to a full version - if (m_bTrialVersion) { - if (ProfileManager.IsFullVersion()) { - m_bTrialVersion = false; - m_buttons[(int)eControl_UnlockOrDLC].init( - app.GetString(IDS_DOWNLOADABLECONTENT), eControl_UnlockOrDLC); - } - } -#endif - -#if 0 - if (m_bWaitingForDLCInfo) { - if (app.GetTMSDLCInfoRead()) { - m_bWaitingForDLCInfo = false; - ProfileManager.SetLockedProfile(m_iPad); - proceedToScene(ProfileManager.GetPrimaryPad(), - eUIScene_DLCMainMenu); - } - } - - if (g_NetworkManager.ShouldMessageForFullSession()) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_CONNECTION_FAILED, IDS_IN_PARTY_SESSION_FULL, - uiIDA, 1, ProfileManager.GetPrimaryPad()); - } -#endif - -#if 0 - - // process the error dialog (for a patch being available) - // SQRNetworkManager_Orbis::tickErrorDialog also runs the error dialog, so - // wrap this so this doesn't terminate a signin dialog - if (m_bErrorDialogRunning) { - SceErrorDialogStatus stat = sceErrorDialogUpdateStatus(); - if (stat == SCE_ERROR_DIALOG_STATUS_FINISHED) { - sceErrorDialogTerminate(); - // if m_bRunGameChosen is true, we're here after selecting play - // game, and we should let the user continue with an offline game - if (m_bRunGameChosen) { - m_bRunGameChosen = false; - m_eAction = eAction_RunGame; - - // give the option of continuing offline - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION_PATCH_AVAILABLE, - uiIDA, 1, ProfileManager.GetPrimaryPad(), - &UIScene_MainMenu::PlayOfflineReturned, - this); - } - m_bErrorDialogRunning = false; - } - } - - if (m_bLoadTrialOnNetworkManagerReady && - g_NetworkManager.IsReadyToPlayOrIdle()) { - m_bLoadTrialOnNetworkManagerReady = false; - LoadTrial(); - } - -#endif } void UIScene_MainMenu::RunAchievements(int iPad) { @@ -2093,9 +1054,6 @@ void UIScene_MainMenu::RunHelpAndOptions(int iPad) { #endif { ProfileManager.SetLockedProfile(iPad); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif proceedToScene(iPad, eUIScene_HelpAndOptionsMenu); } #if TO_BE_IMPLEMENTED @@ -2147,9 +1105,7 @@ void UIScene_MainMenu::LoadTrial(void) { // not online for the trial game g_NetworkManager.HostGame(0, false, true, MINECRAFT_NET_MAX_PLAYERS, 0); -#if 1 g_NetworkManager.FakeLocalPlayerJoined(); -#endif NetworkGameInitData* param = new NetworkGameInitData(); param->seed = 0; @@ -2174,9 +1130,6 @@ void UIScene_MainMenu::LoadTrial(void) { ui.ShowTrialTimer(true); -#if 0 - ui.ShowPlayerDisplayname(true); -#endif ui.NavigateToScene(ProfileManager.GetPrimaryPad(), eUIScene_FullscreenProgress, loadingParams); } @@ -2186,19 +1139,3 @@ void UIScene_MainMenu::handleUnlockFullVersion() { true); } -#if 0 -int UIScene_MainMenu::SelectNetworkModeReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; - - if (result == C4JStorage::EMessage_ResultAccept) { - app.DebugPrintf("Setting network mode to PSN\n"); - app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0); - } else if (result == C4JStorage::EMessage_ResultDecline) { - app.DebugPrintf("Setting network mode to Adhoc\n"); - app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 1); - } - pClass->updateTooltips(); - return 0; -} -#endif //0 diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.h index d8e050653..23daa2d7b 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_MainMenu.h @@ -39,13 +39,7 @@ private: bool m_bIgnorePress; bool m_bTrialVersion; bool m_bLoadTrialOnNetworkManagerReady; -#if 0 || 0 || 0 - bool m_bLaunchFullVersionPurchase; -#endif -#if 0 - bool m_bWaitingForDLCInfo; -#endif float m_fScreenWidth, m_fScreenHeight; float m_fRawWidth, m_fRawHeight; @@ -69,13 +63,6 @@ private: eAction_RunAchievements, eAction_RunHelpAndOptions, eAction_RunUnlockOrDLC, -#if 0 || 0 || 0 - eAction_RunLeaderboardsPSN, - eAction_RunGamePSN, - eAction_RunUnlockOrDLCPSN, -#elif 0 - eAction_RunXboxHelp, -#endif }; eActions m_eAction; @@ -93,9 +80,7 @@ public: virtual ~UIScene_MainMenu(); // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif virtual void updateTooltips(); virtual void updateComponents(); @@ -145,25 +130,12 @@ private: static int MustSignInReturned(void* pParam, int iPad, C4JStorage::EMessageResult result); -#if 0 || 0 || 0 - static int MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif static int Leaderboards_SignInReturned(void* pParam, bool bContinue, int iPad); static int UnlockFullGame_SignInReturned(void* pParam, bool bContinue, int iPad); static int ExitGameReturned(void* pParam, int iPad, C4JStorage::EMessageResult result); -#if 0 - static void RefreshChatAndContentRestrictionsReturned_PlayGame( - void* pParam); - static void RefreshChatAndContentRestrictionsReturned_Leaderboards( - void* pParam); - - static int PlayOfflineReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif bool m_bRunGameChosen; int32_t m_errorCode; bool m_bErrorDialogRunning; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_MessageBox.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_MessageBox.cpp index 130e47818..441578776 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_MessageBox.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_MessageBox.cpp @@ -55,9 +55,6 @@ UIScene_MessageBox::UIScene_MessageBox(int iPad, void* initData, parentLayer->addComponent(iPad, eUIComponent_MenuBackground); // 4J-TomK - rebuild touch after auto resize -#if 0 - ui.TouchBoxRebuild(this); -#endif } UIScene_MessageBox::~UIScene_MessageBox() { @@ -111,9 +108,6 @@ void UIScene_MessageBox::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.cpp index 8d060bef1..81b65b7ac 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.cpp @@ -36,9 +36,6 @@ UIScene_NewUpdateMessage::UIScene_NewUpdateMessage(int iPad, void* initData, m_bIgnoreInput = false; -#if 0 - ui.TouchBoxRebuild(this); -#endif } UIScene_NewUpdateMessage::~UIScene_NewUpdateMessage() { @@ -57,11 +54,6 @@ void UIScene_NewUpdateMessage::handleInput(int iPad, int key, bool repeat, bool& handled) { if (m_bIgnoreInput) return; -#if 0 - // ignore all players except player 0 - it's their profile that is currently - // being used - if (iPad != 0) return; -#endif ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); @@ -78,9 +70,6 @@ void UIScene_NewUpdateMessage::handleInput(int iPad, int key, bool repeat, app.CheckGameSettingsChanged(true, m_iPad); ui.NavigateBack(m_iPad); } break; -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_OK: case ACTION_MENU_DOWN: case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.h b/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.h index 6d4fe5685..a0fdb8b4c 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_NewUpdateMessage.h @@ -24,9 +24,7 @@ public: virtual EUIScene getSceneType() { return eUIScene_EULA; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif virtual void updateTooltips(); protected: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp index 80ec496e2..023e6aada 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.cpp @@ -7,13 +7,7 @@ #include "../../Minecraft.Client/Textures/Packs/TexturePack.h" #include "../../Minecraft.Client/Textures/Packs/DLCTexturePack.h" #include "../../Minecraft.World/Util/StringHelpers.h" -#if 0 -#include -#endif -#if 0 || 0 -#define USE_SONY_REMOTE_STORAGE -#endif UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void* initData, UILayer* parentLayer) @@ -31,43 +25,8 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void* initData, BUTTON_PAUSE_LEADERBOARDS); m_buttons[BUTTON_PAUSE_ACHIEVEMENTS].init(app.GetString(IDS_ACHIEVEMENTS), BUTTON_PAUSE_ACHIEVEMENTS); -#if 0 || 0 - m_bTrialTexturePack = false; - if (!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) { - TexturePack* tPack = Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - m_pDLCPack = - pDLCTexPack->getDLCInfoParentPack(); // tPack->getDLCPack(); - - if (!m_pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture, L"")) { - m_bTrialTexturePack = true; - } - } - - // 4J-TomK - check for all possible labels being fed into - // BUTTON_PAUSE_SAVEGAME (Bug 163775) this has to be done before button - // initialisation! - wchar_t saveButtonLabels[2][256]; - swprintf(saveButtonLabels[0], 256, L"%ls", app.GetString(IDS_SAVE_GAME)); - swprintf(saveButtonLabels[1], 256, L"%ls", - app.GetString(IDS_DISABLE_AUTOSAVE)); - m_buttons[BUTTON_PAUSE_SAVEGAME].setAllPossibleLabels(2, saveButtonLabels); - - if (app.GetGameHostOption(eGameHostOption_DisableSaving) || - m_bTrialTexturePack) { - m_savesDisabled = true; - m_buttons[BUTTON_PAUSE_SAVEGAME].init(app.GetString(IDS_SAVE_GAME), - BUTTON_PAUSE_SAVEGAME); - } else { - m_savesDisabled = false; - m_buttons[BUTTON_PAUSE_SAVEGAME].init( - app.GetString(IDS_DISABLE_AUTOSAVE), BUTTON_PAUSE_SAVEGAME); - } -#else m_buttons[BUTTON_PAUSE_SAVEGAME].init(app.GetString(IDS_SAVE_GAME), BUTTON_PAUSE_SAVEGAME); -#endif m_buttons[BUTTON_PAUSE_EXITGAME].init(app.GetString(IDS_EXIT_GAME), BUTTON_PAUSE_EXITGAME); @@ -136,41 +95,8 @@ std::wstring UIScene_PauseMenu::getMoviePath() { void UIScene_PauseMenu::tick() { UIScene::tick(); -#if 0 - // 4J-MGH - Need to check for installed DLC here, as we delay the - // installation of the key file on Vita - if (!app.DLCInstallProcessCompleted()) app.StartInstallDLCProcess(0); -#endif -#if 0 || 0 - if (!m_bTrialTexturePack && - m_savesDisabled != - (app.GetGameHostOption(eGameHostOption_DisableSaving) != 0) && - ProfileManager.GetPrimaryPad() == m_iPad) { - // We show the save button if saves are disabled as this lets us show a - // prompt to enable them (via purchasing a texture pack) - if (app.GetGameHostOption(eGameHostOption_DisableSaving)) { - m_savesDisabled = true; - m_buttons[BUTTON_PAUSE_SAVEGAME].setLabel( - app.GetString(IDS_SAVE_GAME)); - } else { - m_savesDisabled = false; - m_buttons[BUTTON_PAUSE_SAVEGAME].setLabel( - app.GetString(IDS_DISABLE_AUTOSAVE)); - } - } -#endif -#if 0 - // Process the error dialog (for a patch being available) - if (m_bErrorDialogRunning) { - SceErrorDialogStatus stat = sceErrorDialogUpdateStatus(); - if (stat == SCE_ERROR_DIALOG_STATUS_FINISHED) { - sceErrorDialogTerminate(); - m_bErrorDialogRunning = false; - } - } -#endif } void UIScene_PauseMenu::updateTooltips() { @@ -178,43 +104,25 @@ void UIScene_PauseMenu::updateTooltips() { bool bIsisPrimaryHost = g_NetworkManager.IsHost() && (ProfileManager.GetPrimaryPad() == m_iPad); -#if 0 - bool bDisplayBanTip = !g_NetworkManager.IsLocalGame() && - !bIsisPrimaryHost && !ProfileManager.IsGuest(m_iPad); -#endif int iY = -1; -#if 0 || 0 - if (m_iPad == ProfileManager.GetPrimaryPad()) - iY = IDS_TOOLTIPS_GAME_INVITES; -#endif int iRB = -1; int iX = -1; if (ProfileManager.IsFullVersion()) { if (StorageManager.GetSaveDisabled()) { iX = bIsisPrimaryHost ? IDS_TOOLTIPS_SELECTDEVICE : -1; -#if 0 - iRB = bDisplayBanTip ? IDS_TOOLTIPS_BANLEVEL : -1; -#endif if (CSocialManager::Instance()->IsTitleAllowedToPostImages() && CSocialManager::Instance()->AreAllUsersAllowedToPostImages() && bUserisClientSide) { -#if 1 iY = IDS_TOOLTIPS_SHARE; -#endif } } else { iX = bIsisPrimaryHost ? IDS_TOOLTIPS_CHANGEDEVICE : -1; -#if 0 - iRB = bDisplayBanTip ? IDS_TOOLTIPS_BANLEVEL : -1; -#endif if (CSocialManager::Instance()->IsTitleAllowedToPostImages() && CSocialManager::Instance()->AreAllUsersAllowedToPostImages() && bUserisClientSide) { -#if 1 iY = IDS_TOOLTIPS_SHARE; -#endif } } } @@ -233,42 +141,12 @@ void UIScene_PauseMenu::updateComponents() { } void UIScene_PauseMenu::handlePreReload() { -#if 0 || 0 - if (ProfileManager.GetPrimaryPad() == m_iPad) { - // 4J-TomK - check for all possible labels being fed into - // BUTTON_PAUSE_SAVEGAME (Bug 163775) this has to be done before button - // initialisation! - wchar_t saveButtonLabels[2][256]; - swprintf(saveButtonLabels[0], 256, L"%ls", - app.GetString(IDS_SAVE_GAME)); - swprintf(saveButtonLabels[1], 256, L"%ls", - app.GetString(IDS_DISABLE_AUTOSAVE)); - m_buttons[BUTTON_PAUSE_SAVEGAME].setAllPossibleLabels(2, - saveButtonLabels); - } -#endif } void UIScene_PauseMenu::handleReload() { updateTooltips(); updateControlsVisibility(); -#if 0 || 0 - if (ProfileManager.GetPrimaryPad() == m_iPad) { - // We show the save button if saves are disabled as this lets us show a - // prompt to enable them (via purchasing a texture pack) - if (app.GetGameHostOption(eGameHostOption_DisableSaving) || - m_bTrialTexturePack) { - m_savesDisabled = true; - m_buttons[BUTTON_PAUSE_SAVEGAME].setLabel( - app.GetString(IDS_SAVE_GAME)); - } else { - m_savesDisabled = false; - m_buttons[BUTTON_PAUSE_SAVEGAME].setLabel( - app.GetString(IDS_DISABLE_AUTOSAVE)); - } - } -#endif doHorizontalResizeCheck(); } @@ -288,16 +166,8 @@ void UIScene_PauseMenu::updateControlsVisibility() { if (app.GetLocalPlayerCount() > 1) { // Hide the BUTTON_PAUSE_LEADERBOARDS and BUTTON_PAUSE_ACHIEVEMENTS removeControl(&m_buttons[BUTTON_PAUSE_LEADERBOARDS], false); -#if 1 removeControl(&m_buttons[BUTTON_PAUSE_ACHIEVEMENTS], false); -#endif } -#if 0 - // MGH added - remove leaderboards in adhoc - if (CGameNetworkManager::usingAdhocMode()) { - removeControl(&m_buttons[BUTTON_PAUSE_LEADERBOARDS], false); - } -#endif if (!g_NetworkManager.IsHost()) { // Hide the BUTTON_PAUSE_SAVEGAME @@ -307,25 +177,14 @@ void UIScene_PauseMenu::updateControlsVisibility() { // Hide the BUTTON_PAUSE_LEADERBOARDS, BUTTON_PAUSE_ACHIEVEMENTS and // BUTTON_PAUSE_SAVEGAME removeControl(&m_buttons[BUTTON_PAUSE_LEADERBOARDS], false); -#if 1 removeControl(&m_buttons[BUTTON_PAUSE_ACHIEVEMENTS], false); -#endif removeControl(&m_buttons[BUTTON_PAUSE_SAVEGAME], false); } // is saving disabled? if (StorageManager.GetSaveDisabled()) { -#if 0 - // disable save button - m_buttons[BUTTON_PAUSE_SAVEGAME].setEnable(false); -#endif } -#if 0 || 0 || 0 - // We don't have a way to display trophies/achievements, so remove the - // button, and we're allowed to not have it on Xbox One - removeControl(&m_buttons[BUTTON_PAUSE_ACHIEVEMENTS], false); -#endif } void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, @@ -340,26 +199,10 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, // pressed?"TRUE":"FALSE", released?"TRUE":"FALSE"); ui.AnimateKeyPress(iPad, key, repeat, pressed, released); -#if 0 - bool bIsisPrimaryHost = - g_NetworkManager.IsHost() && (ProfileManager.GetPrimaryPad() == iPad); - bool bDisplayBanTip = !g_NetworkManager.IsLocalGame() && - !bIsisPrimaryHost && !ProfileManager.IsGuest(iPad); -#endif switch (key) { -#if 0 - case ACTION_MENU_GTC_RESUME: -#endif -#if 0 // not for Orbis - we want to use the pause menu (touchpad - // press) to select a menu item - case ACTION_MENU_PAUSEMENU: -#endif case ACTION_MENU_CANCEL: if (pressed) { -#if 0 - // DurangoStatsDebugger::PrintStats(iPad); -#endif // TODO: proper fix for pausing // 4jcraft: replace IsLocalGame() with GetPlayerCount() == 1 due // to IsLocalGame() issues on Iggy @@ -379,9 +222,6 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: if (pressed) { @@ -409,73 +249,6 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, #endif case ACTION_MENU_Y: { -#if 0 || 0 - if (pressed && iPad == ProfileManager.GetPrimaryPad()) { -#if 0 - // If a patch is available, can't view invites - if (CheckForPatch()) break; -#endif - - // Are we offline? - if (!ProfileManager.IsSignedInLive(iPad)) { - m_eAction = eAction_ViewInvitesPSN; -#if 0 - int npAvailability = ProfileManager.getNPAvailability(iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - // 4J Stu - This is a bit messy and is due to the - // library incorrectly returning false for - // IsSignedInLive is the npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, - 1, iPad); - } else - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(iPad)) { - // Signed in to PSN but not connected (no internet - // access) - assert(!ProfileManager.isConnectedToPSN(iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, - iPad); - } else { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, - uiIDA, 1, iPad, - &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); - } -#else // 0 - // get them to sign in to online - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); -#endif - } else { -#if 0 - SQRNetworkManager_Orbis::RecvInviteGUI(); -#else // 0 - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf( - "sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, - ret); -#endif - } - } -#else #if TO_BE_IMPLEMENTED if (bUserisClientSide) { // 4J Stu - Added check in 1.8.2 bug fix (TU6) to stop repeat @@ -493,24 +266,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, } rfHandled = TRUE; #endif -#endif // 0 } break; -#if 0 - case ACTION_MENU_RIGHT_SCROLL: - if (bDisplayBanTip) { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_ACTION_BAN_LEVEL_TITLE, - IDS_ACTION_BAN_LEVEL_DESCRIPTION, uiIDA, 2, iPad, - &UIScene_PauseMenu::BanGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); - - // rfHandled = TRUE; - } - break; -#endif } } @@ -542,89 +298,15 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, ProfileManager.GetPrimaryPad()); } else if (!ProfileManager.IsSignedInLive(m_iPad)) { -#if 0 - // If a patch is available, can't show leaderboard - if (CheckForPatch()) break; - // Check for content restricted user - // Update error code - int errorCode = ProfileManager.getNPAvailability(m_iPad); - - // Check if PSN is unavailable because of age restriction - if (errorCode == SCE_NP_ERROR_AGE_RESTRICTION) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - m_iPad); - - break; - ; - } - -#endif - -#if 0 || 0 - // get them to sign in to online - m_eAction = eAction_ViewLeaderboardsPSN; - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, - uiIDA, 1, ProfileManager.GetPrimaryPad(), - &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); -#elif 0 - m_eAction = eAction_ViewLeaderboardsPSN; - int npAvailability = ProfileManager.getNPAvailability(m_iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive is the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - m_iPad); - } else - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(m_iPad)) { - // Signed in to PSN but not connected (no internet - // access) - - // Id - assert(!ProfileManager.isConnectedToPSN(m_iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, - m_iPad); - } else { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, - uiIDA, 1, m_iPad, - &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); - } -#else unsigned int uiIDA[1] = {IDS_OK}; ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, m_iPad); -#endif } else { bool bContentRestricted = false; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions( - m_iPad, true, NULL, &bContentRestricted, NULL); -#endif if (bContentRestricted) { -#if !(0 || defined(_WINDOWS64) || \ - 0) // 4J Stu - Temp to get the win build running, but so +#if !defined(_WINDOWS64) // we check this for other platforms // you can't see leaderboards unsigned int uiIDA[1]; @@ -671,44 +353,6 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { ->getSessionTimer(); } -#if 0 || 0 - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - - if (g_NetworkManager.IsHost() && - StorageManager.GetSaveDisabled()) { - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_EXIT_GAME_SAVE; - uiIDA[2] = IDS_EXIT_GAME_NO_SAVE; - - if (g_NetworkManager.GetPlayerCount() > 1) { - ui.RequestAlertMessage( - IDS_EXIT_GAME, - IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT_SAVE, - uiIDA, 3, m_iPad, - &UIScene_PauseMenu::ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } else { - ui.RequestAlertMessage( - IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 3, - m_iPad, - &UIScene_PauseMenu::ExitGameSaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } - } else if (g_NetworkManager.IsHost() && - g_NetworkManager.GetPlayerCount() > 1) { - ui.RequestAlertMessage( - IDS_EXIT_GAME, - IDS_CONFIRM_EXIT_GAME_CONFIRM_DISCONNECT, uiIDA, 2, - m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } else { - ui.RequestAlertMessage( - IDS_EXIT_GAME, IDS_CONFIRM_EXIT_GAME, uiIDA, 2, - m_iPad, &IUIScene_PauseMenu::ExitGameDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } -#else if (StorageManager.GetSaveDisabled()) { uiIDA[0] = IDS_CONFIRM_CANCEL; uiIDA[1] = IDS_CONFIRM_OK; @@ -750,7 +394,6 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { (LPVOID)GetCallbackUniqueId()); } } -#endif } else { int playTime = -1; if (pMinecraft->localplayers[m_iPad] != NULL) { @@ -807,55 +450,9 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) { void UIScene_PauseMenu::PerformActionSaveGame() { // is the player trying to save in the trial version? if (!ProfileManager.IsFullVersion()) { -#if 0 - // If a patch is available, can't buy full game - if (CheckForPatch()) return; -#endif // Unlock the full version? if (!ProfileManager.IsSignedInLive(m_iPad)) { -#if 0 || 0 - m_eAction = eAction_SaveGamePSN; - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestAlertMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); -#elif 0 - m_eAction = eAction_SaveGamePSN; - int npAvailability = ProfileManager.getNPAvailability(m_iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive is the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - m_iPad); - } else - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(m_iPad)) { - // Signed in to PSN but not connected (no internet access) - assert(!ProfileManager.isConnectedToPSN(m_iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, m_iPad); - } else { - // Not signed in to PSN - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 1, m_iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, - (LPVOID)GetCallbackUniqueId()); - } -#endif } else { unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; @@ -880,35 +477,12 @@ void UIScene_PauseMenu::PerformActionSaveGame() { if (!m_pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture, L"")) { // upsell -#if 0 - ULONGLONG ullOfferID_Full; - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - app.GetDLCFullOfferIDForPackID(pDLCTexPack->getDLCParentPackId(), - &ullOfferID_Full); - - // tell sentient about the upsell of the full version of the texture - // pack - TelemetryManager->RecordUpsellPresented( - m_iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif unsigned int uiIDA[2]; uiIDA[0] = IDS_CONFIRM_OK; uiIDA[1] = IDS_CONFIRM_CANCEL; // Give the player a warning about the trial version of the texture // pack -#if 0 - if (app.DLCInstallProcessCompleted() && - !SonyCommerce_Vita:: - getDLCUpgradePending()) // MGH - devtrack #5861 On vita it - // can take a bit after the install - // has finished to register the - // purchase, so make sure we don't - // end up asking to purchase again -#endif { ui.RequestAlertMessage( IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, @@ -928,31 +502,7 @@ void UIScene_PauseMenu::PerformActionSaveGame() { C4JStorage::ESaveGameState result = StorageManager.DoesSaveExist(&bSaveExists); -#if 0 - if (result == C4JStorage::ELoadGame_DeviceRemoved) { - // this will be a tester trying to be clever - unsigned int uiIDA[2]; - uiIDA[0] = IDS_SELECTANEWDEVICE; - uiIDA[1] = IDS_NODEVICE_DECLINE; - - ui.RequestAlertMessage(IDS_STORAGEDEVICEPROBLEM_TITLE, - IDS_FAILED_TO_LOADSAVE_TEXT, uiIDA, 2, m_iPad, - &IUIScene_PauseMenu::DeviceRemovedDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } else -#endif { -#if 0 || 0 - if (!m_savesDisabled) { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_TITLE_DISABLE_AUTOSAVE, IDS_CONFIRM_DISABLE_AUTOSAVE, uiIDA, - 2, m_iPad, &IUIScene_PauseMenu::DisableAutosaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); - } else -#endif // we need to ask if they are sure they want to overwrite the // existing game if (bSaveExists) { @@ -964,19 +514,8 @@ void UIScene_PauseMenu::PerformActionSaveGame() { m_iPad, &IUIScene_PauseMenu::SaveGameDialogReturned, (LPVOID)GetCallbackUniqueId()); } else { -#if 0 || 0 - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_TITLE_ENABLE_AUTOSAVE, IDS_CONFIRM_ENABLE_AUTOSAVE, - uiIDA, 2, m_iPad, - &IUIScene_PauseMenu::EnableAutosaveDialogReturned, - (LPVOID)GetCallbackUniqueId()); -#else // flag a app action of save game app.SetAction(m_iPad, eAppAction_SaveGame); -#endif } } } @@ -1029,19 +568,6 @@ int UIScene_PauseMenu::UnlockFullSaveReturned( if (result == C4JStorage::EMessage_ResultAccept) { if (ProfileManager.IsSignedInLive(pMinecraft->player->GetXboxPad())) { // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { ProfileManager.DisplayFullVersionPurchase( false, pMinecraft->player->GetXboxPad(), @@ -1070,498 +596,10 @@ int UIScene_PauseMenu::SaveGame_SignInReturned(void* pParam, bool bContinue, return 0; } -#if 0 -int UIScene_PauseMenu::BanGameDialogReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - // results switched for this dialog - if (result == C4JStorage::EMessage_ResultDecline) { - app.SetAction(iPad, eAppAction_BanLevel); - } - return 0; -} -#endif -#if 0 || 0 || 0 -int UIScene_PauseMenu::MustSignInReturnedPSN( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_PauseMenu* pClass = - (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam); - if (result == C4JStorage::EMessage_ResultAccept && pClass) { -#if 0 - switch (pClass->m_eAction) { - case eAction_ViewLeaderboardsPSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewLeaderboards_SignInReturned, - pParam); - break; - case eAction_ViewInvitesPSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewInvites_SignInReturned, pParam); - break; - case eAction_SaveGamePSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_PauseMenu::SaveGame_SignInReturned, pParam); - break; - case eAction_BuyTexturePackPSN: - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_PauseMenu::BuyTexturePack_SignInReturned, pParam); - break; - } -#elif 0 - switch (pClass->m_eAction) { - case eAction_ViewLeaderboardsPSN: - // CD - Must force Ad-Hoc off if they want leaderboard PSN - // sign-in Save settings change - app.SetGameSettings(0, eGameSetting_PSVita_NetworkModeAdhoc, 0); - // Force off - CGameNetworkManager::setAdhocMode(false); - // Now Sign-in - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewLeaderboards_SignInReturned, - pParam); - break; - case eAction_ViewInvitesPSN: - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewInvites_SignInReturned, pParam); - break; - case eAction_SaveGamePSN: - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_PauseMenu::SaveGame_SignInReturned, pParam, true); - break; - case eAction_BuyTexturePackPSN: - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_PauseMenu::BuyTexturePack_SignInReturned, pParam); - break; - } -#else - switch (pClass->m_eAction) { - case eAction_ViewLeaderboardsPSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewLeaderboards_SignInReturned, pClass, - false, iPad); - break; - case eAction_ViewInvitesPSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_PauseMenu::ViewInvites_SignInReturned, pClass, - false, iPad); - break; - case eAction_SaveGamePSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_PauseMenu::SaveGame_SignInReturned, pClass, false, - iPad); - break; - case eAction_BuyTexturePackPSN: - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_PauseMenu::BuyTexturePack_SignInReturned, pClass, - false, iPad); - break; - } -#endif - } - - return 0; -} - -int UIScene_PauseMenu::ViewLeaderboards_SignInReturned(void* pParam, - bool bContinue, - int iPad) { - UIScene_PauseMenu* pClass = - (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam); - if (!pClass) return 0; - - if (bContinue == true) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - - // guests can't look at leaderboards - if (ProfileManager.IsGuest(pClass->m_iPad)) { - ui.RequestAlertMessage(IDS_PRO_GUESTPROFILE_TITLE, - IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else if (ProfileManager.IsSignedInLive(iPad)) { -#if 1 - bool bContentRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - pClass->m_iPad, true, NULL, &bContentRestricted, NULL); - if (bContentRestricted) { - // you can't see leaderboards - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif - { - ui.NavigateToScene(pClass->m_iPad, eUIScene_LeaderboardsMenu); - } - } - } - - return 0; -} - -int UIScene_PauseMenu::WarningTrialTexturePackReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - UIScene_PauseMenu* pClass = - (UIScene_PauseMenu*)ui.GetSceneFromCallbackId((size_t)pParam); - -#if 0 - // If a patch is available, can't proceed - if (!pClass || pClass->CheckForPatch()) return 0; -#endif - -#if 0 || 0 || 0 - if (result == C4JStorage::EMessage_ResultAccept) { - if (!ProfileManager.IsSignedInLive(iPad)) { - if (pClass) pClass->m_eAction = eAction_SaveGamePSN; -#if 0 // Check if PSN is unavailable because of age restriction - int npAvailability = ProfileManager.getNPAvailability(iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - // 4J Stu - This is a bit messy and is due to the library - // incorrectly returning false for IsSignedInLive is the - // npAvailability isn't SCE_OK - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - } else - // Determine why they're not "signed in live" - if (ProfileManager.isSignedInPSN(iPad)) { - // Signed in to PSN but not connected (no internet access) - assert(!ProfileManager.isConnectedToPSN(iPad)); - - unsigned int uiIDA[1]; - uiIDA[0] = IDS_OK; - ui.RequestErrorMessage(IDS_ERROR_NETWORK_TITLE, - IDS_ERROR_NETWORK, uiIDA, 1, iPad); - } else { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 1, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, - pParam); - } -#else // 0 - // You're not signed in to PSN! - unsigned int uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_PRO_NOTONLINE_DECLINE; - ui.RequestAlertMessage( - IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, uiIDA, - 2, iPad, &UIScene_PauseMenu::MustSignInReturnedPSN, pParam); -#endif - } else { -#if 1 - // 4J-PB - need to check this user can access the store - bool bContentRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, &bContentRestricted, - NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - } else -#endif - { - // need to get info on the pack to see if the user has already - // downloaded it - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - // retrieve the store name for the skin pack - DLCPack* pDLCPack = - pDLCTexPack - ->getDLCInfoParentPack(); // tPack->getDLCPack(); - const char* pchPackName = - wstringtofilename(pDLCPack->getName()); - app.DebugPrintf("Texture Pack - %s\n", pchPackName); - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo((char*)pchPackName); - - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // find the info on the skin pack - // we have to retrieve the skuid from the store info, it - // can't be hardcoded since Sony may change it. So we assume - // the first sku for the product is the one we want - - // MGH - keyname in the DLC file is 16 chars long, but - // there's no space for a NULL terminating char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), - chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - - // 4J-PB - need to check for an empty store -#if 0 || 0 || 0 - if (app.CheckForEmptyStore(iPad) == false) -#endif - { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } - } - } - } -#endif // - - return 0; -} - -int UIScene_PauseMenu::BuyTexturePack_SignInReturned(void* pParam, - bool bContinue, int iPad) { - if (bContinue == true) { - // Check if we're signed in to LIVE - if (ProfileManager.IsSignedInLive(iPad)) { -#if 0 || 0 || 0 - -#if 1 - // 4J-PB - need to check this user can access the store - bool bContentRestricted = false; - ProfileManager.GetChatAndContentRestrictions( - iPad, true, NULL, &bContentRestricted, NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestAlertMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, iPad); - } else -#endif - { - // need to get info on the pack to see if the user has already - // downloaded it - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - // retrieve the store name for the skin pack - DLCPack* pDLCPack = - pDLCTexPack - ->getDLCInfoParentPack(); // tPack->getDLCPack(); - const char* pchPackName = - wstringtofilename(pDLCPack->getName()); - app.DebugPrintf("Texture Pack - %s\n", pchPackName); - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo((char*)pchPackName); - - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // find the info on the skin pack - // we have to retrieve the skuid from the store info, it - // can't be hardcoded since Sony may change it. So we assume - // the first sku for the product is the one we want - - // MGH - keyname in the DLC file is 16 chars long, but - // there's no space for a NULL terminating char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), - chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - - // 4J-PB - need to check for an empty store -#if 0 || 0 || 0 - if (app.CheckForEmptyStore(iPad) == false) -#endif - { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.Checkout(chSkuID); - } - } - } - } -#else - // TO BE IMPEMENTED FOR ORBIS -#endif - } - } - return 0; -} - -int UIScene_PauseMenu::ViewInvites_SignInReturned(void* pParam, bool bContinue, - int iPad) { - if (bContinue == true) { - // Check if we're signed in to LIVE - if (ProfileManager.IsSignedInLive(iPad)) { -#if 0 - SQRNetworkManager_Orbis::RecvInviteGUI(); -#elif 0 - int ret = sceNpBasicRecvMessageCustom( - SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, - SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, - SYS_MEMORY_CONTAINER_ID_INVALID); - app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", - ret, ret); -#else // 0 - PSVITA_STUBBED; -#endif - } - } - return 0; -} - -int UIScene_PauseMenu::ExitGameSaveDialogReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - // Exit with or without saving - // Decline means save in this dialog - if (result == C4JStorage::EMessage_ResultDecline || - result == C4JStorage::EMessage_ResultThirdOption) { - if (result == C4JStorage::EMessage_ResultDecline) // Save - { - // 4J-PB - Is the player trying to save but they are using a trial - // texturepack ? - if (!Minecraft::GetInstance()->skins->isUsingDefaultSkin()) { - TexturePack* tPack = - Minecraft::GetInstance()->skins->getSelected(); - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - DLCPack* pDLCPack = - pDLCTexPack - ->getDLCInfoParentPack(); // tPack->getDLCPack(); - if (!pDLCPack->hasPurchasedFile(DLCManager::e_DLCType_Texture, - L"")) { -#if 0 - // upsell - ULONGLONG ullOfferID_Full; - // get the dlc texture pack - DLCTexturePack* pDLCTexPack = (DLCTexturePack*)tPack; - - app.GetDLCFullOfferIDForPackID( - pDLCTexPack->getDLCParentPackId(), &ullOfferID_Full); - - // tell sentient about the upsell of the full version of the - // skin pack - TelemetryManager->RecordUpsellPresented( - iPad, eSet_UpsellID_Texture_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif - - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_OK; - uiIDA[1] = IDS_CONFIRM_CANCEL; - - // Give the player a warning about the trial version of the - // texture pack - ui.RequestAlertMessage( - IDS_WARNING_DLC_TRIALTEXTUREPACK_TITLE, - IDS_WARNING_DLC_TRIALTEXTUREPACK_TEXT, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &UIScene_PauseMenu::WarningTrialTexturePackReturned, - pParam); - - return S_OK; - } - } - - // does the save exist? - bool bSaveExists; - StorageManager.DoesSaveExist(&bSaveExists); - // 4J-PB - we check if the save exists inside the libs - // we need to ask if they are sure they want to overwrite the - // existing game - if (bSaveExists) { - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_TITLE_SAVE_GAME, IDS_CONFIRM_SAVE_GAME, uiIDA, 2, - ProfileManager.GetPrimaryPad(), - &IUIScene_PauseMenu::ExitGameAndSaveReturned, pParam); - return 0; - } else { -#if 0 || 0 - StorageManager.SetSaveDisabled(false); -#endif - MinecraftServer::getInstance()->setSaveOnExit(true); - } - } else { - // been a few requests for a confirm on exit without saving - unsigned int uiIDA[2]; - uiIDA[0] = IDS_CONFIRM_CANCEL; - uiIDA[1] = IDS_CONFIRM_OK; - ui.RequestAlertMessage( - IDS_TITLE_DECLINE_SAVE_GAME, IDS_CONFIRM_DECLINE_SAVE_GAME, - uiIDA, 2, ProfileManager.GetPrimaryPad(), - &IUIScene_PauseMenu::ExitGameDeclineSaveReturned, pParam); - return 0; - } - - app.SetAction(iPad, eAppAction_ExitWorld); - } - return 0; -} - -#endif void UIScene_PauseMenu::SetIgnoreInput(bool ignoreInput) { m_bIgnoreInput = ignoreInput; } -#if 0 -void UIScene_PauseMenu::HandleDLCLicenseChange() {} -#endif -#if 0 -bool UIScene_PauseMenu::CheckForPatch() { - int npAvailability = - ProfileManager.getNPAvailability(ProfileManager.GetPrimaryPad()); - - bool bPatchAvailable; - switch (npAvailability) { - case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST: - case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED: - bPatchAvailable = true; - break; - default: - bPatchAvailable = false; - break; - } - - if (bPatchAvailable) { - int32_t ret = sceErrorDialogInitialize(); - if (ret == SCE_OK) { - m_bErrorDialogRunning = true; - - SceErrorDialogParam param; - sceErrorDialogParamInitialize(¶m); - // 4J-PB - We want to display the option to get the patch now - param.errorCode = - SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED; // pClass->m_errorCode; - ret = sceUserServiceGetInitialUser(¶m.userId); - if (ret == SCE_OK) { - ret = sceErrorDialogOpen(¶m); - } else { - sceErrorDialogTerminate(); - } - } - } - - return bPatchAvailable; -} -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.h index 9e83533c5..c5d18081f 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_PauseMenu.h @@ -20,12 +20,6 @@ private: enum eActions { eAction_None = 0, -#if 0 || 0 || 0 - eAction_ViewLeaderboardsPSN, - eAction_ViewInvitesPSN, - eAction_SaveGamePSN, - eAction_BuyTexturePackPSN -#endif }; eActions m_eAction; @@ -42,9 +36,6 @@ private: virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(); -#if 0 - virtual void HandleDLCLicenseChange(); -#endif static int UnlockFullSaveReturned(void* pParam, int iPad, C4JStorage::EMessageResult result); static int SaveGame_SignInReturned(void* pParam, bool bContinue, int iPad); @@ -82,31 +73,7 @@ protected: private: void PerformActionSaveGame(); -#if 0 || 0 || 0 - static int MustSignInReturnedPSN(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int ViewLeaderboards_SignInReturned(void* pParam, bool bContinue, - int iPad); - static int ViewInvites_SignInReturned(void* pParam, bool bContinue, - int iPad); - static int BuyTexturePack_SignInReturned(void* pParam, bool bContinue, - int iPad); - static int WarningTrialTexturePackReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result); - static int ExitGameSaveDialogReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif protected: -#if 0 - static int BanGameDialogReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); - virtual long long getDefaultGtcButtons() { - return _360_GTC_BACK | _360_GTC_PLAY; - } -#endif -#if 0 - bool CheckForPatch(); -#endif }; diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.cpp index 279989b58..0103a4525 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.cpp @@ -2,9 +2,6 @@ #include "UI.h" #include "UIScene_QuadrantSignin.h" #include "../../Minecraft.Client/Minecraft.h" -#if 0 -#include "../Network/Sony/SonyHttp.h" -#endif UIScene_QuadrantSignin::UIScene_QuadrantSignin(int iPad, void* _initData, UILayer* parentLayer) @@ -20,17 +17,6 @@ UIScene_QuadrantSignin::UIScene_QuadrantSignin(int iPad, void* _initData, _initQuadrants(); -#if 0 || 0 || 0 - if (InputManager.IsCircleCrossSwapped()) { - IggyDataValue result; - IggyDataValue value[1]; - value[0].type = IGGY_DATATYPE_boolean; - value[0].boolval = true; - IggyResult out = IggyPlayerCallMethodRS(getMovie(), &result, - IggyPlayerRootPath(getMovie()), - m_funcSetABSwap, 1, value); - } -#endif parentLayer->addComponent(iPad, eUIComponent_MenuBackground); } @@ -81,12 +67,6 @@ void UIScene_QuadrantSignin::handleInput(int iPad, int key, bool repeat, switch (key) { case ACTION_MENU_CANCEL: { if (pressed) { -#if 0 - if (InputManager.IsPadLocked(iPad)) { - if (iPad != ProfileManager.GetPrimaryPad()) { - ProfileManager.RemoveGamepadFromGame(iPad); - } else -#endif { m_bIgnoreInput = true; m_signInInfo.Func(m_signInInfo.lpParam, false, @@ -96,47 +76,18 @@ void UIScene_QuadrantSignin::handleInput(int iPad, int key, bool repeat, navigateBack(); } } -#if 0 - } -#endif } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { m_bIgnoreInput = true; -#if 0 - if (ProfileManager.IsSignedIn(iPad) && - InputManager.IsPadLocked(iPad)) -#else if (ProfileManager.IsSignedIn(iPad)) -#endif { app.DebugPrintf("Signed in pad pressed\n"); ProfileManager.CancelProfileAvatarRequest(); -#if 0 - // On Durango, if we don't navigate forward here, then - // when we are on the main menu, it (re)gains focus & - // that causes our users to get cleared - ui.NavigateToScene(m_iPad, eUIScene_Timer); -#endif navigateBack(); m_signInInfo.Func(m_signInInfo.lpParam, true, m_iPad); } else { -#if 0 - if (ProfileManager.IsSignedIn(0) && - !InputManager.IsPadLocked(0)) { - app.DebugPrintf( - "Signed in pad with no controller bound " - "pressed\n"); - ProfileManager.RequestSignInUI( - false, false, false, true, false, - &UIScene_QuadrantSignin::SignInReturned, this, - iPad); - } else -#endif { app.DebugPrintf("Non-signed in pad pressed\n"); ProfileManager.RequestSignInUI( @@ -159,28 +110,13 @@ void UIScene_QuadrantSignin::handleInput(int iPad, int key, bool repeat, handled = true; } -#if 0 -int UIScene_QuadrantSignin::SignInReturned(void* pParam, bool bContinue, - int iPad, int iController) -#else int UIScene_QuadrantSignin::SignInReturned(void* pParam, bool bContinue, int iPad) -#endif { app.DebugPrintf("SignInReturned for pad %d\n", iPad); UIScene_QuadrantSignin* pClass = (UIScene_QuadrantSignin*)pParam; -#if 0 - if (bContinue && pClass->m_signInInfo.requireOnline && - ProfileManager.IsSignedIn(iPad)) { - if (!InputManager.IsPadLocked(iPad)) { - ProfileManager.ForcePrimaryPadController(iController); - } - ProfileManager.CheckMultiplayerPrivileges( - iPad, true, &checkAllPrivilegesCallback, pClass); - } else -#endif { pClass->m_bIgnoreInput = false; pClass->updateState(); @@ -189,19 +125,6 @@ int UIScene_QuadrantSignin::SignInReturned(void* pParam, bool bContinue, return 0; } -#if 0 -void UIScene_QuadrantSignin::checkAllPrivilegesCallback(LPVOID lpParam, - bool hasPrivileges, - int iPad) { - UIScene_QuadrantSignin* pClass = (UIScene_QuadrantSignin*)lpParam; - - if (!hasPrivileges) { - ProfileManager.RemoveGamepadFromGame(iPad); - } - pClass->m_bIgnoreInput = false; - pClass->updateState(); -} -#endif namespace { int AvatarReturnedThunk(void* lpParam, std::uint8_t* thumbnailData, @@ -217,11 +140,6 @@ void UIScene_QuadrantSignin::updateState() { // app.DebugPrintf("Index %d is signed in, display name - '%s'\n", // i, ProfileManager.GetDisplayName(i).data()); -#if 0 - if (!InputManager.IsPadLocked(i)) { - setControllerState(i, eControllerStatus_PressToJoin_LoggedIn); - } else -#endif { setControllerState(i, eControllerStatus_PlayerDetails); } @@ -307,11 +225,6 @@ void UIScene_QuadrantSignin::_initQuadrants() { if (ProfileManager.IsSignedIn(i)) { app.DebugPrintf("Index %d is signed in\n", i); -#if 0 - if (!InputManager.IsPadLocked(i)) { - setControllerState(i, eControllerStatus_PressToJoin_LoggedIn); - } else -#endif { setControllerState(i, eControllerStatus_PlayerDetails); } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h index a2ec711e0..c4162ed9d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_QuadrantSignin.h @@ -107,20 +107,11 @@ public: DWORD dwThumbnailBytes); private: -#if 0 - static int SignInReturned(void* pParam, bool bContinue, int iPad, - int iController); -#else static int SignInReturned(void* pParam, bool bContinue, int iPad); -#endif void updateState(); void setControllerState(int iPad, EControllerStatus state); -#if 0 - static void checkAllPrivilegesCallback(void* lpParam, bool hasPrivileges, - int iPad); -#endif protected: void _initQuadrants(); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_ReinstallMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_ReinstallMenu.cpp index fce657082..207722ed5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_ReinstallMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_ReinstallMenu.cpp @@ -69,9 +69,6 @@ void UIScene_ReinstallMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: sendInputToMovie(key, repeat, pressed, released); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.cpp index afe5f2650..e96cd5698 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.cpp @@ -37,9 +37,6 @@ UIScene_SaveMessage::UIScene_SaveMessage(int iPad, void* initData, m_bIgnoreInput = false; // 4J-TomK - rebuild touch after auto resize -#if 0 - ui.TouchBoxRebuild(this); -#endif } UIScene_SaveMessage::~UIScene_SaveMessage() { @@ -57,19 +54,11 @@ void UIScene_SaveMessage::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool& handled) { if (m_bIgnoreInput) return; -#if 0 || 0 - // ignore all players except player 0 - it's their profile that is currently - // being used - if (iPad != 0) return; -#endif ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); switch (key) { case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; // #ifdef 0 @@ -104,13 +93,7 @@ void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId) { m_bIgnoreInput = true; -#if 0 || 0 || 0 - // wait for the profile to be read - this has been kicked off - // earlier, so should be read by now - addTimer(PROFILE_LOADED_TIMER_ID, PROFILE_LOADED_TIMER_TIME); -#else ui.NavigateToHomeMenu(); -#endif break; }; } @@ -118,68 +101,9 @@ void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId) { void UIScene_SaveMessage::handleTimerComplete(int id) { switch (id) { case PROFILE_LOADED_TIMER_ID: { -#if 0 || 0 || 0 - C4JStorage::eOptionsCallback eStatus = - app.GetOptionsCallbackStatus(0); - - switch (eStatus) { - case C4JStorage::eOptions_Callback_Read: - case C4JStorage::eOptions_Callback_Read_FileNotFound: - case C4JStorage::eOptions_Callback_Read_Fail: -#if 0 - case C4JStorage::eOptions_Callback_Write_Fail: - case C4JStorage::eOptions_Callback_Write: -#endif - // set defaults - which has already been done - killTimer(PROFILE_LOADED_TIMER_ID); - ui.NavigateToHomeMenu(); - SQRNetworkManager::SafeToRespondToGameBootInvite(); - app.SetOptionsCallbackStatus( - 0, C4JStorage::eOptions_Callback_Idle); - break; - case C4JStorage::eOptions_Callback_Read_CorruptDeleted: - killTimer(PROFILE_LOADED_TIMER_ID); - ui.NavigateToHomeMenu(); - SQRNetworkManager::SafeToRespondToGameBootInvite(); - app.SetOptionsCallbackStatus( - 0, C4JStorage::eOptions_Callback_Idle); - break; - case C4JStorage::eOptions_Callback_Read_Corrupt: - // get the user to delete the options file - app.DebugPrintf("Corrupt options file\n"); - app.SetOptionsCallbackStatus( - 0, C4JStorage:: - eOptions_Callback_Read_CorruptDeletePending); - m_bIgnoreInput = false; - // give the option to delete the save - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CORRUPT_OPTIONS_RETRY; - uiIDA[1] = IDS_CORRUPT_OPTIONS_DELETE; - ui.RequestErrorMessage( - IDS_CORRUPT_FILE, IDS_CORRUPT_OPTIONS, uiIDA, 2, 0, - &UIScene_SaveMessage::DeleteOptionsDialogReturned, - this); - break; - } -#endif } break; } } -#if 0 || 0 || 0 -int UIScene_SaveMessage::DeleteOptionsDialogReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - // UIScene_SaveMessage* pClass = (UIScene_SaveMessage*)pParam; - if (result == C4JStorage::EMessage_ResultAccept) { - // retry loading the options file - StorageManager.ReadFromProfile(iPad); - } else // result == EMessage_ResultDecline - { - // kick off the delete - StorageManager.DeleteOptionsData(iPad); - } - return 0; -} -#endif diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.h b/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.h index bd240cd94..61eef4d1e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SaveMessage.h @@ -19,10 +19,6 @@ private: UI_MAP_NAME(m_funcAutoResize, L"AutoResize") UI_END_MAP_ELEMENTS_AND_NAMES() -#if 0 || 0 || 0 - static int DeleteOptionsDialogReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); -#endif public: UIScene_SaveMessage(int iPad, void* initData, UILayer* parentLayer); @@ -30,9 +26,7 @@ public: virtual EUIScene getSceneType() { return eUIScene_SaveMessage; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif virtual void updateTooltips(); protected: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsAudioMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsAudioMenu.cpp index 05cd151c8..984d90d79 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsAudioMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsAudioMenu.cpp @@ -72,9 +72,6 @@ void UIScene_SettingsAudioMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsControlMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsControlMenu.cpp index ca6827960..742ef223b 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsControlMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsControlMenu.cpp @@ -75,9 +75,6 @@ void UIScene_SettingsControlMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsGraphicsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsGraphicsMenu.cpp index ee9562a6a..75cd2e8e3 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsGraphicsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsGraphicsMenu.cpp @@ -116,9 +116,6 @@ void UIScene_SettingsGraphicsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsMenu.cpp index cd9b05b55..d8a7c2081 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsMenu.cpp @@ -93,9 +93,6 @@ void UIScene_SettingsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: @@ -144,16 +141,9 @@ int UIScene_SettingsMenu::ResetDefaultsDialogReturned( // results switched for this dialog if (result == C4JStorage::EMessage_ResultDecline) { -#if (0 || 0 || 0 || \ - 0) - app.SetDefaultOptions( - StorageManager.GetDashboardProfileSettings(pClass->m_iPad), - pClass->m_iPad); -#else app.SetDefaultOptions( ProfileManager.GetDashboardProfileSettings(pClass->m_iPad), pClass->m_iPad); -#endif // if the profile data has been changed, then force a profile write // It seems we're allowed to break the 5 minute rule if it's the result // of a user action diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsOptionsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsOptionsMenu.cpp index 5750b5331..d8e3f4ad8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsOptionsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsOptionsMenu.cpp @@ -2,9 +2,6 @@ #include "UI.h" #include "UIScene_SettingsOptionsMenu.h" -#if 0 -#define _ENABLE_LANGUAGE_SELECT -#endif int UIScene_SettingsOptionsMenu::m_iDifficultySettingA[4] = { IDS_DIFFICULTY_PEACEFUL, IDS_DIFFICULTY_EASY, IDS_DIFFICULTY_NORMAL, @@ -67,9 +64,6 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, m_sliderAutosave.init(autosaveLabels[ucValue], eControl_Autosave, 0, 8, ucValue); -#if 0 || 0 - removeControl(&m_sliderAutosave, true); -#endif ucValue = app.GetGameSettings(m_iPad, eGameSetting_Difficulty); wchar_t difficultyLabels[4][256]; @@ -136,7 +130,7 @@ UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, // MGH - disabled the language select for the patch build, we'll re-enable // afterwards 4J Stu - Removed it with a preprocessor def as we turn this // off in various places -#ifdef _ENABLE_LANGUAGE_SELECT +#if defined(_ENABLE_LANGUAGE_SELECT) if (app.GetGameStarted()) { removeControl(&m_buttonLanguageSelect, false); } else { @@ -209,9 +203,6 @@ void UIScene_SettingsOptionsMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: @@ -277,9 +268,6 @@ void UIScene_SettingsOptionsMenu::handleReload() { m_sliderAutosave.init(autosaveLabels[ucValue], eControl_Autosave, 0, 8, ucValue); -#if 0 || 0 - removeControl(&m_sliderAutosave, true); -#endif ucValue = app.GetGameSettings(m_iPad, eGameSetting_Difficulty); @@ -346,7 +334,7 @@ void UIScene_SettingsOptionsMenu::handleReload() { // MGH - disabled the language select for the patch build, we'll re-enable // afterwards 4J Stu - Removed it with a preprocessor def as we turn this // off in various places -#ifdef _ENABLE_LANGUAGE_SELECT +#if defined(_ENABLE_LANGUAGE_SELECT) // 4J-JEV: Changing languages in-game will produce many a bug. if (app.GetGameStarted()) { removeControl(&m_buttonLanguageSelect, false); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsUIMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsUIMenu.cpp index 8d700d452..5a7b3625e 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SettingsUIMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SettingsUIMenu.cpp @@ -146,9 +146,6 @@ void UIScene_SettingsUIMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif sendInputToMovie(key, repeat, pressed, released); break; case ACTION_MENU_UP: diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SignEntryMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SignEntryMenu.cpp index d32dc81b8..85b4a8666 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SignEntryMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SignEntryMenu.cpp @@ -125,9 +125,6 @@ void UIScene_SignEntryMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: sendInputToMovie(key, repeat, pressed, released); @@ -161,49 +158,17 @@ void UIScene_SignEntryMenu::handlePress(F64 controlId, F64 childId) { case eControl_Line4: { m_iEditingLine = (int)controlId; m_bIgnoreInput = true; -#if 0 - // 4J-PB - Xbox One uses the Windows virtual keyboard, and doesn't - // have the Xbox 360 Latin keyboard type, so we can't restrict the - // input set to alphanumeric. The closest we get is the - // emailSmtpAddress type. - int language = XGetLanguage(); - switch (language) { - case XC_LANGUAGE_JAPANESE: - case XC_LANGUAGE_KOREAN: - case XC_LANGUAGE_TCHINESE: - InputManager.RequestKeyboard( - app.GetString(IDS_SIGN_TITLE), - m_textInputLines[m_iEditingLine].getLabel(), m_iPad, 15, - &UIScene_SignEntryMenu::KeyboardCompleteCallback, this, - C_4JInput::EKeyboardMode_Email); - break; - default: - InputManager.RequestKeyboard( - app.GetString(IDS_SIGN_TITLE), - m_textInputLines[m_iEditingLine].getLabel(), m_iPad, 15, - &UIScene_SignEntryMenu::KeyboardCompleteCallback, this, - C_4JInput::EKeyboardMode_Alphabet); - break; - } -#else InputManager.RequestKeyboard( app.GetString(IDS_SIGN_TITLE), m_textInputLines[m_iEditingLine].getLabel(), m_iPad, 15, &UIScene_SignEntryMenu::KeyboardCompleteCallback, this, C_4JInput::EKeyboardMode_Alphabet); -#endif } break; } } void UIScene_SignEntryMenu::handleDestroy() { -#if 0 - app.DebugPrintf("missing InputManager.DestroyKeyboard on Vita !!!!!!\n"); -#endif // another player destroyed the anvil, so shut down the keyboard if it is // displayed -#if (0 || 0 || 0) - InputManager.DestroyKeyboard(); -#endif } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp index b9e0ccb88..473f38bf0 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.cpp @@ -2,11 +2,6 @@ #include "UI.h" #include "UIScene_SkinSelectMenu.h" #include "../../Minecraft.World/Util/StringHelpers.h" -#if 0 -#include -#elif 0 -#include -#endif #define SKIN_SELECT_PACK_DEFAULT 0 #define SKIN_SELECT_PACK_FAVORITES 1 @@ -33,9 +28,6 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void* initData, m_labelSelected.init(app.GetString(IDS_SELECTED)); -#if 0 - m_bErrorDialogRunning = false; -#endif m_bIgnoreInput = false; m_bNoSkinsToShow = false; @@ -86,13 +78,6 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void* initData, m_centreLabel = L""; m_rightLabel = L""; -#if 0 - // initialise vita tab controls with ids - m_TouchTabLeft.init(ETouchInput_TabLeft); - m_TouchTabRight.init(ETouchInput_TabRight); - m_TouchTabCenter.init(ETouchInput_TabCenter); - m_TouchIggyCharacters.init(ETouchInput_IggyCharacters); -#endif // block input if we're waiting for DLC to install. The end of dlc mounting // custom message will fill the save list @@ -137,11 +122,6 @@ UIScene_SkinSelectMenu::UIScene_SkinSelectMenu(int iPad, void* initData, // Display the tooltips -#if 0 - InitializeCriticalSection( - &m_DLCInstallCS); // to prevent a race condition between the install - // and the mounted callback -#endif } void UIScene_SkinSelectMenu::updateTooltips() { @@ -173,18 +153,6 @@ void UIScene_SkinSelectMenu::tick() { // check for new DLC installed // check for the patch error dialog -#if 0 - - // process the error dialog (for a patch being available) - if (m_bErrorDialogRunning) { - SceErrorDialogStatus stat = sceErrorDialogUpdateStatus(); - if (stat == SCE_ERROR_DIALOG_STATUS_FINISHED) { - sceErrorDialogTerminate(); - m_bErrorDialogRunning = false; - } - } - -#endif } void UIScene_SkinSelectMenu::handleAnimationEnd() { @@ -222,9 +190,6 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { InputActionOK(iPad); } @@ -434,57 +399,11 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { // if(true) if (!m_currentPack->hasPurchasedFile( DLCManager::e_DLCType_Skin, skinFile->getPath())) { -#if 0 - // 4J-PB - Check if there is a patch for the game - int errorCode = ProfileManager.getNPAvailability( - ProfileManager.GetPrimaryPad()); - - bool bPatchAvailable; - switch (errorCode) { - case SCE_NP_ERROR_LATEST_PATCH_PKG_EXIST: - case SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED: - bPatchAvailable = true; - break; - default: - bPatchAvailable = false; - break; - } - - if (bPatchAvailable) { - int32_t ret = sceErrorDialogInitialize(); - m_bErrorDialogRunning = true; - if (ret == SCE_OK) { - SceErrorDialogParam param; - sceErrorDialogParamInitialize(¶m); - // 4J-PB - We want to display the option to get - // the patch now - param.errorCode = - SCE_NP_ERROR_LATEST_PATCH_PKG_DOWNLOADED; // pClass->m_errorCode; - ret = - sceUserServiceGetInitialUser(¶m.userId); - if (ret == SCE_OK) { - ret = sceErrorDialogOpen(¶m); - break; - } - } - } -#endif // no unsigned int uiIDA[1]; uiIDA[0] = IDS_OK; -#if 0 - // Check if PSN is unavailable because of age - // restriction - int npAvailability = - ProfileManager.getNPAvailability(iPad); - if (npAvailability == SCE_NP_ERROR_AGE_RESTRICTION) { - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, - uiIDA, 1, iPad); - } else -#endif // We need to upsell the full version if (ProfileManager.IsGuest(iPad)) { // can't buy @@ -492,43 +411,11 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1, iPad); } -#if 0 || 0 || 0 - // are we online? - else if (!ProfileManager.IsSignedInLive(iPad)) { - showNotOnlineDialog(iPad); - } -#endif else { // upsell -#if 0 - DLC_INFO* pDLCInfo = - app.GetDLCInfoForTrialOfferID( - m_currentPack->getPurchaseOfferId()); - ULONGLONG ullOfferID_Full; - - if (pDLCInfo != NULL) { - ullOfferID_Full = pDLCInfo->ullOfferID_Full; - } else { - ullOfferID_Full = - m_currentPack->getPurchaseOfferId(); - } - - // tell sentient about the upsell of the full - // version of the skin pack - SentientManager.RecordUpsellPresented( - iPad, eSet_UpsellID_Skin_DLC, - ullOfferID_Full & 0xFFFFFFFF); -#endif bool bContentRestricted = false; -#if 0 || 0 - ProfileManager.GetChatAndContentRestrictions( - m_iPad, true, NULL, &bContentRestricted, - NULL); -#endif if (bContentRestricted) { -#if !(0 || \ - defined( \ - _WIN64)) // 4J Stu - Temp to get the win build running, but so we +#if !defined(_WIN64) // check this for other platforms you can't see the store unsigned int uiIDA[1]; uiIDA[0] = IDS_CONFIRM_OK; @@ -539,9 +426,6 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad) { #endif } else { // 4J-PB - need to check for an empty store -#if 0 || 0 || 0 - if (app.CheckForEmptyStore(iPad) == false) -#endif { m_bIgnoreInput = true; renableInputAfterOperation = false; @@ -622,22 +506,10 @@ void UIScene_SkinSelectMenu::customDraw(IggyCustomDrawCallbackRegion* region) { // region->scissor_y1); app.DebugPrintf("Stencil mask= %d, stencil ref= // %d, stencil write= %d\n", region->stencil_func_mask, // region->stencil_func_ref, region->stencil_write_mask); -#if 0 - if (region->stencil_func_ref != 0) - RenderManager.StateSetStencil(GL_EQUAL, region->stencil_func_ref, - region->stencil_func_mask); -#elif 0 - // AP - make sure the skins are only drawn inside the smokey panel - if (region->stencil_func_ref != 0) - RenderManager.StateSetStencil(SCE_GXM_STENCIL_FUNC_EQUAL, - region->stencil_func_mask, - region->stencil_write_mask); -#else if (region->stencil_func_ref != 0) RenderManager.StateSetStencil(GL_EQUAL, region->stencil_func_ref, region->stencil_func_mask, region->stencil_write_mask); -#endif m_characters[characterId].render(region); // Finish GDraw and anything else that needs to be finalised @@ -1273,141 +1145,8 @@ void UIScene_SkinSelectMenu::setRightLabel(const std::wstring& label) { } } -#if 0 -void UIScene_SkinSelectMenu::handleTouchInput(unsigned int iPad, S32 x, S32 y, - int iId, bool bPressed, - bool bRepeat, bool bReleased) { - if (bPressed) { - switch (iId) { - case ETouchInput_TabLeft: - case ETouchInput_TabRight: - case ETouchInput_TabCenter: - // change to pack navigation if not already there! - if (m_currentNavigation != eSkinNavigation_Pack) { - ui.PlayUISFX(eSFX_Scroll); - m_currentNavigation = eSkinNavigation_Pack; - sendInputToMovie(ACTION_MENU_UP, false, true, false); - } - break; - case ETouchInput_IggyCharacters: - if (m_packIndex == SKIN_SELECT_PACK_FAVORITES) { - if (app.GetPlayerFavoriteSkinsCount(m_iPad) == 0) { - // ignore this, since there are no skins being displayed - break; - } - } - // change to skin navigation if not already there! - if (m_currentNavigation != eSkinNavigation_Skin) { - ui.PlayUISFX(eSFX_Scroll); - m_currentNavigation = eSkinNavigation_Skin; - sendInputToMovie(ACTION_MENU_DOWN, false, true, false); - } - // remember touch x start - m_iTouchXStart = x; - m_bTouchScrolled = false; - break; - } - } else if (bRepeat) { - switch (iId) { - case ETouchInput_TabLeft: - /* no action */ - break; - case ETouchInput_TabRight: - /* no action */ - break; - case ETouchInput_IggyCharacters: - if (m_currentNavigation != eSkinNavigation_Skin) { - // not in skin select mode - break; - } - if (x < m_iTouchXStart - 50) { - if (!m_bAnimatingMove && !m_bTouchScrolled) { - ui.PlayUISFX(eSFX_Scroll); - m_skinIndex = getNextSkinIndex(m_skinIndex); - // handleSkinIndexChanged(); - - m_bSlidingSkins = true; - m_bAnimatingMove = true; - - m_characters[eCharacter_Current].SetFacing( - UIControl_PlayerSkinPreview:: - e_SkinPreviewFacing_Right, - true); - m_characters[eCharacter_Next1].SetFacing( - UIControl_PlayerSkinPreview:: - e_SkinPreviewFacing_Forward, - true); - - // 4J Stu - Swapped nav buttons - sendInputToMovie(ACTION_MENU_LEFT, false, true, false); - - m_bTouchScrolled = true; - } - } else if (x > m_iTouchXStart + 50) { - if (!m_bAnimatingMove && !m_bTouchScrolled) { - ui.PlayUISFX(eSFX_Scroll); - - m_skinIndex = getPreviousSkinIndex(m_skinIndex); - // handleSkinIndexChanged(); - - m_bSlidingSkins = true; - m_bAnimatingMove = true; - - m_characters[eCharacter_Current].SetFacing( - UIControl_PlayerSkinPreview:: - e_SkinPreviewFacing_Left, - true); - m_characters[eCharacter_Previous1].SetFacing( - UIControl_PlayerSkinPreview:: - e_SkinPreviewFacing_Forward, - true); - - // 4J Stu - Swapped nav buttons - sendInputToMovie(ACTION_MENU_RIGHT, false, true, false); - - m_bTouchScrolled = true; - } - } - break; - } - } else if (bReleased) { - switch (iId) { - case ETouchInput_TabLeft: - if (m_currentNavigation == eSkinNavigation_Pack) { - ui.PlayUISFX(eSFX_Scroll); - int startingIndex = m_packIndex; - m_packIndex = getPreviousPackIndex(m_packIndex); - if (startingIndex != m_packIndex) { - handlePackIndexChanged(); - } - } - break; - case ETouchInput_TabRight: - if (m_currentNavigation == eSkinNavigation_Pack) { - ui.PlayUISFX(eSFX_Scroll); - int startingIndex = m_packIndex; - m_packIndex = getNextPackIndex(m_packIndex); - if (startingIndex != m_packIndex) { - handlePackIndexChanged(); - } - } - break; - case ETouchInput_IggyCharacters: - if (!m_bTouchScrolled) { - InputActionOK(iPad); - } - break; - } - } -} -#endif void UIScene_SkinSelectMenu::HandleDLCInstalled() { -#if 0 - EnterCriticalSection( - &m_DLCInstallCS); // to prevent a race condition between the install - // and the mounted callback -#endif app.DebugPrintf(4, "UIScene_SkinSelectMenu::HandleDLCInstalled\n"); // mounted DLC may have changed @@ -1426,17 +1165,9 @@ void UIScene_SkinSelectMenu::HandleDLCInstalled() { // this will send a CustomMessage_DLCMountingComplete when done -#if 0 - LeaveCriticalSection(&m_DLCInstallCS); -#endif } void UIScene_SkinSelectMenu::HandleDLCMountingComplete() { -#if 0 - EnterCriticalSection( - &m_DLCInstallCS); // to prevent a race condition between the install - // and the mounted callback -#endif app.DebugPrintf(4, "UIScene_SkinSelectMenu::HandleDLCMountingComplete\n"); m_controlTimer.setVisible(false); m_controlIggyCharacters.setVisible(true); @@ -1474,41 +1205,10 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete() { #if TO_BE_IMPLEMENTED if (bInGame) XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE_AUTO); #endif -#if 0 - LeaveCriticalSection(&m_DLCInstallCS); -#endif } void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad) { // need to be signed in to live. get them to sign in to online -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this); - -#elif 0 - if (CGameNetworkManager::usingAdhocMode() && - SQRNetworkManager_AdHoc_Vita::GetAdhocStatus()) { - // we're in adhoc mode, we really need to ask before disconnecting - UINT uiIDA[2]; - uiIDA[0] = IDS_PRO_NOTONLINE_ACCEPT; - uiIDA[1] = IDS_CANCEL; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_NOTONLINE_TEXT, - uiIDA, 2, ProfileManager.GetPrimaryPad(), - &UIScene_SkinSelectMenu::MustSignInReturned, - NULL); - } else { - SQRNetworkManager_Vita::AttemptPSNSignIn(NULL, this); - } - -#elif 0 - SQRNetworkManager_Orbis::AttemptPSNSignIn(NULL, this, false, iPad); - -#elif 0 - - unsigned int uiIDA[1] = {IDS_CONFIRM_OK}; - ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, - IDS_PRO_NOTONLINE_TEXT, uiIDA, 1, iPad); - -#endif } int UIScene_SkinSelectMenu::UnlockSkinReturned( @@ -1518,69 +1218,6 @@ int UIScene_SkinSelectMenu::UnlockSkinReturned( if ((result == C4JStorage::EMessage_ResultAccept) && ProfileManager.IsSignedIn(iPad)) { if (ProfileManager.IsSignedInLive(iPad)) { -#if 0 || 0 || 0 - // need to get info on the pack to see if the user has already - // downloaded it - - // retrieve the store name for the skin pack - std::wstring wStrPackName = pScene->m_currentPack->getName(); - const char* pchPackName = wstringtofilename(wStrPackName); - SONYDLC* pSONYDLCInfo = app.GetSONYDLCInfo((char*)pchPackName); - - if (pSONYDLCInfo != NULL) { - char chName[42]; - char chKeyName[20]; - char chSkuID[SCE_NP_COMMERCE2_SKU_ID_LEN]; - - memset(chSkuID, 0, SCE_NP_COMMERCE2_SKU_ID_LEN); - // find the info on the skin pack - // we have to retrieve the skuid from the store info, it can't - // be hardcoded since Sony may change it. So we assume the first - // sku for the product is the one we want - - // while the store is screwed, hardcode the sku - // sprintf(chName,"%s-%s-%s",app.GetCommerceCategory(),pSONYDLCInfo->chDLCKeyname,"EURO"); - - // MGH - keyname in the DLC file is 16 chars long, but there's - // no space for a NULL terminating char - memset(chKeyName, 0, sizeof(chKeyName)); - strncpy(chKeyName, pSONYDLCInfo->chDLCKeyname, 16); - -#if 0 - strcpy(chName, chKeyName); -#else - sprintf(chName, "%s-%s", app.GetCommerceCategory(), chKeyName); -#endif - app.GetDLCSkuIDFromProductList(chName, chSkuID); - -#if 0 || 0 || 0 - if (app.CheckForEmptyStore(iPad) == false) -#endif - { - if (app.DLCAlreadyPurchased(chSkuID)) { - app.DebugPrintf( - "Already purchased this DLC - " - "DownloadAlreadyPurchased \n"); - app.DownloadAlreadyPurchased(chSkuID); - } else { - app.DebugPrintf( - "Not yet purchased this DLC - Checkout \n"); - app.Checkout(chSkuID); - } - } - } - // need to re-enable input because the user can back out of the - // store purchase, and we'll be stuck - pScene->m_bIgnoreInput = - false; // MGH - moved this to outside the pSONYDLCInfo, so we - // don't get stuck -#elif 0 - StorageManager.InstallOffer( - 1, - const_cast( - pScene->m_currentPack->getPurchaseOfferId().c_str()), - &RenableInput, pScene, NULL); -#endif } else // Is signed in, but not live. { pScene->showNotOnlineDialog(iPad); @@ -1642,35 +1279,4 @@ void UIScene_SkinSelectMenu::handleReload() { handlePackIndexChanged(); } -#if 0 -void UIScene_SkinSelectMenu::HandleDLCLicenseChange() { - // update the lock flag - handleSkinIndexChanged(); -} -#endif -#if 0 -int UIScene_SkinSelectMenu::MustSignInReturned( - void* pParam, int iPad, C4JStorage::EMessageResult result) { - if (result == C4JStorage::EMessage_ResultAccept) { -#if 0 - SQRNetworkManager_PS3::AttemptPSNSignIn( - &UIScene_SkinSelectMenu::PSNSignInReturned, pParam, true); -#elif 0 - SQRNetworkManager_Vita::AttemptPSNSignIn( - &UIScene_SkinSelectMenu::PSNSignInReturned, pParam, true); -#elif 0 - SQRNetworkManager_Orbis::AttemptPSNSignIn( - &UIScene_SkinSelectMenu::PSNSignInReturned, pParam, true); -#endif - } - return 0; -} - -int UIScene_SkinSelectMenu::PSNSignInReturned(void* pParam, bool bContinue, - int iPad) { - if (bContinue) { - } - return 0; -} -#endif // 0 \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h index d7158d582..6675048f8 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_SkinSelectMenu.h @@ -12,16 +12,6 @@ private: // 4J Stu - How many to show on each side of the main control static const int sidePreviewControls = 4; -#if 0 - enum ETouchInput { - ETouchInput_TabLeft = 10, - ETouchInput_TabRight, - ETouchInput_TabCenter, - ETouchInput_IggyCharacters, - - ETouchInput_Count, - }; -#endif enum ESkinSelectNavigation { eSkinNavigation_Pack, @@ -49,19 +39,9 @@ private: UIControl_Label m_labelSelected; UIControl m_controlSkinNamePlate, m_controlSelectedPanel, m_controlIggyCharacters, m_controlTimer; -#if 0 - UIControl_Touch m_TouchTabLeft, m_TouchTabRight, m_TouchTabCenter, - m_TouchIggyCharacters; -#endif IggyName m_funcSetPlayerCharacterSelected, m_funcSetCharacterLocked; IggyName m_funcSetLeftLabel, m_funcSetRightLabel, m_funcSetCentreLabel; UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) -#if 0 - UI_MAP_ELEMENT(m_TouchTabLeft, "TouchTabLeft") - UI_MAP_ELEMENT(m_TouchTabRight, "TouchTabRight") - UI_MAP_ELEMENT(m_TouchTabCenter, "TouchTabCenter") - UI_MAP_ELEMENT(m_TouchIggyCharacters, "TouchIggyCharacters") -#endif UI_MAP_ELEMENT(m_controlSkinNamePlate, "SkinNamePlate") UI_BEGIN_MAP_CHILD_ELEMENTS(m_controlSkinNamePlate) UI_MAP_ELEMENT(m_labelSkinName, "SkinTitle1") @@ -120,11 +100,6 @@ private: public: UIScene_SkinSelectMenu(int iPad, void* initData, UILayer* parentLayer); -#if 0 - virtual ~UIScene_SkinSelectMenu() { - DeleteCriticalSection(&m_DLCInstallCS); - } -#endif virtual void tick(); @@ -167,9 +142,6 @@ private: virtual void HandleDLCMountingComplete(); virtual void HandleDLCInstalled(); -#if 0 - virtual void HandleDLCLicenseChange(); -#endif void showNotOnlineDialog(int iPad); @@ -179,24 +151,8 @@ private: void AddFavoriteSkin(int iPad, int iSkinID); void InputActionOK(unsigned int iPad); -#if 0 - virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, - bool bPressed, bool bRepeat, bool bReleased); -#endif //0 virtual void handleReload(); -#if 0 - bool m_bErrorDialogRunning; -#endif -#if 0 - static int MustSignInReturned(void* pParam, int iPad, - C4JStorage::EMessageResult result); - static int PSNSignInReturned(void* pParam, bool bContinue, int iPad); -#endif -#if 0 - CRITICAL_SECTION m_DLCInstallCS; // to prevent a race condition between the - // install and the mounted callback -#endif }; \ No newline at end of file diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TeleportMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_TeleportMenu.cpp index cd33b4c1e..1c4b36906 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TeleportMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TeleportMenu.cpp @@ -43,7 +43,7 @@ UIScene_TeleportMenu::UIScene_TeleportMenu(int iPad, void* initData, ++m_playersCount; std::wstring playerName = L""; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { @@ -125,7 +125,7 @@ void UIScene_TeleportMenu::handleReload() { ++m_playersCount; std::wstring playerName = L""; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { @@ -184,7 +184,7 @@ void UIScene_TeleportMenu::tick() { } std::wstring playerName = L""; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { @@ -218,9 +218,6 @@ void UIScene_TeleportMenu::handleInput(int iPad, int key, bool repeat, } break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif case ACTION_MENU_UP: case ACTION_MENU_DOWN: case ACTION_MENU_PAGEUP: @@ -289,7 +286,7 @@ void UIScene_TeleportMenu::OnPlayerChanged(void* callbackParam, ++scene->m_playersCount; std::wstring playerName = L""; -#ifndef _CONTENT_PACKAGE +#if !defined(_CONTENT_PACKAGE) if (app.DebugSettingsOn() && (app.GetGameSettingsDebugMask() & (1L << eDebugSetting_DebugLeaderboards))) { diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp index 0800642ed..9c2c91211 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TradingMenu.cpp @@ -57,9 +57,6 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void* _initData, // success or fail ui.OverrideSFX(m_iPad, ACTION_MENU_A, true); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, true); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, true); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, true); ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, true); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, true); @@ -103,9 +100,6 @@ void UIScene_TradingMenu::handleDestroy() { ui.OverrideSFX(m_iPad, ACTION_MENU_A, false); ui.OverrideSFX(m_iPad, ACTION_MENU_OK, false); -#if 0 - ui.OverrideSFX(m_iPad, ACTION_MENU_TOUCHPAD_PRESS, false); -#endif ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT_SCROLL, false); ui.OverrideSFX(m_iPad, ACTION_MENU_RIGHT_SCROLL, false); ui.OverrideSFX(m_iPad, ACTION_MENU_LEFT, false); diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.cpp index 9bb2f59e5..ebe4cdb55 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.cpp @@ -32,9 +32,6 @@ void UIScene_TrialExitUpsell::handleInput(int iPad, int key, bool repeat, navigateBack(); break; case ACTION_MENU_OK: -#if 0 - case ACTION_MENU_TOUCHPAD_PRESS: -#endif if (pressed) { // CD - Added for audio ui.PlayUISFX(eSFX_Press); @@ -47,19 +44,6 @@ void UIScene_TrialExitUpsell::handleInput(int iPad, int key, bool repeat, ui.PlayUISFX(eSFX_Press); // 4J-PB - need to check this user can access the store -#if 0 || 0 - bool bContentRestricted; - ProfileManager.GetChatAndContentRestrictions( - ProfileManager.GetPrimaryPad(), true, NULL, - &bContentRestricted, NULL); - if (bContentRestricted) { - unsigned int uiIDA[1]; - uiIDA[0] = IDS_CONFIRM_OK; - ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, - IDS_CONTENT_RESTRICTION, uiIDA, 1, - ProfileManager.GetPrimaryPad()); - } else -#endif { TelemetryManager->RecordUpsellPresented( iPad, eSen_UpsellID_Full_Version_Of_Game, diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.h b/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.h index 96562b5d9..8f50f7843 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.h +++ b/Minecraft.Client/Platform/Common/UI/UIScene_TrialExitUpsell.h @@ -13,9 +13,7 @@ public: virtual EUIScene getSceneType() { return eUIScene_TrialExitUpsell; } // Returns true if this scene has focus for the pad passed in -#if 1 virtual bool hasFocus(int iPad) { return bHasFocus; } -#endif virtual void updateTooltips(); protected: diff --git a/Minecraft.Client/Platform/Common/UI/UIString.cpp b/Minecraft.Client/Platform/Common/UI/UIString.cpp index 3155f9426..75a532663 100644 --- a/Minecraft.Client/Platform/Common/UI/UIString.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIString.cpp @@ -82,11 +82,7 @@ int UIString::s_currentLocale = -1; UIString::UIString() { m_core = std::shared_ptr(); } UIString::UIString(int ids) { -#if 0 - StringBuilder builder = StringBuilder(new IdsStringBuilder(ids)); -#else StringBuilder builder = [ids]() { return app.GetString(ids); }; -#endif UIStringCore* core = new UIStringCore(builder); m_core = std::shared_ptr(core); } @@ -114,9 +110,7 @@ UIString::UIString(const wchar_t* constant) { } UIString::~UIString() { -#if 1 m_core = nullptr; -#endif } bool UIString::empty() { return m_core.get() == NULL; } diff --git a/Minecraft.Client/Platform/Common/UI/UIString.h b/Minecraft.Client/Platform/Common/UI/UIString.h index 7143c3fb9..d9f2de635 100644 --- a/Minecraft.Client/Platform/Common/UI/UIString.h +++ b/Minecraft.Client/Platform/Common/UI/UIString.h @@ -3,34 +3,9 @@ #include #include -#if 1 typedef std::function StringBuilder; -#else - -class StringBuilderCore { -public: - virtual std::wstring getString() = 0; -}; - -struct StringBuilder { - std::shared_ptr m_coreBuilder; - virtual std::wstring operator()() { return m_coreBuilder->getString(); } - StringBuilder() {} - StringBuilder(StringBuilderCore* core) { - m_coreBuilder = std::shared_ptr(core); - } -}; - -class IdsStringBuilder : public StringBuilderCore { - const int m_ids; - -public: - IdsStringBuilder(int ids) : m_ids(ids) {} - virtual std::wstring getString(void) { return app.GetString(m_ids); } -}; -#endif class UIString { protected: diff --git a/Minecraft.Client/Platform/Common/UI/UIStructs.h b/Minecraft.Client/Platform/Common/UI/UIStructs.h index a63b435f3..1e69d976d 100644 --- a/Minecraft.Client/Platform/Common/UI/UIStructs.h +++ b/Minecraft.Client/Platform/Common/UI/UIStructs.h @@ -210,30 +210,15 @@ typedef struct _SaveListDetails { int saveId; std::uint8_t* pbThumbnailData; unsigned int dwThumbnailSize; -#if 0 - wchar_t UTF16SaveName[128]; - wchar_t UTF16SaveFilename[MAX_SAVEFILENAME_LENGTH]; -#else char UTF8SaveName[128]; -#if 1 char UTF8SaveFilename[MAX_SAVEFILENAME_LENGTH]; -#endif -#endif _SaveListDetails() { saveId = 0; pbThumbnailData = NULL; dwThumbnailSize = 0; -#if 0 - ZeroMemory(UTF16SaveName, sizeof(wchar_t) * 128); - ZeroMemory(UTF16SaveFilename, - sizeof(wchar_t) * MAX_SAVEFILENAME_LENGTH); -#else ZeroMemory(UTF8SaveName, 128); -#if 1 ZeroMemory(UTF8SaveFilename, MAX_SAVEFILENAME_LENGTH); -#endif -#endif } } SaveListDetails; @@ -357,16 +342,10 @@ typedef struct _LoadingInputParams { } LoadingInputParams; // Tutorial -#if 1 class UIScene; -#endif class Tutorial; typedef struct _TutorialPopupInfo { -#if 0 - CXuiScene* interactScene; -#else UIScene* interactScene; -#endif const wchar_t* desc; const wchar_t* title; int icon; diff --git a/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h b/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h index 9784fe2fc..351a0d487 100644 --- a/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h +++ b/Minecraft.Client/Platform/Common/XML/xmlFilesCallback.h @@ -1,6 +1,6 @@ #pragma once -#ifndef XMLMOJANGCALLBACK_H +#if !defined(XMLMOJANGCALLBACK_H) #define XMLMOJANGCALLBACK_H // xml reading @@ -135,11 +135,7 @@ public: { wcsncpy_s( wValue, pAttributes[i].strValue, pAttributes[i].ValueLen); -#if 0 - iValue=_wtoi(wValue); -#else iValue=wcstol(wValue, NULL, 10); -#endif } } } @@ -147,9 +143,9 @@ public: // if the xuid hasn't been defined, then we can't use the data if(iValue!=-1) { - #ifdef _DEBUG +#if defined(_DEBUG) wprintf(L"Type - %s, Value - %d, ",wType, iValue); - #endif +#endif return CConsoleMinecraftApp::RegisterConfigValues(wType, iValue ); } @@ -283,11 +279,7 @@ public: { wcsncpy_s( wConfig, pAttributes[i].strValue, pAttributes[i].ValueLen); -#if 0 - iConfig=_wtoi(wConfig); -#else iConfig=wcstol(wConfig, NULL, 10); -#endif } } else if (_wcsicmp(wAttName,L"DataFile")==0) @@ -303,7 +295,7 @@ public: // if the xuid hasn't been defined, then we can't use the data if(ullFull!=0LL) { -#ifdef _DEBUG +#if defined(_DEBUG) wprintf(L"Type - %ls, Name - %ls, ",wType, wNameBanner); #endif app.DebugPrintf("Full = %lld, Trial %lld\n",ullFull,ullTrial); @@ -336,4 +328,4 @@ public: }; -#endif \ No newline at end of file +#endif