ScummVM API documentation
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 GRIM_SPRITE_H
23 #define GRIM_SPRITE_H
24 
25 #include "math/matrix4.h"
26 
27 namespace Common {
28 class SeekableReadStream;
29 class String;
30 }
31 
32 namespace Grim {
33 
34 class Material;
35 class CMap;
36 class EMICostume;
37 
38 class Sprite {
39 public:
40  enum SpriteFlags1 {
41  BlendAdditive = 0x400
42  };
43  enum SpriteFlags2 {
44  DepthTest = 0x100,
45  AlphaTest = 0x20000
46  };
47 
48  Sprite();
49  void draw() const;
50  void loadBinary(Common::SeekableReadStream *, EMICostume *costume);
51  void loadGrim(const Common::String &name, const char *comma, CMap *cmap);
52 
53  Math::Vector3d _pos;
54  float _width;
55  float _height;
56  bool _visible;
57  Material *_material;
58  Sprite *_next;
59  uint32 _flags1;
60  int _red[4];
61  int _green[4];
62  int _blue[4];
63  int _alpha[4];
64  float _texCoordX[4];
65  float _texCoordY[4];
66  uint32 _flags2;
67 };
68 
69 } // end of namespace Grim
70 
71 #endif
Definition: str.h:59
Definition: stream.h:745
Definition: actor.h:33
Definition: material.h:63
Definition: sprite.h:38
Definition: algorithm.h:29
Definition: colormap.h:35
Definition: costumeemi.h:40