rocksndiamonds-3.3.0.0
[rocksndiamonds.git] / src / game_sp / vb_lib.c
1 // ----------------------------------------------------------------------------
2 // vb_lib.c
3 // ----------------------------------------------------------------------------
4
5 #include "main_sp.h"
6
7 #include "vb_lib.h"
8
9
10 /* helper functions for constructs not supported by C */
11
12 #if 0
13 void *REDIM_1D(int data_size, int first_data_pos, int last_data_pos)
14 {
15   /* for a buffer of n elements, first_data_pos is 0 and last_data_pos is n-1 */
16   /* a negative value for "first_data_pos" indicates a preceding buffer zone */
17
18   int data_count = last_data_pos - first_data_pos + 1;
19   int buffer_size = data_size * data_count;
20   int buffer_start = data_size * first_data_pos;
21
22   return (checked_calloc(buffer_size) - buffer_start);
23 }
24 #endif
25
26 long MyGetTickCount()
27 {
28   return random_linux_libc(RANDOM_SIMPLE);
29 }