阅读:1930回复:1
【源码编辑】游戏内添加时间显示及在线时间
添加文件:
------------------------- WndWorld.cpp ------------------------- CString string; CTime time = CTime::GetCurrentTime(); string = time.Format( "真实时间: %H:%M:%S" ); p2DRender->TextOut( 5, 140 , string, D3DCOLOR_ARGB( 255, 0, 255, 255 ) ); TCHAR str[64]; _stprintf( str, "瑞嘉时间: %d:%d:%d",g_GameTimer.m_nHour,g_GameTimer.m_nMin,g_GameTimer.m_nSec); p2DRender->TextOut( 5, 155 , str, D3DCOLOR_ARGB( 255, 0, 255, 255 ) ); TCHAR strtime[64]; char* szT = new char[32]; MakeShowTime((GetCurrentTime() - g_jointime) / 1000,szT); _stprintf(strtime,"在线时间:%s",szT); p2DRender->TextOut(5,170,strtime,0xff00ffff); |
|
100% |
沙发#
发布于:2014-05-06 09:36
g_jointime - -这个是怎么定义的???添加进去 未定义
|
|