From 203016c44e883c7612c9ea171bce30451a03688c Mon Sep 17 00:00:00 2001 From: thoduv Date: Sun, 2 Jul 2006 11:21:07 +0000 Subject: [PATCH] Big change in GTK+ gui: now it can load/unload/load... roms. Added firmware file settings. Added desmume.cpp/h (can be used for other guis) Deleted free() of ROM in NDSSystem, it's up to gui to malloc/free (so, no more double free in GTK+ gui) --- desmume/src/gtk/Makefile.am | 2 +- desmume/src/gtk/desmume.h | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 desmume/src/gtk/desmume.h diff --git a/desmume/src/gtk/Makefile.am b/desmume/src/gtk/Makefile.am index dd02f55b4..80207f2be 100644 --- a/desmume/src/gtk/Makefile.am +++ b/desmume/src/gtk/Makefile.am @@ -1,4 +1,4 @@ bin_PROGRAMS = desmume -desmume_SOURCES = main.cpp +desmume_SOURCES = main.cpp desmume.cpp dToolsList.cpp tools/ioregsView.cpp desmume_LDADD = ../libdesmume.a $(GTK_LIBS) desmume_CXXFLAGS = $(GTK_CFLAGS) diff --git a/desmume/src/gtk/desmume.h b/desmume/src/gtk/desmume.h new file mode 100644 index 000000000..69ee86886 --- /dev/null +++ b/desmume/src/gtk/desmume.h @@ -0,0 +1,43 @@ +#ifndef __DESMUME_H__ +#define __DESMUME_H__ + +#include "../types.h" + +#define DESMUME_NB_KEYS 12 + +#define DESMUME_KEYMASK_(k) (1 << k) + +#define DESMUME_KEY_A 1 +#define DESMUME_KEY_B 2 +#define DESMUME_KEY_Select 3 +#define DESMUME_KEY_Start 4 +#define DESMUME_KEY_Right 5 +#define DESMUME_KEY_Left 6 +#define DESMUME_KEY_Up 7 +#define DESMUME_KEY_Down 8 +#define DESMUME_KEY_R 9 +#define DESMUME_KEY_L 10 + +#define DESMUME_KEY_Y 11 +#define DESMUME_KEY_X 12 + +extern void desmume_init(); +extern void desmume_free(); + +extern int desmume_load_rom(const char *filename); +extern void desmume_free_rom(); +extern void desmume_reset(); + +extern void desmume_pause(); +extern void desmume_resume(); +extern void desmume_toggle(); +extern BOOL desmume_running(); + +extern void desmume_cycle(); + +extern void desmume_touch(s16 x, s16 y); +extern void desmume_touch_release(); +extern void desmume_keypad(u16 k); + +#endif /*__DESMUME_H__*/ +