ScummVM API documentation
eden_graphics.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 CRYO_EDEN_GRAPHICS_H
23 #define CRYO_EDEN_GRAPHICS_H
24 
25 #include "cryo/defs.h" // Room
26 
27 namespace Cryo {
28 
29 class EdenGame;
30 class HnmPlayer;
31 
32 class EdenGraphics {
33 public:
34  EdenGraphics(EdenGame *game);
35  ~EdenGraphics();
36 
37  // Original name: noclipax
38  void drawSprite(int16 index, int16 x, int16 y, bool withBlack = false, bool onSubtitle = false);
39 
40  // Original name: af_subtitle
41  void displaySubtitles();
42 
43  // Original name: bars_in
44  void showBars();
45 
46  void sundcurs(int16 x, int16 y);
47 
48  void rundcurs();
49 
50  void unglow();
51 
52  void glow(int16 index);
53 
54  void setGlowX(int16 value);
55 
56  void setGlowY(int16 value);
57 
58  // Original name : blackbars
59  void drawBlackBars();
60 
61  // Original name: bars_out
62  void hideBars();
63 
64  // Original name: afsalle
65  void displayRoom();
66 
67  // Original name: af_image
68  void displayImage();
69 
70  void effetpix();
71 
72  // Original name: effet1
73  void displayEffect1();
74 
75  // Original name: effet2
76  void displayEffect2();
77 
78  void setShowBlackBars(bool value);
79 
80  bool getShowBlackBars();
81 
82  void paneltobuf();
83 
84  void cursbuftopanel();
85 
86  void langbuftopanel();
87 
88  View *getSubtitlesView();
89 
90  View *getMainView();
91 
92  byte *getHnmViewBuf();
93 
94  void setCurCharRect(Common::Rect *charRect);
95 
96  void setPaletteColor(byte *buffer);
97 
98  // Original name: sauvefondbouche
99  void saveMouthBackground();
100 
101  // Original name: restaurefondbouche
102  void restoreMouthBackground();
103 
104  void openWindow();
105 
106  bool _savedUnderSubtitles;
107 
108  void setSavedUnderSubtitles(bool value);
109 
110  byte *getSubtitlesViewBuf();
111 
112  View *getUnderBarsView();
113 
114  void SendPalette2Screen(int16 value);
115 
116  void setFade(bool value);
117 
118  bool getFade();
119 
120  // Original name: effet3
121  void displayEffect3();
122 
123  void setDestRect(int16 sx, int16 sy, int16 ex, int16 ey);
124 
125  void setSrcRect(int16 sx, int16 sy, int16 ex, int16 ey);
126 
127  void fadeToBlack(int delay);
128 
129  // Original name: fadetoblack128
130  void fadeToBlackLowPalette(int delay);
131 
132  // Original name: fadefromblack128
133  void fadeFromBlackLowPalette(int delay);
134 
135  void clearScreen();
136 
137  void playHNM(int16 num);
138 
139  void setCursKeepPos(int16 x, int16 y);
140 
141  void restoreUnderSubtitles();
142 
143  void initRects();
144 
145  void initGlobals();
146 
147  void saveTopFrieze(int16 x);
148 
149  void saveBottomFrieze();
150 
151  void restoreTopFrieze();
152 
153  void restoreBottomFrieze();
154 
155 private:
156  EdenGame *_game;
157 
158  int16 _glowX;
159  int16 _glowY;
160  int16 _glowW;
161  int16 _glowH;
162 
163  bool _showVideoSubtitle;
164 
165  Common::Point _cursKeepPos;
166 
167  View *_mainView;
168  View *_underSubtitlesView;
169  View *_subtitlesView;
170  View *_underBarsView;
171 
172  Common::Rect _underSubtitlesScreenRect;
173  Common::Rect _underSubtitlesBackupRect;
174 
175  Common::Rect _underTopBarScreenRect;
176  Common::Rect _underBottomBarBackupRect;
177  Common::Rect _underBottomBarScreenRect;
178  Common::Rect _underTopBarBackupRect;
179 
180  byte *_underSubtitlesViewBuf; // CHECKME: Useless?
181 
182  byte *_mainViewBuf;
183 
184  View *_hnmView;
185  byte *_hnmViewBuf;
186  byte *_view2Buf;
187 
188  Common::Rect *_curCharacterRect;
189 
190  Common::Rect _rect_dst, _rect_src;
191 
192  View *_view2;
193 
194  int _hnmFrameNum;
195 
196  bool _videoCanceledFlag; //TODO: hnm_canceled
197 
198  color_t _globalPalette[256]; //TODO palette_t
199 
200  byte *_subtitlesViewBuf;
201 
202  bool _needToFade;
203 
204  int _eff2pat;
205 
206  color3_t _newColor;
207  color_t _oldPalette[256]; // TODO palette_t ?
208  color_t _newPalette[256];
209 
210  bool _showBlackBars;
211 
212  void saveUnderSubtitles(int16 y);
213 
214 
215 
216  void displayHNMSubtitle();
217 
218  void readPalette(byte *ptr);
219 
220  void getglow(int16 x, int16 y, int16 w, int16 h);
221 
222  void loadMouthRectFromCurChar();
223 
224  // Original name afsalle1
225  void displaySingleRoom(Room *room);
226 
227  // Original name: effet4
228  void displayEffect4();
229 
230  void colimacon(const int16 pattern[]);
231 
232  // Original name: rectanglenoir32
233  void blackRect32();
234 
236  // Original name: showfilm
237  void showMovie(int16 num, char arg1);
238 
239  // Original name bullehnm
240  void handleHNMSubtitles();
241 };
242 
243 } // namespace Cryo
244 
245 #endif // CRYO_EDEN_GRAPHICS_H
Definition: cryolib.h:69
Definition: rect.h:144
Definition: eden_graphics.h:32
Definition: rect.h:45
Definition: defs.h:435
Definition: eden.h:44
Definition: cryo.h:41
Definition: cryolib.h:65
Definition: cryolib.h:47