1 /*****************************************************************************
2 * puzzle.h : Puzzle game
3 *****************************************************************************
4 * Copyright (C) 2005-2009 VLC authors and VideoLAN
5 * Copyright (C) 2013 Vianney Boyer
8 * Authors: Vianney Boyer <vlcvboyer -at- gmail -dot- com>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
26 #define VLC_PUZZLE_H 1
28 #include "puzzle_mgt.h"
41 param_t s_current_param
;
44 uint32_t i_done_count
, i_tmp_done_count
;
46 int32_t i_mouse_drag_pce
;
47 int32_t i_mouse_x
, i_mouse_y
;
48 int16_t i_pointed_pce
;
49 int8_t i_mouse_action
;
51 uint32_t i_solve_acc_loop
, i_solve_grp_loop
, i_calc_corn_loop
;
52 int32_t i_magnet_accuracy
;
53 int32_t *pi_group_qty
;
55 int32_t *pi_order
; /* array which contains final pieces location (used in BASIC GAME MODE) */
56 puzzle_array_t
***ps_puzzle_array
; /* array [row][col][plane] preset of location & size of each piece in the original image */
57 piece_shape_t
**ps_pieces_shapes
; /* array [each piece type (PCE_TYPE_NBR * negative * 4: top...)][each plane] of piece definition */
58 piece_t
*ps_pieces
; /* list [piece] of pieces data. */
59 piece_t
*ps_pieces_tmp
; /* used when sorting layers */
61 puzzle_plane_t
*ps_desk_planes
;
62 puzzle_plane_t
*ps_pict_planes
;
64 uint8_t i_preview_pos
;
67 vlc_mutex_t lock
, pce_lock
;
69 int32_t i_auto_shuffle_countdown_val
, i_auto_solve_countdown_val
;
71 point_t
**ps_bezier_pts_H
;
74 picture_t
*Filter( filter_t
*, picture_t
* );
75 int puzzle_Callback( vlc_object_t
*, char const *, vlc_value_t
, vlc_value_t
, void * );
76 int puzzle_mouse( filter_t
*, vlc_mouse_t
*, const vlc_mouse_t
*, const vlc_mouse_t
* );