diff --git a/Minecraft.Client/AchievementPopup.cpp b/Minecraft.Client/AchievementPopup.cpp index 04f822ab..45603454 100644 --- a/Minecraft.Client/AchievementPopup.cpp +++ b/Minecraft.Client/AchievementPopup.cpp @@ -25,7 +25,12 @@ AchievementPopup::AchievementPopup(Minecraft *mc) void AchievementPopup::popup(Achievement *ach) { title = I18n::get(L"achievement.get"); - desc = ach->name; + if (title == L"achievement.get") + title = L"Achievement Get!"; + + desc = I18n::get(ach->name); + if (desc == ach->name) + desc = ach->getDescription(); startTime = System::currentTimeMillis(); this->ach = ach; isHelper = false; @@ -69,7 +74,7 @@ void AchievementPopup::prepareWindow() void AchievementPopup::render() { // 4J Unused -#if 0 + if (Minecraft::warezTime > 0) { glDisable(GL_DEPTH_TEST); @@ -115,17 +120,17 @@ void AchievementPopup::render() int xx = width - 160; int yy = 0 - (int) (yo * 36); - int tex = mc->textures->loadTexture(L"/achievement/bg.png"); - glColor4f(1, 1, 1, 1); glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, tex); + mc->textures->bindTexture(L"/achievement/bg.png"); + glColor4f(1, 1, 1, 1); glDisable(GL_LIGHTING); blit(xx, yy, 96, 202, 160, 32); if (isHelper) { - mc->font->drawWordWrap(desc, xx + 30, yy + 7, 120, 0xffffffff); + mc->font->draw(title, xx + 30, yy + 7, 0xffffff00); + mc->font->draw(desc, xx + 30, yy + 18, 0xffffffff); } else { @@ -147,5 +152,5 @@ void AchievementPopup::render() glDepthMask(true); glEnable(GL_DEPTH_TEST); -#endif + } \ No newline at end of file diff --git a/Minecraft.Client/AchievementScreen.cpp b/Minecraft.Client/AchievementScreen.cpp index 26f20326..bcd36243 100644 --- a/Minecraft.Client/AchievementScreen.cpp +++ b/Minecraft.Client/AchievementScreen.cpp @@ -157,8 +157,6 @@ void AchievementScreen::renderLabels() void AchievementScreen::renderBg(int xm, int ym, float a) { - // 4J Unused -#if 0 int xScroll = Mth::floor(xScrollO + (xScrollP - xScrollO) * a); int yScroll = Mth::floor(yScrollO + (yScrollP - yScrollO) * a); @@ -168,8 +166,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) if (yScroll >= yMax) yScroll = yMax - 1; - int terrainTex = minecraft->textures->loadTexture(L"/terrain.png"); - int tex = minecraft->textures->loadTexture(L"/achievement/bg.png"); + // Textures bound inline at usage sites via bindTexture() int xo = (width - imageWidth) / 2; int yo = (height - imageHeight) / 2; @@ -189,7 +186,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) glEnable(GL_RESCALE_NORMAL); glEnable(GL_COLOR_MATERIAL); - minecraft->textures->bind(terrainTex); + minecraft->textures->bindTexture(L"/terrain.png"); int leftTile = (xScroll + EDGE_VALUE_X) >> 4; int topTile = (yScroll + EDGE_VALUE_Y) >> 4; @@ -202,6 +199,16 @@ void AchievementScreen::renderBg(int xm, int ym, float a) const int diamondLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 19) / 10; const int bedrockLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 31) / 10; + // Standard terrain.png tile indices (16-wide atlas, row*16+col) + const int TEX_SAND = 18; // row 1, col 2 + const int TEX_BEDROCK = 17; // row 1, col 1 + const int TEX_DIAMOND_ORE = 50; // row 3, col 2 + const int TEX_REDSTONE_ORE = 51; // row 3, col 3 + const int TEX_IRON_ORE = 33; // row 2, col 1 + const int TEX_COAL_ORE = 34; // row 2, col 2 + const int TEX_STONE = 1; // row 0, col 1 + const int TEX_DIRT = 2; // row 0, col 2 + Random *random = new Random(); for (int tileY = 0; (tileY * 16) - yMod < BIGMAP_HEIGHT; tileY++) @@ -216,38 +223,38 @@ void AchievementScreen::renderBg(int xm, int ym, float a) random->setSeed(1234 + leftTile + tileX); random->nextInt(); int heightValue = random->nextInt(1 + topTile + tileY) + (topTile + tileY) / 2; - int tileType = Tile::sand->tex; + int tileType = TEX_SAND; if (heightValue > bedrockLevel || (topTile + tileY) == MAX_BG_TILE_Y) { - tileType = Tile::unbreakable->tex; + tileType = TEX_BEDROCK; } else if (heightValue == diamondLevel) { if (random->nextInt(2) == 0) { - tileType = Tile::diamondOre->tex; + tileType = TEX_DIAMOND_ORE; } else { - tileType = Tile::redStoneOre->tex; + tileType = TEX_REDSTONE_ORE; } } else if (heightValue == ironLevel) { - tileType = Tile::ironOre->tex; + tileType = TEX_IRON_ORE; } else if (heightValue == coalLevel) { - tileType = Tile::coalOre->tex; + tileType = TEX_COAL_ORE; } else if (heightValue > rockLevel) { - tileType = Tile::rock->tex; + tileType = TEX_STONE; } else if (heightValue > 0) { - tileType = Tile::dirt->tex; + tileType = TEX_DIRT; } this->blit(xBigMap + tileX * 16 - xMod, yBigMap + tileY * 16 - yMod, (tileType % 16) << 4, (tileType >> 4) << 4, 16, 16); @@ -326,7 +333,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) glColor4f(br, br, br, 1); } - minecraft->textures->bind(tex); + minecraft->textures->bindTexture(L"/achievement/bg.png"); int xx = xBigMap + x; int yy = yBigMap + y; if (ach->isGolden()) @@ -364,7 +371,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); glColor4f(1, 1, 1, 1); - minecraft->textures->bind(tex); + minecraft->textures->bindTexture(L"/achievement/bg.png"); blit(xo, yo, 0, 0, imageWidth, imageHeight); @@ -396,7 +403,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) } fillGradient(x - 3, y - 3, x + width + 3, y + height + 3 + 12, 0xc0000000, 0xc0000000); - font->drawWordWrap(descr, x, y + 12, width, 0xffa0a0a0); + font->drawWordWrap(descr, x, y + 12, width, 0xffa0a0a0, font->wordWrapHeight(descr, width)); if (statsCounter->hasTaken(ach)) { font->drawShadow(I18n::get(L"achievement.taken"), x, y + height + 4, 0xff9090ff); @@ -408,7 +415,7 @@ void AchievementScreen::renderBg(int xm, int ym, float a) wstring msg = I18n::get(L"achievement.requires", ach->requires->name); int height = font->wordWrapHeight(msg, width); fillGradient(x - 3, y - 3, x + width + 3, y + height + 12 + 3, 0xc0000000, 0xc0000000); - font->drawWordWrap(msg, x, y + 12, width, 0xff705050); + font->drawWordWrap(msg, x, y + 12, width, 0xff705050, font->wordWrapHeight(msg, width)); } font->drawShadow(name, x, y, statsCounter->canTake(ach) ? ach->isGolden() ? 0xffffff80 : 0xffffffff : ach->isGolden() ? 0xff808040 : 0xff808080); @@ -417,7 +424,6 @@ void AchievementScreen::renderBg(int xm, int ym, float a) glEnable(GL_DEPTH_TEST); glEnable(GL_LIGHTING); Lighting::turnOff(); -#endif } bool AchievementScreen::isPauseScreen() diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp index e7d907ec..e71fd22c 100644 --- a/Minecraft.Client/Common/UI/UIScene.cpp +++ b/Minecraft.Client/Common/UI/UIScene.cpp @@ -992,6 +992,7 @@ bool UIScene::allowRepeat(int key) void UIScene::externalCallback(IggyExternalFunctionCallUTF16 * call) { + printf("externalCallback: [%S]\n", call->function_name.string); if(wcscmp((wchar_t *)call->function_name.string,L"handlePress")==0) { if(call->num_arguments != 2) diff --git a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp index d1999bbe..85dcb60a 100644 --- a/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_DLCMainMenu.cpp @@ -57,7 +57,7 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void *initData, UILayer *pare m_buttonListOffers.addItem(app.GetString(IDS_DLC_MENU_SKINPACKS), e_DLC_SkinPack); m_buttonListOffers.addItem(app.GetString(IDS_DLC_MENU_TEXTUREPACKS), e_DLC_TexturePacks); m_buttonListOffers.addItem(app.GetString(IDS_DLC_MENU_MASHUPPACKS), e_DLC_MashupPacks); - m_buttonListOffers.addItem(app.GetString(IDS_DLC_MENU_WORLDS), e_DLC_Worlds); + m_buttonListOffers.addItem("Worlds", e_DLC_Worlds); app.AddDLCRequest(e_Marketplace_Content); app.StartInstallDLCProcess(iPad); @@ -74,6 +74,7 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void *initData, UILayer *pare if (wcscmp(offer.wszType, L"SkinPack") == 0) eType = e_DLC_SkinPack; else if (wcscmp(offer.wszType, L"TexturePack") == 0) eType = e_DLC_TexturePacks; else if (wcscmp(offer.wszType, L"MashUp") == 0) eType = e_DLC_MashupPacks; + else if (wcscmp(offer.wszType, L"World") == 0) eType = e_DLC_Worlds; CMinecraftApp::RegisterW64DLC( eType, diff --git a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp index 8896a968..525ae802 100644 --- a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp @@ -6,6 +6,10 @@ #include "..\..\MinecraftServer.h" #include "UI.h" #include "UIScene_MainMenu.h" +#ifdef _WINDOWS64 +#include "AchievementScreen.h" +#include "StatsCounter.h" +#endif #ifdef __ORBIS__ #include #endif @@ -279,6 +283,8 @@ void UIScene_MainMenu::handleInput(int iPad, int key, bool repeat, bool pressed, void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) { + printf("[DBG] handlePress controlId=%d childId=%d\n", (int)controlId, (int)childId); + int primaryPad = ProfileManager.GetPrimaryPad(); int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL; @@ -942,7 +948,11 @@ int UIScene_MainMenu::Achievements_SignInReturned(void *pParam,bool bContinue,in // 4J-JEV: We only need to update rich-presence if the sign-in status changes. ProfileManager.SetCurrentGameActivity(iPad, CONTEXT_PRESENCE_MENUS, false); +#ifdef _WINDOWS64 + pClass->RunAchievements(iPad); +#else XShowAchievementsUI( ProfileManager.GetPrimaryPad() ); +#endif } else { @@ -1908,7 +1918,28 @@ void UIScene_MainMenu::tick() void UIScene_MainMenu::RunAchievements(int iPad) { -#if TO_BE_IMPLEMENTED +#ifdef _WINDOWS64 + printf("[DBG] RunAchievements called\n"); + if(ProfileManager.IsGuest(iPad)) + { + printf("[DBG] IsGuest - showing message\n"); + UINT uiIDA[1]; + uiIDA[0]=IDS_OK; + ui.RequestMessageBox(IDS_PRO_GUESTPROFILE_TITLE, IDS_PRO_GUESTPROFILE_TEXT, uiIDA, 1); + } + else + { + printf("[DBG] Getting minecraft instance\n"); + Minecraft *minecraft = Minecraft::GetInstance(); + printf("[DBG] minecraft=%p\n", minecraft); + if (minecraft) + { + printf("[DBG] Calling setScreen\n"); + minecraft->setScreen(new AchievementScreen(new StatsCounter())); + printf("[DBG] setScreen returned\n"); + } + } +#elif TO_BE_IMPLEMENTED UINT uiIDA[1]; uiIDA[0]=IDS_OK; @@ -2051,4 +2082,4 @@ int UIScene_MainMenu::SelectNetworkModeReturned(void *pParam,int iPad,C4JStorage pClass->updateTooltips(); return 0; } -#endif //__PSVITA__ +#endif //__PSVITA__ \ No newline at end of file diff --git a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp index d9569cc9..b4fdec10 100644 --- a/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_PauseMenu.cpp @@ -619,11 +619,11 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) Windows::Xbox::ApplicationModel::Help::Show(user); } break; -#elif TO_BE_IMPLEMENTED +#endif case BUTTON_PAUSE_ACHIEVEMENTS: // guests can't look at achievements - if(ProfileManager.IsGuest(pNotifyPressData->UserIndex)) + if(ProfileManager.IsGuest(m_iPad)) { UINT uiIDA[1]; uiIDA[0]=IDS_OK; @@ -631,10 +631,10 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId) } else { - XShowAchievementsUI( pNotifyPressData->UserIndex ); + XShowAchievementsUI( m_iPad ); } break; -#endif + case BUTTON_PAUSE_HELPANDOPTIONS: ui.NavigateToScene(m_iPad,eUIScene_HelpAndOptionsMenu); diff --git a/Minecraft.Client/Extrax64Stubs.cpp b/Minecraft.Client/Extrax64Stubs.cpp index 94cf6b66..fe82c873 100644 --- a/Minecraft.Client/Extrax64Stubs.cpp +++ b/Minecraft.Client/Extrax64Stubs.cpp @@ -20,6 +20,8 @@ #include "StatsCounter.h" #include "Windows64\Social\SocialManager.h" #include "Windows64\Sentient\DynamicConfigurations.h" +#include "AchievementScreen.h" +#include "Minecraft.h" #elif defined __PSVITA__ #include "PSVita\Sentient\SentientManager.h" #include "StatsCounter.h" @@ -76,7 +78,17 @@ DWORD XShowPartyUI(DWORD dwUserIndex) { return 0; } DWORD XShowFriendsUI(DWORD dwUserIndex) { return 0; } HRESULT XPartyGetUserList(XPARTY_USER_LIST *pUserList) { return S_OK; } DWORD XContentGetThumbnail(DWORD dwUserIndex, const XCONTENT_DATA *pContentData, PBYTE pbThumbnail, PDWORD pcbThumbnail, PXOVERLAPPED *pOverlapped) { return 0; } -void XShowAchievementsUI(int i) {} +void XShowAchievementsUI(int i) +{ + + Minecraft *minecraft = Minecraft::GetInstance(); + if (minecraft && i >= 0 && i < 4 && minecraft->stats[i] != NULL) + { + minecraft->setScreen(NULL); + minecraft->setScreen(new AchievementScreen(minecraft->stats[i])); + } + +} DWORD XBackgroundDownloadSetMode(XBACKGROUND_DOWNLOAD_MODE Mode) { return 0; } #ifndef _DURANGO @@ -903,7 +915,7 @@ wstring C_4JProfile::GetDisplayName(int iPad) return displayName; } #endif -bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; } +bool C_4JProfile::IsFullVersion() { return true; } void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {} void C_4JProfile::SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam) {} bool C_4JProfile::RegionIsNorthAmerica(void) { return false; } @@ -924,6 +936,10 @@ int C_4JProfile::SetOldProfileVersionCallback(int( *Func)(LPVOID,unsigned ch // To store the dashboard preferences for controller flipped, etc. C_4JProfile::PROFILESETTINGS ProfileSettingsA[XUSER_MAX_COUNT]; +#define MAX_AWARDS 32 + +static bool s_awardsUnlocked[XUSER_MAX_COUNT][MAX_AWARDS] = {}; + C_4JProfile::PROFILESETTINGS * C_4JProfile::GetDashboardProfileSettings(int iPad) { return &ProfileSettingsA[iPad]; } void C_4JProfile::WriteToProfile(int iQuadrant, bool bGameDefinedDataChanged, bool bOverride5MinuteLimitOnProfileWrites) {} void C_4JProfile::ForceQueuedProfileWrites(int iPad) {} @@ -941,9 +957,24 @@ void C_4JProfile::RegisterAward(int iAwardNumber,int iGamerconfigID, eAwardTy CXuiStringTable*pStringTable, int iTitleStr, int iTextStr, int iAcceptStr, char *pszThemeName, unsigned int ulThemeSize) {} int C_4JProfile::GetAwardId(int iAwardNumber) { return 0; } eAwardType C_4JProfile::GetAwardType(int iAwardNumber) { return eAwardType_Achievement; } -bool C_4JProfile::CanBeAwarded(int iQuadrant, int iAwardNumber) { return false; } -void C_4JProfile::Award(int iQuadrant, int iAwardNumber, bool bForce) {} -bool C_4JProfile::IsAwardsFlagSet(int iQuadrant, int iAward) { return false; } +bool C_4JProfile::CanBeAwarded(int iQuadrant, int iAwardNumber) +{ + if (iQuadrant < 0 || iQuadrant >= XUSER_MAX_COUNT) return false; + if (iAwardNumber < 0 || iAwardNumber >= MAX_AWARDS) return false; + return !s_awardsUnlocked[iQuadrant][iAwardNumber]; +} +void C_4JProfile::Award(int iQuadrant, int iAwardNumber, bool bForce) +{ + if (iQuadrant < 0 || iQuadrant >= XUSER_MAX_COUNT) return; + if (iAwardNumber < 0 || iAwardNumber >= MAX_AWARDS) return; + s_awardsUnlocked[iQuadrant][iAwardNumber] = true; +} +bool C_4JProfile::IsAwardsFlagSet(int iQuadrant, int iAward) +{ + if (iQuadrant < 0 || iQuadrant >= XUSER_MAX_COUNT) return false; + if (iAward < 0 || iAward >= MAX_AWARDS) return false; + return s_awardsUnlocked[iQuadrant][iAward]; +} void C_4JProfile::RichPresenceInit(int iPresenceCount, int iContextCount) {} void C_4JProfile::RegisterRichPresenceContext(int iGameConfigContextID) {} void C_4JProfile::SetRichPresenceContextValue(int iPad,int iContextID, int iVal) {} @@ -1063,4 +1094,4 @@ void StatsCounter::setupStatBoards() {} #ifdef _DEBUG void StatsCounter::WipeLeaderboards() {} #endif -*/ +*/ \ No newline at end of file diff --git a/Minecraft.Client/LocalPlayer.cpp b/Minecraft.Client/LocalPlayer.cpp index ea66b9e1..da4d27f4 100644 --- a/Minecraft.Client/LocalPlayer.cpp +++ b/Minecraft.Client/LocalPlayer.cpp @@ -609,6 +609,7 @@ bool LocalPlayer::startCrafting(int x, int y, int z) bool LocalPlayer::startEnchanting(int x, int y, int z) { + bool success = app.LoadEnchantingMenu(GetXboxPad(), inventory, x, y, z, level ); if( success ) ui.PlayUISFX(eSFX_Press); //minecraft.setScreen(new EnchantmentScreen(inventory, level, x, y, z)); @@ -762,7 +763,7 @@ void LocalPlayer::awardStat(Stat *stat, byteArray param) //if (!minecraft->stats[m_iPad]->hasTaken(ach)) { // 4J-PB - Don't display the java popup - //minecraft->achievementPopup->popup(ach); + minecraft->achievementPopup->popup(ach); // 4J Stu - Added this function in the libraries as some achievements don't get awarded to all players // e.g. Splitscreen players cannot get theme/avatar/gamerpic and Trial players cannot get any diff --git a/Minecraft.Client/Minecraft.Client.vcxproj b/Minecraft.Client/Minecraft.Client.vcxproj index 95aa7d6e..d8520a9d 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj +++ b/Minecraft.Client/Minecraft.Client.vcxproj @@ -590,6 +590,7 @@ true $(OutDir)$(ProjectName)_D.xex $(ProjectDir)\..\Minecraft.World\x64headers;$(ProjectDir)\Xbox\Sentient\Include;$(IncludePath) + Minecraft true @@ -35485,6 +35486,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU + true true @@ -35507,23 +35509,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU - - true - true - true - true - true - true - true - true - true - true - true - true - true - true - true - + diff --git a/Minecraft.Client/Minecraft.Client.vcxproj.filters b/Minecraft.Client/Minecraft.Client.vcxproj.filters index 1ab8d590..0751d835 100644 --- a/Minecraft.Client/Minecraft.Client.vcxproj.filters +++ b/Minecraft.Client/Minecraft.Client.vcxproj.filters @@ -5961,11 +5961,10 @@ Durango + - - Windows - + diff --git a/Minecraft.Client/PauseScreen.cpp b/Minecraft.Client/PauseScreen.cpp index 18d066b5..22be1c45 100644 --- a/Minecraft.Client/PauseScreen.cpp +++ b/Minecraft.Client/PauseScreen.cpp @@ -9,6 +9,8 @@ #include "..\Minecraft.World\net.minecraft.world.level.h" #include "..\Minecraft.World\net.minecraft.stats.h" #include "..\Minecraft.Client\LocalPlayer.h" +#include "AchievementScreen.h" +#include "StatsScreen.h" PauseScreen::PauseScreen() { @@ -65,11 +67,11 @@ void PauseScreen::buttonClicked(Button button) if (button.id == 5) { -// minecraft->setScreen(new AchievementScreen(minecraft->stats)); // 4J TODO - put back + minecraft->setScreen(new AchievementScreen(minecraft->stats[button.id])); // 4J TODO - put back } if (button.id == 6) { -// minecraft->setScreen(new StatsScreen(this, minecraft->stats)); // 4J TODO - put back + minecraft->setScreen(new StatsScreen(this, minecraft->stats[button.id])); // 4J TODO - put back } } diff --git a/Minecraft.Client/StatsCounter.cpp b/Minecraft.Client/StatsCounter.cpp index 4568c7db..0194961d 100644 --- a/Minecraft.Client/StatsCounter.cpp +++ b/Minecraft.Client/StatsCounter.cpp @@ -34,6 +34,11 @@ StatsCounter::StatsCounter() void StatsCounter::award(Stat* stat, unsigned int difficulty, unsigned int count) { + printf("[StatsCounter] award(): %ls | isAchievement: %s | difficulty: %u | count: %u\n", + stat->name.c_str(), + stat->isAchievement() ? "YES" : "NO", + difficulty, + count); #ifndef _DURANGO if( stat->isAchievement() ) difficulty = 0; @@ -204,10 +209,12 @@ void StatsCounter::save(int player, bool force) { #ifndef _DURANGO // 4J-PB - If this is the trial game, don't save any stats +#ifndef _WINDOWS64 if(!ProfileManager.IsFullVersion()) { return; } +#endif //Check we're going to have enough room to store all possible stats unsigned int uiTotalStatsSize = (Stats::all->size() * 4 * sizeof(unsigned short)) - (Achievements::achievements->size() * 3 * sizeof(unsigned short)) + (LARGE_STATS_COUNT*4*(sizeof(unsigned int)-sizeof(unsigned short))); @@ -302,6 +309,7 @@ void StatsCounter::setLeaderboardRating(XUSER_PROPERTY* prop, LONGLONG value) void StatsCounter::flushLeaderboards() { #ifndef _DURANGO +#ifndef _WINDOWS64 if( LeaderboardManager::Instance()->OpenSession() ) { writeStats(); @@ -310,18 +318,17 @@ void StatsCounter::flushLeaderboards() else { app.DebugPrintf("Failed to open a session in order to write to leaderboard\n"); - - // 4J-JEV: If user was not signed in it would hit this. - //assert(false);// && "Failed to open a session in order to write to leaderboard"); } modifiedBoards = 0; #endif +#endif } void StatsCounter::saveLeaderboards() { #ifndef _DURANGO +#ifndef _WINDOWS64 // 4J-PB - If this is the trial game, no writing leaderboards if(!ProfileManager.IsFullVersion()) { @@ -336,13 +343,11 @@ void StatsCounter::saveLeaderboards() else { app.DebugPrintf("Failed to open a session in order to write to leaderboard\n"); - - // 4J-JEV: If user was not signed in it would hit this. - //assert(false);// && "Failed to open a session in order to write to leaderboard"); } modifiedBoards = 0; #endif +#endif } void StatsCounter::writeStats() @@ -1341,4 +1346,4 @@ void StatsCounter::WipeLeaderboards() } #endif } -#endif +#endif \ No newline at end of file diff --git a/Minecraft.Client/Windows64/GameHDD/20260302103102/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302103102/saveData.ms new file mode 100644 index 00000000..962bbe86 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302103102/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302103251/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302103251/saveData.ms new file mode 100644 index 00000000..bd666f47 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302103251/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302103440/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302103440/saveData.ms new file mode 100644 index 00000000..9b1b5326 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302103440/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302104548/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302104548/saveData.ms new file mode 100644 index 00000000..aee5a5d7 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302104548/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302104635/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302104635/saveData.ms new file mode 100644 index 00000000..873e393c Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302104635/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302105418/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302105418/saveData.ms new file mode 100644 index 00000000..65f3742f Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302105418/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302105446/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302105446/saveData.ms new file mode 100644 index 00000000..b3f9dccc Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302105446/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302105547/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302105547/saveData.ms new file mode 100644 index 00000000..604b18ee Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302105547/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302110507/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302110507/saveData.ms new file mode 100644 index 00000000..30f68847 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302110507/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302110946/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302110946/saveData.ms new file mode 100644 index 00000000..6ab330e8 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302110946/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302111310/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302111310/saveData.ms new file mode 100644 index 00000000..2a4cb457 Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302111310/saveData.ms differ diff --git a/Minecraft.Client/Windows64/GameHDD/20260302114309/saveData.ms b/Minecraft.Client/Windows64/GameHDD/20260302114309/saveData.ms new file mode 100644 index 00000000..40010faa Binary files /dev/null and b/Minecraft.Client/Windows64/GameHDD/20260302114309/saveData.ms differ diff --git a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp index 63be3586..2d201600 100644 --- a/Minecraft.Client/Windows64/Windows64_Minecraft.cpp +++ b/Minecraft.Client/Windows64/Windows64_Minecraft.cpp @@ -844,6 +844,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, freopen("CONIN$", "r", stdin); std::ios::sync_with_stdio(true); #endif + UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); diff --git a/Minecraft.Client/Xbox/MinecraftWindows.rc b/Minecraft.Client/Xbox/MinecraftWindows.rc deleted file mode 100644 index 69ce5334..00000000 Binary files a/Minecraft.Client/Xbox/MinecraftWindows.rc and /dev/null differ diff --git a/Minecraft.Client/app_icon.rc b/Minecraft.Client/app_icon.rc new file mode 100644 index 00000000..4df5c066 --- /dev/null +++ b/Minecraft.Client/app_icon.rc @@ -0,0 +1 @@ +MAINICON ICON "icon.ico" \ No newline at end of file diff --git a/Minecraft.Client/discord_game_sdk.dll b/Minecraft.Client/discord_game_sdk.dll new file mode 100644 index 00000000..10a8928f Binary files /dev/null and b/Minecraft.Client/discord_game_sdk.dll differ diff --git a/Minecraft.Client/icon.ico b/Minecraft.Client/icon.ico new file mode 100644 index 00000000..5f40f3f7 Binary files /dev/null and b/Minecraft.Client/icon.ico differ diff --git a/Minecraft.Client/iggy_w64.dll b/Minecraft.Client/iggy_w64.dll new file mode 100644 index 00000000..43430508 Binary files /dev/null and b/Minecraft.Client/iggy_w64.dll differ diff --git a/Minecraft.Client/mss64.dll b/Minecraft.Client/mss64.dll new file mode 100644 index 00000000..5e19ce1c Binary files /dev/null and b/Minecraft.Client/mss64.dll differ diff --git a/Minecraft.Client/server.properties b/Minecraft.Client/server.properties new file mode 100644 index 00000000..bae44552 --- /dev/null +++ b/Minecraft.Client/server.properties @@ -0,0 +1,9 @@ +allow-nether=true +gamemode=0 +level-name=world +level-type=default +max-build-height=256 +max-players=20 +spawn-animals=true +spawn-monsters=true +spawn-npcs=true diff --git a/Minecraft.World/Achievement.cpp b/Minecraft.World/Achievement.cpp index a0dfd533..cd374b4c 100644 --- a/Minecraft.World/Achievement.cpp +++ b/Minecraft.World/Achievement.cpp @@ -60,7 +60,7 @@ wstring Achievement::getDescription() { if (descFormatter != NULL) { - return descFormatter->format(desc); + return desc; } return desc; }