ReplicaNet and RNLobby  1
Stat.h
1 /* START_LICENSE_HEADER
2 
3 Copyright (C) 2000 Martin Piper, original design and program code
4 Copyright (C) 2001 Replica Software
5 
6 This program file is copyright (C) Replica Software and can only be used under license.
7 For more information visit: http://www.replicanet.com/
8 Or email: info@replicanet.com
9 
10 END_LICENSE_HEADER */
11 #include "RNPlatform/Inc/MemoryTracking.h"
12 #ifndef _STATSERVER_STAT_H_
13 #define _STATSERVER_STAT_H_
14 #include "RNLobby/Inc/UserClient.h"
15 
16 namespace RNReplicaNet
17 {
18 
19 namespace RNLobby
20 {
21 
22 namespace StatServerSession
23 {
24 
25 // The user must implement these two functions in GCC expected when using BootStatGCC.lang
26 extern void ProcessPlayer( const int loginID );
27 
28 extern void ProcessGame( void );
29 
30 
31 // These functions are actually implemented in SimpleScript by StatGCC.lang
32 extern int GetResult( const int loginID , const char *name , const int defaultValue );
33 extern float GetResult( const int loginID , const char *name , const float defaultValue );
34 
35 extern int GetVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const int defaultValue );
36 extern float GetVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const float defaultValue );
37 
38 extern void SetVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const int value );
39 extern void SetVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const float value );
40 
41 extern void ShiftVariables( const int loginID , const int startSection , const UserClient::VariableAccess access , const char *name , const int numItems , const int sectionOffset);
42 
43 extern int GetTimeAsSeconds( void );
44 
45 extern int CalcStatVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const int defaultValue );
46 extern float CalcStatVariable( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const float defaultValue );
47 
48 extern int CalcStatVariableResult( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const int defaultValue );
49 extern float CalcStatVariableResult( const int loginID , const int section , const UserClient::VariableAccess access , const char *name , const float defaultValue );
50 
51 } // namespace StatServerSession
52 
53 } // namespace RNLobby
54 
55 } // namespace RNReplicaNet
56 
57 #endif