| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
#ifndef DOSBOX_RENDER_H |
| 20 |
#define DOSBOX_RENDER_H |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
#define RENDER_USE_ADVANCED_SCALERS 3 |
| 27 |
|
| 28 |
#include "../src/gui/render_scalers.h" |
| 29 |
|
| 30 |
#define RENDER_SKIP_CACHE 16 |
| 31 |
|
| 32 |
|
| 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 |