Debian Codegraph @

include/render.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2002-2010 The DOSBox Team
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19 #ifndef DOSBOX_RENDER_H
20 #define DOSBOX_RENDER_H
21
22 // 0: complex scalers off, scaler cache off, some simple scalers off, memory requirements reduced
23 // 1: complex scalers off, scaler cache off, all simple scalers on
24 // 2: complex scalers off, scaler cache on
25 // 3: complex scalers on
26 #define RENDER_USE_ADVANCED_SCALERS 3
27
28 #include "../src/gui/render_scalers.h"
29
30 #define RENDER_SKIP_CACHE 16
31 //Enable this for scalers to support 0 input for empty lines
32 //#define RENDER_NULL_INPUT
33
34 typedef struct {
35 struct {
36 Bit8u red;
37 Bit8u green;
38 Bit8u blue;
39 Bit8u unused;
40 } rgb[256];
41 union {
42 Bit16u b16[256];
43 Bit32u b32[256];
44 } lut;
45 bool changed;
46 Bit8u modified[256];
47 Bitu first;
48 Bitu last;
49 } RenderPal_t;
50
51 typedef struct {
52 struct {
53 Bitu width, start;
54 Bitu height;
55 Bitu bpp;
56 bool dblw,dblh;
57 double ratio;
58 float fps;
59 } src;
60 struct {
61 Bitu count;
62 Bitu max;
63 Bitu index;
64 Bit8u hadSkip[RENDER_SKIP_CACHE];
65 } frameskip;
66 struct {
67 Bitu size;
68 scalerMode_t inMode;
69 scalerMode_t outMode;
70 scalerOperation_t op;
71 bool clearCache;
72 bool forced;
73 ScalerLineHandler_t lineHandler;
74 ScalerLineHandler_t linePalHandler;
75 ScalerComplexHandler_t complexHandler;
76 Bitu blocks, lastBlock;
77 Bitu outPitch;
78 Bit8u *outWrite;
79 Bitu cachePitch;
80 Bit8u *cacheRead;
81 Bitu inHeight, inLine, outLine;
82 } scale;
83 RenderPal_t pal;
84 bool updating;
85 bool active;
86 bool aspect;
87 bool fullFrame;
88 } Render_t;
89
90 extern Render_t render;
91 extern ScalerLineHandler_t RENDER_DrawLine;
92 void RENDER_SetSize(Bitu width,Bitu height,Bitu bpp,float fps,double ratio,bool dblw,bool dblh);
93 bool RENDER_StartUpdate(void);
94 void RENDER_EndUpdate(bool abort);
95 void RENDER_SetPal(Bit8u entry,Bit8u red,Bit8u green,Bit8u blue);
96
97
98 #endif