ScummVM API documentation
cryolib.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_CRYOLIB_H
23 #define CRYO_CRYOLIB_H
24 
25 #include "audio/mixer.h"
26 #include "common/system.h"
27 
28 #include "cryo/platdefs.h"
29 
30 namespace Cryo {
31 
32 class CryoEngine;
33 
34 enum {
35  fsFromStart = 1
36 };
37 
38 struct BlitView{
39  int _srcLeft;
40  int _srcTop;
41  int _dstLeft;
42  int _dstTop;
43  int _width;
44  int _height;
45 };
46 
47 class View {
48 public:
49  View(int w, int h);
50  ~View();
51 
52  void setSrcZoomValues(int x, int y);
53  void setDisplayZoomValues(int w, int h);
54  void initDatas(int w, int h, void *buffer);
55  void centerIn(View *parent);
56 
57  int _width;
58  int _height;
59  byte *_bufferPtr;
60  int16 _pitch;
61  BlitView _normal;
62  BlitView _zoom;
63 };
64 
65 struct color3_t {
66  uint16 r, g, b;
67 };
68 
69 struct color_t {
70  uint16 a, r, g, b;
71 };
72 
73 void SysBeep(int x);
74 void FlushEvents(int16 arg1, int16 arg2);
75 
76 void CLBlitter_Init();
77 void CLBlitter_CopyViewRect(View *view1, View *view2, Common::Rect *rect1, Common::Rect *rect2);
78 void CLBlitter_Send2ScreenNextCopy(color_t *palette, uint16 first, uint16 count);
79 void CLBlitter_OneBlackFlash();
80 void CLBlitter_CopyView2ViewSimpleSize(byte *src, int16 srcw, int16 srcp, int16 srch,
81  byte *dst, int16 dstw, int16 dstp, int16 dsth);
82 void CLBlitter_CopyView2ScreenCUSTOM(View *view);
83 void CLBlitter_CopyView2Screen(View *view);
84 void CLBlitter_UpdateScreen();
85 void CLBlitter_FillView(View *view, unsigned int fill);
86 void CLBlitter_FillScreenView(unsigned int fill);
87 
88 void CLPalette_Init();
89 void CLPalette_SetLastPalette(color_t *palette, int16 first, int16 count);
90 void CLPalette_GetLastPalette(color_t *palette);
91 void CLPalette_SetRGBColor(color_t *palette, uint16 index, color3_t *rgb);
92 void CLPalette_Macintize(int16 macintize);
93 void CLPalette_SetInterval(uint16 first, uint16 last);
94 void CLPalette_DeactivateInterval();
95 void CLPalette_Send2Screen(struct color_t *palette, uint16 first, uint16 count);
96 void CLPalette_BeSystem();
97 
98 void CRYOLib_ManagersInit();
99 void CRYOLib_ManagersDone();
100 
101 } // End of namespace Cryo
102 
103 #endif
Definition: cryolib.h:69
Definition: rect.h:144
Definition: cryolib.h:38
signed char * fill(signed char *first, signed char *last, Value val)
Definition: algorithm.h:111
Definition: cryo.h:41
Definition: cryolib.h:65
Definition: cryolib.h:47