ScummVM API documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
cliprect.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
* Clipping rectangle defines
21
*/
22
23
#ifndef TINSEL_CLIPRECT_H // prevent multiple includes
24
#define TINSEL_CLIPRECT_H
25
26
#include "common/list.h"
27
#include "common/rect.h"
28
29
namespace
Tinsel
{
30
31
struct
OBJECT;
32
33
typedef
Common::List<Common::Rect>
RectList;
34
35
/*----------------------------------------------------------------------*\
36
|* Clip Rect Function Prototypes *|
37
\*----------------------------------------------------------------------*/
38
39
void
ResetClipRect();
// Resets the clipping rectangle allocator
40
41
void
AddClipRect(
// Allocate a clipping rectangle from the free list
42
const
Common::Rect
&pClip);
// clip rectangle dimensions to allocate
43
44
const
RectList &GetClipRects();
45
46
bool
IntersectRectangle(
// Creates the intersection of two rectangles
47
Common::Rect
&pDest,
// pointer to destination rectangle that is to receive the intersection
48
const
Common::Rect
&pSrc1,
// pointer to a source rectangle
49
const
Common::Rect
&pSrc2);
// pointer to a source rectangle
50
51
bool
UnionRectangle(
// Creates the union of two rectangles
52
Common::Rect
&pDest,
// destination rectangle that is to receive the new union
53
const
Common::Rect
&pSrc1,
// a source rectangle
54
const
Common::Rect
&pSrc2);
// a source rectangle
55
56
void
FindMovingObjects(
// Creates clipping rectangles for all the objects that have moved on the specified object list
57
OBJECT **pObjList,
// playfield display list to draw
58
Common::Point
*pWin,
// playfield window top left position
59
Common::Rect
*pClip,
// playfield clipping rectangle
60
bool
bVelocity,
// when set, objects pos is updated with velocity
61
bool
bScrolled);
// when set, playfield has scrolled
62
63
void
MergeClipRect();
// Merges any clipping rectangles that overlap
64
65
void
UpdateClipRectSingle(
// Redraws single object within this clipping rectangle
66
OBJECT *pObj,
// object to draw
67
Common::Point
*pWin,
// window top left position
68
Common::Rect
*pClip);
// pointer to clip rectangle
69
70
void
UpdateClipRect(
// Redraws all objects within this clipping rectangle
71
OBJECT **pObjList,
// object list to draw
72
Common::Point
*pWin,
// window top left position
73
Common::Rect
*pClip);
// pointer to clip rectangle
74
75
}
// End of namespace Tinsel
76
77
#endif // TINSEL_CLIPRECT_H
Common::List< Common::Rect >
Common::Rect
Definition:
rect.h:144
Tinsel
Definition:
actors.h:36
Common::Point
Definition:
rect.h:45
engines
tinsel
cliprect.h
Generated on Sun Apr 6 2025 09:20:42 for ScummVM API documentation by
1.8.13