1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Update to 20060309

PR:		ports/103145
Submitted by:	KATO Tsuguru <tkato432(at)yahoo.com>
This commit is contained in:
Martin Wilke 2006-09-12 07:40:10 +00:00
parent 47e199b050
commit d455bf87bd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172823
3 changed files with 48 additions and 4 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= gngb
PORTVERSION= 20060204
PORTVERSION= 20060309
CATEGORIES= emulators
MASTER_SITES= http://m.peponas.free.fr/gngb/download/

View File

@ -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

View File

@ -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;