[SCM] Arcade style game branch, master, updated. debian/3.3.0.1+dfsg1-1

Dmitry E. Oboukhov unera at debian.org
Thu Jun 17 06:46:11 UTC 2010


The following commit has been merged in the master branch:
commit c8d7d472a9e6acf4411776f02f2024902aa6a7b4
Author: Dmitry E. Oboukhov <unera at debian.org>
Date:   Thu Jun 17 10:38:37 2010 +0400

    new upstream version

diff --git a/ChangeLog b/ChangeLog
index 9451858..db17bdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-06-08
+	* version 3.3.0.1 released
+
+2010-06-08
+	* added configurable key shortcuts for snap+direction player actions
+	  (probably most useful for recording tool-assisted speedrun (TAS)
+	  tapes using the single-step mode of the tape recorder)
+
+2010-05-28
+	* version number set to 3.3.0.1
+
+2010-05-25
+	* version 3.3.0.0 released
+
 2010-05-22
 	* fixed missing memory allocation in SP engine when saving engine data
 	  for non-SP game engine snapshots (which also stores SP engine part)
diff --git a/debian/changelog b/debian/changelog
index f2891ba..572b8bf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+rocksndiamonds (3.3.0.1+dfsg1-1) unstable; urgency=low
+
+  * New upstream bugfix version.
+
+ -- Dmitry E. Oboukhov <unera at debian.org>  Thu, 17 Jun 2010 10:37:21 +0400
+
 rocksndiamonds (3.3.0.0+dfsg1-1) unstable; urgency=low
 
   * New upstream version.
diff --git a/debian/postinst.in b/debian/postinst.in
index 5d433fb..9ab256c 100644
--- a/debian/postinst.in
+++ b/debian/postinst.in
@@ -17,7 +17,7 @@ our %info=
   {
     url =>
       'http://www.artsoft.org/RELEASES/unix/rocksndiamonds/rocksndiamonds-#VERSION#.tar.gz',
-    md5 => '191b7a63de9706b0aee52cdf983b3267',
+    md5 => '813ced99d54f89db7c593c518d197d18',
     topdir => 'rocksndiamonds-#VERSION#',
   },
 
diff --git a/rocksndiamonds.1 b/rocksndiamonds.1
index e155fa2..4c14c4b 100644
--- a/rocksndiamonds.1
+++ b/rocksndiamonds.1
@@ -150,8 +150,8 @@ keys or with the joystick (if you have no joystick and even no arrow
 keys on your keyboard, you can use the keys 'i', 'j', 'k' and 'm' for
 the directions. To 'snap' a field near you without moving to it, you
 can use the left fire button on your joystick (hold it down, move the
-stick to 'snap' the field, release the button) or the keys 'e', 's', 'd'
-and 'x'. To place a piece of dynamite, use the right fire button
+stick to 'snap' the field, release the button) or the keys 'e', 's',
+'d' and 'x'. To place a piece of dynamite, use the right fire button
 on your joystick or use the 'b' key (and, after placing the dynamite,
 better see to move away from this field...).
 
@@ -195,9 +195,9 @@ elements and something like that. The four 3x3 field on the upper left
 can be edited like the level field and indicate the 'contents' of smashed
 crunchers (just try it out with some crunchers in one of your own levels).
 
- 'Undo & Exit' leaves the level editor, throwing away all the changes you
+'Undo & Exit' leaves the level editor, throwing away all the changes you
 have done to the level.
- 'Save & Exit' leveas the level editor and saves the new level (the old one
+'Save & Exit' leveas the level editor and saves the new level (the old one
 will be deleted).
 
 
@@ -216,8 +216,8 @@ to press 'Start Game' as usual.
 .TP
 .B Saving a game tape:
 To save a tape to the tape file corresponding to the level (that means
-that you can only save one tape file for each level), just press the 'eject'
-button (the very left button). Then you will be prompted if
+that you can only save one tape file for each level), just press the
+'eject' button (the very left button). Then you will be prompted if
 you really want to replace the old tape (if an old tape exists).
 
 .TP
