* Remove debug console - it's now behind a GameMod

* Remove log counter.
This commit is contained in:
iProgramInCpp
2023-08-28 20:45:05 +03:00
parent 08aadb8535
commit d88e0a7643
4 changed files with 7 additions and 7 deletions

View File

@@ -37,6 +37,7 @@
//#define MOD_USE_FLAT_WORLD // Use a flat world instead of the regular world generation
//#define MOD_USE_BIGGER_SCREEN_SIZE // Use a bigger screen size instead of 854x480
//#define MOD_DONT_COLOR_GRASS // Don't give the top of grass tiles a different color. (like Classic)
#define MOD_POPOUT_CONSOLE // Open a separate console aside from the game window. By default only the debugger can see our logs. Win32 Debug only.
// Tests
//#define TEST_DROPPED_ITEMS // Allow dropped items to be dropped and collected.

View File

@@ -123,13 +123,13 @@ void CheckOptionalTextureAvailability()
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
#ifdef _DEBUG
#if defined(_DEBUG) && defined(MOD_POPOUT_CONSOLE)
AllocConsole();
FILE* ostream;
FILE* istream;
freopen_s(&ostream, "CONOUT$", "w", stdout);
freopen_s(&istream, "CONIN$", "r", stdin);
SetConsoleTitle("Minecraft C++ Debug Console");
SetConsoleTitle("ReMinecraftPE Debug Console");
#endif
SetInstance(hInstance);

View File

@@ -525,7 +525,7 @@ void GameRenderer::renderLevel(float f)
if (bAnaglyph)
glColorMask(true, true, true, false);
}
int logs = 0;
void GameRenderer::render(float f)
{
if (m_pMinecraft->m_pLocalPlayer && m_pMinecraft->m_bGrabbedMouse)
@@ -636,7 +636,7 @@ void GameRenderer::render(float f)
std::stringstream debugText;
debugText << "ReMinecraftPE " << m_pMinecraft->getVersionString();
debugText << "\n" << m_shownFPS << " fps, " << m_shownChunkUpdates << " chunk updates" << " logs: " << logs;
debugText << "\n" << m_shownFPS << " fps, " << m_shownChunkUpdates << " chunk updates";
if (m_pMinecraft->m_options.m_bDebugText)
{

View File

@@ -4,8 +4,6 @@
#include "Logger.hpp"
#include "Util.hpp"
extern int logs;
Logger* Logger::m_singleton = nullptr;
Logger* const Logger::singleton()
@@ -28,8 +26,9 @@ Logger::~Logger()
void Logger::print(const char* const str)
{
// iProgramInCpp changed this to printf because he was worried that
// the std::cout features wouldn't work in emscripten.
::printf("%s\n", str);
logs++;
}
void Logger::print(std::string str)