?? gametime.c
字號:
//*************************************************************************************************
//* *
//* ******************************游戲時間********************************** *
//* *
//*************************************************************************************************
#include "includes.h"
GAMETIME st_GameTime; //游戲時間全局變量。
//*************************************************************************************************
//* *
//* ******************************初始化時間顯示****************************** *
//* *
//*************************************************************************************************
void vTimeInitialize()
{
st_GameTime.ucHour=0;
st_GameTime.ucMinute=0;
st_GameTime.ucSecond=0;
vShowGraph(TIMEPOS_ROW,TIMEPOS_LINE,40,2,uca_TIME);
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE,st_GameTime.ucHour);
vShowCustomRow(TIMEPOS_ROW+2,TIMEPOS_LINE+10,3,uca_MAOHAO);
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE+13,st_GameTime.ucMinute);
vShowCustomRow(TIMEPOS_ROW+2,TIMEPOS_LINE+23,3,uca_MAOHAO);
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE+26,st_GameTime.ucSecond);
}
//*************************************************************************************************
//* *
//* ******************************游戲時間增加******************************** *
//* *
//*************************************************************************************************
void vTimeAdd()
{
if(st_GameTime.ucSecond<60)
st_GameTime.ucSecond++;
else
{
st_GameTime.ucSecond=0;
if(st_GameTime.ucMinute<60)
st_GameTime.ucMinute++;
else
{
st_GameTime.ucMinute=0;
st_GameTime.ucHour++;
}
}
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE,st_GameTime.ucHour);
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE+13,st_GameTime.ucMinute);
vShowNumber(CAPS_TIME,TIMEPOS_ROW+1,TIMEPOS_LINE+26,st_GameTime.ucSecond);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -