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
35namespace hpl {
36
37class cFrameTexture;
38class cResourceImage;
39class Bitmap2D;
40
41// The frames bitmap + rect class
43public:
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
58
59class cFrameBitmap : public iFrameBase {
60public:
61 cFrameBitmap(Bitmap2D *apBitmap, cFrameTexture *apFrmTex, int alHandle);
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
78private:
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
Definition: list.h:44
Definition: bitmap2D.h:42
Definition: FrameBitmap.h:42
Definition: FrameBitmap.h:59
Definition: FrameTexture.h:37
Definition: ResourceImage.h:43
Definition: FrameBase.h:35
Definition: list_intern.h:54