ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aspect.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 GRAPHICS_SCALER_ASPECT_H
23 #define GRAPHICS_SCALER_ASPECT_H
24 
25 #include "common/scummsys.h"
26 #include "graphics/scaler.h"
27 
31 FORCEINLINE int real2Aspect(int y) {
32  return y + (y + 1) / 5;
33 }
34 
38 FORCEINLINE int aspect2Real(int y) {
39  return (y * 5 + 4) / 6;
40 }
41 
45 void makeRectStretchable(int &x, int &y, int &w, int &h, bool interpolate);
46 
51 int stretch200To240(uint8 *buf,
52  uint32 pitch,
53  int width,
54  int height,
55  int srcX,
56  int srcY,
57  int origSrcY,
58  bool interpolate,
59  const Graphics::PixelFormat &format);
60 
61 int stretch200To240Nearest(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY, const Graphics::PixelFormat &format);
62 
63 #endif
Definition: pixelformat.h:138