ScummVM API documentation
FrameBitmap.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
* Copyright (C) 2006-2010 - Frictional Games
24
*
25
* This file is part of HPL1 Engine.
26
*/
27
28
#ifndef HPL_FRAMEBITMAP_H
29
#define HPL_FRAMEBITMAP_H
30
31
#include "hpl1/engine/math/MathTypes.h"
32
#include "hpl1/engine/resources/FrameBase.h"
33
#include "hpl1/engine/system/BinTree.h"
34
35
namespace
hpl
{
36
37
class
cFrameTexture;
38
class
cResourceImage;
39
class
Bitmap2D;
40
41
// The frames bitmap + rect class
42
class
cFBitmapRect
{
43
public
:
44
cFBitmapRect
() { mlHandle = -1; }
45
cFBitmapRect
(
int
x,
int
y,
int
w,
int
h,
int
alHandle) {
46
mRect =
cRect2l
(x, y, w, h);
47
mlHandle = alHandle;
48
}
49
50
cRect2l
mRect;
51
int
mlHandle;
52
};
53
54
typedef
BinTree<cFBitmapRect>
tRectTree
;
55
typedef
BinTreeNode<cFBitmapRect>
tRectTreeNode
;
56
typedef
Common::List<tRectTreeNode *>
tRectTreeNodeList
;
57
typedef
tRectTreeNodeList::iterator
tRectTreeNodeListIt
;
58
59
class
cFrameBitmap
:
public
iFrameBase
{
60
public
:
61
cFrameBitmap
(
Bitmap2D
*apBitmap,
cFrameTexture
*apFrmTex,
int
alHandle);
62
~
cFrameBitmap
();
63
64
cResourceImage
*AddBitmap(
Bitmap2D
*apSrc);
65
bool
MinimumFit(
cRect2l
aSrc,
cRect2l
aDest);
66
bool
IsFull();
67
bool
IsUpdated();
68
69
bool
IsLocked()
const
{
return
mbIsLocked; }
70
void
SetLocked(
bool
abX) { mbIsLocked = abX; }
71
72
bool
FlushToTexture();
73
74
cFrameTexture
*GetFrameTexture() {
return
mpFrameTexture; }
75
76
int
GetHandle()
const
{
return
mlHandle; }
77
78
private
:
79
Bitmap2D
*mpBitmap;
80
cFrameTexture
*mpFrameTexture;
81
tRectTree mRects;
82
int
mlMinHole;
83
int
mlHandle;
84
bool
mbIsFull;
85
bool
mbIsUpdated;
86
bool
mbIsLocked;
87
};
88
89
}
// namespace hpl
90
91
#endif // HPL_FRAMEBITMAP_H
hpl::cRect2< int >
hpl
Definition:
AI.h:36
hpl::Bitmap2D
Definition:
bitmap2D.h:42
hpl::cFBitmapRect
Definition:
FrameBitmap.h:42
Common::List
Definition:
list.h:44
hpl::cResourceImage
Definition:
ResourceImage.h:43
hpl::cFrameBitmap
Definition:
FrameBitmap.h:59
hpl::BinTree< cFBitmapRect >
hpl::iFrameBase
Definition:
FrameBase.h:35
hpl::BinTreeNode< cFBitmapRect >
hpl::cFrameTexture
Definition:
FrameTexture.h:37
Common::ListInternal::Iterator
Definition:
list_intern.h:51
engines
hpl1
engine
resources
FrameBitmap.h
Generated on Fri Nov 22 2024 09:17:40 for ScummVM API documentation by
1.8.13