cCompetition.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:2k
- // RACE X
- //
- // Written by Mauricio Teichmann Ritter
- //
- // Copyright (C) 2002, Brazil. All rights reserved.
- //
- //
- #if !defined(AFX_CCOMPETITION_H__11C73611_1EDC_46F6_88E3_1526635CA821__INCLUDED_)
- #define AFX_CCOMPETITION_H__11C73611_1EDC_46F6_88E3_1526635CA821__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- struct PLAYER_DATA
- {
- string m_sPlayerName;
- int m_iPoints;
- UINT m_iCarColor;
- int m_iControlType;
- BYTE m_bId;
- int m_dpnid;
- BOOL m_bPlayerIsReady;
- };
- // cCompetition Class
- //
- // This class is used to control the game and the competiton status
- // It have a list of all player currently playing the game as well as their,
- // name, points and IDs
- class cCompetition
- {
- private:
- PLAYER_DATA m_pPlayerData[4];
- public:
- BOOL AllPlayersReady();
- void ResetReadyState();
- void SetReadyState(BYTE bPlayerId, BOOL bReady);
- BYTE GetPlayerID(int iIndex);
- BYTE GetPlayerIDbyDPNID(int iDPNID);
- int GetPlayerDPNID(BYTE idPlayer);
- string GetPlayerName(BYTE idPlayer);
- DWORD GetPlayerColor(BYTE idPlayer);
- void SetPlayerName(BYTE idPlayer, char* sName);
- void SetPlayerColor(BYTE idPlayer, UINT iColor);
-
- BOOL DPNIDExists(int iID);
- int GetControlType(int iPosition);
- void AddPointToPlayer(BYTE bId,int iPoints);
- int GetNumberOfCars();
- int GetPlayerPointsByPosition(int iPosition);
- void NextRace();
- int m_iNextRace;
- string GetNextRace();
- UINT GetColor(UINT iPosition);
- //string GetPlayerNameByPosition(int iPosition);
- //string GetPlayerNameByColor(UINT iColor);
- void AddPlayer(string sPlayerName, UINT iCarColor, int iControlType, BYTE bID, int iDPNID);
- void Reset();
- int m_iNumPlayers;
- BOOL GetCompetitionMode();
- void SetCompetitionMode(BOOL bActivate);
- BOOL m_bCompetitionActive;
- cCompetition();
- virtual ~cCompetition();
- };
- #endif // !defined(AFX_CCOMPETITION_H__11C73611_1EDC_46F6_88E3_1526635CA821__INCLUDED_)