rpms/mirrormagic/devel mirrormagic-2.0.2-64bit.patch, NONE, 1.1 mirrormagic-2.0.2-fixes.patch, NONE, 1.1 mirrormagic.desktop, NONE, 1.1 mirrormagic.png, NONE, 1.1 mirrormagic.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Fri Oct 6 20:08:43 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/mirrormagic/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21788/devel

Modified Files:
	.cvsignore sources 
Added Files:
	mirrormagic-2.0.2-64bit.patch mirrormagic-2.0.2-fixes.patch 
	mirrormagic.desktop mirrormagic.png mirrormagic.spec 
Log Message:
auto-import mirrormagic-2.0.2-2.fc6 on branch devel from mirrormagic-2.0.2-2.fc6.src.rpm

mirrormagic-2.0.2-64bit.patch:

--- NEW FILE mirrormagic-2.0.2-64bit.patch ---
--- mirrormagic-2.0.2/src/libgame/gadgets.c~	2006-09-30 03:21:56.000000000 +0200
+++ mirrormagic-2.0.2/src/libgame/gadgets.c	2006-09-30 03:21:56.000000000 +0200
@@ -301,11 +301,11 @@
 	break;
 
       case GDI_TYPE:
-	gi->type = va_arg(ap, unsigned long);
+	gi->type = va_arg(ap, int);
 	break;
 
       case GDI_STATE:
-	gi->state = va_arg(ap, unsigned long);
+	gi->state = va_arg(ap, int);
 	break;
 
       case GDI_CHECKED:

mirrormagic-2.0.2-fixes.patch:

--- NEW FILE mirrormagic-2.0.2-fixes.patch ---
diff -ur mirrormagic-2.0.2.orig/src/editor.c mirrormagic-2.0.2/src/editor.c
--- mirrormagic-2.0.2.orig/src/editor.c	2001-01-14 17:14:33.000000000 +0100
+++ mirrormagic-2.0.2/src/editor.c	2006-09-29 12:14:21.000000000 +0200
@@ -2751,7 +2751,7 @@
 	break;
       }
 
