/
globals.h
132 lines (108 loc) · 3.12 KB
/
globals.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/* globals.h - this file is part of DeSmuME
*
* Copyright (C) 2007-2015 DeSmuME Team
* Copyright (C) 2007 Damien Nozay (damdoum)
* Author: damdoum at users.sourceforge.net
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GLOBALS_H__
#define __GLOBALS_H__
#ifndef GTK_UI
#define GTK_UI
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
// Localization
#include <libintl.h>
#define _(String) gettext (String)
#include <SDL.h>
// fix gtk-glade on windows with no configure
#ifndef DATADIR
#define DATADIR " "
#endif
#ifndef GLADEUI_UNINSTALLED_DIR
#define GLADEUI_UNINSTALLED_DIR "glade/"
#endif
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <glade/glade.h>
#include <glade/glade-xml.h>
typedef union _callback_arg{
gpointer my_pointer;
gconstpointer my_constpointer;
gfloat my_float;
gdouble my_double;
gsize my_size;
gssize my_ssize;
gboolean my_boolean;
guchar my_uchar;
guint my_uint;
guint8 my_uint8;
guint16 my_uint16;
guint32 my_uint32;
guint64 my_uint64;
gushort my_ushort;
gulong my_ulong;
gchar my_char;
gint my_int;
gint8 my_int8;
gint16 my_int16;
gint32 my_int32;
gint64 my_int64;
gshort my_short;
glong my_long;
} callback_arg;
#define dyn_CAST(gtype,var) (((callback_arg*)var)->my_##gtype)
#include "../MMU.h"
#include "../registers.h"
#include "../armcpu.h"
#include "../NDSSystem.h"
#include "../GPU.h"
#include "../shared/sndsdl.h"
#include "../shared/ctrlssdl.h"
#include "../types.h"
#include "../saves.h"
#include "../render3D.h"
#include "desmume.h"
// autoconnect with strings as user_data
void
glade_xml_signal_autoconnect_StringObject (GladeXML *self);
//---
extern int Frameskip;
/* main.cpp */
extern GtkWidget * pWindow;
extern GtkWidget * pDrawingArea, * pDrawingArea2;
extern GladeXML * xml, * xml_tools;
typedef void (*VoidFunPtr)();
void notify_Tools();
void register_Tool(VoidFunPtr fun);
void unregister_Tool(VoidFunPtr fun);
gchar * get_ui_file (const char *filename);
/* callbacks.cpp */
void enable_rom_features();
void resize (float Size1, float Size2);
void rotate(float angle);
extern gboolean ScreenInvert;
/* callbacks_IO.cpp */
extern float ScreenCoeff_Size[2];
extern float ScreenRotate;
void black_screen ();
void edit_controls();
void init_joy_labels();
#endif /* __GLOBALS_H__ */