mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Warp back to 1983!!! (rev 1983, that is, not the year :P)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1997 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -38,7 +38,6 @@
|
||||
|
||||
#include "../../../PluginSpecs/CommonTypes.h"
|
||||
#define HAVE_WIIUSE 1
|
||||
#define HAVE_SDL 1
|
||||
#define HAVE_WX 1
|
||||
#else
|
||||
#include "CommonTypes.h"
|
||||
|
@ -37,10 +37,8 @@ CPlugin::~CPlugin()
|
||||
|
||||
CPlugin::CPlugin(const char* _szName) : valid(false)
|
||||
{
|
||||
if (m_hInstLib.Load(_szName))
|
||||
{
|
||||
if (m_hInstLib.Load(_szName)) {
|
||||
|
||||
// Create pointers to the DLL functions
|
||||
m_GetDllInfo = reinterpret_cast<TGetDllInfo>
|
||||
(m_hInstLib.Get("GetDllInfo"));
|
||||
m_DllConfig = reinterpret_cast<TDllConfig>
|
||||
@ -58,28 +56,24 @@ CPlugin::CPlugin(const char* _szName) : valid(false)
|
||||
}
|
||||
|
||||
if (m_GetDllInfo != 0 &&
|
||||
m_DllConfig != 0 &&
|
||||
m_DllDebugger != 0 &&
|
||||
m_SetDllGlobals != 0 &&
|
||||
m_Initialize != 0 &&
|
||||
m_Shutdown != 0 &&
|
||||
m_DoState != 0)
|
||||
m_DllConfig != 0 &&
|
||||
m_DllDebugger != 0 &&
|
||||
m_SetDllGlobals != 0 &&
|
||||
m_Initialize != 0 &&
|
||||
m_Shutdown != 0 &&
|
||||
m_DoState != 0)
|
||||
valid = true;
|
||||
|
||||
// Save the filename for this plugin
|
||||
Filename = _szName;
|
||||
}
|
||||
|
||||
void *CPlugin::LoadSymbol(const char *sym)
|
||||
{
|
||||
void *CPlugin::LoadSymbol(const char *sym) {
|
||||
return m_hInstLib.Get(sym);
|
||||
}
|
||||
|
||||
|
||||
// ______________________________________________________________________________________
|
||||
// GetInfo: Get DLL info
|
||||
bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo)
|
||||
{
|
||||
bool CPlugin::GetInfo(PLUGIN_INFO& _pluginInfo) {
|
||||
if (m_GetDllInfo != 0)
|
||||
{
|
||||
m_GetDllInfo(&_pluginInfo);
|
||||
|
@ -36,37 +36,35 @@ class CPlugin
|
||||
{
|
||||
public:
|
||||
|
||||
CPlugin(const char* _szName);
|
||||
~CPlugin();
|
||||
CPlugin(const char* _szName);
|
||||
~CPlugin();
|
||||
|
||||
virtual bool IsValid() {return valid;};
|
||||
virtual std::string GetFilename() {return Filename;};
|
||||
virtual bool IsValid() {return valid;};
|
||||
|
||||
bool GetInfo(PLUGIN_INFO& _pluginInfo);
|
||||
void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
|
||||
void *LoadSymbol(const char *sym);
|
||||
bool GetInfo(PLUGIN_INFO& _pluginInfo);
|
||||
void SetGlobals(PLUGIN_GLOBALS* _PluginGlobals);
|
||||
void *LoadSymbol(const char *sym);
|
||||
|
||||
void Config(HWND _hwnd);
|
||||
void About(HWND _hwnd);
|
||||
void Debug(HWND _hwnd, bool Show);
|
||||
void DoState(unsigned char **ptr, int mode);
|
||||
void Initialize(void *init);
|
||||
void Shutdown();
|
||||
void Config(HWND _hwnd);
|
||||
void About(HWND _hwnd);
|
||||
void Debug(HWND _hwnd, bool Show);
|
||||
void DoState(unsigned char **ptr, int mode);
|
||||
void Initialize(void *init);
|
||||
void Shutdown();
|
||||
|
||||
private:
|
||||
|
||||
DynamicLibrary m_hInstLib;
|
||||
bool valid;
|
||||
std::string Filename;
|
||||
DynamicLibrary m_hInstLib;
|
||||
bool valid;
|
||||
|
||||
// Functions
|
||||
TGetDllInfo m_GetDllInfo;
|
||||
TDllConfig m_DllConfig;
|
||||
TDllDebugger m_DllDebugger;
|
||||
TSetDllGlobals m_SetDllGlobals;
|
||||
TInitialize m_Initialize;
|
||||
TShutdown m_Shutdown;
|
||||
TDoState m_DoState;
|
||||
// Functions
|
||||
TGetDllInfo m_GetDllInfo;
|
||||
TDllConfig m_DllConfig;
|
||||
TDllDebugger m_DllDebugger;
|
||||
TSetDllGlobals m_SetDllGlobals;
|
||||
TInitialize m_Initialize;
|
||||
TShutdown m_Shutdown;
|
||||
TDoState m_DoState;
|
||||
};
|
||||
} // end of namespace Common
|
||||
|
||||
|
@ -4,27 +4,25 @@
|
||||
#include "pluginspecs_pad.h"
|
||||
#include "Plugin.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
namespace Common {
|
||||
typedef void (__cdecl* TPAD_GetStatus)(u8, SPADStatus*);
|
||||
typedef void (__cdecl* TPAD_Input)(u16, u8);
|
||||
typedef void (__cdecl* TPAD_Rumble)(u8, unsigned int, unsigned int);
|
||||
typedef unsigned int (__cdecl* TPAD_GetAttachedPads)();
|
||||
|
||||
class PluginPAD : public CPlugin
|
||||
{
|
||||
class PluginPAD : public CPlugin {
|
||||
public:
|
||||
PluginPAD(const char *_Filename);
|
||||
~PluginPAD();
|
||||
virtual bool IsValid() {return validPAD;};
|
||||
PluginPAD(const char *_Filename);
|
||||
~PluginPAD();
|
||||
virtual bool IsValid() {return validPAD;};
|
||||
|
||||
TPAD_GetStatus PAD_GetStatus;
|
||||
TPAD_Input PAD_Input;
|
||||
TPAD_Rumble PAD_Rumble;
|
||||
TPAD_GetAttachedPads PAD_GetAttachedPads;
|
||||
TPAD_GetStatus PAD_GetStatus;
|
||||
TPAD_Input PAD_Input;
|
||||
TPAD_Rumble PAD_Rumble;
|
||||
TPAD_GetAttachedPads PAD_GetAttachedPads;
|
||||
|
||||
private:
|
||||
bool validPAD;
|
||||
bool validPAD;
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -1,11 +1,7 @@
|
||||
#include "PluginVideo.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
PluginVideo::PluginVideo(const char *_Filename) :
|
||||
CPlugin(_Filename),
|
||||
validVideo(false)
|
||||
{
|
||||
namespace Common {
|
||||
PluginVideo::PluginVideo(const char *_Filename) : CPlugin(_Filename), validVideo(false) {
|
||||
|
||||
Video_Prepare = reinterpret_cast<TVideo_Prepare>
|
||||
(LoadSymbol("Video_Prepare"));
|
||||
|
@ -13,23 +13,22 @@ namespace Common {
|
||||
typedef void (__cdecl* TVideo_AddMessage)(const char* pstr, unsigned int milliseconds);
|
||||
typedef void (__cdecl* TVideo_Stop)();
|
||||
|
||||
class PluginVideo : public CPlugin
|
||||
{
|
||||
public:
|
||||
PluginVideo(const char *_Filename);
|
||||
~PluginVideo();
|
||||
virtual bool IsValid() {return validVideo;};
|
||||
class PluginVideo : public CPlugin {
|
||||
public:
|
||||
PluginVideo(const char *_Filename);
|
||||
~PluginVideo();
|
||||
virtual bool IsValid() {return validVideo;};
|
||||
|
||||
TVideo_Prepare Video_Prepare;
|
||||
TVideo_SendFifoData Video_SendFifoData;
|
||||
TVideo_UpdateXFB Video_UpdateXFB;
|
||||
TVideo_Screenshot Video_Screenshot;
|
||||
TVideo_EnterLoop Video_EnterLoop;
|
||||
TVideo_AddMessage Video_AddMessage;
|
||||
TVideo_Stop Video_Stop;
|
||||
TVideo_Prepare Video_Prepare;
|
||||
TVideo_SendFifoData Video_SendFifoData;
|
||||
TVideo_UpdateXFB Video_UpdateXFB;
|
||||
TVideo_Screenshot Video_Screenshot;
|
||||
TVideo_EnterLoop Video_EnterLoop;
|
||||
TVideo_AddMessage Video_AddMessage;
|
||||
TVideo_Stop Video_Stop;
|
||||
|
||||
private:
|
||||
bool validVideo;
|
||||
bool validVideo;
|
||||
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user