diff --git a/Minecraft.Client/Common/App_Defines.h b/Minecraft.Client/Common/App_Defines.h index 7e96896c9..88745b11e 100644 --- a/Minecraft.Client/Common/App_Defines.h +++ b/Minecraft.Client/Common/App_Defines.h @@ -55,7 +55,8 @@ enum EGameHostOptionWorldSize e_worldSize_Classic, e_worldSize_Small, e_worldSize_Medium, - e_worldSize_Large + e_worldSize_Large, + e_worldSize_Infinite }; diff --git a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp index ef72ec163..2561d7179 100644 --- a/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_CreateWorldMenu.cpp @@ -1240,6 +1240,10 @@ void UIScene_CreateWorldMenu::CreateGame(UIScene_CreateWorldMenu* pClass, DWORD param->xzSize = LEVEL_WIDTH_LARGE; param->hellScale = HELL_LEVEL_SCALE_LARGE; // hellsize = ceil(5*64/8) = 40 break; + case 4: // Infinite + param->xzSize = LEVEL_WIDTH_INFINITE; + param->hellScale = HELL_LEVEL_SCALE_INFINITE; + break; }; #else param->xzSize = LEVEL_MAX_WIDTH; diff --git a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp index b2981ebf6..d953a0775 100644 --- a/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LaunchMoreOptionsMenu.cpp @@ -6,12 +6,13 @@ #define GAME_CREATE_ONLINE_TIMER_TIME 100 #ifdef _LARGE_WORLDS -int m_iWorldSizeTitleA[4] = +int m_iWorldSizeTitleA[5] = { IDS_WORLD_SIZE_TITLE_CLASSIC, IDS_WORLD_SIZE_TITLE_SMALL, IDS_WORLD_SIZE_TITLE_MEDIUM, IDS_WORLD_SIZE_TITLE_LARGE, + IDS_WORLD_SIZE_TITLE_INFINITE, }; #endif @@ -34,7 +35,8 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini value[1].boolval = false; if(m_params->currentWorldSize == e_worldSize_Classic || m_params->currentWorldSize == e_worldSize_Small || - m_params->currentWorldSize == e_worldSize_Medium ) + m_params->currentWorldSize == e_worldSize_Medium || + m_params->currentWorldSize == e_worldSize_Large ) { // don't show the increase world size stuff if we're already large, or the size is unknown. value[1].boolval = true; @@ -109,7 +111,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini #ifdef _LARGE_WORLDS m_labelWorldSize.init(app.GetString(IDS_WORLD_SIZE)); - m_sliderWorldSize.init(app.GetString(m_iWorldSizeTitleA[m_params->worldSize]),eControl_WorldSize,0,3,m_params->worldSize); + m_sliderWorldSize.init(app.GetString(m_iWorldSizeTitleA[m_params->worldSize]),eControl_WorldSize,0,4,m_params->worldSize); m_checkboxes[eLaunchCheckbox_DisableSaving].init( app.GetString(IDS_DISABLE_SAVING), eLaunchCheckbox_DisableSaving, m_params->bDisableSaving ); @@ -117,7 +119,7 @@ UIScene_LaunchMoreOptionsMenu::UIScene_LaunchMoreOptionsMenu(int iPad, void *ini { m_labelWorldResize.init(app.GetString(IDS_INCREASE_WORLD_SIZE)); int min= static_cast(m_params->currentWorldSize)-1; - int max=3; + int max=4; int curr = static_cast(m_params->newWorldSize)-1; m_sliderWorldResize.init(app.GetString(m_iWorldSizeTitleA[curr]),eControl_WorldResize,min,max,curr); m_checkboxes[eLaunchCheckbox_WorldResizeType].init(app.GetString(IDS_INCREASE_WORLD_SIZE_OVERWRITE_EDGES),eLaunchCheckbox_WorldResizeType,m_params->newWorldSizeOverwriteEdges); diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp index d61a79022..6c70814c5 100644 --- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp +++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp @@ -912,6 +912,10 @@ void UIScene_LoadMenu::StartSharedLaunchFlow() newWorldSize = LEVEL_WIDTH_LARGE; newHellScale = HELL_LEVEL_SCALE_LARGE; break; + case e_worldSize_Infinite: + newWorldSize = LEVEL_WIDTH_INFINITE; + newHellScale = HELL_LEVEL_SCALE_INFINITE; + break; default: assert(0); break; diff --git a/Minecraft.Client/Windows64Media/loc/stringsPlatformSpecific.xml b/Minecraft.Client/Windows64Media/loc/stringsPlatformSpecific.xml index b222769b9..cc20a840a 100644 --- a/Minecraft.Client/Windows64Media/loc/stringsPlatformSpecific.xml +++ b/Minecraft.Client/Windows64Media/loc/stringsPlatformSpecific.xml @@ -261,6 +261,9 @@ If you try to save while using the trial version, you will be given the option t Classic + + Infinite + Game Options diff --git a/Minecraft.Client/Windows64Media/strings.h b/Minecraft.Client/Windows64Media/strings.h index 63e3a7f4e..65f4b7b45 100644 --- a/Minecraft.Client/Windows64Media/strings.h +++ b/Minecraft.Client/Windows64Media/strings.h @@ -2289,3 +2289,4 @@ #define IDS_RICHPRESENCESTATE_BREWING 2283 #define IDS_RICHPRESENCESTATE_ANVIL 2284 #define IDS_RICHPRESENCESTATE_TRADING 2285 +#define IDS_WORLD_SIZE_TITLE_INFINITE 2286 \ No newline at end of file diff --git a/Minecraft.World/ChunkSource.h b/Minecraft.World/ChunkSource.h index 37b0ecc33..f8fa73791 100644 --- a/Minecraft.World/ChunkSource.h +++ b/Minecraft.World/ChunkSource.h @@ -7,13 +7,13 @@ class TilePos; // The maximum number of chunks that we can store #ifdef _LARGE_WORLDS // 4J Stu - Our default map (at zoom level 3) is 1024x1024 blocks (or 64 chunks) -#define LEVEL_MAX_WIDTH (5*64) //(6*54) - +//#define LEVEL_MAX_WIDTH (29999984 / 16) //1,874,999 chunks +#define LEVEL_MAX_WIDTH (6 * 64) // Keep renderer sane #define LEVEL_WIDTH_CLASSIC 54 #define LEVEL_WIDTH_SMALL 64 #define LEVEL_WIDTH_MEDIUM (3*64) #define LEVEL_WIDTH_LARGE (5*64) - +#define LEVEL_WIDTH_INFINITE (29999984 / 16) // Infinite World Size #else #define LEVEL_MAX_WIDTH 54 #endif @@ -31,6 +31,7 @@ class TilePos; #define HELL_LEVEL_SCALE_SMALL 3 #define HELL_LEVEL_SCALE_MEDIUM 6 #define HELL_LEVEL_SCALE_LARGE 8 +#define HELL_LEVEL_SCALE_INFINITE 8 #else #define HELL_LEVEL_MAX_SCALE 3 diff --git a/Minecraft.World/LevelData.cpp b/Minecraft.World/LevelData.cpp index fbc10ddb1..e68952437 100644 --- a/Minecraft.World/LevelData.cpp +++ b/Minecraft.World/LevelData.cpp @@ -145,6 +145,7 @@ LevelData::LevelData(CompoundTag *tag) case LEVEL_WIDTH_CLASSIC: m_classicEdgeMoat = bUseMoat; break; case LEVEL_WIDTH_SMALL: m_smallEdgeMoat = bUseMoat; break; case LEVEL_WIDTH_MEDIUM: m_mediumEdgeMoat = bUseMoat; break; + case LEVEL_WIDTH_LARGE: break; default: assert(0); break; } assert(newWorldSize > m_xzSize); @@ -176,6 +177,7 @@ LevelData::LevelData(CompoundTag *tag) case LEVEL_WIDTH_SMALL: hostOptionworldSize = e_worldSize_Small; break; case LEVEL_WIDTH_MEDIUM: hostOptionworldSize = e_worldSize_Medium; break; case LEVEL_WIDTH_LARGE: hostOptionworldSize = e_worldSize_Large; break; + case LEVEL_WIDTH_INFINITE: hostOptionworldSize = e_worldSize_Infinite; break; default: assert(0); break; } app.SetGameHostOption(eGameHostOption_WorldSize, hostOptionworldSize );