diff --git a/src/Makefile b/src/Makefile
index 34f01f6..4bbbcca 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -102,13 +102,13 @@ endif
 
 ifeq ($(TARGET),sdl)			# compiling for SDL target
 SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
-SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net
+SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg
 SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --libs)
 endif
 
 ifeq ($(TARGET),sdl-static)		# compiling for SDL target (static)
 SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
-SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net
+SDL_LIBS = -lSDL_image -lSDL_mixer -lSDL_net -lsmpeg
 SYS_LDFLAGS = $(SDL_LIBS) $(shell sdl-config --static-libs)
 endif
 
diff --git a/src/events.c b/src/events.c
index 9a42eb4..8c7aeca 100644
--- a/src/events.c
+++ b/src/events.c
@@ -607,20 +607,22 @@ static void HandleKeysSpecial(Key key)
 void HandleKey(Key key, int key_status)
 {
   boolean anyTextGadgetActiveOrJustFinished = anyTextGadgetActive();
-  static struct SetupKeyboardInfo custom_key;
+  static struct SetupKeyboardInfo ski;
+  static struct SetupShortcutInfo ssi;
   static struct
   {
     Key *key_custom;
+    Key *key_snap;
     Key key_default;
     byte action;
   } key_info[] =
   {
-    { &custom_key.left,  DEFAULT_KEY_LEFT,  JOY_LEFT     },
-    { &custom_key.right, DEFAULT_KEY_RIGHT, JOY_RIGHT    },
-    { &custom_key.up,    DEFAULT_KEY_UP,    JOY_UP       },
-    { &custom_key.down,  DEFAULT_KEY_DOWN,  JOY_DOWN     },
-    { &custom_key.snap,  DEFAULT_KEY_SNAP,  JOY_BUTTON_1 },
-    { &custom_key.drop,  DEFAULT_KEY_DROP,  JOY_BUTTON_2 }
+    { &ski.left,  &ssi.snap_left,  DEFAULT_KEY_LEFT,  JOY_LEFT        },
+    { &ski.right, &ssi.snap_right, DEFAULT_KEY_RIGHT, JOY_RIGHT       },
+    { &ski.up,    &ssi.snap_up,    DEFAULT_KEY_UP,    JOY_UP          },
+    { &ski.down,  &ssi.snap_down,  DEFAULT_KEY_DOWN,  JOY_DOWN        },
+    { &ski.snap,  NULL,            DEFAULT_KEY_SNAP,  JOY_BUTTON_SNAP },
+    { &ski.drop,  NULL,            DEFAULT_KEY_DROP,  JOY_BUTTON_DROP }
   };
   int joy = 0;
   int i;
@@ -632,6 +634,8 @@ void HandleKey(Key key, int key_status)
     static boolean element_dropped[MAX_PLAYERS] = { FALSE,FALSE,FALSE,FALSE };
     int pnr;
 
+    ssi = setup.shortcut;
+
     for (pnr = 0; pnr < MAX_PLAYERS; pnr++)
     {
       byte key_action = 0;
@@ -639,12 +643,16 @@ void HandleKey(Key key, int key_status)
       if (setup.input[pnr].use_joystick)
 	continue;
 
-      custom_key = setup.input[pnr].key;
+      ski = setup.input[pnr].key;
 
-      for (i = 0; i < 6; i++)
+      for (i = 0; i < NUM_PLAYER_ACTIONS; i++)
 	if (key == *key_info[i].key_custom)
 	  key_action |= key_info[i].action;
 
+      for (i = 0; i < NUM_DIRECTIONS; i++)
+	if (key == *key_info[i].key_snap)
+	  key_action |= key_info[i].action | JOY_BUTTON_SNAP;
+
       if (tape.single_step && clear_button_2[pnr])
       {
 	stored_player[pnr].action &= ~KEY_BUTTON_2;
@@ -699,7 +707,7 @@ void HandleKey(Key key, int key_status)
   }
   else
   {
-    for (i = 0; i < 6; i++)
+    for (i = 0; i < NUM_PLAYER_ACTIONS; i++)
       if (key == key_info[i].key_default)
 	joy |= key_info[i].action;
   }
diff --git a/src/files.c b/src/files.c
index d783748..349d2d5 100644
--- a/src/files.c
+++ b/src/files.c
@@ -9067,8 +9067,12 @@ void SaveScore(int nr)
 #define SETUP_TOKEN_SHORTCUT_SOUND_SIMPLE	13
 #define SETUP_TOKEN_SHORTCUT_SOUND_LOOPS	14
 #define SETUP_TOKEN_SHORTCUT_SOUND_MUSIC	15
+#define SETUP_TOKEN_SHORTCUT_SNAP_LEFT		16
+#define SETUP_TOKEN_SHORTCUT_SNAP_RIGHT		17
+#define SETUP_TOKEN_SHORTCUT_SNAP_UP		18
+#define SETUP_TOKEN_SHORTCUT_SNAP_DOWN		19
 
-#define NUM_SHORTCUT_SETUP_TOKENS		16
+#define NUM_SHORTCUT_SETUP_TOKENS		20
 
 /* player setup */
 #define SETUP_TOKEN_PLAYER_USE_JOYSTICK		0
@@ -9221,6 +9225,10 @@ static struct TokenInfo shortcut_setup_tokens[] =
   { TYPE_KEY_X11, &ssi.sound_simple,	"shortcut.sound_simple"		},
   { TYPE_KEY_X11, &ssi.sound_loops,	"shortcut.sound_loops"		},
   { TYPE_KEY_X11, &ssi.sound_music,	"shortcut.sound_music"		},
+  { TYPE_KEY_X11, &ssi.snap_left,	"shortcut.snap_left"		},
+  { TYPE_KEY_X11, &ssi.snap_right,	"shortcut.snap_right"		},
+  { TYPE_KEY_X11, &ssi.snap_up,		"shortcut.snap_up"		},
+  { TYPE_KEY_X11, &ssi.snap_down,	"shortcut.snap_down"		},
 };
 
 static struct TokenInfo player_setup_tokens[] =
@@ -9347,6 +9355,11 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
   si->shortcut.sound_loops	= DEFAULT_KEY_SOUND_LOOPS;
   si->shortcut.sound_music	= DEFAULT_KEY_SOUND_MUSIC;
 
+  si->shortcut.snap_left	= DEFAULT_KEY_SNAP_LEFT;
+  si->shortcut.snap_right	= DEFAULT_KEY_SNAP_RIGHT;
+  si->shortcut.snap_up		= DEFAULT_KEY_SNAP_UP;
+  si->shortcut.snap_down	= DEFAULT_KEY_SNAP_DOWN;
+
   for (i = 0; i < MAX_PLAYERS; i++)
   {
     si->input[i].use_joystick = FALSE;
diff --git a/src/libgame/joystick.h b/src/libgame/joystick.h
index efaaf5b..dfc3089 100644
--- a/src/libgame/joystick.h
+++ b/src/libgame/joystick.h
@@ -61,6 +61,8 @@
 #define JOY_DOWN	       	MV_DOWN
 #define JOY_BUTTON_1		KEY_BUTTON_1
 #define JOY_BUTTON_2		KEY_BUTTON_2
+#define JOY_BUTTON_SNAP		KEY_BUTTON_SNAP
+#define JOY_BUTTON_DROP		KEY_BUTTON_DROP
 #define JOY_MOTION		KEY_MOTION
 #define JOY_BUTTON		KEY_BUTTON
 #define JOY_ACTION		KEY_ACTION
diff --git a/src/libgame/system.h b/src/libgame/system.h
index cbcf5c8..4383b60 100644
--- a/src/libgame/system.h
+++ b/src/libgame/system.h
@@ -80,6 +80,10 @@
 #define DEFAULT_KEY_SOUND_SIMPLE	KSYM_UNDEFINED
 #define DEFAULT_KEY_SOUND_LOOPS		KSYM_UNDEFINED
 #define DEFAULT_KEY_SOUND_MUSIC		KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_LEFT		KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_RIGHT		KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_UP		KSYM_UNDEFINED
+#define DEFAULT_KEY_SNAP_DOWN		KSYM_UNDEFINED
 
 /* values for key_status */
 #define KEY_NOT_PRESSED			FALSE
@@ -130,6 +134,8 @@
 #define BUTTON_1			4
 #define BUTTON_2			5
 
+#define NUM_PLAYER_ACTIONS		6
+
 /* values for special "focus player" bitmasks */
 #define BIT_SET_FOCUS			6
 
@@ -153,6 +159,8 @@
 
 #define KEY_BUTTON_1		(1 << BUTTON_1)
 #define KEY_BUTTON_2		(1 << BUTTON_2)
+#define KEY_BUTTON_SNAP		KEY_BUTTON_1
+#define KEY_BUTTON_DROP		KEY_BUTTON_2
 #define KEY_MOTION		(MV_LEFT | MV_RIGHT | MV_UP | MV_DOWN)
 #define KEY_BUTTON		(KEY_BUTTON_1 | KEY_BUTTON_2)
 #define KEY_ACTION		(KEY_MOTION | KEY_BUTTON)
@@ -863,6 +871,11 @@ struct SetupShortcutInfo
   Key sound_simple;
   Key sound_loops;
   Key sound_music;
+
+  Key snap_left;
+  Key snap_right;
+  Key snap_up;
+  Key snap_down;
 };
 
 struct SetupSystemInfo
diff --git a/src/main.h b/src/main.h
index 0933b06..d16f5bc 100644
--- a/src/main.h
+++ b/src/main.h
@@ -2023,7 +2023,7 @@
 #define PROGRAM_VERSION_MAJOR		3
 #define PROGRAM_VERSION_MINOR		3
 #define PROGRAM_VERSION_PATCH		0
-#define PROGRAM_VERSION_BUILD		0
+#define PROGRAM_VERSION_BUILD		1
 
 #define PROGRAM_TITLE_STRING		"Rocks'n'Diamonds"
 #define PROGRAM_AUTHOR_STRING		"Holger Schemel"
diff --git a/src/screens.c b/src/screens.c
index db347cd..de24626 100644
--- a/src/screens.c
+++ b/src/screens.c
@@ -50,20 +50,21 @@
 #define SETUP_MODE_SHORTCUTS_2		9
 #define SETUP_MODE_SHORTCUTS_3		10
 #define SETUP_MODE_SHORTCUTS_4		11
+#define SETUP_MODE_SHORTCUTS_5		12
 
 /* sub-screens on the setup screen (generic) */
-#define SETUP_MODE_CHOOSE_ARTWORK	12
-#define SETUP_MODE_CHOOSE_OTHER		13
+#define SETUP_MODE_CHOOSE_ARTWORK	13
+#define SETUP_MODE_CHOOSE_OTHER		14
 
 /* sub-screens on the setup screen (specific) */
-#define SETUP_MODE_CHOOSE_GAME_SPEED	14
-#define SETUP_MODE_CHOOSE_SCREEN_MODE	15
-#define SETUP_MODE_CHOOSE_SCROLL_DELAY	16
-#define SETUP_MODE_CHOOSE_GRAPHICS	17
-#define SETUP_MODE_CHOOSE_SOUNDS	18
-#define SETUP_MODE_CHOOSE_MUSIC		19
+#define SETUP_MODE_CHOOSE_GAME_SPEED	15
+#define SETUP_MODE_CHOOSE_SCREEN_MODE	16
+#define SETUP_MODE_CHOOSE_SCROLL_DELAY	17
+#define SETUP_MODE_CHOOSE_GRAPHICS	18
+#define SETUP_MODE_CHOOSE_SOUNDS	19
+#define SETUP_MODE_CHOOSE_MUSIC		20
 
-#define MAX_SETUP_MODES			20
+#define MAX_SETUP_MODES			21
 
 /* for input setup functions */
 #define SETUPINPUT_SCREEN_POS_START	0
@@ -235,7 +236,7 @@ static struct
 				 INFO_MODE_MAIN)
 
 #define DRAW_MODE_SETUP(i)	((i) >= SETUP_MODE_MAIN &&		\
-				 (i) <= SETUP_MODE_SHORTCUTS_4 ? (i) :	\
+				 (i) <= SETUP_MODE_SHORTCUTS_5 ? (i) :	\
 				 (i) >= SETUP_MODE_CHOOSE_GRAPHICS &&	\
 				 (i) <= SETUP_MODE_CHOOSE_MUSIC ?	\
 				 SETUP_MODE_CHOOSE_ARTWORK :		\
@@ -4135,6 +4136,13 @@ static void execSetupShortcuts4()
   DrawSetupScreen();
 }
 
+static void execSetupShortcuts5()
+{
+  setup_mode = SETUP_MODE_SHORTCUTS_5;
+
+  DrawSetupScreen();
+}
+
 static void execExitSetup()
 {
   game_status = GAME_MODE_MAIN;
@@ -4308,6 +4316,7 @@ static struct TokenInfo setup_info_shortcuts[] =
   { TYPE_ENTER_MENU,	execSetupShortcuts2,	"Player Focus"	},
   { TYPE_ENTER_MENU,	execSetupShortcuts3,	"Tape Buttons"	},
   { TYPE_ENTER_MENU,	execSetupShortcuts4,	"Sound & Music"	},
+  { TYPE_ENTER_MENU,	execSetupShortcuts5,	"TAS Snap Keys"	},
   { TYPE_EMPTY,		NULL,			""			},
   { TYPE_LEAVE_MENU,	execSetupMain, 		"Back"			},
 
@@ -4381,6 +4390,22 @@ static struct TokenInfo setup_info_shortcuts_4[] =
   { 0,			NULL,			NULL			}
 };
 
+static struct TokenInfo setup_info_shortcuts_5[] =
+{
+  { TYPE_KEYTEXT,	NULL,			"Snap Left:",		},
+  { TYPE_KEY,		&setup.shortcut.snap_left, ""			},
+  { TYPE_KEYTEXT,	NULL,			"Snap Right:",		},
+  { TYPE_KEY,		&setup.shortcut.snap_right, ""			},
+  { TYPE_KEYTEXT,	NULL,			"Snap Up:",		},
+  { TYPE_KEY,		&setup.shortcut.snap_up, ""			},
+  { TYPE_KEYTEXT,	NULL,			"Snap Down:",		},
+  { TYPE_KEY,		&setup.shortcut.snap_down, ""			},
+  { TYPE_EMPTY,		NULL,			""			},
+  { TYPE_LEAVE_MENU,	execSetupShortcuts,	"Back"			},
+
+  { 0,			NULL,			NULL			}
+};
+
 static Key getSetupKey()
 {
   Key key = KSYM_UNDEFINED;
@@ -4684,6 +4709,11 @@ static void DrawSetupScreen_Generic()
     setup_info = setup_info_shortcuts_4;
     title_string = "Setup Shortcuts";
   }
+  else if (setup_mode == SETUP_MODE_SHORTCUTS_5)
+  {
+    setup_info = setup_info_shortcuts_5;
+    title_string = "Setup Shortcuts";
+  }
 
   DrawTextSCentered(mSY - SY + 16, FONT_TITLE_1, title_string);
 

-- 
Arcade style game



More information about the Pkg-games-commits mailing list