-      if (!LevelContainsPlayer)
+      if (!LevelContainsPlayer())
 	Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
       else
       {
@@ -2766,7 +2766,7 @@
       break;
 
     case GADGET_ID_TEST:
-      if (!LevelContainsPlayer)
+      if (!LevelContainsPlayer())
 	Request("No Level without Gregor Mc Duffin please !", REQ_CONFIRM);
       else
       {
diff -ur mirrormagic-2.0.2.orig/src/events.c mirrormagic-2.0.2/src/events.c
--- mirrormagic-2.0.2.orig/src/events.c	2001-01-14 17:14:33.000000000 +0100
+++ mirrormagic-2.0.2/src/events.c	2006-09-29 14:44:13.000000000 +0200
@@ -134,6 +134,13 @@
     case EVENT_CLIENTMESSAGE:
       HandleClientMessageEvent((ClientMessageEvent *) event);
       break;
+    
+#ifdef TARGET_SDL // hack SDL returns this when toggling fullscreen
+    case (Uint8)-1:
+      if (game_status == SETUP) // redraw the setup screen to update fs status
+        DrawSetupScreen();
+      break;
+#endif
 
     default:
       break;
diff -ur mirrormagic-2.0.2.orig/src/files.c mirrormagic-2.0.2/src/files.c
--- mirrormagic-2.0.2.orig/src/files.c	2002-03-18 04:09:16.000000000 +0100
+++ mirrormagic-2.0.2/src/files.c	2006-09-29 12:09:17.000000000 +0200
@@ -183,7 +183,7 @@
 static char *getScoreDir(char *level_subdir)
 {
   static char *score_dir = NULL;
-  char *data_dir = options.rw_base_directory;
+  char *data_dir = getUserDataDir();
   char *score_subdir = SCORES_DIRECTORY;
 
   if (score_dir)
diff -ur mirrormagic-2.0.2.orig/src/libgame/misc.c mirrormagic-2.0.2/src/libgame/misc.c
--- mirrormagic-2.0.2.orig/src/libgame/misc.c	2002-03-19 02:57:15.000000000 +0100
+++ mirrormagic-2.0.2/src/libgame/misc.c	2006-09-29 12:13:03.000000000 +0200
@@ -423,7 +423,6 @@
   options.server_host = NULL;
   options.server_port = 0;
   options.ro_base_directory = RO_BASE_PATH;
-  options.rw_base_directory = RW_BASE_PATH;
   options.level_directory = RO_BASE_PATH "/" LEVELS_DIRECTORY;
   options.serveronly = FALSE;
   options.network = FALSE;
@@ -492,9 +491,7 @@
       if (option_arg == NULL)
 	Error(ERR_EXIT_HELP, "option '%s' requires an argument", option_str);
 
-      /* this should be extended to separate options for ro and rw data */
       options.ro_base_directory = option_arg;
-      options.rw_base_directory = option_arg;
       if (option_arg == next_option)
 	options_left++;
 
diff -ur mirrormagic-2.0.2.orig/src/libgame/sdl.c mirrormagic-2.0.2/src/libgame/sdl.c
--- mirrormagic-2.0.2.orig/src/libgame/sdl.c	2002-03-19 04:10:37.000000000 +0100
+++ mirrormagic-2.0.2/src/libgame/sdl.c	2006-09-29 13:48:10.000000000 +0200
@@ -14,7 +14,7 @@
 #include "system.h"
 #include "sound.h"
 #include "misc.h"
-
+#include "../main.h"
 
 #if defined(TARGET_SDL)
 
@@ -930,6 +930,21 @@
       ((ButtonEvent *)event)->y = 0;
   }
 #endif
+  if (event->type == EVENT_KEYPRESS)
+  {
+    /* make alt + enter toggle fullscreen */
+    if ( (((KeyEvent *)event)->keysym.sym == KSYM_Return) &&
+         (((KeyEvent *)event)->keysym.mod == KMOD_LALT) )
+    {
+      if(SDL_WM_ToggleFullScreen(SDL_GetVideoSurface()))
+      {
+        video.fullscreen_enabled = !video.fullscreen_enabled;  
+        setup.fullscreen = video.fullscreen_enabled;
+      }
+      /* make this an invalid event so the enter has no further results */
+      event->type = -1;
+    }
+  }
 }
 
 #endif /* TARGET_SDL */
diff -ur mirrormagic-2.0.2.orig/src/libgame/system.h mirrormagic-2.0.2/src/libgame/system.h
--- mirrormagic-2.0.2.orig/src/libgame/system.h	2002-03-19 03:42:52.000000000 +0100
+++ mirrormagic-2.0.2/src/libgame/system.h	2006-09-29 12:13:06.000000000 +0200
@@ -154,7 +154,6 @@
   char *server_host;
   int server_port;
   char *ro_base_directory;
-  char *rw_base_directory;
   char *level_directory;
   boolean serveronly;
   boolean network;
diff -ur mirrormagic-2.0.2.orig/src/main.h mirrormagic-2.0.2/src/main.h
--- mirrormagic-2.0.2.orig/src/main.h	2003-06-07 18:04:37.000000000 +0200
+++ mirrormagic-2.0.2/src/main.h	2006-09-29 11:36:39.000000000 +0200
@@ -459,7 +459,6 @@
 #endif
 extern struct HiScore		highscore[];
 extern struct TapeInfo		tape;
-extern struct JoystickInfo	joystick[];
 extern struct SetupInfo		setup;
 extern struct GameInfo		game;
 extern struct LaserInfo		laser;
diff -ur mirrormagic-2.0.2.orig/src/tools.c mirrormagic-2.0.2/src/tools.c
--- mirrormagic-2.0.2.orig/src/tools.c	2002-03-19 03:53:26.000000000 +0100
+++ mirrormagic-2.0.2/src/tools.c	2006-09-29 14:01:07.000000000 +0200
@@ -1310,6 +1310,18 @@
 	    case KSYM_Escape:
 	      result = 0;
 	      break;
+            
+            case KSYM_y:
+            case KSYM_Y:
+              if (req_state & REQ_ASK)
+                result = TRUE;
+              break;
+
+            case KSYM_n:
+            case KSYM_N:
+              if (req_state & REQ_ASK)
+                result = FALSE;
+              break;
 
 	    default:
 	      break;


--- NEW FILE mirrormagic.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=Mirror Magic
Comment=Puzzle game where you steer a beam of light using mirrors
Exec=mirrormagic
Icon=mirrormagic.png
Terminal=false
StartupNotify=false
Type=Application
Categories=Application;Game;ArcadeGame;


--- NEW FILE mirrormagic.spec ---
Name:           mirrormagic
Version:        2.0.2
Release:        2%{?dist}
Summary:        Puzzle game where you steer a beam of light using mirrors
Group:          Amusements/Games
License:        GPL
URL:            http://www.artsoft.org/mirrormagic/
Source0:        http://www.artsoft.org/RELEASES/unix/%{name}/%{name}-%{version}.tar.gz
Source1:        %{name}.desktop
Source2:        %{name}.png
Patch0:         %{name}-%{version}-fixes.patch
Patch1:         %{name}-%{version}-64bit.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL_image-devel SDL_mixer-devel desktop-file-utils

%description
MirrorMagic is a game where you shoot around obstacles to collect energy using
your beam. It is similar to "Mindbender" (Amiga) from the same author. The goal
is to work out how to get around obstacles to shoot energy containers with your
beam, thereby opening the path to the next level. Included are many levels
familiar from the games "Deflektor" and "Mindbender".


%prep
%setup -q
%patch0 -p1 -z .fixes
%patch1 -p1 -z .64bit


%build
make %{?_smp_mflags} RO_GAME_DIR=%{_datadir}/%{name} \
  OPTIONS="$RPM_OPT_FLAGS" sdl


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir} $RPM_BUILD_ROOT%{_datadir}/%{name}
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
cp -a graphics levels music sounds $RPM_BUILD_ROOT%{_datadir}/%{name}

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE1}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{SOURCE2} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc CHANGES COPYING README
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png


%changelog
* Sat Sep 30 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.0.2-2
- Add a patch which fixes running (startup) on 64 bit archs

* Fri Sep 29 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.0.2-1
- Initial Fedora Extras package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/mirrormagic/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	6 Oct 2006 20:07:18 -0000	1.1
+++ .cvsignore	6 Oct 2006 20:08:42 -0000	1.2
@@ -0,0 +1 @@
+mirrormagic-2.0.2.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/mirrormagic/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	6 Oct 2006 20:07:18 -0000	1.1
+++ sources	6 Oct 2006 20:08:42 -0000	1.2
@@ -0,0 +1 @@
+32fd3909c1e27f493d89bc2276da6744  mirrormagic-2.0.2.tar.gz




More information about the scm-commits mailing list