OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
ScRaceSampleDlg.h
1// ladderTrackDlg.h : header file
2//
3
4#if !defined(AFX_LADDERTRACKDLG_H__82121F55_1FDB_427A_B616_B59EB16C5E6D__INCLUDED_)
5#define AFX_LADDERTRACKDLG_H__82121F55_1FDB_427A_B616_B59EB16C5E6D__INCLUDED_
6
7#include "LoginDlg.h"
8#include "HostOrJoinDlg.h"
9#include "..\..\GT2\gt2.h" // Added by ClassView
10#include "..\..\GT2\gt2Encode.h"
11#include "WaitingDlg.h" // Added by ClassView
12
13#if _MSC_VER > 1000
14#pragma once
15#endif // _MSC_VER > 1000
16
18// CScRaceSampleDlg dialog
19
20#define LOGGED_OUT 1
21#define SETTING_UP 2
22#define RACING 3
23
24#define HOST_LISTENING 11
25#define HOST_CONNECTED 12
26#define HOST_ERROR 13
27#define HOST_EXCHANGE_CERT 14
28#define HOST_VERIFY_CERT 15
29#define HOST_EXCHANGE_KEYS 16
30#define HOST_WAITING 17
31#define HOST_SEND_SESSID 18
32
33#define JOIN_CONNECTING 21
34#define JOIN_CONNECTED 22
35#define JOIN_ERROR 23
36#define JOIN_EXCHANGE_CERT 24
37#define JOIN_VERIFY_CERT 25
38#define JOIN_EXCHANGE_KEYS 26
39#define JOIN_WAITING 27
40#define JOIN_SEND_CONNID 28
41
42
43#define NONE -1
44#define LEFT 0
45#define RIGHT 1
46
47#define RACE_STEPS 60
48
49extern SamplePlayerData gPlayerData;
50
51class CScRaceSampleDlg : public CDialog
52{
53// Construction
54public:
55 void FakeStats();
56 CString m_remoteNick;
57 DWORD m_remoteTime;
58 DWORD m_localTime;
59 int m_totalSteps;
60 int m_step;
61 int m_numSteps;
62 DWORD m_start;
63 BOOL m_racing;
64 int m_countdown;
65 CString m_remoteResponse;
66 int m_state;
67 BOOL m_hosting;
68 CString m_challenge;
69
70 // stats markers
71 gsi_bool m_win;
72 gsi_bool m_tie;
73 gsi_bool m_disconnect;
74 gsi_bool m_reportSent;
75
76 CLoginDlg m_loginDlg;
77 CHostOrJoinDlg m_hostOrJoinDlg;
78 CWaitingDlg m_waitingDlg;
79
80 GT2Socket m_GT2Socket; // raw socket
81 GT2Connection m_GT2Connection; // established connection
82
83 SCInterfacePtr m_interface; //pointer to the stats interface
84 int m_remoteProfile;
85 GSLoginCertificate m_remoteCertificate;
86 gsi_u8 m_remoteConnId[SC_CONNECTION_GUID_SIZE];
87
88
89 BOOL SetupHosting();
90 BOOL SetupJoining();
91 BOOL SetupMatch();
92 void Countdown();
93 void Logout();
94 void StartRace();
95 void ReportStats();
96 CScRaceSampleDlg(CWnd* pParent = NULL); // standard constructor
97
98// Dialog Data
99 //{{AFX_DATA(CScRaceSampleDlg)
100 enum { IDD = IDD_SCRACESAMPLE_DIALOG };
101 CButton m_startRace;
102 CProgressCtrl m_remoteProgress;
103 CProgressCtrl m_localProgress;
104 CString m_info;
105 //}}AFX_DATA
106
107 // ClassWizard generated virtual function overrides
108 //{{AFX_VIRTUAL(CScRaceSampleDlg)
109 public:
110 virtual BOOL PreTranslateMessage(MSG* pMsg);
111 protected:
112 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
113 //}}AFX_VIRTUAL
114
115// Implementation
116protected:
117 HICON m_hIcon;
118
119 // Generated message map functions
120 //{{AFX_MSG(CScRaceSampleDlg)
121 virtual BOOL OnInitDialog();
122 afx_msg void OnPaint();
123 afx_msg HCURSOR OnQueryDragIcon();
124 afx_msg void OnStart();
125 afx_msg void OnDestroy();
126 afx_msg void OnTimer(UINT nIDEvent);
127 afx_msg void OnLogout();
128 //}}AFX_MSG
129 DECLARE_MESSAGE_MAP()
130};
131
132//{{AFX_INSERT_LOCATION}}
133// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
134
135#endif // !defined(AFX_LADDERTRACKDLG_H__82121F55_1FDB_427A_B616_B59EB16C5E6D__INCLUDED_)
Definition HostOrJoinDlg.h:17
Definition LoginDlg.h:14
Definition WaitingDlg.h:14
Definition AuthService.h:87
Definition ScRaceSample.h:31