Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
ab6bcb28
Commit
ab6bcb28
authored
Apr 15, 2013
by
Vianney BOYER
Committed by
Jean-Baptiste Kempf
Apr 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Puzzle: main drawing functions
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
a52823aa
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
354 additions
and
0 deletions
+354
-0
modules/video_filter/puzzle_lib.c
modules/video_filter/puzzle_lib.c
+290
-0
modules/video_filter/puzzle_lib.h
modules/video_filter/puzzle_lib.h
+64
-0
No files found.
modules/video_filter/puzzle_lib.c
0 → 100644
View file @
ab6bcb28
This diff is collapsed.
Click to expand it.
modules/video_filter/puzzle_lib.h
0 → 100644
View file @
ab6bcb28
/*****************************************************************************
* puzzle_lib.h : Useful functions used by puzzle game filter
*****************************************************************************
* Copyright (C) 2005-2009 VLC authors and VideoLAN
* Copyright (C) 2013 Vianney Boyer
* $Id$
*
* Authors: Antoine Cellerier <dionoea -at- videolan -dot- org>
* Vianney Boyer <vlcvboyer -at- gmail -dot- com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_LIB_PUZZLE_H
#define VLC_LIB_PUZZLE_H 1
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <math.h>
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
#include <vlc_rand.h>
#include "puzzle.h"
void
puzzle_preset_desk_background
(
picture_t
*
p_pic_out
,
uint8_t
Y
,
uint8_t
U
,
uint8_t
V
);
void
puzzle_draw_borders
(
filter_t
*
p_filter
,
picture_t
*
p_pic_in
,
picture_t
*
p_pic_out
);
void
puzzle_draw_preview
(
filter_t
*
p_filter
,
picture_t
*
p_pic_in
,
picture_t
*
p_pic_out
);
void
puzzle_draw_sign
(
picture_t
*
p_pic_out
,
int32_t
i_x
,
int32_t
i_y
,
int32_t
i_width
,
int32_t
i_lines
,
const
char
**
ppsz_sign
,
bool
b_reverse
);
void
puzzle_draw_rectangle
(
picture_t
*
p_pic_out
,
int32_t
x
,
int32_t
y
,
int32_t
i_w
,
int32_t
i_h
,
uint8_t
Y
,
uint8_t
U
,
uint8_t
V
);
void
puzzle_fill_rectangle
(
picture_t
*
p_pic_out
,
int32_t
x
,
int32_t
y
,
int32_t
i_w
,
int32_t
i_h
,
uint8_t
Y
,
uint8_t
U
,
uint8_t
V
);
static
inline
int32_t
init_countdown
(
int32_t
init_val
)
{
return
(
(
__MAX
(
1
,
30000
-
init_val
)
/
20
)
/
2
+
((
unsigned
)
vlc_mrand48
()
)
%
(
__MAX
(
1
,
((
30000
-
init_val
)
/
20
)
)
)
);
}
#define SHUFFLE_WIDTH 81
#define SHUFFLE_LINES 13
extern
const
char
*
ppsz_shuffle_button
[
SHUFFLE_LINES
];
#define ARROW_WIDTH 13
#define ARROW_LINES 13
extern
const
char
*
ppsz_rot_arrow_sign
[
ARROW_LINES
];
extern
const
char
*
ppsz_mir_arrow_sign
[
ARROW_LINES
];
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment