ScummVM API documentation
walk_behind.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 // Walk-behinds calculation logic.
23 
24 #ifndef AGS_ENGINE_AC_WALK_BEHIND_H
25 #define AGS_ENGINE_AC_WALK_BEHIND_H
26 
27 #include "ags/shared/util/geometry.h"
28 
29 namespace AGS3 {
30 
31 // A method of rendering walkbehinds on screen:
32 // DrawAsSeparateSprite - draws whole walkbehind as a sprite;
33 // this method is most simple and is optimal for 3D renderers.
34 // DrawOverCharSprite - turns parts of the character and object sprites
35 // transparent when they are covered by walkbehind (walkbehind itself
36 // is not drawn separately in this case);
37 // this method is optimized for software render.
38 enum WalkBehindMethodEnum {
39  DrawOverCharSprite,
40  DrawAsSeparateSprite
41 };
42 
43 // An info on vertical column of walk-behind mask, which may contain WB area
45  bool Exists = false; // whether any WB area is in this column
46  int Y1 = 0, Y2 = 0; // WB top and bottom Y coords
47 };
48 
49 namespace AGS { namespace Shared { class Bitmap; } }
50 using namespace AGS; // FIXME later
51 
52 // Recalculates walk-behind positions
53 void walkbehinds_recalc();
54 // Generates walk-behinds as separate sprites
55 void walkbehinds_generate_sprites();
56 // Edits the given game object's sprite, cutting out pixels covered by walk-behinds;
57 // returns whether any pixels were updated
58 bool walkbehinds_cropout(Shared::Bitmap *sprit, int sprx, int spry, int basel);
59 
60 } // namespace AGS3
61 
62 #endif
Definition: achievements_tables.h:27
Definition: allegro_bitmap.h:44
Definition: walk_behind.h:44
Definition: ags.h:40