Rockbox Development > Starting Development and Compiling

new doom patch problem

(1/2) > >>

gravedigg154:
OK so I downloaded the Doom Scrollwheel patch. I look in the path file to find out where to put it. I find this /cvsroot/rockbox/apps/plugins/doom/g_game. First of all I don't know where this is so i just put it where the rockdoom.wad file is. In the cmd window i navigate there and when I try to open the patch I get this. E:\games\doom>patch --binary -p0 < doom_scroll3_sync20061010.patch
'patch' is not recognized as an internal or external command, operable program or batch file. After it said this I tried again but changed -p0 to -p1 like the guide said I should. I got the same response every time up to 5.

Llorean:
I would suggest first learning how to compile Rockbox, as from the steps you followed to attempt this it sounds unlikely that you've done that, and necessary to be able to compile, to use patches.

gravedigg154:
I have a new problem now. I'm doing the doom scrollwheel patch still but I'm trying it with vmware as I heard it is better than cygwin. I do everything that the person that made the vmware compiling thread put in the thread. I put the patch in the doom folder like it said. When I try to add patch this comes up. Heres everything I've done so far regarding adding the patch.

And yes I did try the -p0 to -p5 thing.

bluebrother:
patch says already what is wrong. Open the patch file in an editor an look up the exact path its expecting, and from that you can get the -p number you need.

gravedigg154:
Ok thank you. Other then that it looks like I'm doing everything right?
This is taken from the patch. "/cvsroot/rockbox/apps/plugins/doom/i_video.c" Every single file the patch changes is in that folder. It's also the one I'm in.

Here's all the entire patch file incase you want to see it.

Index: apps/plugins/doom/d_event.h
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/doom/d_event.h,v
retrieving revision 1.1
diff -u -r1.1 d_event.h
--- apps/plugins/doom/d_event.h   28 Mar 2006 15:44:01 -0000   1.1
+++ apps/plugins/doom/d_event.h   17 Apr 2006 19:00:42 -0000
@@ -47,7 +47,8 @@
    ev_keydown,
    ev_keyup,
    ev_mouse,
-   ev_joystick
+   ev_joystick,
+   ev_scroll
 } evtype_t;
 
 // Event structure.
Index: apps/plugins/doom/g_game.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/doom/g_game.c,v
retrieving revision 1.3
diff -u -r1.3 g_game.c
--- apps/plugins/doom/g_game.c   16 Apr 2006 23:14:04 -0000   1.3
+++ apps/plugins/doom/g_game.c   17 Apr 2006 19:00:44 -0000
@@ -229,6 +229,9 @@
 static unsigned int   dclickstate2;
 static unsigned int   dclicks2;
 
+// scrollwheel values
+static int scrollmag;
+
 // joystick values are repeated
 static int   joyxmove;
 static int   joyymove;
@@ -317,6 +320,13 @@
 
    // let movement keys cancel each other out
 
+   /* strafe with scrollwheel */
+   if (scrollmag > 0)
+         side += 5*sidemove[speed];
+   if (scrollmag < 0)
+         side -= 5*sidemove[speed];
+   scrollmag = 0;        
+
    if (strafe)
    {
       if (gamekeydown[key_right])
@@ -757,6 +769,9 @@
       joyymove = ev->data3;
       return true;    // eat events
 
+   case ev_scroll:
+      scrollmag = ev->data1;
+
    default:
       break;
    }

Index: apps/plugins/doom/i_video.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/doom/i_video.c,v
retrieving revision 1.15
diff -u -r1.15 i_video.c
--- apps/plugins/doom/i_video.c   16 Apr 2006 23:14:04 -0000   1.15
+++ apps/plugins/doom/i_video.c   17 Apr 2006 19:00:45 -0000
@@ -143,7 +143,9 @@
 //
 
 #if (CONFIG_KEYPAD == IPOD_4G_PAD) || (CONFIG_KEYPAD == IPOD_3G_PAD)
-//#define DOOMBUTTON_SCROLLWHEEL
+#define DOOMBUTTON_SCROLLWHEEL
+#define DOOMBUTTON_S_LEFT     BUTTON_SCROLL_BACK
+#define DOOMBUTTON_S_RIGHT    BUTTON_SCROLL_FWD
 #define DOOMBUTTON_UP         BUTTON_MENU
 #define DOOMBUTTON_WEAPON     BUTTON_SELECT
 #define DOOMBUTTON_LEFT       BUTTON_LEFT
@@ -177,6 +179,26 @@
    holdbutton=rb->button_hold();
 #endif
 
+#ifdef DOOMBUTTON_SCROLLWHEEL
+   /* use button_get(false) for clickwheel checks */
+   int button; /* move me */
+   button = rb->button_get(false);
+   switch(button){
+   case DOOMBUTTON_S_LEFT | BUTTON_REPEAT:
+   case DOOMBUTTON_S_LEFT:
+         event.type = ev_scroll;
+         event.data1=-1;
+         D_PostEvent(&event);
+         break;
+   case DOOMBUTTON_S_RIGHT | BUTTON_REPEAT:
+   case DOOMBUTTON_S_RIGHT:
+         event.type = ev_scroll;
+         //event.data1=KEY_LEFTARROW;
+         event.data1=1;
+         D_PostEvent(&event);
+         break;
+   }
+#endif  
    newbuttonstate = rb->button_status();
    released = ~newbuttonstate & oldbuttonstate;
    pressed = newbuttonstate & ~oldbuttonstate;

Navigation

[0] Message Index

[#] Next page

Go to full version