File: ScRaceSample.h

package info (click to toggle)
openmohaa 0.81.1%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 29,124 kB
  • sloc: ansic: 270,865; cpp: 250,173; sh: 234; asm: 141; xml: 64; makefile: 7
file content (95 lines) | stat: -rw-r--r-- 2,527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// ladderTrack.h : main header file for the LADDERTRACK application
//

#if !defined(AFX_LADDERTRACK_H__E9856F44_580A_48C0_ABFF_6FFA9BA944A3__INCLUDED_)
#define AFX_LADDERTRACK_H__E9856F44_580A_48C0_ABFF_6FFA9BA944A3__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols


///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// global defines used in the sample

#define SCRACE_GAMENAME		"sc_race"
#define SCRACE_SECRETKEY	"Zc0eM6"
#define SCRACE_GAMEID		1649
#define SCRACE_PRODUCTID	11030

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// This represents the player data structure in your game.
typedef struct SamplePlayerData
{
	// "Normal" game data
	gsi_u32 mProfileId;
	GSLoginCertificate mCertificate;
	GSLoginPrivateData mPrivateData;
	SCPeerCipher mPeerSendCipher; // for fast encryption
	SCPeerCipher mPeerRecvCipher; // for fast decryption
	
	SCInterfacePtr mStatsInterface;

	// Stats related data
	gsi_u8  mSessionId[SC_SESSION_GUID_SIZE];
	gsi_u8  mConnectionId[SC_CONNECTION_GUID_SIZE];
	gsi_u8  mStatsAuthdata[16];

	gsi_i32 mFrags;
	gsi_i32 mScore;
	gsi_i16 mDeaths;
	gsi_i16 mShots;
	gsi_i32 mTeam;
	
	// Obfuscated versions
	SCHiddenData mHiddenFrags;
	SCHiddenData mHiddenDeaths;
	SCHiddenData mHiddenShots;
	SCHiddenData mHiddenScore;

	// A simple way to block the sample's progress
	gsi_u32 mWaitCount; 

} SamplePlayerData;

extern SamplePlayerData gPlayerData;

/////////////////////////////////////////////////////////////////////////////
// CLadderTrackApp:
// See ladderTrack.cpp for the implementation of this class
//

class CLadderTrackApp : public CWinApp
{
public:
	CLadderTrackApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CLadderTrackApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CLadderTrackApp)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LADDERTRACK_H__E9856F44_580A_48C0_ABFF_6FFA9BA944A3__INCLUDED_)