Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/mupen64plus-video-glide64/src/m64p.h
2 views
1
/******************************************************************************
2
* Glide64 - Glide video plugin for Nintendo 64 emulators.
3
* http://bitbucket.org/wahrhaft/mupen64plus-video-glide64/
4
*
5
* Copyright (C) 2010 Jon Ring
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 2
10
* of the License, or (at your option) any later version.
11
*
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.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
*****************************************************************************/
21
22
#ifndef M64P_H
23
#define M64P_H
24
25
#define M64P_PLUGIN_PROTOTYPES 1
26
#include "m64p_types.h"
27
#include "m64p_common.h"
28
#include "m64p_plugin.h"
29
#include "m64p_config.h"
30
#include "m64p_vidext.h"
31
#include <stdio.h>
32
33
#define PLUGIN_NAME "Glide64 Video Plugin"
34
#define PLUGIN_VERSION 0x020000
35
#define VIDEO_PLUGIN_API_VERSION 0x020200
36
#define CONFIG_API_VERSION 0x020000
37
#define VIDEXT_API_VERSION 0x030000
38
39
#define VERSION_PRINTF_SPLIT(x) (((x) >> 16) & 0xffff), (((x) >> 8) & 0xff), ((x) & 0xff)
40
void WriteLog(m64p_msg_level level, const char *msg, ...);
41
42
//The Glide API originally used an integer to pick an enumerated resolution.
43
//To accomodate arbitrary resolutions, pack it into a 32-bit struct
44
//so we don't have to change function signatures
45
union PackedScreenResolution
46
{
47
struct
48
{
49
int width : 16;
50
int height : 15;
51
int fullscreen : 1;
52
};
53
int resolution;
54
};
55
56
57
/* definitions of pointers to Core config functions */
58
extern ptr_ConfigOpenSection ConfigOpenSection;
59
extern ptr_ConfigSetParameter ConfigSetParameter;
60
extern ptr_ConfigGetParameter ConfigGetParameter;
61
extern ptr_ConfigGetParameterHelp ConfigGetParameterHelp;
62
extern ptr_ConfigSetDefaultInt ConfigSetDefaultInt;
63
extern ptr_ConfigSetDefaultFloat ConfigSetDefaultFloat;
64
extern ptr_ConfigSetDefaultBool ConfigSetDefaultBool;
65
extern ptr_ConfigSetDefaultString ConfigSetDefaultString;
66
extern ptr_ConfigGetParamInt ConfigGetParamInt;
67
extern ptr_ConfigGetParamFloat ConfigGetParamFloat;
68
extern ptr_ConfigGetParamBool ConfigGetParamBool;
69
extern ptr_ConfigGetParamString ConfigGetParamString;
70
71
extern ptr_ConfigGetSharedDataFilepath ConfigGetSharedDataFilepath;
72
extern ptr_ConfigGetUserConfigPath ConfigGetUserConfigPath;
73
extern ptr_ConfigGetUserDataPath ConfigGetUserDataPath;
74
extern ptr_ConfigGetUserCachePath ConfigGetUserCachePath;
75
76
77
extern ptr_VidExt_Init CoreVideo_Init;
78
extern ptr_VidExt_Quit CoreVideo_Quit;
79
extern ptr_VidExt_ListFullscreenModes CoreVideo_ListFullscreenModes;
80
extern ptr_VidExt_SetVideoMode CoreVideo_SetVideoMode;
81
extern ptr_VidExt_SetCaption CoreVideo_SetCaption;
82
extern ptr_VidExt_ToggleFullScreen CoreVideo_ToggleFullScreen;
83
extern ptr_VidExt_ResizeWindow CoreVideo_ResizeWindow;
84
extern ptr_VidExt_GL_GetProcAddress CoreVideo_GL_GetProcAddress;
85
extern ptr_VidExt_GL_SetAttribute CoreVideo_GL_SetAttribute;
86
extern ptr_VidExt_GL_SwapBuffers CoreVideo_GL_SwapBuffers;
87
88
#endif
89
90