ScummVM API documentation
playground3d.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 PLAYGROUND3D_H
23 #define PLAYGROUND3D_H
24 
25 #include "common/array.h"
26 
27 #include "graphics/framelimiter.h"
28 
29 #include "engines/engine.h"
30 
31 #include "engines/playground3d/gfx.h"
32 
33 namespace Playground3d {
34 
35 class Playground3dEngine : public Engine {
36 public:
38  ~Playground3dEngine() override;
39 
40  Common::Error run() override;
41 
42  bool hasFeature(EngineFeature f) const override;
43 
44  void processInput();
45 
46  void drawFrame(int testId);
47 
48 private:
49  OSystem *_system;
50  Renderer *_gfx;
51  Graphics::FrameLimiter *_frameLimiter;
52  Math::Vector4d _clearColor;
53  Math::Vector4d _fogColor;
54  float _fade;
55  bool _fadeIn;
56  bool _fogEnable;
57  Graphics::Surface *_rgbaTexture;
58  Graphics::Surface *_rgbTexture;
59  Graphics::Surface *_rgb565Texture;
60  Graphics::Surface *_rgba5551Texture;
61  Graphics::Surface *_rgba4444Texture;
62 
63  float _rotateAngleX, _rotateAngleY, _rotateAngleZ;
64 
65  Graphics::Surface *generateRgbaTexture(int width, int height, Graphics::PixelFormat format);
66  void drawAndRotateCube();
67  void drawPolyOffsetTest();
68  void dimRegionInOut();
69  void drawInViewport();
70  void drawRgbaTexture();
71 };
72 
73 } // End of namespace Playground3d
74 
75 #endif // PLAYGROUND3D_H
Definition: framelimiter.h:37
Definition: gfx.h:35
Definition: surface.h:67
EngineFeature
Definition: engine.h:253
Definition: error.h:84
Common::Error run() override
Definition: pixelformat.h:138
bool hasFeature(EngineFeature f) const override
Definition: gfx.h:37
Definition: playground3d.h:35
Definition: system.h:161
Definition: engine.h:144