Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add isometric screenshot feature. #122

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Add isometric screenshot feature. #122

wants to merge 6 commits into from

Conversation

iProgramMC
Copy link
Member

@iProgramMC iProgramMC commented Apr 30, 2024

This pull request adds an isometric screenshot feature to the game.

What is there more to do? The following:

  • Make the game render everything to a single texture, instead of using the main frame buffer. This will also allow a loading screen to be shown instead of the screen being reduced to a flickery mess
  • Actually preserve and stitch the textures together to save them to one file, instead of saving a bunch
  • Maybe have the screenshots be resolution-agnostic? Currently each piece is rendered corresponding to the screen resolution.

@iProgramMC iProgramMC marked this pull request as draft April 30, 2024 15:53
Comment on lines 506 to 513
// getOptions()->m_bAmbientOcclusion = !getOptions()->m_bAmbientOcclusion;
// Minecraft::useAmbientOcclusion = getOptions()->m_bAmbientOcclusion;
// m_pLevelRenderer->allChanged();

if (m_pGameRenderer->m_bIsometric)
m_pGameRenderer->m_isomStage = 100000;
else
m_pGameRenderer->startIsometricRender();
Copy link

@er2off er2off Apr 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhm... no ambient occlusion toggle? maybe remap to other button?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is temporary and will be replaced.

@@ -680,7 +863,7 @@ void GameRenderer::render(float f)
debugText << "ReMinecraftPE " << m_pMinecraft->getVersionString();
debugText << "\n" << m_shownFPS << " fps, " << m_shownChunkUpdates << " chunk updates";

if (m_pMinecraft->getOptions()->m_bDebugText)
if (m_pMinecraft->getOptions()->m_bDebugText && !m_pMinecraft->getOptions()->m_bDontRenderGui)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally! actually it's not part of isometric renderer but anyway

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest this condition is redundant, as if m_bDontRenderGui is true, there's an early return

source/client/renderer/GameRenderer.cpp Outdated Show resolved Hide resolved
@@ -641,8 +845,10 @@ void GameRenderer::render(float f)
renderLevel(f);
if (m_pMinecraft->getOptions()->m_bDontRenderGui)
{
if (!m_pMinecraft->m_pScreen)
if (!m_pMinecraft->m_pScreen) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We definitely need to set up something like clang-format, code is using Microsoft-ish style but some code like this formatted incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants