<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<small><br>
<br>
Hi,<br>
<br>
You'll find below and in 1 additional patches the puzzle video
filter bug fix and GUI.<br>
This is the same as previous one but separated from the other new
modules (oldmovie, vhs & freeze)<br>
<br>
However it has to be applied after freeze, oldmovie and vhs patch
set<br>
<br>
<br>
This fix regenerates the shapes when you change the game mode.
However you'll see straight shapes.<br>
<br>
Regards<br>
<br>
Vianney<br>
<br>
<br>
<br>
---<br>
modules/video_filter/puzzle_mgt.c | 47
+++++++++++++++++++++++++++++++++++++++<br>
1 file changed, 47 insertions(+)<br>
<br>
diff --git a/modules/video_filter/puzzle_mgt.c
b/modules/video_filter/puzzle_mgt.c<br>
index b6a9862..8f2fd19 100644<br>
--- a/modules/video_filter/puzzle_mgt.c<br>
+++ b/modules/video_filter/puzzle_mgt.c<br>
@@ -957,4 +957,51 @@ void puzzle_load( filter_t *p_filter,
save_game_t *ps_save_game)<br>
break;<br>
}<br>
}<br>
+<br>
+ for (uint32_t i_pce=0; i_pce <
p_sys->s_allocated.i_pieces_nbr; i_pce++) {<br>
+ /* redefine shapes */<br>
+ uint32_t i_left_pce = 0;<br>
+ uint32_t i_right_pce = 6;<br>
+ uint32_t i_top_pce = 2;<br>
+ uint32_t i_btm_pce = 4;<br>
+<br>
+ uint32_t i_pce_pair = 0;<br>
+ for (int32_t i_row = 0; i_row <
p_sys->s_allocated.i_rows; i_row++)<br>
+ for (int32_t i_col = 0; i_col <
p_sys->s_allocated.i_cols; i_col++) {<br>
+ if (p_sys->ps_pieces[i_pce].i_original_row ==
p_sys->ps_pieces[i_pce_pair].i_original_row) {<br>
+ if (p_sys->ps_pieces[i_pce].i_original_col
== p_sys->ps_pieces[i_pce_pair].i_original_col - 1)<br>
+ i_right_pce = i_pce_pair;<br>
+ else if
(p_sys->ps_pieces[i_pce].i_original_col ==
p_sys->ps_pieces[i_pce_pair].i_original_col + 1)<br>
+ i_left_pce = i_pce_pair;<br>
+ }<br>
+ else if
(p_sys->ps_pieces[i_pce].i_original_col ==
p_sys->ps_pieces[i_pce_pair].i_original_col) {<br>
+ if (p_sys->ps_pieces[i_pce].i_original_row
== p_sys->ps_pieces[i_pce_pair].i_original_row - 1)<br>
+ i_btm_pce = i_pce_pair;<br>
+ else if
(p_sys->ps_pieces[i_pce].i_original_row ==
p_sys->ps_pieces[i_pce_pair].i_original_row + 1)<br>
+ i_top_pce = i_pce_pair;<br>
+ }<br>
+ i_pce_pair++;<br>
+ }<br>
+<br>
+ if ((p_sys->ps_pieces[i_pce].i_left_shape == 0)
&& (p_sys->ps_pieces[i_pce].i_original_col != 0)) {<br>
+ p_sys->ps_pieces[i_left_pce].i_right_shape = 6 + 8
+ 8*(( (unsigned) vlc_mrand48()) % ( SHAPES_QTY ) ) +
(vlc_mrand48() & 0x01);<br>
+ p_sys->ps_pieces[i_pce].i_left_shape =
(p_sys->ps_pieces[i_left_pce].i_right_shape - 6 ) ^ 0x01;<br>
+ }<br>
+<br>
+ if ((p_sys->ps_pieces[i_pce].i_right_shape == 6)
&& (p_sys->ps_pieces[i_pce].i_original_col !=
p_sys->s_allocated.i_cols-1)) {<br>
+ p_sys->ps_pieces[i_pce].i_right_shape = 6 + 8 +
8*(( (unsigned) vlc_mrand48()) % ( SHAPES_QTY ) ) + (vlc_mrand48()
& 0x01);<br>
+ p_sys->ps_pieces[i_right_pce].i_left_shape =
(p_sys->ps_pieces[i_pce].i_right_shape - 6 ) ^ 0x01;<br>
+ }<br>
+<br>
+ if ((p_sys->ps_pieces[i_pce].i_top_shape == 2)
&& (p_sys->ps_pieces[i_pce].i_original_row != 0)) {<br>
+ p_sys->ps_pieces[i_top_pce].i_btm_shape = 4 + 8 +
8*(( (unsigned) vlc_mrand48()) % ( SHAPES_QTY ) ) + (vlc_mrand48()
& 0x01);<br>
+ p_sys->ps_pieces[i_pce].i_top_shape =
(p_sys->ps_pieces[i_top_pce].i_btm_shape - 2 ) ^ 0x01;<br>
+ }<br>
+<br>
+ if ((p_sys->ps_pieces[i_pce].i_btm_shape == 4)
&& (p_sys->ps_pieces[i_pce].i_original_row !=
p_sys->s_allocated.i_rows-1)) {<br>
+ p_sys->ps_pieces[i_pce].i_btm_shape = 4 + 8 + 8*((
(unsigned) vlc_mrand48()) % ( SHAPES_QTY ) ) + (vlc_mrand48()
& 0x01);<br>
+ p_sys->ps_pieces[i_btm_pce].i_top_shape =
(p_sys->ps_pieces[i_pce].i_btm_shape - 2 ) ^ 0x01;<br>
+ }<br>
+<br>
+ }<br>
}<br>
-- <br>
1.8.1.2<br>
<br>
<br>
</small>
</body>
</html>