diff --git a/Minecraft.Client/Platform/Linux/Iggy/gdraw/gdraw_glfw.h b/Minecraft.Client/Platform/Linux/Iggy/gdraw/gdraw_glfw.h deleted file mode 100644 index cd8cc8281..000000000 --- a/Minecraft.Client/Platform/Linux/Iggy/gdraw/gdraw_glfw.h +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef __RAD_INCLUDE_GDRAW_GLFW_H__ -#define __RAD_INCLUDE_GDRAW_GLFW_H__ - -#include "../../../Windows64/Iggy/include/gdraw.h" -#include "../../../Windows64/Iggy/include/iggy.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum gdraw_gl_resourcetype { - GDRAW_GL_RESOURCE_rendertarget, - GDRAW_GL_RESOURCE_texture, - GDRAW_GL_RESOURCE_vertexbuffer, - - GDRAW_GL_RESOURCE__count, -} gdraw_gl_resourcetype; - -struct IggyCustomDrawCallbackRegion; - -extern int gdraw_GL_SetResourceLimits(gdraw_gl_resourcetype type, - S32 num_handles, S32 num_bytes); -extern GDrawFunctions* gdraw_GL_CreateContext(S32 min_w, S32 min_h, - S32 msaa_samples); -extern void gdraw_GL_DestroyContext(void); -extern void gdraw_GL_SetTileOrigin( - S32 vx, S32 vy, - unsigned int - framebuffer); // framebuffer=FBO handle, or 0 for main frame buffer -extern void gdraw_GL_NoMoreGDrawThisFrame(void); - -extern GDrawTexture* gdraw_GL_WrappedTextureCreate(S32 gl_texture_handle, - S32 width, S32 height, - int has_mipmaps); -extern void gdraw_GL_WrappedTextureChange(GDrawTexture* tex, - S32 new_gl_texture_handle, - S32 new_width, S32 new_height, - int new_has_mipmaps); -extern void gdraw_GL_WrappedTextureDestroy(GDrawTexture* tex); - -extern void gdraw_GL_BeginCustomDraw( - struct IggyCustomDrawCallbackRegion* region, float* matrix); -extern void gdraw_GL_EndCustomDraw(struct IggyCustomDrawCallbackRegion* region); - -extern void gdraw_GL_CalculateCustomDraw_4J( - struct IggyCustomDrawCallbackRegion* region, float* matrix); -extern void gdraw_GL_BeginCustomDraw_4J( - struct IggyCustomDrawCallbackRegion* region, float* matrix); - -extern GDrawTexture* gdraw_GL_MakeTextureFromResource( - unsigned char* resource_file, S32 resource_len, - IggyFileTextureRaw* texture); -extern void gdraw_GL_DestroyTextureFromResource(GDrawTexture* tex); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/Minecraft.Client/Platform/Linux/Iggy/include/iggy_audio_shim.h b/Minecraft.Client/Platform/Linux/Iggy/include/iggy_audio_shim.h deleted file mode 100644 index d8b09e10b..000000000 --- a/Minecraft.Client/Platform/Linux/Iggy/include/iggy_audio_shim.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef IGGY_AUDIO_SHIM_H -#define IGGY_AUDIO_SHIM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define IGGY_AUDIO_OK 0 - -enum IggyAudioOutPort { - Main = 0, - Bgm = 1, - Voice = 2, - Personal = 3, - PadSpk = 4, - Audio3d = 126, - Aux = 127, -}; - -enum IggyAudioOutParamAttr { - None = 0, - Restricted = 1, - MixToMain = 2, -}; - -enum IggyAudioOutParamFormat { - S16Mono = 0, - S16Stereo = 1, - S16_8CH = 2, - FloatMono = 3, - FloatStereo = 4, - Float_8CH = 5, - S16_8CH_Std = 6, - Float_8CH_Std = 7 -}; - -typedef union IggyAudioOutParamExtendedInformation { - unsigned raw; - struct { - unsigned data_format : 8; // bits 0.. 7 - unsigned reserve0 : 8; // bits 8..15 - unsigned attributes : 4; // bits 16..19 - unsigned reserve1 : 10; // bits 20..29 - unsigned : 1; // bit 30 (padding) - unsigned unused : 1; // bit 31 - } bits; -} IggyAudioOutParamExtendedInformation; - - -typedef struct IggyAudioShimCallbacks { - int (*iggyAudioOutOpen)( - int user_id, - enum IggyAudioOutPort port_type, - int index, - unsigned length, - unsigned sample_rate, - IggyAudioOutParamExtendedInformation param_type); - - int (*iggyAudioOutSetVolume)(int handle, int flag, int* vol); - int (*iggyAudioOutClose)(int handle); - int (*iggyAudioOutOutput)(int handle, void* ptr); -} IggyAudioShimCallbacks; - -// Registers callback table used by the shim -int iggyAudioShimRegisterCallbacks(const IggyAudioShimCallbacks* callbacks); - -#ifdef __cplusplus -} -#endif - -#endif // IGGY_AUDIO_SHIM_H diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrAtomics.o b/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrAtomics.o deleted file mode 100644 index 4955e86d0..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrAtomics.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrCpu.o b/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrCpu.o deleted file mode 100644 index 05bf4e953..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrCpu.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrThreads.o b/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrThreads.o deleted file mode 100644 index 6b2fcf68a..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrThreads.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrTime.o b/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrTime.o deleted file mode 100644 index 783ae702c..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/ORBIS_rrTime.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3_component_helpers.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3_component_helpers.o deleted file mode 100644 index df663211c..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3_component_helpers.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm.o deleted file mode 100644 index e30e58e8d..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_decode.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_decode.o deleted file mode 100644 index e0d7d03e0..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_decode.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_dump.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_dump.o deleted file mode 100644 index 998965ff2..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_abc_dump.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_class.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_class.o deleted file mode 100644 index 171513ece..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_class.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_base_dummy.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_base_dummy.o deleted file mode 100644 index df156ad5a..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_base_dummy.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_flash_dummy.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_flash_dummy.o deleted file mode 100644 index ca6e10bb4..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_classes_flash_dummy.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_convert.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_convert.o deleted file mode 100644 index cd224a52f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_convert.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_create.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_create.o deleted file mode 100644 index 5a2d442cb..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_create.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_debugger_interface.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_debugger_interface.o deleted file mode 100644 index acbecfa87..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_debugger_interface.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_dump_value.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_dump_value.o deleted file mode 100644 index 3256e2320..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_dump_value.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_gc.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_gc.o deleted file mode 100644 index 058c63858..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_gc.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_array.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_array.o deleted file mode 100644 index 451694de3..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_array.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_math.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_math.o deleted file mode 100644 index 91228e5ee..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_math.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_misc.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_misc.o deleted file mode 100644 index d2c4c2de3..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_misc.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_string.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_string.o deleted file mode 100644 index 21762d803..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_imp_string.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_interpreter.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_interpreter.o deleted file mode 100644 index 0f6526bd6..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_interpreter.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_names.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_names.o deleted file mode 100644 index 1d5a34f11..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_names.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_op_strings.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_op_strings.o deleted file mode 100644 index fce4d1951..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_op_strings.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_property.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_property.o deleted file mode 100644 index e1e1c62a0..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_property.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_util.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_util.o deleted file mode 100644 index 8fa9db90d..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_util.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_verifier.o b/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_verifier.o deleted file mode 100644 index b651bc674..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/as3vm_verifier.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/avm2_microcode.o b/Minecraft.Client/Platform/Linux/Iggy/lib/avm2_microcode.o deleted file mode 100644 index 733ef8b34..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/avm2_microcode.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/dtoa.o b/Minecraft.Client/Platform/Linux/Iggy/lib/dtoa.o deleted file mode 100644 index f8b5e049b..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/dtoa.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/gr_strokepath.o b/Minecraft.Client/Platform/Linux/Iggy/lib/gr_strokepath.o deleted file mode 100644 index fd2b151bb..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/gr_strokepath.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_allocation.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_allocation.o deleted file mode 100644 index 91cd32a44..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_allocation.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions.o deleted file mode 100644 index 81003b998..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions_global.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions_global.o deleted file mode 100644 index ece286f41..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_api_functions_global.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_arena_allocator.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_arena_allocator.o deleted file mode 100644 index 8df41940a..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_arena_allocator.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_debug.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_debug.o deleted file mode 100644 index 6a6e3423f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_debug.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_file_reader.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_file_reader.o deleted file mode 100644 index b6cb22770..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_file_reader.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_font_provider.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_font_provider.o deleted file mode 100644 index 3ec05495d..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_font_provider.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_main.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_main.o deleted file mode 100644 index d85905b7f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_main.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_mixer.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_mixer.o deleted file mode 100644 index 0020d0a08..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_mixer.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_audio.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_audio.o deleted file mode 100644 index 930f85832..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_audio.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_deps.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_deps.o deleted file mode 100644 index b65f6d089..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_platform_deps.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_sound.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_sound.o deleted file mode 100644 index 59644fb4b..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_sound.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_unicode.o b/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_unicode.o deleted file mode 100644 index e982ea747..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/iggy_unicode.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/orbis_shim.c b/Minecraft.Client/Platform/Linux/Iggy/lib/orbis_shim.c deleted file mode 100644 index 41c07eb7f..000000000 --- a/Minecraft.Client/Platform/Linux/Iggy/lib/orbis_shim.c +++ /dev/null @@ -1,338 +0,0 @@ -#define _GNU_SOURCE - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "iggy_audio_shim.h" - -_Static_assert(sizeof(pthread_t) == 8, "pthread_t must be 8 bytes"); -_Static_assert(sizeof(int) == 4, "int must be 32 bit"); -_Static_assert(sizeof(unsigned) == 4, "unsigned must be 32 bit"); - - -/* ============================================================ - * CRT & Math Shims - * ============================================================ */ - -double _Sin(double x) { return sin(x); } -double _Log(double x) { return log(x); } - -// Map to the C fenv.h rounding modes -int _Fltrounds(void) { - switch (fegetround()) { - case FE_TOWARDZERO: return 0; - case FE_TONEAREST: return 1; - case FE_DOWNWARD: return 2; - case FE_UPWARD: return 3; - default: return 1; - } -} - -// BSD specific function supposed to return pointer to thread-local errno -#if defined(__GLIBC__) -int *__error(void) { return __errno_location(); } -#else -int *__error(void) { return &errno; } -#endif - -// Microsoft specific variant of gmtime -int gmtime_s(struct tm *tmDest, const time_t *sourceTime) { - if (!tmDest || !sourceTime) return EINVAL; - if (gmtime_r(sourceTime, tmDest) == NULL) return EINVAL; /* conservative */ - return 0; -} - -// Returns pointer to ctype classification table -const unsigned short *_Getpctype(void) { -#if defined(__GLIBC__) - return (const unsigned short *)(*__ctype_b_loc()); -#else - // We might still be alright - errno = ENOSYS; - return NULL; -#endif -} - -/* ============================================================ - * Helpers for heap-allocated opaque objects - * ============================================================ */ - -static int alloc_and_init(void **out, size_t size, int (*init_fn)(void *), void (*free_fn)(void *)) { - if (!out) return EINVAL; - *out = NULL; - - void *p = malloc(size); - if (!p) return ENOMEM; - - int rc = init_fn(p); - if (rc != 0) { - if (free_fn) free_fn(p); - else free(p); - return rc; - } - - *out = p; - return 0; -} - -/* ============================================================ - * Pthread Shims (opaque handles allocated on heap) - * ============================================================ */ - -// Mutex Attributes - -static int mutexattr_init_thunk(void *p) { - return pthread_mutexattr_init((pthread_mutexattr_t *)p); -} - -int scePthreadMutexattrInit(void **attr) { - return alloc_and_init(attr, sizeof(pthread_mutexattr_t), mutexattr_init_thunk, free); -} - -int scePthreadMutexattrSettype(void **attr, int type) { - if (!attr || !*attr) return EINVAL; - return pthread_mutexattr_settype((pthread_mutexattr_t *)*attr, type); -} - -int scePthreadMutexattrDestroy(void **attr) { - if (!attr || !*attr) return EINVAL; - pthread_mutexattr_t *a = (pthread_mutexattr_t *)*attr; - - int rc = pthread_mutexattr_destroy(a); - if (rc == 0) { - free(a); - *attr = NULL; - } - return rc; -} - -// Mutexes - -int scePthreadMutexInit(void **mutex, void **attr, const char *name) { - (void)name; - - if (!mutex) return EINVAL; - *mutex = NULL; - - pthread_mutex_t *m = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t)); - if (!m) return ENOMEM; - - pthread_mutexattr_t *a = (attr && *attr) ? (pthread_mutexattr_t *)*attr : NULL; - - int rc = pthread_mutex_init(m, a); - if (rc != 0) { - free(m); - return rc; - } - - *mutex = m; - return 0; -} - -int scePthreadMutexLock(void **mutex) { - if (!mutex || !*mutex) return EINVAL; - return pthread_mutex_lock((pthread_mutex_t *)*mutex); -} - -int scePthreadMutexTrylock(void **mutex) { - if (!mutex || !*mutex) return EINVAL; - return pthread_mutex_trylock((pthread_mutex_t *)*mutex); -} - -int scePthreadMutexUnlock(void **mutex) { - if (!mutex || !*mutex) return EINVAL; - return pthread_mutex_unlock((pthread_mutex_t *)*mutex); -} - -int scePthreadMutexTimedlock(void **mutex, unsigned int usecs) { - if (!mutex || !*mutex) return EINVAL; - - struct timespec ts; - - // Get current wall clock time - if (clock_gettime(CLOCK_REALTIME, &ts) == -1) - return errno; - - // Add the relative microseconds to the current time - ts.tv_sec += (usecs / 1000000); - ts.tv_nsec += (usecs % 1000000) * 1000; - - // Handle nanosecond overflow - if (ts.tv_nsec >= 1000000000L) { - ts.tv_sec++; - ts.tv_nsec -= 1000000000L; - } - - // Call the standard POSIX function with the absolute time - return pthread_mutex_timedlock(*mutex, &ts); -} - -int scePthreadMutexDestroy(void **mutex) { - if (!mutex || !*mutex) return EINVAL; - - pthread_mutex_t *m = (pthread_mutex_t *)*mutex; - int rc = pthread_mutex_destroy(m); - if (rc == 0) { - free(m); - *mutex = NULL; - } - return rc; -} - -// Thread Attributes - -static int attr_init_thunk(void *p) { - return pthread_attr_init((pthread_attr_t *)p); -} - -int scePthreadAttrInit(void **attr) { - return alloc_and_init(attr, sizeof(pthread_attr_t), attr_init_thunk, free); -} - -int scePthreadAttrSetstacksize(void **attr, size_t stacksize) { - if (!attr || !*attr) return EINVAL; - return pthread_attr_setstacksize((pthread_attr_t *)*attr, stacksize); -} - -int scePthreadAttrDestroy(void **attr) { - if (!attr || !*attr) return EINVAL; - - pthread_attr_t *a = (pthread_attr_t *)*attr; - int rc = pthread_attr_destroy(a); - if (rc == 0) { - free(a); - *attr = NULL; - } - return rc; -} - -// Threads - -int scePthreadCreate(pthread_t *thread_out, void **attr, void *(*start_routine)(void *), void *arg, const char *name) { - (void)name; - - if (!thread_out || !start_routine) return EINVAL; - pthread_attr_t *a = (attr && *attr) ? (pthread_attr_t *)*attr : NULL; - return pthread_create(thread_out, a, start_routine, arg); -} - -int scePthreadJoin(pthread_t thread, void **value_ptr) { - return pthread_join(thread, value_ptr); -} - -int scePthreadDetach(pthread_t thread) { - return pthread_detach(thread); -} - -pthread_t scePthreadSelf(void) { - return pthread_self(); -} - -void scePthreadYield(void) { - sched_yield(); -} - -int scePthreadSetschedparam(pthread_t thread, int policy, const struct sched_param *param) { - if (!param) return EINVAL; - return pthread_setschedparam(thread, policy, param); -} - -int scePthreadGetschedparam(pthread_t thread, int *policy, struct sched_param *param) { - if (!policy || !param) return EINVAL; - return pthread_getschedparam(thread, policy, param); -} - -// TLS Keys - -int scePthreadKeyCreate(pthread_key_t *key, void (*destructor)(void *), const char *name) { - (void)name; - if (!key) return EINVAL; - return pthread_key_create(key, destructor); -} - -int scePthreadSetspecific(pthread_key_t key, const void *value) { - return pthread_setspecific(key, value); -} - -void *scePthreadGetspecific(pthread_key_t key) { - return pthread_getspecific(key); -} - -// Affinity - -int scePthreadSetaffinity(pthread_t thread, uint64_t cpumask) { - (void)thread; - (void)cpumask; - return 0; // Could return ENOSYS here, but this should be alright too -} - -/* ============================================================ - * Kernel & Hardware Shims - * ============================================================ */ - -int sceKernelGettimeofday(struct timeval *tp) { - if (!tp) return EINVAL; - return gettimeofday(tp, NULL); -} - -int sceKernelUsleep(unsigned microseconds) { - return usleep(microseconds); -} - -/* ============================================================ - * Audio Shims - * ============================================================ */ - -static IggyAudioShimCallbacks g_audioCbs = {}; - -int iggyAudioShimRegisterCallbacks(const IggyAudioShimCallbacks* callbacks) { - if (callbacks) { - g_audioCbs = *callbacks; - } else { - IggyAudioShimCallbacks cbs = {}; - g_audioCbs = cbs; - } - return IGGY_AUDIO_OK; -} - -int sceAudioOutOpen(int user_id, enum IggyAudioOutPort port_type, int index, unsigned length, unsigned sample_rate, IggyAudioOutParamExtendedInformation param_type) { - if (g_audioCbs.iggyAudioOutOpen) - return g_audioCbs.iggyAudioOutOpen(user_id, port_type, index, length, sample_rate, param_type); - return IGGY_AUDIO_OK; -} - -int sceAudioOutSetVolume(int handle, int flag, int* vol) { - if (g_audioCbs.iggyAudioOutSetVolume) - return g_audioCbs.iggyAudioOutSetVolume(handle, flag, vol); - return IGGY_AUDIO_OK; -} - -int sceAudioOutClose(int handle) { - if (g_audioCbs.iggyAudioOutClose) - return g_audioCbs.iggyAudioOutClose(handle); - return IGGY_AUDIO_OK; -} - -int sceAudioOutOutput(int handle, void* ptr) { - if (g_audioCbs.iggyAudioOutOutput) - return g_audioCbs.iggyAudioOutOutput(handle, ptr); - return IGGY_AUDIO_OK; -} - -/* ============================================================ - * Misc - * ============================================================ */ - -void gdraw_ps4_wait(void) { - usleep(1000); -} diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/radss_orbis.o b/Minecraft.Client/Platform/Linux/Iggy/lib/radss_orbis.o deleted file mode 100644 index c46375899..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/radss_orbis.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/rrCore.o b/Minecraft.Client/Platform/Linux/Iggy/lib/rrCore.o deleted file mode 100644 index 88f889bea..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/rrCore.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/rrMath.o b/Minecraft.Client/Platform/Linux/Iggy/lib/rrMath.o deleted file mode 100644 index b2b240396..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/rrMath.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/rrMem.o b/Minecraft.Client/Platform/Linux/Iggy/lib/rrMem.o deleted file mode 100644 index f70469eba..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/rrMem.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/rrSyncCheck.o b/Minecraft.Client/Platform/Linux/Iggy/lib/rrSyncCheck.o deleted file mode 100644 index ccb2a8c38..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/rrSyncCheck.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/rrstring.o b/Minecraft.Client/Platform/Linux/Iggy/lib/rrstring.o deleted file mode 100644 index 86410d8b9..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/rrstring.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/stb_truetype_wrapper.o b/Minecraft.Client/Platform/Linux/Iggy/lib/stb_truetype_wrapper.o deleted file mode 100644 index f940c8bd0..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/stb_truetype_wrapper.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_bitmap_data.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_bitmap_data.o deleted file mode 100644 index 3b629125f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_bitmap_data.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_misc.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_misc.o deleted file mode 100644 index 3ce3b7f29..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_misc.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_textfield.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_textfield.o deleted file mode 100644 index ad404ce41..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3_textfield.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm.o deleted file mode 100644 index d92f448c7..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_display.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_display.o deleted file mode 100644 index b97312060..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_display.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_events.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_events.o deleted file mode 100644 index 98d983a91..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_as3vm_flash_events.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_cache.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_cache.o deleted file mode 100644 index c0cf5bc78..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_cache.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_decode.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_decode.o deleted file mode 100644 index 0b648410f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_decode.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw.o deleted file mode 100644 index 78cb7d1dc..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filltype.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filltype.o deleted file mode 100644 index a905b0fee..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filltype.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filter.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filter.o deleted file mode 100644 index 4821db090..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_filter.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_interface.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_interface.o deleted file mode 100644 index 7cad48c60..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_interface.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_lib.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_lib.o deleted file mode 100644 index 6673dbe20..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_lib.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_renderstate.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_renderstate.o deleted file mode 100644 index 261ac0701..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_renderstate.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_shape.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_shape.o deleted file mode 100644 index fb98a2e44..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_shape.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_text.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_text.o deleted file mode 100644 index 67c0e3c8a..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_text.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_texture.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_texture.o deleted file mode 100644 index e5728df9f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_texture.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_triangulate.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_triangulate.o deleted file mode 100644 index 1f03609a3..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_draw_triangulate.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_fontcache.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_fontcache.o deleted file mode 100644 index 14b7cad06..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_fontcache.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_jpeg.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_jpeg.o deleted file mode 100644 index 59fa23d4d..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_jpeg.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_math.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_math.o deleted file mode 100644 index 4a440178c..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_math.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_play.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_play.o deleted file mode 100644 index 87878e46f..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_play.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_playhead.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_playhead.o deleted file mode 100644 index 6fd3ff284..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_playhead.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_polygonalize.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_polygonalize.o deleted file mode 100644 index 6f42d956c..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_polygonalize.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_state.o b/Minecraft.Client/Platform/Linux/Iggy/lib/swf_state.o deleted file mode 100644 index 78a4b56ac..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/swf_state.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/triangulate_ears.o b/Minecraft.Client/Platform/Linux/Iggy/lib/triangulate_ears.o deleted file mode 100644 index 91239e19b..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/triangulate_ears.o and /dev/null differ diff --git a/Minecraft.Client/Platform/Linux/Iggy/lib/zlib.o b/Minecraft.Client/Platform/Linux/Iggy/lib/zlib.o deleted file mode 100644 index 6714e918c..000000000 Binary files a/Minecraft.Client/Platform/Linux/Iggy/lib/zlib.o and /dev/null differ diff --git a/Minecraft.Client/meson.build b/Minecraft.Client/meson.build index 7284d3949..c71440aec 100644 --- a/Minecraft.Client/meson.build +++ b/Minecraft.Client/meson.build @@ -35,7 +35,6 @@ platform_sources += run_command( ).stdout().strip().split('\n') # linux-specific files (everything in Platform/Linux) -linux_objects = [] if host_machine.system() == 'linux' platform_sources += run_command( 'sh', '-c', @@ -44,22 +43,15 @@ if host_machine.system() == 'linux' + '" \\( -name "*.cpp" -o -name "*.c" \\) ', check : true, ).stdout().strip().split('\n') - - _linux_objects_str = run_command( - 'sh', '-c', - 'find "' - + meson.current_source_dir() / 'Platform/Linux' - + '" -name "*.o"', - check : true, - ).stdout().strip() - if _linux_objects_str != '' - linux_objects += _linux_objects_str.split('\n') - endif endif +shiggy_dep = dependency( + 'shiggy', + fallback : ['shiggy', 'shiggy_dep'], +) + client = executable('Minecraft.Client', client_sources + platform_sources + localisation[1], - objects : linux_objects, include_directories : include_directories('Platform', 'Platform/Linux/Iggy/include'), dependencies : [ render_dep, @@ -72,6 +64,7 @@ client = executable('Minecraft.Client', glu_dep, thread_dep, thread_dep, + shiggy_dep, dependency('zlib'), ], cpp_args : global_cpp_args + global_cpp_defs + [ diff --git a/subprojects/.wraplock b/subprojects/.wraplock new file mode 100644 index 000000000..e69de29bb diff --git a/subprojects/shiggy.wrap b/subprojects/shiggy.wrap new file mode 100644 index 000000000..0797087e2 --- /dev/null +++ b/subprojects/shiggy.wrap @@ -0,0 +1,6 @@ +[wrap-git] +url = https://github.com/4jcraft/shiggy.git +revision = main + +[provide] +shiggy_dep = shiggy \ No newline at end of file