From d9f2cb03c73b62b04de795a1cd9105d91f0f0b5c Mon Sep 17 00:00:00 2001 From: Tropical <42101043+tropicaaal@users.noreply.github.com> Date: Tue, 7 Apr 2026 18:00:30 -0500 Subject: [PATCH] nuke more unused stubs --- targets/app/common/stubs.cpp | 68 ------------------- targets/app/linux/linux_game_stubs.cpp | 8 --- .../client/renderer/GameRenderer.cpp | 3 - targets/platform/renderer/gl/GLRenderer.cpp | 8 --- targets/platform/stubs.h | 5 +- 5 files changed, 2 insertions(+), 90 deletions(-) delete mode 100644 targets/app/common/stubs.cpp delete mode 100644 targets/app/linux/linux_game_stubs.cpp diff --git a/targets/app/common/stubs.cpp b/targets/app/common/stubs.cpp deleted file mode 100644 index 85132ba4d..000000000 --- a/targets/app/common/stubs.cpp +++ /dev/null @@ -1,68 +0,0 @@ - -#include "platform/stubs.h" - -#include "app/linux/LinuxGame.h" -#if defined(__linux__) - -void LinuxLogStubLightmapProbe() { - static bool logged = false; - if (logged) return; - - logged = true; - app.DebugPrintf( - "[linux-lightmap] stubs.cpp: Linux excludes the no-op multitexture " - "stubs in this file; the runtime uses libGL/4jlibs symbols.\n"); -} - -#else - -void glReadPixels(int, int, int, int, int, int, ByteBuffer*) {} - -void glClearDepth(double) {} - -void glVertexPointer(int, int, int, int) {} - -void glVertexPointer(int, int, FloatBuffer*) {} - -void glTexCoordPointer(int, int, int, int) {} - -void glTexCoordPointer(int, int, FloatBuffer*) {} - -void glNormalPointer(int, int, int) {} - -void glNormalPointer(int, ByteBuffer*) {} - -void glEnableClientState(int) {} - -void glDisableClientState(int) {} - -void glColorPointer(int, int, int, int) {} - -void glColorPointer(int, bool, int, ByteBuffer*) {} - -void glDrawArrays(int, int, int) {} - -void glNormal3f(float, float, float) {} - -void glGenQueriesARB(IntBuffer*) {} - -void glBeginQueryARB(int, int) {} - -void glEndQueryARB(int) {} - -void glGetQueryObjectuARB(int, int, IntBuffer*) {} - -void glShadeModel(int) {} - -void glColorMaterial(int, int) {} - -// 1.8.2 -void glClientActiveTexture(int) {} - -void glActiveTexture(int) {} - -void glFlush() {} - -void glTexGeni(int, int, int) {} - -#endif diff --git a/targets/app/linux/linux_game_stubs.cpp b/targets/app/linux/linux_game_stubs.cpp deleted file mode 100644 index 6bd332517..000000000 --- a/targets/app/linux/linux_game_stubs.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#ifdef __linux__ - -#include "app/common/Game.h" -#include "platform/stubs.h" - -void Display::update() {} - -#endif diff --git a/targets/minecraft/client/renderer/GameRenderer.cpp b/targets/minecraft/client/renderer/GameRenderer.cpp index b1ddd5f7d..7bbbc69a2 100644 --- a/targets/minecraft/client/renderer/GameRenderer.cpp +++ b/targets/minecraft/client/renderer/GameRenderer.cpp @@ -802,7 +802,6 @@ void GameRenderer::turnOffLightLayer(double alpha) { // 4J - TODO FRAME_PROFILE_SCOPE(Lightmap); #if defined(__linux__) if (SharedConstants::TEXTURE_LIGHTING) { - LinuxLogStubLightmapProbe(); PlatformRenderer.TextureBindVertex(-1); } #else @@ -830,7 +829,6 @@ void GameRenderer::turnOnLightLayer( #if defined(__linux__) if (!SharedConstants::TEXTURE_LIGHTING) return; - LinuxLogStubLightmapProbe(); const int textureId = getLightTexture(mc->player->GetXboxPad(), mc->level); static int logCount = 0; @@ -841,7 +839,6 @@ void GameRenderer::turnOnLightLayer( } PlatformRenderer.TextureBindVertex(textureId, scaleLight); - LinuxGLLogLightmapState("turnOnLightLayer", textureId, scaleLight); #else // 4jcraft: update light texture // todo: check implementation of getLightTexture. diff --git a/targets/platform/renderer/gl/GLRenderer.cpp b/targets/platform/renderer/gl/GLRenderer.cpp index 6943130be..a8e87049d 100644 --- a/targets/platform/renderer/gl/GLRenderer.cpp +++ b/targets/platform/renderer/gl/GLRenderer.cpp @@ -1626,11 +1626,3 @@ void glGetQueryObjectuARB_4J(int id, int pname, IntBuffer* params) { void glGetFloat(int pname, FloatBuffer* params) { glGetFloat_4J(pname, params); } -void LinuxGLLogLightmapState(const char* stage, int textureId, - bool scaleLight) { - static int logCount = 0; - if (logCount >= 16) return; - ++logCount; - fprintf(stderr, "[linux-lightmap] %s tex=%d scale=%d\n", stage, textureId, - scaleLight ? 1 : 0); -} \ No newline at end of file diff --git a/targets/platform/stubs.h b/targets/platform/stubs.h index 68788082c..c9ba7f71b 100644 --- a/targets/platform/stubs.h +++ b/targets/platform/stubs.h @@ -1,6 +1,7 @@ #pragma once #include + #ifdef __linux__ #include #include @@ -39,8 +40,6 @@ void glEndQueryARB(int); void glGetQueryObjectuARB(int, int, IntBuffer*); void glReadPixels(int, int, int, int, int, int, ByteBuffer*); -void LinuxGLLogLightmapState(const char* stage, int textureId, bool scaleLight); -void LinuxLogStubLightmapProbe(); #else const int GL_BYTE = 0; @@ -289,7 +288,7 @@ public: class Display { public: static bool isActive() { return true; } - static void update(); + static void update() {} static void swapBuffers(); static void destroy() {} };