dxutil.h

来自「java实现的简单的分形树。简单易学!是学习分形知识的很好的例子。其java语法」· C头文件 代码 · 共 55 行

H
55
字号
// --------------------------------------------------------------------------
// Dingus project - a collection of subsystems for game/graphics applications
// --------------------------------------------------------------------------

#ifndef DX_UTIL_H__
#define DX_UTIL_H__


namespace dingus {

//---------------------------------------------------------------------------

/**
 *  Performs timer opertations.
 *
 *  Use the following commands:
 *		TIMER_RESET           - to reset the timer
 *		TIMER_START           - to start the timer
 *		TIMER_STOP            - to stop (or pause) the timer
 *		TIMER_ADVANCE         - to advance the timer by 0.1 seconds
 *		TIMER_GETABSOLUTETIME - to get the absolute system time
 *		TIMER_GETAPPTIME      - to get the current time
 *		TIMER_GETELAPSEDTIME  - to get the time that elapsed between TIMER_GETELAPSEDTIME calls
 */
enum eTimerCommand {
	TIMER_RESET, TIMER_START, TIMER_STOP, TIMER_ADVANCE,
	TIMER_GETABSOLUTETIME, TIMER_GETAPPTIME, TIMER_GETELAPSEDTIME
};

double __stdcall timer( eTimerCommand command );


//---------------------------------------------------------------------------
// UNICODE support for converting between CHAR, TCHAR, and WCHAR strings

HRESULT convertAnsiStringToWideCch( WCHAR* wstrDestination, const CHAR* strSource, int cchDestChar );
HRESULT convertWideStringToAnsiCch( CHAR* strDestination, const WCHAR* wstrSource, int cchDestChar );
HRESULT convertGenericStringToAnsiCch( CHAR* strDestination, const TCHAR* tstrSource, int cchDestChar );
HRESULT convertGenericStringToWideCch( WCHAR* wstrDestination, const TCHAR* tstrSource, int cchDestChar );
HRESULT convertAnsiStringToGenericCch( TCHAR* tstrDestination, const CHAR* strSource, int cchDestChar );
HRESULT convertWideStringToGenericCch( TCHAR* tstrDestination, const WCHAR* wstrSource, int cchDestChar );
HRESULT convertAnsiStringToWideCb( WCHAR* wstrDestination, const CHAR* strSource, int cbDestChar );
HRESULT convertWideStringToAnsiCb( CHAR* strDestination, const WCHAR* wstrSource, int cbDestChar );
HRESULT convertGenericStringToAnsiCb( CHAR* strDestination, const TCHAR* tstrSource, int cbDestChar );
HRESULT convertGenericStringToWideCb( WCHAR* wstrDestination, const TCHAR* tstrSource, int cbDestChar );
HRESULT convertAnsiStringToGenericCb( TCHAR* tstrDestination, const CHAR* strSource, int cbDestChar );
HRESULT convertWideStringToGenericCb( TCHAR* tstrDestination, const WCHAR* wstrSource, int cbDestChar );



}; // namespace dingus


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?