?? gpe93surf.cpp
字號(hào):
//**********************************************************************
//
// Filename: gpe93surf.cpp
//
// Description: Contains the class for the gpesurf for memory in the
// video buffer.
//
// 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.
//
// Use of this source code is subject to the terms of the Cirrus 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.
//
// Copyright(c) Cirrus Logic Corporation 2002, All Rights Reserved
//
//**********************************************************************
#include "precomp.h"
GPE93xxSurf::GPE93xxSurf
(
int width, // ... system-memory surface (i.e. DIB)
int height,
SurfaceHeapV* pSurface,
ULONG uPhyOffset,
int size,
int stride,
EGPEFormat format
)
{
m_nOffsetInVideoMemory = NULL;
pNode = pSurface->Alloc(size);
if( pNode != NULL )
{
void* pBits = (void*)(pNode->Address());
if(pBits)
{
Init( width, height, pBits, stride, format
#ifdef DD_ENABLE
, EGPEFormatToEDDGPEPixelFormat[format]
#endif
);
m_nOffsetInVideoMemory = pNode->Address() + uPhyOffset - FRAMEBUF_PHYSICAL_MEMORY;
m_fInVideoMemory = TRUE;
}
}
#ifdef DD_ENABLE
m_fOwnsBuffer = FALSE;
m_dwColorKeyLowValue = 0L;
m_dwColorKeyHighValue = 0L;
m_dwColorKeyMask = 0xFFFFFFFFL;
lpDDSurface = NULL;
m_pDriverData = NULL;
#endif
}
GPE93xxSurf::GPE93xxSurf
(
int width,
int height,
void *pBits,
int stride,
EGPEFormat format,
ULONG ulPhysicalMemory
)
{
pNode = NULL;
Init( width, height, pBits, stride, format
#ifdef DD_ENABLE
, EGPEFormatToEDDGPEPixelFormat[format]
#endif
);
m_fInVideoMemory = TRUE;
m_nOffsetInVideoMemory = 0;
#ifdef DD_ENABLE
m_fOwnsBuffer = FALSE;
m_dwColorKeyLowValue = 0L;
m_dwColorKeyHighValue = 0L;
m_dwColorKeyMask = 0xFFFFFFFFL;
lpDDSurface = NULL;
m_pDriverData = NULL;
#endif
}
GPE93xxSurf::~GPE93xxSurf()
{
if(pNode)
{
while(*GRAPHICS_BLOCKCTRL & BLOCKCTRL_ENABLE);
pNode->Free();
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -