This commit is contained in:
cyw
2026-02-13 14:34:15 +08:00
parent 6ed1953e24
commit f36e3f9df2
5206 changed files with 573757 additions and 16 deletions

View File

@@ -0,0 +1,82 @@
#include "Stdafx.h"
#include "HistoryScore.h"
//////////////////////////////////////////////////////////////////////////////////
//构造函数
CHistoryScore::CHistoryScore()
{
//设置变量
ZeroMemory(m_HistoryScore,sizeof(m_HistoryScore));
return;
}
//析构函数
CHistoryScore::~CHistoryScore()
{
}
//重置数据
VOID CHistoryScore::ResetData()
{
//设置变量
ZeroMemory(m_HistoryScore,sizeof(m_HistoryScore));
return;
}
//获取积分
tagHistoryScore * CHistoryScore::GetHistoryScore(WORD wChairID)
{
//效验参数
ASSERT(wChairID<GAME_PLAYER);
if (wChairID>=GAME_PLAYER) return NULL;
//获取积分
return &m_HistoryScore[wChairID];
}
//用户进入
VOID CHistoryScore::OnEventUserEnter(WORD wChairID)
{
//效验椅子
ASSERT(wChairID<GAME_PLAYER);
if (wChairID>=GAME_PLAYER) return;
//设置变量
m_HistoryScore[wChairID].lTurnScore=0;
m_HistoryScore[wChairID].lCollectScore=0;
return;
}
//用户离开
VOID CHistoryScore::OnEventUserLeave(WORD wChairID)
{
//效验椅子
ASSERT(wChairID<GAME_PLAYER);
if (wChairID>=GAME_PLAYER) return;
//设置变量
m_HistoryScore[wChairID].lTurnScore=0;
m_HistoryScore[wChairID].lCollectScore=0;
return;
}
//用户积分
VOID CHistoryScore::OnEventUserScore(WORD wChairID, SCORE lGameScore)
{
//效验参数
ASSERT(wChairID<GAME_PLAYER);
if (wChairID>=GAME_PLAYER) return;
//设置变量
m_HistoryScore[wChairID].lTurnScore=lGameScore;
m_HistoryScore[wChairID].lCollectScore+=lGameScore;
return;
}
//////////////////////////////////////////////////////////////////////////////////