mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Infinite World Gen /WIP
current issue is "Infinite" text wont show up and we can't change level_max_width to 30 million as getGlobalChunkCount() = overworldSize * overworldSize * CHUNK_Y_COUNT so we will be getting a bad_alloc error on boot
This commit is contained in:
parent
4d200a589d
commit
b119bb5949
|
|
@ -55,7 +55,8 @@ enum EGameHostOptionWorldSize
|
|||
e_worldSize_Classic,
|
||||
e_worldSize_Small,
|
||||
e_worldSize_Medium,
|
||||
e_worldSize_Large
|
||||
e_worldSize_Large,
|
||||
e_worldSize_Infinite
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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<int>(m_params->currentWorldSize)-1;
|
||||
int max=3;
|
||||
int max=4;
|
||||
int curr = static_cast<int>(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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -261,6 +261,9 @@ If you try to save while using the trial version, you will be given the option t
|
|||
<data name="IDS_WORLD_SIZE_TITLE_CLASSIC">
|
||||
<value>Classic</value>
|
||||
</data>
|
||||
<data name="IDS_WORLD_SIZE_TITLE_INFINITE">
|
||||
<value>Infinite</value>
|
||||
</data>
|
||||
<data name="IDS_GAME_OPTIONS">
|
||||
<value>Game Options</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue