2014-09-11 07:38:56 +00:00
|
|
|
#include "PluginAPI.h"
|
|
|
|
#include "Types.h"
|
2017-10-05 14:39:43 +00:00
|
|
|
#include "mupenplus/GLideN64_mupenplus.h"
|
|
|
|
#include "N64.h"
|
2014-09-11 07:38:56 +00:00
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
2015-07-23 10:07:33 +00:00
|
|
|
EXPORT int CALL RomOpen(void)
|
|
|
|
{
|
2017-10-05 14:39:43 +00:00
|
|
|
if (rdram_size != nullptr)
|
|
|
|
RDRAMSize = *rdram_size - 1;
|
2017-11-20 16:17:14 +00:00
|
|
|
else
|
|
|
|
RDRAMSize = 0;
|
2017-10-05 14:39:43 +00:00
|
|
|
|
2019-10-04 12:54:40 +00:00
|
|
|
return api().RomOpen();
|
2015-07-23 10:07:33 +00:00
|
|
|
}
|
|
|
|
|
2014-09-11 07:38:56 +00:00
|
|
|
EXPORT m64p_error CALL PluginGetVersion(
|
|
|
|
m64p_plugin_type * _PluginType,
|
|
|
|
int * _PluginVersion,
|
|
|
|
int * _APIVersion,
|
|
|
|
const char ** _PluginNamePtr,
|
|
|
|
int * _Capabilities
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return api().PluginGetVersion(_PluginType, _PluginVersion, _APIVersion, _PluginNamePtr, _Capabilities);
|
|
|
|
}
|
|
|
|
|
|
|
|
EXPORT m64p_error CALL PluginStartup(
|
|
|
|
m64p_dynlib_handle CoreLibHandle,
|
|
|
|
void *Context,
|
|
|
|
void (*DebugCallback)(void *, int, const char *)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return api().PluginStartup(CoreLibHandle);
|
|
|
|
}
|
|
|
|
|
2020-06-19 13:06:17 +00:00
|
|
|
#ifdef M64P_GLIDENUI
|
|
|
|
EXPORT m64p_error CALL PluginConfig(void)
|
|
|
|
{
|
|
|
|
return api().PluginConfig();
|
|
|
|
}
|
|
|
|
#endif // M64P_GLIDENUI
|
|
|
|
|
2014-09-11 07:38:56 +00:00
|
|
|
EXPORT m64p_error CALL PluginShutdown(void)
|
|
|
|
{
|
|
|
|
return api().PluginShutdown();
|
|
|
|
}
|
|
|
|
|
|
|
|
EXPORT void CALL ReadScreen2(void *dest, int *width, int *height, int front)
|
|
|
|
{
|
|
|
|
api().ReadScreen2(dest, width, height, front);
|
|
|
|
}
|
|
|
|
|
|
|
|
EXPORT void CALL SetRenderingCallback(void (*callback)(int))
|
|
|
|
{
|
|
|
|
api().SetRenderingCallback(callback);
|
|
|
|
}
|
2017-10-05 14:39:43 +00:00
|
|
|
|
2017-02-23 22:24:07 +00:00
|
|
|
EXPORT void CALL ResizeVideoOutput(int width, int height)
|
|
|
|
{
|
|
|
|
api().ResizeVideoOutput(width, height);
|
|
|
|
}
|
2014-09-11 07:38:56 +00:00
|
|
|
|
|
|
|
} // extern "C"
|