1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * Mupen64plus - plugin.h *
3 * Mupen64Plus homepage: http://code.google.com/p/mupen64plus/ *
4 * Copyright (C) 2002 Hacktarux *
5 * Copyright (C) 2009 Richard Goedeken *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
12 * This program is distributed in the hope that it will be useful, *
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15 * GNU General Public License for more details. *
17 * You should have received a copy of the GNU General Public License *
18 * along with this program; if not, write to the *
19 * Free Software Foundation, Inc., *
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
21 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #include "api/m64p_common.h"
27 #include "api/m64p_plugin.h"
29 extern m64p_error plugin_connect(m64p_plugin_type, m64p_dynlib_handle plugin_handle);
30 extern m64p_error plugin_start(m64p_plugin_type);
31 extern m64p_error plugin_check(void);
33 extern CONTROL Controls[4];
35 /*** Version requirement information ***/
36 #define RSP_API_VERSION 0x20000
37 #define GFX_API_VERSION 0x20200
38 #define AUDIO_API_VERSION 0x20000
39 #define INPUT_API_VERSION 0x20000
41 /* video plugin function pointers */
42 typedef struct _gfx_plugin_functions
44 ptr_PluginGetVersion getVersion;
45 ptr_ChangeWindow changeWindow;
46 ptr_InitiateGFX initiateGFX;
47 ptr_MoveScreen moveScreen;
48 ptr_ProcessDList processDList;
49 ptr_ProcessRDPList processRDPList;
50 ptr_RomClosed romClosed;
53 ptr_UpdateScreen updateScreen;
54 ptr_ViStatusChanged viStatusChanged;
55 ptr_ViWidthChanged viWidthChanged;
56 ptr_ReadScreen2 readScreen;
57 ptr_SetRenderingCallback setRenderingCallback;
58 ptr_ResizeVideoOutput resizeVideoOutput;
60 /* frame buffer plugin spec extension */
63 ptr_FBGetFrameBufferInfo fBGetFrameBufferInfo;
64 } gfx_plugin_functions;
66 extern gfx_plugin_functions gfx;
68 /* audio plugin function pointers */
69 typedef struct _audio_plugin_functions
71 ptr_PluginGetVersion getVersion;
72 ptr_AiDacrateChanged aiDacrateChanged;
73 ptr_AiLenChanged aiLenChanged;
74 ptr_InitiateAudio initiateAudio;
75 ptr_ProcessAList processAList;
76 ptr_RomClosed romClosed;
78 ptr_SetSpeedFactor setSpeedFactor;
79 ptr_VolumeUp volumeUp;
80 ptr_VolumeDown volumeDown;
81 ptr_VolumeGetLevel volumeGetLevel;
82 ptr_VolumeSetLevel volumeSetLevel;
83 ptr_VolumeMute volumeMute;
84 ptr_VolumeGetString volumeGetString;
85 } audio_plugin_functions;
87 extern audio_plugin_functions audio;
89 /* input plugin function pointers */
90 typedef struct _input_plugin_functions
92 ptr_PluginGetVersion getVersion;
93 ptr_ControllerCommand controllerCommand;
95 ptr_InitiateControllers initiateControllers;
96 ptr_ReadController readController;
97 ptr_RomClosed romClosed;
99 ptr_SDL_KeyDown keyDown;
101 } input_plugin_functions;
103 extern input_plugin_functions input;
105 /* RSP plugin function pointers */
106 typedef struct _rsp_plugin_functions
108 ptr_PluginGetVersion getVersion;
109 ptr_DoRspCycles doRspCycles;
110 ptr_InitiateRSP initiateRSP;
111 ptr_RomClosed romClosed;
112 } rsp_plugin_functions;
114 extern rsp_plugin_functions rsp;