2 Copyright 2006 Marten Richter
\r
4 This file is part of VOMP.
\r
6 VOMP is free software; you can redistribute it and/or modify
\r
7 it under the terms of the GNU General Public License as published by
\r
8 the Free Software Foundation; either version 2 of the License, or
\r
9 (at your option) any later version.
\r
11 VOMP is distributed in the hope that it will be useful,
\r
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 GNU General Public License for more details.
\r
16 You should have received a copy of the GNU General Public License
\r
17 along with VOMP; if not, write to the Free Software
\r
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
21 #ifndef SURFACEWIN_H
\r
22 #define SURFACEWIN_H
\r
24 #include "defines.h"
\r
25 #include "surface.h"
\r
26 #include <winsock2.h>
\r
29 class SurfaceWin : public Surface
\r
32 SurfaceWin(int id = 0);
\r
35 int create(UINT width, UINT height);
\r
38 void startFastDraw();
\r
41 int fillblt(int x, int y, int width, int height, unsigned int c);
\r
42 void drawPixel(int x, int y, Colour& c, bool fastdraw=false);
\r
43 void drawPixel(int x, int y, unsigned int c, bool fastdraw=false);
\r
44 void drawHorzLine(int x1, int x2, int y, unsigned int c);
\r
45 void drawVertLine(int x, int y1, int y2, unsigned int c);
\r
46 void drawBitmap(int x, int y, const Bitmap& bm);
\r
47 int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);
\r
48 void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);
\r
49 void screenShot(const char* fileName);
\r
50 void ReleaseSurface();
\r
51 int blt(int fd, unsigned long shandle, int sx, int sy, int width, int height, unsigned long dhandle, int dx, int dy);
\r
52 void drawJpeg(const char *fileName,int x, int y,int *width, int *height);
\r
53 /* void drawJpeg(char *buffer,ULONG buflength,DWORD x, DWORD y,DWORD *width, DWORD *height);*/
\r
54 LPDIRECT3DSURFACE9 getD3dsurface() {WaitForSingleObject(event,INFINITE);
\r
55 return d3dsurface;};
\r
56 LPDIRECT3DTEXTURE9 getD3dtexture() {return d3dtexture;};
\r
58 LPDIRECT3DSURFACE9 d3dsurface;
\r
59 LPDIRECT3DTEXTURE9 d3dtexture;
\r
60 D3DLOCKED_RECT lockrect;
\r
61 UINT sheight,swidth;
\r