ScummVM API documentation
texture.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
#ifndef WATCHMAKER_TEXTURE_H
23
#define WATCHMAKER_TEXTURE_H
24
25
#include "common/array.h"
26
#include "common/str.h"
27
#include "common/textconsole.h"
28
#include "watchmaker/3d/dds_header.h"
29
#include "graphics/surface.h"
30
#include "watchmaker/rect.h"
31
32
namespace
Watchmaker
{
33
34
class
WGame;
35
// Texture structs
36
struct
gTexture
{
37
Common::String
name;
38
Texture
*_texture =
nullptr
;
39
int
RealDimX = 0;
// original dimensions
40
int
RealDimY = 0;
// original dimensions
41
int
DimX = 0;
// current dimensions
42
int
DimY = 0;
// current dimensions
43
int
ID = 0;
// id
44
int
Flags = 0;
// Flags
45
46
bool
isEmpty() {
47
return
_texture ==
nullptr
;
48
}
49
void
clear() {
50
// TODO: This will only work for the back-surface
51
warning
(
"Clearing %d"
, _blitsOnTop.
size
());
52
_blitsOnTop.
clear
();
53
}
54
void
render(
WGame
&game,
Common::Rect
src,
Common::Rect
dst);
55
void
blitInto(
gTexture
*texture,
Common::Rect
src,
Common::Rect
dst) {
56
_blitsOnTop.
push_back
({texture, src, dst});
57
}
58
private
:
59
struct
Blit {
60
gTexture
*texture;
61
Common::Rect
src;
62
Common::Rect
dst;
63
};
64
Common::Array<Blit>
_blitsOnTop;
65
};
66
67
}
// End of namespace Watchmaker
68
69
#endif // WATCHMAKER_TEXTURE_H
Watchmaker
Definition:
2d_stuff.h:30
Common::String
Definition:
str.h:59
warning
void warning(MSVC_PRINTF const char *s,...) GCC_PRINTF(1
Common::Array< Blit >
Common::Array::clear
void clear()
Definition:
array.h:320
Common::Rect
Definition:
rect.h:144
Common::Array::push_back
void push_back(const T &element)
Definition:
array.h:180
Watchmaker::gTexture
Definition:
texture.h:36
Common::Array::size
size_type size() const
Definition:
array.h:315
Watchmaker::WGame
Definition:
game.h:56
Watchmaker::Texture
Definition:
dds_header.h:50
engines
watchmaker
3d
texture.h
Generated on Fri Nov 22 2024 09:05:12 for ScummVM API documentation by
1.8.13