Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
475f5ac496 | ||
|
|
ef7d4658dc |
@@ -1085,13 +1085,6 @@ void Gui::render(float a, bool mouseFree, int xMouse, int yMouse)
|
|||||||
|
|
||||||
vector<wstring> lines;
|
vector<wstring> lines;
|
||||||
|
|
||||||
// Only show version/branch for player 0 to avoid cluttering each splitscreen viewport
|
|
||||||
if (iPad == 0)
|
|
||||||
{
|
|
||||||
lines.push_back(ClientConstants::VERSION_STRING);
|
|
||||||
lines.push_back(ClientConstants::GetLCENString());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr)
|
if (minecraft->options->renderDebug && minecraft->player != nullptr && minecraft->level != nullptr)
|
||||||
{
|
{
|
||||||
lines.push_back(minecraft->fpsString);
|
lines.push_back(minecraft->fpsString);
|
||||||
|
|||||||
@@ -10,7 +10,11 @@ public:
|
|||||||
int id;
|
int id;
|
||||||
bool isLoaded;
|
bool isLoaded;
|
||||||
int ticksSinceLastUse;
|
int ticksSinceLastUse;
|
||||||
static const int UNUSED_TICKS_TO_FREE = 20;
|
// @CDevJoud
|
||||||
|
// changing the lifetime of the texture from 20 ticks(1 sec) to 200 ticks (10 sec)
|
||||||
|
// as it helps the texture to have longer lifetime and reducing the usage of loadTexture for every second/frame
|
||||||
|
// note that we dont remove the code that removes the textures from `tick()` as it is required in memory limited environment such as older Consoles(PS3/XBOX360)
|
||||||
|
static const int UNUSED_TICKS_TO_FREE = 200;
|
||||||
|
|
||||||
MemTexture(const wstring& _name, PBYTE pbData, DWORD dwBytes, MemTextureProcessor *processor);
|
MemTexture(const wstring& _name, PBYTE pbData, DWORD dwBytes, MemTextureProcessor *processor);
|
||||||
~MemTexture();
|
~MemTexture();
|
||||||
|
|||||||
@@ -985,7 +985,9 @@ void CleanupDevice()
|
|||||||
static Minecraft* InitialiseMinecraftRuntime()
|
static Minecraft* InitialiseMinecraftRuntime()
|
||||||
{
|
{
|
||||||
app.loadMediaArchive();
|
app.loadMediaArchive();
|
||||||
RenderManager.Initialise(g_pd3dDevice, g_pSwapChain);
|
// @CDevJoud: No need to call this method as it gets called once in `InitDevice()`
|
||||||
|
// Calling it again and it results of 20MB of memory leak!
|
||||||
|
//RenderManager.Initialise(g_pd3dDevice, g_pSwapChain);
|
||||||
app.loadStringTable();
|
app.loadStringTable();
|
||||||
ui.init(g_pd3dDevice, g_pImmediateContext, g_pRenderTargetView, g_pDepthStencilView, g_rScreenWidth, g_rScreenHeight);
|
ui.init(g_pd3dDevice, g_pImmediateContext, g_pRenderTargetView, g_pDepthStencilView, g_rScreenWidth, g_rScreenHeight);
|
||||||
InputManager.Initialise(1, 3, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
|
InputManager.Initialise(1, 3, MINECRAFT_ACTION_MAX, ACTION_MAX_MENU);
|
||||||
@@ -1133,7 +1135,8 @@ void StartGame(Win64LaunchOptions launchOptions, int nCmdShow)
|
|||||||
Minecraft* pMinecraft = InitialiseMinecraftRuntime();
|
Minecraft* pMinecraft = InitialiseMinecraftRuntime();
|
||||||
if (!pMinecraft) { CleanupDevice(); return; }
|
if (!pMinecraft) { CleanupDevice(); return; }
|
||||||
g_bResizeReady = true;
|
g_bResizeReady = true;
|
||||||
|
ShowWindow(g_hWnd, (nCmdShow != SW_HIDE) ? SW_SHOWMAXIMIZED : nCmdShow);
|
||||||
|
UpdateWindow(g_hWnd);
|
||||||
MSG msg = {0};
|
MSG msg = {0};
|
||||||
while (WM_QUIT != msg.message && !app.m_bShutdown)
|
while (WM_QUIT != msg.message && !app.m_bShutdown)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -109,9 +109,11 @@ Stat *CommonStats::get_itemsUsed(int itemId)
|
|||||||
#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE)
|
#if (defined _EXTENDED_ACHIEVEMENTS) && (!defined _XBOX_ONE)
|
||||||
// 4J-JEV: I've done the same thing here, we can't place these items anyway.
|
// 4J-JEV: I've done the same thing here, we can't place these items anyway.
|
||||||
if (itemId == Item::porkChop_cooked_Id) return Stats::blocksPlaced[itemId];
|
if (itemId == Item::porkChop_cooked_Id) return Stats::blocksPlaced[itemId];
|
||||||
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (itemId == Item::porkChop_cooked_Id) return Stats::blocksPlaced[itemId];
|
if (itemId == Item::porkChop_cooked_Id) return Stats::blocksPlaced[itemId];
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Stat *CommonStats::get_itemsBought(int itemId)
|
Stat *CommonStats::get_itemsBought(int itemId)
|
||||||
|
|||||||
Reference in New Issue
Block a user