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
|
Description: Fix compiler warnings in blackbox.c
Author: Adrian Bunk <bunk@debian.org>
--- black-box-1.4.8.orig/src/blackbox.c
+++ black-box-1.4.8/src/blackbox.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <time.h>
#include <SDL.h>
#include <SDL_image.h>
#include <SDL_timer.h>
@@ -553,6 +554,11 @@ void show_real()
SDL_UpdateRect(screen,0,0,0,0);
}
+static int abrand(int a,int b) //random number between a and b (inclusive)
+{
+ return(a+(rand() % (b-a+1)));
+}
+
void generate_field()
{
int x,y;
@@ -852,11 +858,6 @@ void click()
this_turn_demo=0;
}
-int abrand(int a,int b) //random number between a and b (inclusive)
-{
- return(a+(rand() % (b-a+1)));
-}
-
void get_click()
{
while ( SDL_WaitEvent(&event) >= 0 ) {
@@ -895,7 +896,7 @@ void init_sound()
}
}
-main(int argc, char *argv[])
+int main(int argc, char *argv[])
{
printf("\nBlack-Box version %s, Copyright (C) 2000-2008 Karl Bartel\n",VERSION);
printf("Black-Box comes with ABSOLUTELY NO WARRANTY; for details see COPYING'.\n");
|