From flz@xbsd.org  Mon Jan 17 11:56:46 2005
Return-Path: <flz@xbsd.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 83DEE16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 11:56:46 +0000 (GMT)
Received: from gate.xbsd.org (xbsd.org [82.233.2.192])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B6AE443D39
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 11:56:45 +0000 (GMT)
	(envelope-from flz@xbsd.org)
Received: from localhost (localhost.xbsd.org [127.0.0.1])
	by gate.xbsd.org (Postfix) with ESMTP id 852A211996
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jan 2005 12:59:00 +0100 (CET)
Received: from gate.xbsd.org ([127.0.0.1])
 by localhost (gate.xbsd.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 90210-01 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 17 Jan 2005 12:58:50 +0100 (CET)
Received: by gate.xbsd.org (Postfix, from userid 2001)
	id 3CEC01198A; Mon, 17 Jan 2005 12:58:50 +0100 (CET)
Message-Id: <20050117115850.3CEC01198A@gate.xbsd.org>
Date: Mon, 17 Jan 2005 12:58:50 +0100 (CET)
From: Florent Thoumie <flz@xbsd.org>
Reply-To: Florent Thoumie <flz@xbsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Update port: emulators/raine - update port to version 0.42.3, unbreak on 4.x
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76339
>Category:       ports
>Synopsis:       Update port: emulators/raine - update port to version 0.42.3, unbreak on 4.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 17 12:01:39 GMT 2005
>Closed-Date:    Fri Feb 11 13:05:15 GMT 2005
>Last-Modified:  Fri Feb 11 13:05:15 GMT 2005
>Originator:     Florent Thoumie
>Release:        FreeBSD 5.3-RELEASE i386
>Organization:
Xbsd.org
>Environment:

System: FreeBSD gate.xbsd.org 5.3-RELEASE FreeBSD 5.3-RELEASE #2: Wed Nov 24 16:35:34 CET 2004 root@gate.xbsd.org:/usr/src/sys/i386/compile/GATE i386

>Description:

Update raine port to version 0.42.3.
Make the port compile with gcc 2.95.4.

>How-To-Repeat:

N/A

>Fix:

	

--- raine.diff begins here ---
diff -ruN raine.old/Makefile raine/Makefile
--- raine.old/Makefile	Fri Jan 14 16:37:39 2005
+++ raine/Makefile	Mon Jan 17 12:48:06 2005
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	raine
-PORTVERSION=	0.40.5
+PORTVERSION=	0.42.3
 CATEGORIES=	emulators games
 MASTER_SITES=	http://www.rainemu.com/html/archive/
 DISTNAME=	${PORTNAME}s-${PORTVERSION}
@@ -29,10 +29,6 @@
 ONLY_FOR_ARCHS=	i386
 
 .include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN=		"pengo.c doesn't compile on 4.10 (see ports/69509)"
-.endif
 
 post-patch:
 	${REINPLACE_CMD} -e "s, [$$]_mcpu,,g" ${WRKSRC}/detect-cpu
diff -ruN raine.old/distinfo raine/distinfo
--- raine.old/distinfo	Fri Jan 14 16:37:39 2005
+++ raine/distinfo	Fri Jan 14 16:38:55 2005
@@ -1,2 +1,2 @@
-MD5 (raines-0.40.5.tar.bz2) = d49cdd9186e5354290283e15866a2b32
-SIZE (raines-0.40.5.tar.bz2) = 1605975
+MD5 (raines-0.42.3.tar.bz2) = a5adc3e4b8e92b28392bc77504707c9e
+SIZE (raines-0.42.3.tar.bz2) = 1683108
diff -ruN raine.old/files/patch-source::alleg::blit.c raine/files/patch-source::alleg::blit.c
--- raine.old/files/patch-source::alleg::blit.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::alleg::blit.c	Mon Jan 17 12:38:38 2005
@@ -0,0 +1,11 @@
+--- source/alleg/blit.c.orig	Mon Jan 17 12:37:21 2005
++++ source/alleg/blit.c	Mon Jan 17 12:38:10 2005
+@@ -1,6 +1,8 @@
+ #ifdef RAINE_WIN32
+ #include <allegro.h>
+ #include <winalleg.h>
++#elif defined(RAINE_UNIX)
++#include <sys/time.h>
+ #endif
+ #include "blit_x2.h"
+ #include "eagle.h"
diff -ruN raine.old/files/patch-source::emumain.c raine/files/patch-source::emumain.c
--- raine.old/files/patch-source::emumain.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::emumain.c	Mon Jan 17 11:50:10 2005
@@ -0,0 +1,13 @@
+--- source/emumain.c.orig	Mon Jan 17 11:47:24 2005
++++ source/emumain.c	Mon Jan 17 11:49:36 2005
+@@ -9,6 +9,10 @@
+ #include <winalleg.h>
+ #endif
+ 
++#ifdef RAINE_UNIX
++#include <sys/time.h>
++#endif
++
+ #include "raine.h"              // General defines and stuff
+ #include "gui.h"                // Interface stuff
+ #include "sasound.h"            // Sound Sample stuff
diff -ruN raine.old/files/patch-source::games::cps1.c raine/files/patch-source::games::cps1.c
--- raine.old/files/patch-source::games::cps1.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::cps1.c	Mon Jan 17 11:35:10 2005
@@ -0,0 +1,20 @@
+--- source/games/cps1.c.orig	Mon Jan 17 10:56:50 2005
++++ source/games/cps1.c	Mon Jan 17 11:35:07 2005
+@@ -1437,11 +1437,13 @@
+ 
+ void load_cps2() {
+   UINT16 *rom = (UINT16*)load_region[REGION_ROM1];
+-  xor = (UINT16*)load_region[REGION_USER1];
++  UINT8 *tmp;
++  int i, size_code, size_user1;
+ /*   int size = get_region_size(REGION_USER1)/2,i,size_code; */
+-  int size_code = get_region_size(REGION_ROM1),i;
+-  int size_user1 = get_region_size(REGION_USER1);
+-  UINT8 *tmp = AllocateMem(size_user1);
++  xor = (UINT16*)load_region[REGION_USER1];
++  size_code = get_region_size(REGION_ROM1);
++  size_user1 = get_region_size(REGION_USER1);
++  tmp = AllocateMem(size_user1);
+   if (!init_tilequeue()) return;
+   init_pbitmap();
+ 
diff -ruN raine.old/files/patch-source::games::dkong.c raine/files/patch-source::games::dkong.c
--- raine.old/files/patch-source::games::dkong.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::dkong.c	Mon Jan 17 10:33:18 2005
@@ -0,0 +1,68 @@
+--- source/games/dkong.c.orig	Mon Jan 17 10:04:09 2005
++++ source/games/dkong.c	Mon Jan 17 10:33:14 2005
+@@ -479,7 +479,7 @@
+ 
+ static void draw_emudx() {
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*gfx;
+   int offs;
+   int curlev = 0;
+@@ -517,8 +517,8 @@
+     gfx = gfx_ram;
+ 
+   if( check_layer_enabled(layer_id_data[0])) {
+-    MAKE_SCROLL_n_16(512,512,1,0, 0);
+-    START_SCROLL_16(BORDER,BORDER,512,512);
++    MAKE_SCROLL_n_16(512,512,1,0, 0)
++    START_SCROLL_16(BORDER,BORDER,512,512)
+ 
+     int sy = y-16*2;
+     if (sy < 0 || sy > 224*2+BORDER)
+@@ -716,20 +716,21 @@
+   /* As always for the color prom, great thanks go to mame for their decoding work */
+   for (i=0; i<256; i++) {
+     UINT8 bit0, bit1, bit2;
++    int r,g,b;
+     /* red component */
+     bit0 = (color_prom[256] >> 1) & 1;
+     bit1 = (color_prom[256] >> 2) & 1;
+     bit2 = (color_prom[256] >> 3) & 1;
+-    int r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
++    r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
+     /* green component */
+     bit0 = (color_prom[0] >> 2) & 1;
+     bit1 = (color_prom[0] >> 3) & 1;
+     bit2 = (color_prom[256] >> 0) & 1;
+-    int g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
++    g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
+     /* blue component */
+     bit0 = (color_prom[0] >> 0) & 1;
+     bit1 = (color_prom[0] >> 1) & 1;
+-    int b = 7 - ((bit0<<1) | (bit1 << 2));
++    b = 7 - ((bit0<<1) | (bit1 << 2));
+     RAM_PAL[i] = (b) | (g<<3) | (r<<6);
+     color_prom++;
+   }
+@@ -800,9 +801,9 @@
+ 
+ static void draw_dkong() {
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*gfx;
+-  int offs;
++  int offs,sy;
+ 
+   if (*gfx_bank) {
+     gfx = gfx_ram + 0x100;
+@@ -813,7 +814,7 @@
+     MAKE_SCROLL_n_8(256,256,1,0, 0);
+     START_SCROLL_8(BORDER,BORDER,256,256);
+ 
+-    int sy = y-16;
++    sy = y-16;
+     if (sy < 0 || sy > 224+BORDER)
+       continue;
+     code = gfx[tile_index];
diff -ruN raine.old/files/patch-source::games::frogger.c raine/files/patch-source::games::frogger.c
--- raine.old/files/patch-source::games::frogger.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::frogger.c	Mon Jan 17 10:40:42 2005
@@ -0,0 +1,30 @@
+--- source/games/frogger.c.orig	Mon Jan 17 10:37:51 2005
++++ source/games/frogger.c	Mon Jan 17 10:40:26 2005
+@@ -437,7 +437,7 @@
+ 
+ static void draw_emudx() {
+   UINT8 code,color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*solid;
+   int coul1, coul2;
+ 
+@@ -794,7 +794,7 @@
+      rotated you call it either col or row scroll ! */
+ 
+   UINT8 code, color;
+-  SCROLL_REGS;
++  SCROLL_REGS
+   UINT8 *map,*solid;
+   int coul1, coul2;
+ 
+@@ -865,8 +865,8 @@
+   }
+ 
+   if( check_layer_enabled(layer_id_data[1])) {
+-    solid = GFX_SOLID[1];
+     int offs;
++    solid = GFX_SOLID[1];
+     for (offs = 0x20 - 4;offs >= 0;offs -= 4) {
+       UINT8 sx,sy,color;
+       int flipx,flipy,code;
diff -ruN raine.old/files/patch-source::games::pengo.c raine/files/patch-source::games::pengo.c
--- raine.old/files/patch-source::games::pengo.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::games::pengo.c	Mon Jan 17 10:47:50 2005
@@ -0,0 +1,27 @@
+--- source/games/pengo.c.orig	Mon Jan 17 10:46:35 2005
++++ source/games/pengo.c	Mon Jan 17 10:47:35 2005
+@@ -444,11 +444,11 @@
+ }
+ 
+ static void load_pengo() {
+-  RAMSize = 0x1032+0x8000;
+   UINT8 *color_prom = load_region[REGION_PROMS];
+   UINT8 *decode1,*decode2,palette[32*2];
+   UINT32 dest_size;
+   int i;
++  RAMSize = 0x1032+0x8000;
+ 
+   if(!(RAM=AllocateMem(RAMSize))) return;
+ 
+@@ -1536,10 +1536,10 @@
+ {
+   // quite different from pengo for the init : no encoding, different memory map,
+   // different palette...
+-  RAMSize = 0x103a;
+   UINT8 *color_prom = load_region[REGION_PROMS];
+   UINT8 palette[32*2];
+   int i;
++  RAMSize = 0x103a;
+ 
+   if (!strcmp(current_game->main_name,"pacplus")) {
+     for (i = 0; i < 0x4000; i++)
diff -ruN raine.old/files/patch-source::gui::rgui.c raine/files/patch-source::gui::rgui.c
--- raine.old/files/patch-source::gui::rgui.c	Thu Jan  1 01:00:00 1970
+++ raine/files/patch-source::gui::rgui.c	Mon Jan 17 12:23:51 2005
@@ -0,0 +1,32 @@
+--- source/gui/rgui.c.orig	Mon Jan 17 12:07:21 2005
++++ source/gui/rgui.c	Mon Jan 17 12:23:46 2005
+@@ -9,6 +9,10 @@
+ #include <winalleg.h>
+ #endif
+ 
++#ifdef RAINE_UNIX
++#include <sys/time.h>
++#endif
++
+ #include "raine.h"
+ #include "rgui.h"
+ #include "rguiproc.h"
+@@ -1507,6 +1511,10 @@
+ void dialog_oxygen(void)
+ {
+ 
++#ifdef RAINE_UNIX
++  struct timeval timeout;
++#endif
++
+ #ifdef BUFFER_GUI
+    static int z,z1,z2,z3;
+    int ta;
+@@ -1560,7 +1568,6 @@
+   // its sleep function has a 1ms resolution instead of 1us. Too bad...
+    Sleep(1000/60);
+ #elif defined(RAINE_UNIX)
+-  struct timeval timeout;
+   timeout.tv_sec = 0;
+   timeout.tv_usec = 1000000/60;
+   select(0, NULL, NULL, NULL, &timeout);
diff -ruN raine.old/pkg-plist raine/pkg-plist
--- raine.old/pkg-plist	Fri Jan 14 16:37:39 2005
+++ raine/pkg-plist	Fri Jan 14 17:16:51 2005
@@ -1,29 +1,30 @@
 bin/raine
 %%DATADIR%%/cheats.cfg
 %%DATADIR%%/hiscore.dat
-%%DATADIR%%/languages/Brasil.cfg
-%%DATADIR%%/languages/CZECH.CFG
-%%DATADIR%%/languages/Catala.cfg
-%%DATADIR%%/languages/Dansk.cfg
-%%DATADIR%%/languages/Dutch.cfg
-%%DATADIR%%/languages/English.cfg
-%%DATADIR%%/languages/Espaol.cfg
-%%DATADIR%%/languages/Euskera.cfg
-%%DATADIR%%/languages/Finnish.cfg
-%%DATADIR%%/languages/French.cfg
-%%DATADIR%%/languages/French2.cfg
-%%DATADIR%%/languages/German.cfg
-%%DATADIR%%/languages/German2.cfg
-%%DATADIR%%/languages/Italian.cfg
-%%DATADIR%%/languages/Japanese.cfg
-%%DATADIR%%/languages/POLISH.CFG
-%%DATADIR%%/languages/Portugal.cfg
-%%DATADIR%%/languages/Spanish.cfg
-%%DATADIR%%/languages/Svenska.cfg
-%%DATADIR%%/languages/Template.cfg
-%%DATADIR%%/languages/Turkish.cfg
+%%DATADIR%%/languages/brasil.cfg
+%%DATADIR%%/languages/czech.cfg
+%%DATADIR%%/languages/catala.cfg
+%%DATADIR%%/languages/dansk.cfg
+%%DATADIR%%/languages/dutch.cfg
+%%DATADIR%%/languages/english.cfg
+%%DATADIR%%/languages/espanol.cfg
+%%DATADIR%%/languages/euskera.cfg
+%%DATADIR%%/languages/finnish.cfg
+%%DATADIR%%/languages/french.cfg
+%%DATADIR%%/languages/french2.cfg
+%%DATADIR%%/languages/german.cfg
+%%DATADIR%%/languages/german2.cfg
+%%DATADIR%%/languages/italian.cfg
+%%DATADIR%%/languages/japanese.cfg
+%%DATADIR%%/languages/polish.cfg
+%%DATADIR%%/languages/portugal.cfg
+%%DATADIR%%/languages/spanish.cfg
+%%DATADIR%%/languages/svenska.cfg
+%%DATADIR%%/languages/template.cfg
+%%DATADIR%%/languages/turkish.cfg
 %%DATADIR%%/languages/galego.cfg
 %%DATADIR%%/raine.dat
-@dirrm %%DATADIR%%/roms
+@exec mkdir -p %D/%%DATADIR%%/roms
+@unexec rmdir %D/%%DATADIR%%/roms 2> /dev/null || true
 @dirrm %%DATADIR%%/languages
-@dirrm %%DATADIR%%
+@unexec rmdir %D/%%DATADIR%% 2> /dev/null || true
--- raine.diff ends here ---
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vs 
State-Changed-When: Fri Feb 11 10:24:35 GMT 2005 
State-Changed-Why:  
Couldn't this be patched to work out of the box: 
raine@menelaos [11:23:56]> raine 
RAINE (680x0 Arcade Emulation) 0.42.3 (c)1998-2004 Raine Team 

CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz 
Unable to find raine.dat (must be in raine dir, or attached to raine.exe) 
raine@menelaos [11:24:22]> kdump | grep raine.dat 
56798 raine    NAMI  "/usr/share/games/raine/raine.dat" 
56798 raine    NAMI  "raine.dat" 
"Unable to find raine.dat (must be in raine dir, or attached to raine.exe) 


Responsible-Changed-From-To: freebsd-ports-bugs->vs 
Responsible-Changed-By: vs 
Responsible-Changed-When: Fri Feb 11 10:24:35 GMT 2005 
Responsible-Changed-Why:  
Handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76339 

From: Florent Thoumie <flz@xbsd.org>
To: Volker Stolz <vs@FreeBSD.org>
Cc: freebsd-ports-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/76339: Update port: emulators/raine - update port to version
 0.42.3, unbreak on 4.x
Date: Fri, 11 Feb 2005 12:02:40 +0100

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enig8110E133C761CE43B40D960A
 Content-Type: multipart/mixed;
  boundary="------------090203000600070101090004"
 
 This is a multi-part message in MIME format.
 --------------090203000600070101090004
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Here it is ! New patch.
 
 --------------090203000600070101090004
 Content-Type: text/plain;
  name="raine-v2.diff"
 Content-Transfer-Encoding: 8bit
 Content-Disposition: inline;
  filename="raine-v2.diff"
 
 diff -ruN raine.orig/Makefile raine/Makefile
 --- raine.orig/Makefile	Sat Aug 28 06:41:14 2004
 +++ raine/Makefile	Fri Feb 11 11:59:24 2005
 @@ -6,7 +6,7 @@
  #
 
  PORTNAME=	raine
 -PORTVERSION=	0.40.5
 +PORTVERSION=	0.42.3
  CATEGORIES=	emulators games
  MASTER_SITES=	http://www.rainemu.com/html/archive/
  DISTNAME=	${PORTNAME}s-${PORTVERSION}
 @@ -30,12 +30,9 @@
 
  .include <bsd.port.pre.mk>
 
 -.if ${OSVERSION} < 500000
 -BROKEN=		"pengo.c doesn't compile on 4.10 (see ports/69509)"
 -.endif
 -
  post-patch:
  	${REINPLACE_CMD} -e "s, [$$]_mcpu,,g" ${WRKSRC}/detect-cpu
  	${REINPLACE_CMD} -e "s,sdl-config,${SDL_CONFIG},g" ${WRKSRC}/makefile
 +	${REINPLACE_CMD} -e "s,/usr/share/games/raine,${DATADIR},g" ${WRKSRC}/source/raine.c
 
  .include <bsd.port.post.mk>
 diff -ruN raine.orig/distinfo raine/distinfo
 --- raine.orig/distinfo	Sat Aug 28 06:41:14 2004
 +++ raine/distinfo	Fri Feb 11 11:59:24 2005
 @@ -1,2 +1,2 @@
 -MD5 (raines-0.40.5.tar.bz2) = d49cdd9186e5354290283e15866a2b32
 -SIZE (raines-0.40.5.tar.bz2) = 1605975
 +MD5 (raines-0.42.3.tar.bz2) = a5adc3e4b8e92b28392bc77504707c9e
 +SIZE (raines-0.42.3.tar.bz2) = 1683108
 diff -ruN raine.orig/files/patch-source::alleg::blit.c raine/files/patch-source::alleg::blit.c
 --- raine.orig/files/patch-source::alleg::blit.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::alleg::blit.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,11 @@
 +--- source/alleg/blit.c.orig	Mon Jan 17 12:37:21 2005
 ++++ source/alleg/blit.c	Mon Jan 17 12:38:10 2005
 +@@ -1,6 +1,8 @@
 + #ifdef RAINE_WIN32
 + #include <allegro.h>
 + #include <winalleg.h>
 ++#elif defined(RAINE_UNIX)
 ++#include <sys/time.h>
 + #endif
 + #include "blit_x2.h"
 + #include "eagle.h"
 diff -ruN raine.orig/files/patch-source::emumain.c raine/files/patch-source::emumain.c
 --- raine.orig/files/patch-source::emumain.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::emumain.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,13 @@
 +--- source/emumain.c.orig	Mon Jan 17 11:47:24 2005
 ++++ source/emumain.c	Mon Jan 17 11:49:36 2005
 +@@ -9,6 +9,10 @@
 + #include <winalleg.h>
 + #endif
 +
 ++#ifdef RAINE_UNIX
 ++#include <sys/time.h>
 ++#endif
 ++
 + #include "raine.h"              // General defines and stuff
 + #include "gui.h"                // Interface stuff
 + #include "sasound.h"            // Sound Sample stuff
 diff -ruN raine.orig/files/patch-source::games::cps1.c raine/files/patch-source::games::cps1.c
 --- raine.orig/files/patch-source::games::cps1.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::games::cps1.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,20 @@
 +--- source/games/cps1.c.orig	Mon Jan 17 10:56:50 2005
 ++++ source/games/cps1.c	Mon Jan 17 11:35:07 2005
 +@@ -1437,11 +1437,13 @@
 +
 + void load_cps2() {
 +   UINT16 *rom = (UINT16*)load_region[REGION_ROM1];
 +-  xor = (UINT16*)load_region[REGION_USER1];
 ++  UINT8 *tmp;
 ++  int i, size_code, size_user1;
 + /*   int size = get_region_size(REGION_USER1)/2,i,size_code; */
 +-  int size_code = get_region_size(REGION_ROM1),i;
 +-  int size_user1 = get_region_size(REGION_USER1);
 +-  UINT8 *tmp = AllocateMem(size_user1);
 ++  xor = (UINT16*)load_region[REGION_USER1];
 ++  size_code = get_region_size(REGION_ROM1);
 ++  size_user1 = get_region_size(REGION_USER1);
 ++  tmp = AllocateMem(size_user1);
 +   if (!init_tilequeue()) return;
 +   init_pbitmap();
 +
 diff -ruN raine.orig/files/patch-source::games::dkong.c raine/files/patch-source::games::dkong.c
 --- raine.orig/files/patch-source::games::dkong.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::games::dkong.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,68 @@
 +--- source/games/dkong.c.orig	Mon Jan 17 10:04:09 2005
 ++++ source/games/dkong.c	Mon Jan 17 10:33:14 2005
 +@@ -479,7 +479,7 @@
 +
 + static void draw_emudx() {
 +   UINT8 code, color;
 +-  SCROLL_REGS;
 ++  SCROLL_REGS
 +   UINT8 *map,*gfx;
 +   int offs;
 +   int curlev = 0;
 +@@ -517,8 +517,8 @@
 +     gfx = gfx_ram;
 +
 +   if( check_layer_enabled(layer_id_data[0])) {
 +-    MAKE_SCROLL_n_16(512,512,1,0, 0);
 +-    START_SCROLL_16(BORDER,BORDER,512,512);
 ++    MAKE_SCROLL_n_16(512,512,1,0, 0)
 ++    START_SCROLL_16(BORDER,BORDER,512,512)
 +
 +     int sy = y-16*2;
 +     if (sy < 0 || sy > 224*2+BORDER)
 +@@ -716,20 +716,21 @@
 +   /* As always for the color prom, great thanks go to mame for their decoding work */
 +   for (i=0; i<256; i++) {
 +     UINT8 bit0, bit1, bit2;
 ++    int r,g,b;
 +     /* red component */
 +     bit0 = (color_prom[256] >> 1) & 1;
 +     bit1 = (color_prom[256] >> 2) & 1;
 +     bit2 = (color_prom[256] >> 3) & 1;
 +-    int r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
 ++    r = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
 +     /* green component */
 +     bit0 = (color_prom[0] >> 2) & 1;
 +     bit1 = (color_prom[0] >> 3) & 1;
 +     bit2 = (color_prom[256] >> 0) & 1;
 +-    int g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
 ++    g = 7 - (bit0 | (bit1<<1) | (bit2 << 2));
 +     /* blue component */
 +     bit0 = (color_prom[0] >> 0) & 1;
 +     bit1 = (color_prom[0] >> 1) & 1;
 +-    int b = 7 - ((bit0<<1) | (bit1 << 2));
 ++    b = 7 - ((bit0<<1) | (bit1 << 2));
 +     RAM_PAL[i] = (b) | (g<<3) | (r<<6);
 +     color_prom++;
 +   }
 +@@ -800,9 +801,9 @@
 +
 + static void draw_dkong() {
 +   UINT8 code, color;
 +-  SCROLL_REGS;
 ++  SCROLL_REGS
 +   UINT8 *map,*gfx;
 +-  int offs;
 ++  int offs,sy;
 +
 +   if (*gfx_bank) {
 +     gfx = gfx_ram + 0x100;
 +@@ -813,7 +814,7 @@
 +     MAKE_SCROLL_n_8(256,256,1,0, 0);
 +     START_SCROLL_8(BORDER,BORDER,256,256);
 +
 +-    int sy = y-16;
 ++    sy = y-16;
 +     if (sy < 0 || sy > 224+BORDER)
 +       continue;
 +     code = gfx[tile_index];
 diff -ruN raine.orig/files/patch-source::games::frogger.c raine/files/patch-source::games::frogger.c
 --- raine.orig/files/patch-source::games::frogger.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::games::frogger.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,30 @@
 +--- source/games/frogger.c.orig	Mon Jan 17 10:37:51 2005
 ++++ source/games/frogger.c	Mon Jan 17 10:40:26 2005
 +@@ -437,7 +437,7 @@
 +
 + static void draw_emudx() {
 +   UINT8 code,color;
 +-  SCROLL_REGS;
 ++  SCROLL_REGS
 +   UINT8 *map,*solid;
 +   int coul1, coul2;
 +
 +@@ -794,7 +794,7 @@
 +      rotated you call it either col or row scroll ! */
 +
 +   UINT8 code, color;
 +-  SCROLL_REGS;
 ++  SCROLL_REGS
 +   UINT8 *map,*solid;
 +   int coul1, coul2;
 +
 +@@ -865,8 +865,8 @@
 +   }
 +
 +   if( check_layer_enabled(layer_id_data[1])) {
 +-    solid = GFX_SOLID[1];
 +     int offs;
 ++    solid = GFX_SOLID[1];
 +     for (offs = 0x20 - 4;offs >= 0;offs -= 4) {
 +       UINT8 sx,sy,color;
 +       int flipx,flipy,code;
 diff -ruN raine.orig/files/patch-source::games::pengo.c raine/files/patch-source::games::pengo.c
 --- raine.orig/files/patch-source::games::pengo.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::games::pengo.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,27 @@
 +--- source/games/pengo.c.orig	Mon Jan 17 10:46:35 2005
 ++++ source/games/pengo.c	Mon Jan 17 10:47:35 2005
 +@@ -444,11 +444,11 @@
 + }
 +
 + static void load_pengo() {
 +-  RAMSize = 0x1032+0x8000;
 +   UINT8 *color_prom = load_region[REGION_PROMS];
 +   UINT8 *decode1,*decode2,palette[32*2];
 +   UINT32 dest_size;
 +   int i;
 ++  RAMSize = 0x1032+0x8000;
 +
 +   if(!(RAM=AllocateMem(RAMSize))) return;
 +
 +@@ -1536,10 +1536,10 @@
 + {
 +   // quite different from pengo for the init : no encoding, different memory map,
 +   // different palette...
 +-  RAMSize = 0x103a;
 +   UINT8 *color_prom = load_region[REGION_PROMS];
 +   UINT8 palette[32*2];
 +   int i;
 ++  RAMSize = 0x103a;
 +
 +   if (!strcmp(current_game->main_name,"pacplus")) {
 +     for (i = 0; i < 0x4000; i++)
 diff -ruN raine.orig/files/patch-source::gui::rgui.c raine/files/patch-source::gui::rgui.c
 --- raine.orig/files/patch-source::gui::rgui.c	Thu Jan  1 01:00:00 1970
 +++ raine/files/patch-source::gui::rgui.c	Fri Feb 11 11:59:24 2005
 @@ -0,0 +1,32 @@
 +--- source/gui/rgui.c.orig	Mon Jan 17 12:07:21 2005
 ++++ source/gui/rgui.c	Mon Jan 17 12:23:46 2005
 +@@ -9,6 +9,10 @@
 + #include <winalleg.h>
 + #endif
 +
 ++#ifdef RAINE_UNIX
 ++#include <sys/time.h>
 ++#endif
 ++
 + #include "raine.h"
 + #include "rgui.h"
 + #include "rguiproc.h"
 +@@ -1507,6 +1511,10 @@
 + void dialog_oxygen(void)
 + {
 +
 ++#ifdef RAINE_UNIX
 ++  struct timeval timeout;
 ++#endif
 ++
 + #ifdef BUFFER_GUI
 +    static int z,z1,z2,z3;
 +    int ta;
 +@@ -1560,7 +1568,6 @@
 +   // its sleep function has a 1ms resolution instead of 1us. Too bad...
 +    Sleep(1000/60);
 + #elif defined(RAINE_UNIX)
 +-  struct timeval timeout;
 +   timeout.tv_sec = 0;
 +   timeout.tv_usec = 1000000/60;
 +   select(0, NULL, NULL, NULL, &timeout);
 diff -ruN raine.orig/pkg-plist raine/pkg-plist
 --- raine.orig/pkg-plist	Sat Aug 28 06:41:14 2004
 +++ raine/pkg-plist	Fri Feb 11 11:59:24 2005
 @@ -1,29 +1,30 @@
  bin/raine
  %%DATADIR%%/cheats.cfg
  %%DATADIR%%/hiscore.dat
 -%%DATADIR%%/languages/Brasil.cfg
 -%%DATADIR%%/languages/CZECH.CFG
 -%%DATADIR%%/languages/Catala.cfg
 -%%DATADIR%%/languages/Dansk.cfg
 -%%DATADIR%%/languages/Dutch.cfg
 -%%DATADIR%%/languages/English.cfg
 -%%DATADIR%%/languages/Espaol.cfg
 -%%DATADIR%%/languages/Euskera.cfg
 -%%DATADIR%%/languages/Finnish.cfg
 -%%DATADIR%%/languages/French.cfg
 -%%DATADIR%%/languages/French2.cfg
 -%%DATADIR%%/languages/German.cfg
 -%%DATADIR%%/languages/German2.cfg
 -%%DATADIR%%/languages/Italian.cfg
 -%%DATADIR%%/languages/Japanese.cfg
 -%%DATADIR%%/languages/POLISH.CFG
 -%%DATADIR%%/languages/Portugal.cfg
 -%%DATADIR%%/languages/Spanish.cfg
 -%%DATADIR%%/languages/Svenska.cfg
 -%%DATADIR%%/languages/Template.cfg
 -%%DATADIR%%/languages/Turkish.cfg
 +%%DATADIR%%/languages/brasil.cfg
 +%%DATADIR%%/languages/czech.cfg
 +%%DATADIR%%/languages/catala.cfg
 +%%DATADIR%%/languages/dansk.cfg
 +%%DATADIR%%/languages/dutch.cfg
 +%%DATADIR%%/languages/english.cfg
 +%%DATADIR%%/languages/espanol.cfg
 +%%DATADIR%%/languages/euskera.cfg
 +%%DATADIR%%/languages/finnish.cfg
 +%%DATADIR%%/languages/french.cfg
 +%%DATADIR%%/languages/french2.cfg
 +%%DATADIR%%/languages/german.cfg
 +%%DATADIR%%/languages/german2.cfg
 +%%DATADIR%%/languages/italian.cfg
 +%%DATADIR%%/languages/japanese.cfg
 +%%DATADIR%%/languages/polish.cfg
 +%%DATADIR%%/languages/portugal.cfg
 +%%DATADIR%%/languages/spanish.cfg
 +%%DATADIR%%/languages/svenska.cfg
 +%%DATADIR%%/languages/template.cfg
 +%%DATADIR%%/languages/turkish.cfg
  %%DATADIR%%/languages/galego.cfg
  %%DATADIR%%/raine.dat
 -@dirrm %%DATADIR%%/roms
 +@exec mkdir -p %D/%%DATADIR%%/roms
 +@unexec rmdir %D/%%DATADIR%%/roms 2> /dev/null || true
  @dirrm %%DATADIR%%/languages
 -@dirrm %%DATADIR%%
 +@unexec rmdir %D/%%DATADIR%% 2> /dev/null || true
 
 --------------090203000600070101090004--
 
 --------------enig8110E133C761CE43B40D960A
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (FreeBSD)
 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
 
 iD8DBQFCDJDUMxEkbVFH3PQRAnPsAJ0R92cb6QZMMhAfHW8D9aQiCQIyGACfZOm/
 gOALaFLcQ/hDx7hfql8GY28=
 =9a/U
 -----END PGP SIGNATURE-----
 
 --------------enig8110E133C761CE43B40D960A--
State-Changed-From-To: feedback->closed 
State-Changed-By: vs 
State-Changed-When: Fri Feb 11 13:04:57 GMT 2005 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=76339 
>Unformatted:
