mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-09-23 11:18:07 +00:00
Revert "Initial Android Support"
This commit is contained in:
@@ -73,13 +73,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __android__
|
||||
#include <android/log.h>
|
||||
|
||||
#define TAG "4JCRAFT"
|
||||
#define AndroidPrintf(...) do { __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__); printf( __VA_ARGS__); } while( 0 );
|
||||
#endif
|
||||
|
||||
#include "platform/sdl2/Input.h"
|
||||
#include "app/common/src/Audio/SoundEngine.h"
|
||||
#include "app/common/src/Colours/ColourTable.h"
|
||||
@@ -256,12 +249,8 @@ void Game::DebugPrintf(const char* szFormat, ...) {
|
||||
va_start(ap, szFormat);
|
||||
vsnprintf(buf, sizeof(buf), szFormat, ap);
|
||||
va_end(ap);
|
||||
#if defined(__android__)
|
||||
AndroidPrintf("%s", buf);
|
||||
#else
|
||||
OutputDebugStringA(buf);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void Game::DebugPrintf(int user, const char* szFormat, ...) {
|
||||
@@ -272,11 +261,7 @@ void Game::DebugPrintf(int user, const char* szFormat, ...) {
|
||||
va_start(ap, szFormat);
|
||||
vsnprintf(buf, sizeof(buf), szFormat, ap);
|
||||
va_end(ap);
|
||||
#if defined(__android__)
|
||||
AndroidPrintf("%s", buf);
|
||||
#else
|
||||
OutputDebugStringA(buf);
|
||||
#endif
|
||||
if (user == USER_UI) {
|
||||
ui.logDebugString(buf);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#include "app/common/src/UI/Controls/UIControl_MinecraftHorse.h"
|
||||
|
||||
#ifdef GLES
|
||||
#include <GLES3/gl3.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#include "UIControl_MinecraftPlayer.h"
|
||||
|
||||
#ifdef GLES
|
||||
#include <GLES3/gl3.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#include <cmath>
|
||||
#include <memory>
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
|
||||
#include <string>
|
||||
#ifdef __linux__
|
||||
#ifdef GLES
|
||||
#include <GLES3/gl3.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
#undef GL_SMOOTH
|
||||
#undef GL_FLAT
|
||||
@@ -170,13 +166,7 @@ public:
|
||||
static const int GL_FLAT = 0x1D00;
|
||||
#undef glShadeModel
|
||||
#define GL_SHADEMODEL_IS_FUNCTION
|
||||
static void glShadeModel(int mode) {
|
||||
#ifdef GLES
|
||||
glShadeModel(mode);
|
||||
#else
|
||||
::glShadeModel(mode);
|
||||
#endif
|
||||
}
|
||||
static void glShadeModel(int mode) { ::glShadeModel(mode); }
|
||||
};
|
||||
#undef GL_ARRAY_BUFFER_ARB
|
||||
#undef GL_STREAM_DRAW_ARB
|
||||
|
||||
@@ -2,16 +2,6 @@
|
||||
|
||||
#include "gdraw.h"
|
||||
|
||||
// Do we really really need gdraw for the java ui?
|
||||
#ifndef _ENABLEIGGY
|
||||
void gdraw_GL_BeginCustomDraw_4J(IggyCustomDrawCallbackRegion* region, F32* matrix) {}
|
||||
void gdraw_GL_CalculateCustomDraw_4J(IggyCustomDrawCallbackRegion* region, F32* matrix) {}
|
||||
void gdraw_GL_EndCustomDraw(IggyCustomDrawCallbackRegion* region) {}
|
||||
void gdraw_GL_SetTileOrigin(S32 vx, S32 vy, unsigned int framebuffer) {}
|
||||
void gdraw_GL_WrappedTextureDestroy(GDrawTexture* handle) {}
|
||||
|
||||
#else
|
||||
|
||||
#include <GL/gl.h>
|
||||
#include <dlfcn.h>
|
||||
#include <stdbool.h>
|
||||
@@ -848,4 +838,3 @@ void gdraw_GL_CalculateCustomDraw_4J(IggyCustomDrawCallbackRegion* region,
|
||||
F32* matrix) {
|
||||
gdraw_GetObjectSpaceMatrix(matrix, region->o2w, gdraw->projection, 0.0f, 0);
|
||||
}
|
||||
#endif
|
||||
@@ -11,14 +11,17 @@ extern C4JRender RenderManager;
|
||||
|
||||
#ifdef GLES
|
||||
extern "C" {
|
||||
void glTexGeni(GLenum, GLenum, GLint) {}
|
||||
}
|
||||
extern void glClearDepthf(float depth);
|
||||
void glClearDepth(double depth) { glClearDepthf((float)depth); }
|
||||
void glTexGeni(unsigned int, unsigned int, int) {}
|
||||
void glTexGenfv(unsigned int, unsigned int, const float*) {}
|
||||
void glTexCoordPointer(int, unsigned int, int) {}
|
||||
void glNormalPointer(unsigned int, int) {}
|
||||
void glTexCoordPointer(int, unsigned int, int, const void*) {}
|
||||
void glNormalPointer(unsigned int, int, const void*) {}
|
||||
void glColorPointer(int, unsigned int, int, const void*) {}
|
||||
void glVertexPointer(int, unsigned int, int) {}
|
||||
void glCallLists(int) {}
|
||||
void glVertexPointer(int, unsigned int, int, const void*) {}
|
||||
void glEndList(void) {}
|
||||
void glCallLists(int, unsigned int, const void*) {}
|
||||
}
|
||||
#endif
|
||||
|
||||
inline int* getIntPtr(IntBuffer* buf) {
|
||||
@@ -107,32 +110,14 @@ void glTexGen_4J(int, int, FloatBuffer*) {}
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef GLES
|
||||
static PFNGLGENQUERIESPROC _glGenQueriesARB = nullptr;
|
||||
static PFNGLBEGINQUERYPROC _glBeginQueryARB = nullptr;
|
||||
static PFNGLENDQUERYPROC _glEndQueryARB = nullptr;
|
||||
static PFNGLGETQUERYOBJECTUIVPROC _glGetQueryObjectuivARB = nullptr;
|
||||
static bool _queriesInitialized = false;
|
||||
#else
|
||||
static PFNGLGENQUERIESARBPROC _glGenQueriesARB = nullptr;
|
||||
static PFNGLBEGINQUERYARBPROC _glBeginQueryARB = nullptr;
|
||||
static PFNGLENDQUERYARBPROC _glEndQueryARB = nullptr;
|
||||
static PFNGLGETQUERYOBJECTUIVARBPROC _glGetQueryObjectuivARB = nullptr;
|
||||
static bool _queriesInitialized = false;
|
||||
#endif
|
||||
|
||||
static void initQueryFuncs() {
|
||||
if (_queriesInitialized) return;
|
||||
#ifdef GLES
|
||||
_queriesInitialized = true;
|
||||
_glGenQueriesARB =
|
||||
(PFNGLGENQUERIESPROC)dlsym(RTLD_DEFAULT, "glGenQueries");
|
||||
_glBeginQueryARB =
|
||||
(PFNGLBEGINQUERYPROC)dlsym(RTLD_DEFAULT, "glBeginQuery");
|
||||
_glEndQueryARB = (PFNGLENDQUERYPROC)dlsym(RTLD_DEFAULT, "glEndQuery");
|
||||
_glGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVPROC)dlsym(
|
||||
RTLD_DEFAULT, "glGetQueryObjectuiv");
|
||||
#else
|
||||
_queriesInitialized = true;
|
||||
_glGenQueriesARB =
|
||||
(PFNGLGENQUERIESARBPROC)dlsym(RTLD_DEFAULT, "glGenQueriesARB");
|
||||
@@ -141,7 +126,6 @@ static void initQueryFuncs() {
|
||||
_glEndQueryARB = (PFNGLENDQUERYARBPROC)dlsym(RTLD_DEFAULT, "glEndQueryARB");
|
||||
_glGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC)dlsym(
|
||||
RTLD_DEFAULT, "glGetQueryObjectuivARB");
|
||||
#endif
|
||||
}
|
||||
|
||||
void glGenQueriesARB_4J(IntBuffer* buf) {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#ifdef GLES
|
||||
#include <GLES3/gl3.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
// GDraw GL backend for Linux
|
||||
#include "platform/sdl2/Render.h"
|
||||
#include "Linux_UIController.h"
|
||||
|
||||
+1
-23
@@ -29,7 +29,7 @@ platform_sources = run_command(
|
||||
).stdout().strip().split('\n')
|
||||
|
||||
# linux-specific files
|
||||
if host_machine.system() == 'linux' or host_machine.system() == 'android'
|
||||
if host_machine.system() == 'linux'
|
||||
platform_sources += run_command(
|
||||
'sh',
|
||||
'-c', 'find "'
|
||||
@@ -69,27 +69,6 @@ endif
|
||||
|
||||
platform_services_src = files('../platform/PlatformServices.cpp')
|
||||
|
||||
if host_machine.system() == 'android'
|
||||
client_dependencies += declare_dependency(dependencies: cc.find_library('log', required: true))
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'android'
|
||||
client = shared_library(
|
||||
'MinecraftClient',
|
||||
client_sources + platform_sources + platform_services_src + localisation[1],
|
||||
include_directories: include_directories('include', '..'),
|
||||
dependencies: client_dependencies,
|
||||
cpp_args: global_cpp_args
|
||||
+ global_cpp_defs
|
||||
+ [
|
||||
'-DUNICODE',
|
||||
'-D_UNICODE',
|
||||
],
|
||||
c_args: global_cpp_defs + ['-DUNICODE', '-D_UNICODE'],
|
||||
install: true,
|
||||
install_dir: '',
|
||||
)
|
||||
else
|
||||
client = executable(
|
||||
'Minecraft.Client',
|
||||
client_sources + platform_sources + platform_services_src + localisation[1],
|
||||
@@ -105,7 +84,6 @@ client = executable(
|
||||
install: true,
|
||||
install_dir: '',
|
||||
)
|
||||
endif
|
||||
|
||||
custom_target(
|
||||
'copy_assets_to_client',
|
||||
|
||||
Reference in New Issue
Block a user