File: beSurface.h

package info (click to toggle)
devil 1.6.7-5%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 11,536 kB
  • ctags: 7,441
  • sloc: ansic: 35,573; sh: 8,075; cpp: 7,465; pascal: 792; makefile: 399; python: 47
file content (48 lines) | stat: -rw-r--r-- 1,213 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//============================================================//
// File:		beScreen.h
// 
// Date:		10-19-2000
//============================================================//
#ifndef BESURFACE_H
#define BESURFACE_H

class beSurface
{

public:

	beSurface(beScreen *pScreen);
	~beSurface();

	void Release();

    bool Lock(DDSURFACEDESC2& ddsd);
    bool Unlock();

    bool CreateSurface(int iWidth, int iHeight, bool bSystemMemory);
	bool LoadImage(HBITMAP image, bool bSystemMemory);

	beDirectDrawSurface *			GetSurface()		{ return m_pSurface; };
	int								GetWidth()			{ return m_iWidth; };
	int								GetHeight()			{ return m_iHeight; };

	bool BltFast(DWORD dwX,DWORD dwY,beSurface* pSurface,LPRECT lpSrcRect,DWORD dwTrans);
	bool Blt(LPRECT lpDestRect,beSurface* pSurface,LPRECT lpSrcRect,DWORD dwFlags,LPDDBLTFX lpDDBltFx);

	void PlotPixel( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd);

protected:
	void PlotPixel16( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd);
	void PlotPixel32( int x, int y, int r, int g, int b, DDSURFACEDESC2 *ddsd);

private:
	int								m_iWidth;
	int								m_iHeight;

	beScreen *						m_pScreen;
	beDirectDrawSurface *			m_pSurface;
	

};

#endif