OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
ladderTrackDlg.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// CLadderTrackDlg 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_CHALLENGING 12
26#define HOST_CONNECTED 13
27#define HOST_ERROR 14
28
29#define JOIN_CONNECTING 21
30#define JOIN_WAITING 22
31#define JOIN_CONNECTED 23
32#define JOIN_ERROR 24
33
34#define NONE -1
35#define LEFT 0
36#define RIGHT 1
37
38#define RACE_STEPS 60
39
40class CLadderTrackDlg : public CDialog
41{
42// Construction
43public:
44 void FakeStats();
45 CString m_remoteNick;
46 DWORD m_remoteTime;
47 DWORD m_localTime;
48 int m_totalSteps;
49 int m_step;
50 int m_numSteps;
51 DWORD m_start;
52 BOOL m_racing;
53 int m_countdown;
54 BOOL m_challenged;
55 CString m_remoteResponse;
56 int m_state;
57 BOOL m_hosting;
58 CString m_challenge;
59 int m_remoteProfile;
60 CLoginDlg m_loginDlg;
61 CHostOrJoinDlg m_hostOrJoinDlg;
62 CWaitingDlg m_waitingDlg;
63
64 GT2Socket m_GT2Socket; // raw socket
65 GT2Connection m_GT2Connection; // established connection
66
67 BOOL SetupHosting();
68 BOOL SetupJoining();
69 BOOL SetupMatch();
70 void UpdatePlayerPositions();
71 void Countdown();
72 void Logout();
73 void StartRace();
74 void ReportStats();
75 CLadderTrackDlg(CWnd* pParent = NULL); // standard constructor
76
77// Dialog Data
78 //{{AFX_DATA(CLadderTrackDlg)
79 enum { IDD = IDD_LADDERTRACK_DIALOG };
80 CButton m_startRace;
81 CProgressCtrl m_remoteProgress;
82 CProgressCtrl m_localProgress;
83 CString m_localPosition;
84 CString m_remotePosition;
85 CString m_info;
86 //}}AFX_DATA
87
88 // ClassWizard generated virtual function overrides
89 //{{AFX_VIRTUAL(CLadderTrackDlg)
90 public:
91 virtual BOOL PreTranslateMessage(MSG* pMsg);
92 protected:
93 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
94 //}}AFX_VIRTUAL
95
96// Implementation
97protected:
98 HICON m_hIcon;
99
100 // Generated message map functions
101 //{{AFX_MSG(CLadderTrackDlg)
102 virtual BOOL OnInitDialog();
103 afx_msg void OnPaint();
104 afx_msg HCURSOR OnQueryDragIcon();
105 afx_msg void OnStart();
106 afx_msg void OnDestroy();
107 afx_msg void OnTimer(UINT nIDEvent);
108 afx_msg void OnLogout();
109 afx_msg void OnUpdatePositions();
110 //}}AFX_MSG
111 DECLARE_MESSAGE_MAP()
112};
113
114//{{AFX_INSERT_LOCATION}}
115// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
116
117#endif // !defined(AFX_LADDERTRACKDLG_H__82121F55_1FDB_427A_B616_B59EB16C5E6D__INCLUDED_)
Definition HostOrJoinDlg.h:17
Definition LoginDlg.h:14
Definition WaitingDlg.h:14