📄 s3c2443disp.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Module Name:
Abstract:
Functions:
Notes:
--*/
#ifndef __S3C2443DISP_H__
#define __S3C2443DISP_H__
class S3C2443DISPSurf;
class S3C2443DISP : public DDGPE
{
private:
GPEMode m_ModeInfo;
DWORD m_pvFlatFrameBuffer;
DWORD m_cbScanLineLength;
DWORD m_cxPhysicalScreen;
DWORD m_cyPhysicalScreen;
DWORD m_colorDepth;
DWORD m_VirtualFrameBuffer;
DWORD m_RedMaskSize;
DWORD m_RedMaskPosition;
DWORD m_GreenMaskSize;
DWORD m_GreenMaskPosition;
DWORD m_BlueMaskSize;
DWORD m_BlueMaskPosition;
DWORD m_VesaMode;
Node2D * m_p2DVideoMemory;
BOOL m_CursorDisabled;
BOOL m_CursorVisible;
BOOL m_CursorForcedOff;
RECTL m_CursorRect;
POINTL m_CursorSize;
POINTL m_CursorHotspot;
// allocate enough backing store for a 64x64 cursor on a 32bpp (4 bytes per pixel) screen
UCHAR m_CursorBackingStore[64 * 64 * 4];
UCHAR m_CursorXorShape[64 * 64];
UCHAR m_CursorAndShape[64 * 64];
HANDLE m_hVFBMapping;
ULONG m_VideoPowerState;
DWORD m_FrameBufferSize;
public:
BOOL m_InDDraw;
S3C2443DISP();
virtual
~S3C2443DISP();
virtual
int
NumModes();
virtual
SCODE
SetMode(
int modeId,
HPALETTE * palette
);
virtual
int
InVBlank();
virtual
SCODE
SetPalette(
const PALETTEENTRY * source,
USHORT firstEntry,
USHORT numEntries
);
virtual
SCODE
GetModeInfo(
GPEMode * pMode,
int modeNumber
);
virtual
SCODE
SetPointerShape(
GPESurf * mask,
GPESurf * colorSurface,
int xHot,
int yHot,
int cX,
int cY
);
virtual
SCODE
MovePointer(
int xPosition,
int yPosition
);
virtual
void
WaitForNotBusy();
virtual
int
IsBusy();
virtual
void
GetPhysicalVideoMemory(
unsigned long * physicalMemoryBase,
unsigned long * videoMemorySize
);
void
GetVirtualVideoMemory(
unsigned long * virtualMemoryBase,
unsigned long * videoMemorySize
);
virtual
SCODE
Line(
GPELineParms * lineParameters,
EGPEPhase phase
);
virtual
SCODE
BltPrepare(
GPEBltParms * blitParameters
);
virtual
SCODE
BltComplete(
GPEBltParms * blitParameters
);
virtual
ULONG
DrvEscape(
SURFOBJ * pso,
ULONG iEsc,
ULONG cjIn,
void * pvIn,
ULONG cjOut,
void * pvOut
);
int
GetGameXInfo(
ULONG iEsc,
ULONG cjIn,
void * pvIn,
ULONG cjOut,
void * pvOut
);
SCODE
WrappedEmulatedLine(
GPELineParms * lineParameters
);
void
CursorOn();
void
CursorOff();
// surf.cpp
virtual
SCODE
AllocSurface(
GPESurf ** surface,
int width,
int height,
EGPEFormat format,
int surfaceFlags
);
virtual
SCODE
AllocSurface(
DDGPESurf ** ppSurf,
int width,
int height,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat,
int surfaceFlags
);
virtual
void
SetVisibleSurface(
GPESurf * pSurf,
BOOL bWaitForVBlank = FALSE
);
int
GetRotateModeFromReg();
void SetRotateParams();
long
DynRotate(
int angle
);
void SetDisplayPower(ULONG);
friend
void
buildDDHALInfo(
LPDDHALINFO lpddhi,
DWORD modeidx
);
};
class S3C2443DISPSurf : public DDGPESurf
{
private:
Node2D * m_pNode2D;
public:
S3C2443DISPSurf(
int width,
int height,
ULONG offset,
void * pBits,
int stride,
EGPEFormat format,
Node2D * pNode
);
S3C2443DISPSurf(
int width,
int height,
ULONG offset,
void * pBits,
int stride,
EGPEFormat format,
EDDGPEPixelFormat pixelFormat,
Node2D * pNode
);
virtual
~S3C2443DISPSurf();
int
Top() { return m_pNode2D->Top(); }
int
Left() { return m_pNode2D->Left(); }
};
#endif __S3C2443DISP_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -