ScummVM API documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
blender.h
1
/* ScummVM - Graphic Adventure Engine
2
*
3
* ScummVM is the legal property of its developers, whose names
4
* are too numerous to list here. Please refer to the COPYRIGHT
5
* file distributed with this source distribution.
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*
20
*/
21
22
//=============================================================================
23
//
24
// AGS specific color blending routines for transparency and tinting effects
25
//
26
//=============================================================================
27
28
#ifndef AGS_ENGINE_GFX_BLENDER_H
29
#define AGS_ENGINE_GFX_BLENDER_H
30
31
namespace
AGS3
{
32
33
//
34
// Allegro's standard alpha blenders result in:
35
// - src and dst RGB are combined proportionally to src alpha
36
// (src.rgb * src.alpha + dst.rgb * (1 - dst.alpha));
37
// - final alpha is zero.
38
// This blender is suggested for use with opaque destinations
39
// (ones without alpha channel).
40
//
41
/* Declared in Allegro's color.h:
42
void set_alpha_blender();
43
*/
44
45
// Customizable alpha blender that uses the supplied alpha value as src alpha,
46
// and preserves destination's alpha channel (if there was one);
47
void
set_my_trans_blender(
int
r,
int
g,
int
b,
int
a);
48
// Additive alpha blender plain copies src over, applying a summ of src and
49
// dst alpha values.
50
void
set_additive_alpha_blender();
51
// Opaque alpha blender plain copies src over, applying opaque alpha value.
52
void
set_opaque_alpha_blender();
53
// Sets argb2argb for 32-bit mode, and provides appropriate funcs for blending 32-bit onto 15/16/24-bit destination
54
void
set_argb2any_blender();
55
56
}
// namespace AGS3
57
58
#endif
AGS3
Definition:
ags.h:40
engines
ags
engine
gfx
blender.h
Generated on Wed Apr 9 2025 09:09:45 for ScummVM API documentation by
1.8.13