FS2_Open
Open source remastering of the Freespace 2 engine
multi_rate.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef _FS2_MULTI_DATA_RATE_HEADER_FILE
13 #define _FS2_MULTI_DATA_RATE_HEADER_FILE
14 
15 // keep this defined to compile in rate checking
16 #if !defined(NDEBUG)
17  #define MULTI_RATE
18 #endif
19 
20 // -----------------------------------------------------------------------------------------------------------------------
21 // MULTI RATE DEFINES/VARS
22 //
23 
24 #define MAX_RATE_TYPE_LEN 50 // max length of a type string
25 #define MAX_RATE_PLAYERS 12 // how many player we'll keep track of
26 #define MAX_RATE_TYPES 32 // how many types we'll keep track of per player
27 
28 // -----------------------------------------------------------------------------------------------------------------------
29 // MULTI RATE FUNCTIONS
30 //
31 #ifdef MULTI_RATE
32 
33 // notify of a player join
34 void multi_rate_reset(int np_index);
35 
36 // add data of the specified type to datarate processing, returns 0 on fail (if we ran out of types, etc, etc)
37 int multi_rate_add(int np_index, char *type, int size);
38 
39 // process. call _before_ doing network operations each frame
40 void multi_rate_process();
41 
42 // display
43 void multi_rate_display(int np_index, int x, int y);
44 
45 #else
46 
47 // stubs using #defines (c.f. NO_SOUND)
48 #define multi_rate_reset(np_index)
49 #define multi_rate_add(np_index, type, size) do { } while (0)
50 #define multi_rate_process()
51 #define multi_rate_display(np_index, x, y)
52 
53 #endif
54 
55 
56 
57 #endif // header define
GLsizeiptr size
Definition: Glext.h:5496
GLenum type
Definition: Gl.h:1492
void multi_rate_reset(int np_index)
GLint GLint GLint GLint GLint x
Definition: Glext.h:5182
int multi_rate_add(int np_index, char *type, int size)
void multi_rate_display(int np_index, int x, int y)
void multi_rate_process()
GLint y
Definition: Gl.h:1505