📄 gxdraw.h
字号:
/*
* $Workfile: gxdraw.h $
* $Revision: 2 $
* $Date: 4/07/00 9:11a $
* $Modtime: 4/07/00 9:00a $
* $Author: Sarma $
*
* DESCRIPTION:
* Direct Draw driver global header
*
* Copyright (c) 1998 National Semiconductor Corporation.
* All Rights Reserved.
*
* This software is the confidential and proprietary information of National
* Semiconductor Corporation. ("Confidential Information").
* You shall not disclose such Confidential Information and shall use it only
* in accordance with the terms of the license agreement you entered into
* with National Semiconductor Corporation.
* This code is supplied as is.
*
*/
/*
*$Log: /CE/Platform/Nsc/Drivers/Video/gxvideo/ddraw/gxdraw.h $
*
* 2 4/07/00 9:11a Sarma
* Removed Cyrix Corporation from the legal/confidentail information. Also
* added for files not containing this info.
*
*$History: gxdraw.h $
*
* ***************** Version 2 *****************
* User: Sarma Date: 4/07/00 Time: 9:11a
* Updated in $/CE/Platform/Nsc/Drivers/Video/gxvideo/ddraw
* Removed Cyrix Corporation from the legal/confidentail information. Also
* added for files not containing this info.
*
*/
#ifdef DD_SUPPORT
#define YVYU 0
#define YUYV 1
#define UYVY 2
#define RGB8 3
#define EMMA 4 //Added EMMA definition -Balaji
/*
* IN_VBLANK should be replaced by a test to see if the hardware is currently
* in the vertical blank
*/
#define IN_VBLANK InVBlank()
#define IN_DISPLAY !InVBlank()
/*
* DRAW_ENGINE_BUSY should be replaced by a test to see the bltter is still
* busy drawing
*/
#define DRAW_ENGINE_BUSY DrawEngineBusy()
/*
* ENOUGH_FIFO_FOR_BLT should be replaced with a test to see if there is enough
* room in the hardware fifo for a blt
*/
#define ENOUGH_FIFO_FOR_BLT CommandBufferEmpty()
/*
* CURRENT_VLINE should be replaced by a macro to retrieve the current
* scanline
*/
#define CURRENT_VLINE GetScanLine()
typedef struct tagFLIPRECORD
{
FLATPTR fpFlipFrom;
BOOL bFlipFlag;
UINT wFlipScanLine;
BOOL bFlipDuringVBlank;
BOOL bWasEverInDisplay;
} FLIPRECORD;
typedef struct tagOVERLAYDATA
{
BOOL OverlayActive;
DWORD VidFormat;
DWORD VidBufSize;
} OVERLAYDATA;
#ifdef VSIM
typedef struct tagTRACETEX
{
DWORD Bpp;
DWORD Width;
DWORD Height;
DWORD Pitch;
DWORD Count;
DWORD Valid;
} TRACETEX;
#endif
#ifdef GLOBALS
#define EXTERN
#else
#define EXTERN extern
#endif
EXTERN DDRAWDATA *pDriverData;
EXTERN FLIPRECORD flipRecord;
EXTERN HINSTANCE hInstance;
EXTERN OVERLAYDATA OverlayData;
#ifdef VSIM
EXTERN TRACETEX TexInfo;
EXTERN SIMFILE TraceTexture;
#endif
// D3D system callbacks
extern BOOL _stdcall thk_ThunkConnect32( LPSTR pszDll16, LPSTR pszDll32,
HINSTANCE hInst, DWORD dwReason);
// ROUTINES IN "DDBLT32.C"
BOOL InVBlank(void);
BOOL DrawEngineBusy(void);
BOOL CommandBufferEmpty(void);
WORD GetScanLine(void);
BOOL FlipDisplay(DWORD Offset);
BOOL FlipStatus(DWORD Offset);
BOOL ScrToScrBlt(DWORD SrcX, DWORD SrcY, DWORD DstX, DWORD DstY, DWORD Width, DWORD Height);
BOOL ScrToScrXBlt(DWORD SrcX, DWORD SrcY, DWORD DstX, DWORD DstY,
DWORD Width, DWORD Height, DWORD ColorKey);
BOOL FillBlt(DWORD DstX, DWORD DstY, DWORD Width, DWORD Height, DWORD Color);
// ROUTINES IN "DDVID32.C"
BOOL SetChromaKey(DWORD Key, DWORD Bpp);
BOOL SetVideoOffset(DWORD Offset);
BOOL SetVideoPalette(BYTE *RedGamma, BYTE *GreenGamma, BYTE *BlueGamma);
BOOL SetVideoOutput(BOOL State);
BOOL SetVideoBufferSize(DWORD SizeBytes);
BOOL SetVideoDisplay(DWORD * VidCfg, BOOL State);
BOOL SetVideoFormat(DWORD * VidCfg, DWORD Format);
BOOL SetVideoPosition(DWORD * VidCfg, DWORD XPos, DWORD YPos, DWORD Width, DWORD Height, BOOL SizeValid);
BOOL SetScaleFactor(DWORD * VidCfg, DWORD DstWidth, DWORD DstHeight, DWORD SrcWidth, DWORD SrcHeight);
BOOL SetVideoSource(DWORD * VidCfg, DWORD XPos, DWORD Pitch);
BOOL BeginLoad(DWORD * VidCfg);
BOOL EndLoad(DWORD VidCfg);
// ROUTINES IN "DDVPE32.C"
DWORD __stdcall CanCreateVideoPort32 (LPDDHAL_CANCREATEVPORTDATA lpInput);
DWORD __stdcall FlipVideoPort32 (LPDDHAL_FLIPVPORTDATA lpInput);
DWORD __stdcall GetVideoPortConnectInfo32 (LPDDHAL_GETVPORTCONNECTDATA lpInput);
DWORD __stdcall GetVideoPortBandwidth32 (LPDDHAL_GETVPORTBANDWIDTHDATA lpInput);
DWORD __stdcall GetVideoPortFlipStatus32 (LPDDHAL_GETVPORTFLIPSTATUSDATA lpInput);
DWORD __stdcall GetVideoPortInputFormat32 (LPDDHAL_GETVPORTINPUTFORMATDATA lpInput);
DWORD __stdcall GetVideoPortOutputFormat32 (LPDDHAL_GETVPORTOUTPUTFORMATDATA lpInput);
DWORD __stdcall UpdateVideoPort32 (LPDDHAL_UPDATEVPORTDATA lpInput);
DWORD __stdcall WaitForVideoPortSync32 (LPDDHAL_WAITFORVPORTSYNCDATA lpInput);
// System Externals
extern LPVOID _stdcall MapSLFix( DWORD ); // 16:16 -> 0:32
extern LPVOID _stdcall MapLS( LPVOID ); // 0:32 -> 16:16
#endif //DD_SUPPORT
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -