A little more detail regarding using my github copies of the code with where it's...
[vlc/adversarial.git] / modules / video_filter / puzzle.h
blobf4638b1af4588db6f3834faf106c82902b2a8fa9
1 /*****************************************************************************
2 * puzzle.h : Puzzle game
3 *****************************************************************************
4 * Copyright (C) 2005-2009 VLC authors and VideoLAN
5 * Copyright (C) 2013 Vianney Boyer
6 * $Id$
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 *****************************************************************************/
25 #ifndef VLC_PUZZLE_H
26 #define VLC_PUZZLE_H 1
28 #include "puzzle_mgt.h"
30 struct filter_sys_t {
31 bool b_init;
32 bool b_bake_request;
33 bool b_shape_init;
34 bool b_change_param;
35 bool b_finished;
36 bool b_shuffle_rqst;
37 bool b_mouse_drag;
38 bool b_mouse_mvt;
40 param_t s_allocated;
41 param_t s_current_param;
42 param_t s_new_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;
65 int32_t i_selected;
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 * );
78 #endif