ScummVM API documentation
gr_sprite.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 M4_GRAPHICS_GR_SPRITE_H
23#define M4_GRAPHICS_GR_SPRITE_H
24
25#include "m4/m4_types.h"
26
27namespace M4 {
28
29enum {
30 NO_COMPRESS = 0x00,
31 RLE8 = 0x01,
32 SHADOW = 0x80
33};
34
36 Buffer *Src = nullptr; // sprite source buffer
37 Buffer *Dest = nullptr; // destination buffer
38 int32 x = 0; // x position relative to Destination(0, 0)
39 int32 y = 0; // y position relative to Destination(0, 0)
40 int32 scaleX = 0; // x scale factor (can be negative for reverse draw)
41 int32 scaleY = 0; // y scale factor (can't be negative)
42 uint8 *depthCode = nullptr; // depth code array for destination (doesn't care if srcDepth is 0)
43 uint8 *Pal = nullptr; // palette for shadow draw (doesn't care if SHADOW bit is not set in Src.encoding)
44 uint8 *ICT = nullptr; // Inverse Color Table (doesn't care if SHADOW bit is not set in Src.encoding)
45 uint8 srcDepth = 0; // depth code for source (0 if no depth processing)
46};
47
48
49uint32 gr_sprite_RLE8_encode(Buffer *Source, Buffer *Dest);
50uint8 gr_sprite_draw(DrawRequest *DrawReq);
51
52} // namespace M4
53
54#endif
Definition: database.h:28
Definition: m4_types.h:54
Definition: gr_sprite.h:35