亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dxutil.cpp

?? 3D俄羅斯方塊源碼.rar
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
            m_llStopTime += m_llQPFTicksPerSec/10;
            return 0.0f;
        }

        if( command == TIMER_GETABSOLUTETIME )
        {
            fTime = qwTime.QuadPart / (double) m_llQPFTicksPerSec;
            return (FLOAT) fTime;
        }

        return -1.0f; // Invalid command specified
    }
    else
    {
        // Get the time using timeGetTime()
        static double m_fLastElapsedTime  = 0.0;
        static double m_fBaseTime         = 0.0;
        static double m_fStopTime         = 0.0;
        double fTime;
        double fElapsedTime;
        
        // Get either the current time or the stop time, depending
        // on whether we're stopped and what command was sent
        if( m_fStopTime != 0.0 && command != TIMER_START && command != TIMER_GETABSOLUTETIME)
            fTime = m_fStopTime;
        else
            fTime = timeGetTime() * 0.001;
    
        // Return the elapsed time
        if( command == TIMER_GETELAPSEDTIME )
        {   
            fElapsedTime = (double) (fTime - m_fLastElapsedTime);
            m_fLastElapsedTime = fTime;
            return (FLOAT) fElapsedTime;
        }
    
        // Return the current time
        if( command == TIMER_GETAPPTIME )
        {
            return (FLOAT) (fTime - m_fBaseTime);
        }
    
        // Reset the timer
        if( command == TIMER_RESET )
        {
            m_fBaseTime         = fTime;
            m_fLastElapsedTime  = fTime;
            m_fStopTime         = 0;
            m_bTimerStopped     = FALSE;
            return 0.0f;
        }
    
        // Start the timer
        if( command == TIMER_START )
        {
            if( m_bTimerStopped )
                m_fBaseTime += fTime - m_fStopTime;
            m_fStopTime = 0.0f;
            m_fLastElapsedTime  = fTime;
            m_bTimerStopped = FALSE;
            return 0.0f;
        }
    
        // Stop the timer
        if( command == TIMER_STOP )
        {
            m_fStopTime = fTime;
            m_fLastElapsedTime  = fTime;
            m_bTimerStopped = TRUE;
            return 0.0f;
        }
    
        // Advance the timer by 1/10th second
        if( command == TIMER_ADVANCE )
        {
            m_fStopTime += 0.1f;
            return 0.0f;
        }

        if( command == TIMER_GETABSOLUTETIME )
        {
            return (FLOAT) fTime;
        }

        return -1.0f; // Invalid command specified
    }
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToWide()
// Desc: This is a UNICODE conversion utility to convert a CHAR string into a
//       WCHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertAnsiStringToWide( WCHAR* wstrDestination, const CHAR* strSource, 
                                     int cchDestChar )
{
    if( wstrDestination==NULL || strSource==NULL )
        return;

    if( cchDestChar == -1 )
        cchDestChar = strlen(strSource)+1;

    MultiByteToWideChar( CP_ACP, 0, strSource, -1, 
                         wstrDestination, cchDestChar-1 );

    wstrDestination[cchDestChar-1] = 0;
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertWideStringToAnsi()
// Desc: This is a UNICODE conversion utility to convert a WCHAR string into a
//       CHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertWideStringToAnsi( CHAR* strDestination, const WCHAR* wstrSource, 
                                     int cchDestChar )
{
    if( strDestination==NULL || wstrSource==NULL )
        return;

    if( cchDestChar == -1 )
        cchDestChar = wcslen(wstrSource)+1;

    WideCharToMultiByte( CP_ACP, 0, wstrSource, -1, strDestination, 
                         cchDestChar-1, NULL, NULL );

    strDestination[cchDestChar-1] = 0;
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertGenericStringToAnsi()
// Desc: This is a UNICODE conversion utility to convert a TCHAR string into a
//       CHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertGenericStringToAnsi( CHAR* strDestination, const TCHAR* tstrSource, 
                                        int cchDestChar )
{
    if( strDestination==NULL || tstrSource==NULL || cchDestChar == 0 )
        return;

#ifdef _UNICODE
    DXUtil_ConvertWideStringToAnsi( strDestination, tstrSource, cchDestChar );
#else
    if( cchDestChar == -1 )
    {
        strcpy( strDestination, tstrSource );
    }
    else
    {
        strncpy( strDestination, tstrSource, cchDestChar );
        strDestination[cchDestChar-1] = '\0';
    }
#endif
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertGenericStringToWide()
// Desc: This is a UNICODE conversion utility to convert a TCHAR string into a
//       WCHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertGenericStringToWide( WCHAR* wstrDestination, const TCHAR* tstrSource, 
                                        int cchDestChar )
{
    if( wstrDestination==NULL || tstrSource==NULL || cchDestChar == 0 )
        return;

#ifdef _UNICODE
    if( cchDestChar == -1 )
    {
        wcscpy( wstrDestination, tstrSource );
    }
    else
    {
        wcsncpy( wstrDestination, tstrSource, cchDestChar );
        wstrDestination[cchDestChar-1] = L'\0';
    }
#else
    DXUtil_ConvertAnsiStringToWide( wstrDestination, tstrSource, cchDestChar );
#endif
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToGeneric()
// Desc: This is a UNICODE conversion utility to convert a CHAR string into a
//       TCHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertAnsiStringToGeneric( TCHAR* tstrDestination, const CHAR* strSource, 
                                        int cchDestChar )
{
    if( tstrDestination==NULL || strSource==NULL || cchDestChar == 0 )
        return;
        
#ifdef _UNICODE
    DXUtil_ConvertAnsiStringToWide( tstrDestination, strSource, cchDestChar );
#else
    if( cchDestChar == -1 )
    {
        strcpy( tstrDestination, strSource );
    }
    else
    {
        strncpy( tstrDestination, strSource, cchDestChar );
        tstrDestination[cchDestChar-1] = '\0';
    }
#endif
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToGeneric()
// Desc: This is a UNICODE conversion utility to convert a WCHAR string into a
//       TCHAR string. cchDestChar defaults -1 which means it 
//       assumes strDest is large enough to store strSource
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertWideStringToGeneric( TCHAR* tstrDestination, const WCHAR* wstrSource, 
                                        int cchDestChar )
{
    if( tstrDestination==NULL || wstrSource==NULL || cchDestChar == 0 )
        return;

#ifdef _UNICODE
    if( cchDestChar == -1 )
    {
        wcscpy( tstrDestination, wstrSource );
    }
    else
    {
        wcsncpy( tstrDestination, wstrSource, cchDestChar );
        tstrDestination[cchDestChar-1] = L'\0';
    }
#else
    DXUtil_ConvertWideStringToAnsi( tstrDestination, wstrSource, cchDestChar );
#endif
}




//-----------------------------------------------------------------------------
// Name: _DbgOut()
// Desc: Outputs a message to the debug stream
//-----------------------------------------------------------------------------
HRESULT _DbgOut( TCHAR* strFile, DWORD dwLine, HRESULT hr, TCHAR* strMsg )
{
    TCHAR buffer[256];
    wsprintf( buffer, _T("%s(%ld): "), strFile, dwLine );
    OutputDebugString( buffer );
    OutputDebugString( strMsg );

    if( hr )
    {
        wsprintf( buffer, _T("(hr=%08lx)\n"), hr );
        OutputDebugString( buffer );
    }

    OutputDebugString( _T("\n") );

    return hr;
}




//-----------------------------------------------------------------------------
// Name: DXUtil_Trace()
// Desc: Outputs to the debug stream a formatted string with a variable-
//       argument list.
//-----------------------------------------------------------------------------
VOID DXUtil_Trace( TCHAR* strMsg, ... )
{
#if defined(DEBUG) | defined(_DEBUG)
    TCHAR strBuffer[512];
    
    va_list args;
    va_start(args, strMsg);
    _vsntprintf( strBuffer, 512, strMsg, args );
    va_end(args);

    OutputDebugString( strBuffer );
#else
    UNREFERENCED_PARAMETER(strMsg);
#endif
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertStringToGUID()
// Desc: Converts a string to a GUID
//-----------------------------------------------------------------------------
BOOL DXUtil_ConvertStringToGUID( const TCHAR* strIn, GUID* pGuidOut )
{
    UINT aiTmp[10];

    if( _stscanf( strIn, TEXT("{%8X-%4X-%4X-%2X%2X-%2X%2X%2X%2X%2X%2X}"),
                    &pGuidOut->Data1, 
                    &aiTmp[0], &aiTmp[1], 
                    &aiTmp[2], &aiTmp[3],
                    &aiTmp[4], &aiTmp[5],
                    &aiTmp[6], &aiTmp[7],
                    &aiTmp[8], &aiTmp[9] ) != 11 )
    {
        ZeroMemory( pGuidOut, sizeof(GUID) );
        return FALSE;
    }
    else
    {
        pGuidOut->Data2       = (USHORT) aiTmp[0];
        pGuidOut->Data3       = (USHORT) aiTmp[1];
        pGuidOut->Data4[0]    = (BYTE) aiTmp[2];
        pGuidOut->Data4[1]    = (BYTE) aiTmp[3];
        pGuidOut->Data4[2]    = (BYTE) aiTmp[4];
        pGuidOut->Data4[3]    = (BYTE) aiTmp[5];
        pGuidOut->Data4[4]    = (BYTE) aiTmp[6];
        pGuidOut->Data4[5]    = (BYTE) aiTmp[7];
        pGuidOut->Data4[6]    = (BYTE) aiTmp[8];
        pGuidOut->Data4[7]    = (BYTE) aiTmp[9];
        return TRUE;
    }
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertGUIDToString()
// Desc: Converts a GUID to a string 
//-----------------------------------------------------------------------------
VOID DXUtil_ConvertGUIDToString( const GUID* pGuidIn, TCHAR* strOut )
{
    _stprintf( strOut, TEXT("{%0.8X-%0.4X-%0.4X-%0.2X%0.2X-%0.2X%0.2X%0.2X%0.2X%0.2X%0.2X}"),
               pGuidIn->Data1, pGuidIn->Data2, pGuidIn->Data3,
               pGuidIn->Data4[0], pGuidIn->Data4[1],
               pGuidIn->Data4[2], pGuidIn->Data4[3],
               pGuidIn->Data4[4], pGuidIn->Data4[5],
               pGuidIn->Data4[6], pGuidIn->Data4[7] );
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91污片在线观看| 色菇凉天天综合网| 欧美aaaaaa午夜精品| 亚洲18女电影在线观看| 亚洲午夜av在线| 五月天精品一区二区三区| 亚洲大型综合色站| 老司机免费视频一区二区| 精品一区二区三区av| 国产精品18久久久久久vr| 成人毛片视频在线观看| 日本二三区不卡| 欧美精选一区二区| 欧美电影免费观看高清完整版| 精品久久久久久久人人人人传媒| 国产欧美一区二区精品婷婷| 国产精品私人自拍| 亚洲一区二区三区三| 麻豆成人免费电影| 99在线热播精品免费| 欧美日韩精品三区| 久久综合国产精品| 一区二区三区在线观看网站| 青青青伊人色综合久久| 风间由美一区二区av101| 色乱码一区二区三区88| 欧美一区二区精品久久911| 中文字幕不卡的av| 日韩精品一二三区| 成人免费三级在线| 欧美高清精品3d| 欧美激情一区不卡| 日韩 欧美一区二区三区| 成人精品视频一区二区三区尤物| 一本到不卡免费一区二区| 日韩欧美电影一区| 一区二区三区中文免费| 国产一二精品视频| 欧美精品自拍偷拍动漫精品| 国产女人18水真多18精品一级做| 一区二区不卡在线播放| 国产精品 欧美精品| 在线综合视频播放| 亚洲激情校园春色| 国产精品456露脸| 日韩一区二区三区四区| 一区二区三区免费网站| 丁香婷婷综合激情五月色| 91精品国产综合久久精品性色| 国产精品久久久久毛片软件| 捆绑变态av一区二区三区| 在线精品视频免费播放| 国产欧美一区二区在线观看| 日韩电影免费在线看| 欧美亚洲图片小说| 国产精品第一页第二页第三页| 麻豆精品视频在线观看视频| 91福利资源站| 一区二区三区高清不卡| 91农村精品一区二区在线| 国产色综合一区| 国产激情一区二区三区四区| 精品久久免费看| 美女脱光内衣内裤视频久久网站 | 欧美日韩国产美| 玉足女爽爽91| 色偷偷88欧美精品久久久| 欧美国产综合一区二区| 国产精品亚洲а∨天堂免在线| 精品日韩一区二区三区免费视频| 亚洲第一成年网| 欧美高清视频一二三区 | 亚洲第一电影网| 欧美日韩国产首页| 亚洲成人免费电影| 91麻豆精品国产91久久久 | 亚洲h在线观看| 欧美视频一区在线| 日韩电影一区二区三区| 日韩一区二区中文字幕| 美国十次了思思久久精品导航| 67194成人在线观看| 久久精品99国产国产精| 精品国产免费一区二区三区四区| 久久国产精品区| 国产欧美综合在线| 99re热视频精品| 亚洲第一会所有码转帖| 日韩一区二区高清| 国产成人av电影| 亚洲美女视频在线| 欧美一区二区三区在线观看视频| 日韩制服丝袜av| 久久久不卡网国产精品二区| 国产精品 欧美精品| 一区二区三区高清在线| 日韩一区二区免费在线电影 | av中文字幕不卡| 亚洲第一在线综合网站| xfplay精品久久| 欧洲激情一区二区| 久久精品免费观看| 国产精品初高中害羞小美女文| 在线看国产一区| 国产精品18久久久久久久网站| 亚洲天堂精品在线观看| 日韩欧美在线综合网| 成人午夜视频网站| 日韩成人av影视| 亚洲人成伊人成综合网小说| 欧美放荡的少妇| 99riav一区二区三区| 免费看欧美美女黄的网站| 中文字幕一区二区三区乱码在线| 欧美男女性生活在线直播观看| 国产美女一区二区| 午夜精品久久久久久久久久久| 亚洲国产高清aⅴ视频| 欧美日韩黄色一区二区| 成人免费av在线| 久久精品噜噜噜成人av农村| 亚洲色图在线播放| 国产三级欧美三级| 91精品国产欧美一区二区| 91麻豆精品一区二区三区| 国产精品一区二区男女羞羞无遮挡| 亚洲精品视频免费观看| 日本一区二区三区高清不卡| 日韩一二三区视频| 欧洲在线/亚洲| 91麻豆免费观看| 菠萝蜜视频在线观看一区| 国产在线视频精品一区| 日韩不卡免费视频| 性欧美大战久久久久久久久| 亚洲免费在线播放| 一色桃子久久精品亚洲| 国产欧美一区二区精品性色 | 欧美不卡视频一区| 欧美一卡二卡三卡四卡| 欧美日韩高清一区二区三区| 色域天天综合网| 91视频xxxx| 99精品国产99久久久久久白柏| 国产91色综合久久免费分享| 久久精品国产亚洲一区二区三区| 日韩不卡手机在线v区| 日韩不卡免费视频| 秋霞国产午夜精品免费视频| 欧美精品一区二区三区很污很色的 | 欧美岛国在线观看| 欧美午夜片在线看| 欧美午夜精品免费| 欧美色图一区二区三区| 在线一区二区三区| 在线视频观看一区| 欧美精品在线一区二区| 日韩视频免费观看高清完整版在线观看| 欧美日韩亚洲丝袜制服| 91精品国产麻豆国产自产在线| 欧美一区二区三区在线视频| 91精品欧美一区二区三区综合在 | 久久色中文字幕| 欧美激情中文不卡| 亚洲精品一二三区| 亚洲va欧美va人人爽| 美国三级日本三级久久99| 国产精品1区二区.| 色综合久久久久综合体| 欧美精品aⅴ在线视频| 欧美一区二区三区免费| 国产日产欧美精品一区二区三区| 久久精品视频在线看| 亚洲色图在线播放| 日本不卡123| 国产成人免费视频网站高清观看视频 | 亚洲乱码中文字幕| 午夜欧美2019年伦理| 国产成人在线网站| 欧美中文字幕一二三区视频| 欧美成人女星排行榜| 国产精品久久久久久久久晋中| 亚洲综合在线免费观看| 麻豆视频一区二区| 91美女片黄在线| 欧美电影免费观看高清完整版在线 | 亚洲欧洲国产专区| 日韩综合一区二区| 成人免费毛片a| 精品视频在线看| 亚洲国产高清不卡| 蜜臀91精品一区二区三区| 99国产精品久| 337p粉嫩大胆噜噜噜噜噜91av| 最新国产の精品合集bt伙计| 日本91福利区| 欧美亚洲一区三区| 国产精品免费网站在线观看| 日韩精品一二三区| 欧亚洲嫩模精品一区三区|