mirror of
https://github.com/ptitSeb/box64.git
synced 2025-02-19 14:04:13 +00:00
Added wrapped libogg
This commit is contained in:
parent
72ca99051b
commit
8fa2368a63
@ -170,6 +170,7 @@ set(WRAPPEDS
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibgl.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibglu.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibm.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibogg.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibpthread.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibrt.c"
|
||||
"${BOX64_ROOT}/src/wrapped/wrappedlibx11.c"
|
||||
|
@ -27,7 +27,7 @@ GO("libsmpeg-0.4.so.0", smpeg)
|
||||
GO("libsmpeg2-2.0.so.0", smpeg2)
|
||||
//GO("libvorbisfile.so.3", vorbisfile)
|
||||
//GO("libvorbis.so.0", libvorbis)
|
||||
//GO("libogg.so.0", libogg)
|
||||
GO("libogg.so.0", libogg)
|
||||
//GO("libpng12.so.0", png12)
|
||||
//GO("libpng16.so.16", png16)
|
||||
GO("libXxf86vm.so.1", libxxf86vm)
|
||||
|
@ -74,6 +74,7 @@
|
||||
#() vFpi
|
||||
#() vFpu
|
||||
#() vFpf
|
||||
#() vFpl
|
||||
#() vFpL
|
||||
#() vFpp
|
||||
#() vFpS
|
||||
@ -131,6 +132,7 @@
|
||||
#() dFdd
|
||||
#() dFdp
|
||||
#() dFpp
|
||||
#() lFpi
|
||||
#() LFpi
|
||||
#() LFpL
|
||||
#() LFpp
|
||||
|
@ -107,6 +107,7 @@ typedef void (*vFdd_t)(double, double);
|
||||
typedef void (*vFpi_t)(void*, int32_t);
|
||||
typedef void (*vFpu_t)(void*, uint32_t);
|
||||
typedef void (*vFpf_t)(void*, float);
|
||||
typedef void (*vFpl_t)(void*, intptr_t);
|
||||
typedef void (*vFpL_t)(void*, uintptr_t);
|
||||
typedef void (*vFpp_t)(void*, void*);
|
||||
typedef void (*vFpS_t)(void*, void*);
|
||||
@ -164,6 +165,7 @@ typedef double (*dFdi_t)(double, int32_t);
|
||||
typedef double (*dFdd_t)(double, double);
|
||||
typedef double (*dFdp_t)(double, void*);
|
||||
typedef double (*dFpp_t)(void*, void*);
|
||||
typedef intptr_t (*lFpi_t)(void*, int32_t);
|
||||
typedef uintptr_t (*LFpi_t)(void*, int32_t);
|
||||
typedef uintptr_t (*LFpL_t)(void*, uintptr_t);
|
||||
typedef uintptr_t (*LFpp_t)(void*, void*);
|
||||
@ -1075,6 +1077,7 @@ void vFdd(x64emu_t *emu, uintptr_t fcn) { vFdd_t fn = (vFdd_t)fcn; fn(emu->xmm[0
|
||||
void vFpi(x64emu_t *emu, uintptr_t fcn) { vFpi_t fn = (vFpi_t)fcn; fn((void*)R_RDI, (int32_t)R_RSI); }
|
||||
void vFpu(x64emu_t *emu, uintptr_t fcn) { vFpu_t fn = (vFpu_t)fcn; fn((void*)R_RDI, (uint32_t)R_RSI); }
|
||||
void vFpf(x64emu_t *emu, uintptr_t fcn) { vFpf_t fn = (vFpf_t)fcn; fn((void*)R_RDI, emu->xmm[0].f[0]); }
|
||||
void vFpl(x64emu_t *emu, uintptr_t fcn) { vFpl_t fn = (vFpl_t)fcn; fn((void*)R_RDI, (intptr_t)R_RSI); }
|
||||
void vFpL(x64emu_t *emu, uintptr_t fcn) { vFpL_t fn = (vFpL_t)fcn; fn((void*)R_RDI, (uintptr_t)R_RSI); }
|
||||
void vFpp(x64emu_t *emu, uintptr_t fcn) { vFpp_t fn = (vFpp_t)fcn; fn((void*)R_RDI, (void*)R_RSI); }
|
||||
void vFpS(x64emu_t *emu, uintptr_t fcn) { vFpS_t fn = (vFpS_t)fcn; fn((void*)R_RDI, io_convert((void*)R_RSI)); }
|
||||
@ -1132,6 +1135,7 @@ void dFdi(x64emu_t *emu, uintptr_t fcn) { dFdi_t fn = (dFdi_t)fcn; emu->xmm[0].d
|
||||
void dFdd(x64emu_t *emu, uintptr_t fcn) { dFdd_t fn = (dFdd_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], emu->xmm[1].d[0]); }
|
||||
void dFdp(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; emu->xmm[0].d[0]=fn(emu->xmm[0].d[0], (void*)R_RDI); }
|
||||
void dFpp(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI); }
|
||||
void lFpi(x64emu_t *emu, uintptr_t fcn) { lFpi_t fn = (lFpi_t)fcn; R_RAX=(intptr_t)fn((void*)R_RDI, (int32_t)R_RSI); }
|
||||
void LFpi(x64emu_t *emu, uintptr_t fcn) { LFpi_t fn = (LFpi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI); }
|
||||
void LFpL(x64emu_t *emu, uintptr_t fcn) { LFpL_t fn = (LFpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI); }
|
||||
void LFpp(x64emu_t *emu, uintptr_t fcn) { LFpp_t fn = (LFpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI); }
|
||||
|
@ -104,6 +104,7 @@ void vFdd(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpi(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpu(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpf(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpl(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpL(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpp(x64emu_t *emu, uintptr_t fnc);
|
||||
void vFpS(x64emu_t *emu, uintptr_t fnc);
|
||||
@ -161,6 +162,7 @@ void dFdi(x64emu_t *emu, uintptr_t fnc);
|
||||
void dFdd(x64emu_t *emu, uintptr_t fnc);
|
||||
void dFdp(x64emu_t *emu, uintptr_t fnc);
|
||||
void dFpp(x64emu_t *emu, uintptr_t fnc);
|
||||
void lFpi(x64emu_t *emu, uintptr_t fnc);
|
||||
void LFpi(x64emu_t *emu, uintptr_t fnc);
|
||||
void LFpL(x64emu_t *emu, uintptr_t fnc);
|
||||
void LFpp(x64emu_t *emu, uintptr_t fnc);
|
||||
|
18
src/wrapped/wrappedlibogg.c
Executable file
18
src/wrapped/wrappedlibogg.c
Executable file
@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#define _GNU_SOURCE /* See feature_test_macros(7) */
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "wrappedlibs.h"
|
||||
|
||||
#include "wrapper.h"
|
||||
#include "bridge.h"
|
||||
#include "librarian/library_private.h"
|
||||
#include "x64emu.h"
|
||||
|
||||
const char* liboggName = "libogg.so.0";
|
||||
#define LIBNAME libogg
|
||||
|
||||
#include "wrappedlib_init.h"
|
||||
|
78
src/wrapped/wrappedlibogg_private.h
Executable file
78
src/wrapped/wrappedlibogg_private.h
Executable file
@ -0,0 +1,78 @@
|
||||
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
|
||||
#error meh!
|
||||
#endif
|
||||
|
||||
// ogg_stream_state doesn't need align :)
|
||||
// oggpack_buffer probably doesn't need align
|
||||
|
||||
GO(oggpack_adv, vFpi)
|
||||
//GO(oggpack_adv1,
|
||||
//GO(oggpackB_adv,
|
||||
//GO(oggpackB_adv1,
|
||||
//GO(oggpackB_bits,
|
||||
GO(oggpackB_bytes, iFp)
|
||||
GO(oggpackB_get_buffer, pFp)
|
||||
//GO(oggpack_bits,
|
||||
//GO(oggpackB_look,
|
||||
//GO(oggpackB_look1,
|
||||
GO(oggpackB_read, lFpi)
|
||||
//GO(oggpackB_read1,
|
||||
GO(oggpackB_readinit, vFppi)
|
||||
GO(oggpackB_reset, vFp)
|
||||
GO(oggpackB_write, vFpui)
|
||||
//GO(oggpackB_writealign,
|
||||
//GO(oggpackB_writecheck,
|
||||
GO(oggpackB_writeclear, vFp)
|
||||
//GO(oggpackB_writecopy,
|
||||
GO(oggpackB_writeinit, vFp)
|
||||
//GO(oggpackB_writetrunc,
|
||||
GO(oggpack_bytes, lFp)
|
||||
//GO(ogg_packet_clear,
|
||||
GO(oggpack_get_buffer, pFp)
|
||||
GO(oggpack_look, lFpi)
|
||||
//GO(oggpack_look1,
|
||||
GO(oggpack_read, lFpi)
|
||||
//GO(oggpack_read1,
|
||||
GO(oggpack_readinit, vFppi)
|
||||
GO(oggpack_reset, vFp)
|
||||
GO(oggpack_write, vFpui)
|
||||
//GO(oggpack_writealign,
|
||||
//GO(oggpack_writecheck,
|
||||
GO(oggpack_writeclear, vFp)
|
||||
//GO(oggpack_writecopy,
|
||||
GO(oggpack_writeinit, vFp)
|
||||
GO(oggpack_writetrunc, vFpl)
|
||||
GO(ogg_page_bos, iFp)
|
||||
GO(ogg_page_checksum_set, iFp)
|
||||
GO(ogg_page_continued, iFp)
|
||||
GO(ogg_page_eos, iFp)
|
||||
GO(ogg_page_granulepos, IFp)
|
||||
//GO(ogg_page_packets,
|
||||
//GO(ogg_page_pageno,
|
||||
GO(ogg_page_serialno, iFp)
|
||||
//GO(ogg_page_version,
|
||||
//GO(ogg_stream_check,
|
||||
GO(ogg_stream_clear, iFp)
|
||||
//GO(ogg_stream_destroy,
|
||||
//GO(ogg_stream_eos,
|
||||
GO(ogg_stream_flush, iFpp)
|
||||
GO(ogg_stream_flush_fill, iFppi)
|
||||
GO(ogg_stream_init, iFpi)
|
||||
//GO(ogg_stream_iovecin,
|
||||
GO(ogg_stream_packetin, iFpp)
|
||||
GO(ogg_stream_packetout, iFpp)
|
||||
GO(ogg_stream_packetpeek, iFpp)
|
||||
GO(ogg_stream_pagein, iFpp)
|
||||
GO(ogg_stream_pageout, iFpp)
|
||||
//GO(ogg_stream_pageout_fill,
|
||||
GO(ogg_stream_reset, iFp)
|
||||
GO(ogg_stream_reset_serialno, iFpi)
|
||||
GO(ogg_sync_buffer, pFpi)
|
||||
//GO(ogg_sync_check,
|
||||
GO(ogg_sync_clear, iFp)
|
||||
//GO(ogg_sync_destroy,
|
||||
GO(ogg_sync_init, iFp)
|
||||
GO(ogg_sync_pageout, iFpp)
|
||||
GO(ogg_sync_pageseek, iFpp)
|
||||
GO(ogg_sync_reset, iFp)
|
||||
GO(ogg_sync_wrote, iFpi)
|
Loading…
x
Reference in New Issue
Block a user