diff options
author | miwi <miwi@FreeBSD.org> | 2006-09-12 15:40:10 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2006-09-12 15:40:10 +0800 |
commit | 7572d1b4d792e1e1cee298c1db20335bf291855c (patch) | |
tree | 6d7941b42b750e07204fe0f98bb5159dfd3fc36a /emulators/gngb | |
parent | d739c8387b986c1c6918cec4d134b0d14096cd9c (diff) | |
download | freebsd-ports-gnome-7572d1b4d792e1e1cee298c1db20335bf291855c.tar.gz freebsd-ports-gnome-7572d1b4d792e1e1cee298c1db20335bf291855c.tar.zst freebsd-ports-gnome-7572d1b4d792e1e1cee298c1db20335bf291855c.zip |
- Update to 20060309
PR: ports/103145
Submitted by: KATO Tsuguru <tkato432(at)yahoo.com>
Diffstat (limited to 'emulators/gngb')
-rw-r--r-- | emulators/gngb/Makefile | 2 | ||||
-rw-r--r-- | emulators/gngb/distinfo | 6 | ||||
-rw-r--r-- | emulators/gngb/files/patch-memory.c | 44 |
3 files changed, 48 insertions, 4 deletions
diff --git a/emulators/gngb/Makefile b/emulators/gngb/Makefile index f25a08282efb..4555fcc54c8b 100644 --- a/emulators/gngb/Makefile +++ b/emulators/gngb/Makefile @@ -6,7 +6,7 @@ # PORTNAME= gngb -PORTVERSION= 20060204 +PORTVERSION= 20060309 CATEGORIES= emulators MASTER_SITES= http://m.peponas.free.fr/gngb/download/ diff --git a/emulators/gngb/distinfo b/emulators/gngb/distinfo index 8c9f6ac23c4e..144424c768cf 100644 --- a/emulators/gngb/distinfo +++ b/emulators/gngb/distinfo @@ -1,3 +1,3 @@ -MD5 (gngb-20060204.tar.gz) = 43e1395abf82a787f415d15789782a11 -SHA256 (gngb-20060204.tar.gz) = 1b4de58b5d75b0f87b204c2b46569873e6a66f1535a48089c49e595f595220e1 -SIZE (gngb-20060204.tar.gz) = 178241 +MD5 (gngb-20060309.tar.gz) = 1bd23295ba10bfc21046d6334a1c8e76 +SHA256 (gngb-20060309.tar.gz) = 49c565002a6e9025c33b13aa0ffcdc456b6bd6360fb966460815a3b4007b4bc8 +SIZE (gngb-20060309.tar.gz) = 168911 diff --git a/emulators/gngb/files/patch-memory.c b/emulators/gngb/files/patch-memory.c new file mode 100644 index 000000000000..b4531627a400 --- /dev/null +++ b/emulators/gngb/files/patch-memory.c @@ -0,0 +1,44 @@ +--- src/memory.c.orig Sat Apr 29 02:13:47 2006 ++++ src/memory.c Sat Sep 9 18:12:36 2006 +@@ -67,7 +67,7 @@ + MEM_READ_ENTRY mem_read_tab[0x10]; + MEM_WRITE_ENTRY mem_write_tab[0x10]; + +-Sint16 joy_x_min=0;joy_x_max=0;joy_y_min=0;joy_y_max=0; ++Sint16 joy_x_min=0,joy_x_max=0,joy_y_min=0,joy_y_max=0; + + void (*select_rom_page)(Uint16 adr,Uint8 v); + void (*select_ram_page)(Uint16 adr,Uint8 v); +@@ -742,6 +742,13 @@ + if (!conf.play_movie) { + + if (conf.use_joy) { ++ Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; ++ Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; ++ Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2; ++ Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2; ++ Sint16 joy_x_qua=joy_x_mid / 2; ++ Sint16 joy_y_qua=joy_y_mid / 2; ++ + if ((joy_but[jmap[PAD_START]]) || (key[kmap[PAD_START]])) gb_pad|=0x08; /* Start */ + if ((joy_but[jmap[PAD_SELECT]]) || (key[kmap[PAD_SELECT]])) gb_pad|=0x04; /* Select */ + if ((joy_but[jmap[PAD_A]]) || (key[kmap[PAD_A]])) gb_pad|=0x01; /* A */ +@@ -752,18 +759,10 @@ + if ((joy_axis[jmap[PAD_UP]]<-10000) || (key[kmap[PAD_UP]])) gb_pad|=0x40; + if ((joy_axis[jmap[PAD_DOWN]]>10000) || (key[kmap[PAD_DOWN]])) gb_pad|=0x80;*/ + +- Sint16 joy_x_pos=joy_axis[jmap[PAD_LEFT]]; +- Sint16 joy_y_pos=joy_axis[jmap[PAD_UP]]; +- + if (joy_x_pos>joy_x_max) joy_x_max=joy_x_pos; + if (joy_x_pos<joy_x_min) joy_x_min=joy_x_pos; + if (joy_y_pos>joy_y_max) joy_y_max=joy_y_pos; + if (joy_y_pos<joy_y_min) joy_y_min=joy_y_pos; +- +- Sint16 joy_x_mid=(joy_x_max-joy_x_min) / 2; +- Sint16 joy_y_mid=(joy_y_max-joy_y_min) / 2; +- Sint16 joy_x_qua=joy_x_mid / 2; +- Sint16 joy_y_qua=joy_y_mid / 2; + + if ((joy_x_pos<(joy_x_mid-joy_x_qua)) || (key[kmap[PAD_LEFT]])) gb_pad|=0x20; + if ((joy_x_pos>(joy_x_mid+joy_x_qua)) || (key[kmap[PAD_RIGHT]])) gb_pad|=0x10; |