ScummVM API documentation
ui.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 
13 #ifndef SCUMM_INSANE_REBEL2_PSX_UI_H
14 #define SCUMM_INSANE_REBEL2_PSX_UI_H
15 
16 #include "common/rect.h"
17 
18 #include "graphics/surface.h"
19 
20 #include "scumm/insane/rebel2/psx/psx.h"
21 
22 namespace Scumm {
23 
25 public:
26  enum BlendMode {
27  kBlendOpaque,
28  kBlendAdditive
29  };
30 
31  void clear() { _textures.clear(); }
32  bool append(const Common::Array<byte> &data);
33  bool appendRaw24(const char *name, const Common::Array<byte> &data,
34  uint16 width, uint16 height);
35  bool has(const char *name) const { return find(name) != nullptr; }
36  void draw(Graphics::Surface &surface, const char *name, int x, int y,
37  const Common::Rect &source, int brightness = 0x80,
38  BlendMode blend = kBlendOpaque) const;
39  void drawText(Graphics::Surface &surface, const char *font, const char *text,
40  int x, int y) const;
41 
42 private:
43  const RA2PSXTexture *find(const char *name) const;
45 };
46 
48 public:
49  bool load(Common::SeekableReadStream &executable);
50  void draw(Graphics::Surface &surface, RA2PSXMovieTextSequence sequence,
51  int frame, int xOffset, int yOffset) const;
52 
53 private:
54  RA2PSXTextureSet _textures;
55 };
56 
58 public:
59  bool load(const RA2PSXArchive &archive);
60  void draw(Graphics::Surface &surface, int selection) const;
61  Common::Rect itemRect(int item) const;
62 
63 private:
64  RA2PSXTextureSet _textures;
65 };
66 
68 public:
69  bool load(const RA2PSXArchive &archive);
70 
71  void drawCockpit(Graphics::Surface &surface) const;
72  void drawExplosion(Graphics::Surface &surface, int x, int y, int frame) const;
73  void drawHUD(Graphics::Surface &surface, int score, int lives, int shield, int frame) const;
74 
75 private:
76  void drawShield(Graphics::Surface &surface, int shield, int xOffset, int yOffset) const;
77 
78  RA2PSXTextureSet _textures;
79 };
80 
81 } // End of namespace Scumm
82 
83 #endif
Definition: ui.h:47
Definition: surface.h:67
void clear()
Definition: array.h:321
Definition: ui.h:67
Definition: rect.h:536
Definition: stream.h:745
Definition: ui.h:57
Definition: ui.h:24
Definition: actor.h:30