1 // Sotfware effects
2 
3 #ifdef BUILD_WIN32
4  #define SOFTFX_ENABLE_DIRECTX
5 #endif
6 #ifdef BUILD_SDL
7  #define SOFTFX_ENABLE_SDL
8 #endif
9 
10 #ifdef SOFTFX_ENABLE_DIRECTX
11  #include "vid_directx_support.h"
12 #endif
13 #ifdef SOFTFX_ENABLE_SDL
14  #include <SDL.h>
15 #endif
16 
17 #define FILTER_PLAIN				0
18 #define FILTER_ADVMAME_SCALE_2X			1
19 #define FILTER_ADVMAME_SCALE_3X			2
20 #define FILTER_2XPM_LQ				3
21 #define FILTER_2XPM_HQ				4
22 #define FILTER_EAGLE				5
23 #define FILTER_SUPEREAGLE			6
24 #define FILTER_2XSAI				7
25 #define FILTER_SUPER_2XSAI			8
26 #define FILTER_SUPEREAGLE_VBA			9
27 #define FILTER_2XSAI_VBA			10
28 #define FILTER_SUPER_2XSAI_VBA			11
29 #define FILTER_SUPERSCALE			12
30 #define FILTER_SUPERSCALE_75SCAN		13
31 #define FILTER_HQ2X				14
32 #define FILTER_HQ3X				15
33 #define FILTER_HQ4X				16
34 #define FILTER_HQ2XS_VBA			17
35 #define FILTER_HQ3XS_VBA			18
36 #define FILTER_HQ2XS_SNES9X			19
37 #define FILTER_HQ3XS_SNES9X			20
38 #define FILTER_HQ2XBOLD				21
39 #define FILTER_HQ3XBOLD				22
40 #define FILTER_EPXB				23
41 #define FILTER_EPXC				24
42 #define FILTER_2XBR_A			25
43 #define FILTER_2XBR_B			26
44 #define FILTER_2XBR_C			27
45 #define FILTER_3XBR_A			28
46 #define FILTER_3XBR_B			29
47 #define FILTER_3XBR_C			30
48 #define FILTER_4XBR_A			31
49 #define FILTER_4XBR_B			32
50 #define FILTER_4XBR_C			33
51 #define FILTER_DDT3X            34
52 
53 TCHAR* VidSoftFXGetEffect(int nEffect);
54 int VidSoftFXGetZoom(int nEffect);
55 int VidSoftFXCheckDepth(int nEffect, int nDepth);
56 
57 void VidSoftFXExit();
58 int VidSoftFXInit(int nBlitter, int nRotate);
59 
60 int VidSoftFXScale(RECT* pRect, int nGameWidth, int nGameHeight);
61 
62 #ifdef SOFTFX_ENABLE_DIRECTX
63 int VidSoftFXApplyEffectDirectX(IDirectDrawSurface7* pSurf, RECT* pRect);
64 #endif
65 
66 #ifdef SOFTFX_ENABLE_SDL
67 int VidSoftFXApplyEffectSDL(SDL_Surface* pSurf);
68 #endif
69 
70 int VidFilterApplyEffect(unsigned char* pd, int pitch);
71