rnd-20090623-1-src
[rocksndiamonds.git] / src / game_sp / modGeneralTricks.c
1 // ----------------------------------------------------------------------------
2 // modGeneralTricks.c
3 // ----------------------------------------------------------------------------
4
5 #include "modGeneralTricks.h"
6
7 // static char *VB_Name = "modGeneralTricks";
8 // --- Option Explicit
9
10 void Inc(int *i)
11 {
12   *i = *i + 1;
13 }
14
15 void Dec(int *i)
16 {
17   *i = *i - 1;
18 }
19
20 /*
21 double ValEx(char *TS)
22 {
23   double ValEx;
24
25   // Extends the Val() function for
26   // german-style number-representing strings
27   int i;
28   char *LS, *RS;
29
30   i = InStr(1, TS, ",");
31   if (i != 0)
32   {
33     LS = Left(TS, i - 1);
34     RS = Right(TS, Len(TS) - i);
35     ValEx = ValCAT(LS, ".", RS);
36   }
37   else
38   {
39     ValEx = Val(TS);
40   }
41
42   return ValEx;
43 }
44 */
45
46 int Min(int A, int B)
47 {
48   int Min;
49
50   if (A < B)
51     Min = A;
52   else
53     Min = B;
54
55   return Min;
56 }
57
58 int Max(int A, int B)
59 {
60   int Max;
61
62   if (A < B)
63     Max = B;
64   else
65     Max = A;
66
67   return Max;
68 }
69