You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.6 KiB
102 lines
2.6 KiB
13 years ago
|
diff -ruN trimines-1.3.0.orig/Makefile trimines-1.3.0/Makefile
|
||
|
--- trimines-1.3.0.orig/Makefile 1969-12-31 19:00:00.000000000 -0500
|
||
|
+++ trimines-1.3.0/Makefile 2010-10-13 18:01:50.802198348 -0400
|
||
|
@@ -0,0 +1,2 @@
|
||
|
+trimines:
|
||
|
+ $(CC) $(LDFLAGS) $(CFLAGS) src/main.c -o ./trimines `sdl-config --cflags` `sdl-config --libs`
|
||
|
diff -ruN trimines-1.3.0.orig/src/boardinit.c trimines-1.3.0/src/boardinit.c
|
||
|
--- trimines-1.3.0.orig/src/boardinit.c 2006-05-13 15:40:32.000000000 -0400
|
||
|
+++ trimines-1.3.0/src/boardinit.c 2010-10-13 18:00:58.238609895 -0400
|
||
|
@@ -22,7 +22,7 @@
|
||
|
|
||
|
void genrandmines(int ex, int ey)
|
||
|
{
|
||
|
-int rx,ry,count,z,i,j;
|
||
|
+int rx,ry,count,i,j;
|
||
|
|
||
|
// generate random mines + (ex,ey) will never be a mine
|
||
|
|
||
|
diff -ruN trimines-1.3.0.orig/src/gfx.c trimines-1.3.0/src/gfx.c
|
||
|
--- trimines-1.3.0.orig/src/gfx.c 2006-05-13 15:40:32.000000000 -0400
|
||
|
+++ trimines-1.3.0/src/gfx.c 2010-10-13 18:00:58.238609895 -0400
|
||
|
@@ -218,7 +218,7 @@
|
||
|
|
||
|
void drawcounter(int n,int posx, int posy)
|
||
|
{
|
||
|
-SDL_Surface *p1, *p2, *p3, *p4;
|
||
|
+SDL_Surface *p2, *p3, *p4;
|
||
|
int n1,n2,n3,num;
|
||
|
|
||
|
|
||
|
diff -ruN trimines-1.3.0.orig/src/main.c trimines-1.3.0/src/main.c
|
||
|
--- trimines-1.3.0.orig/src/main.c 2006-05-13 15:40:32.000000000 -0400
|
||
|
+++ trimines-1.3.0/src/main.c 2010-10-13 18:00:58.239609676 -0400
|
||
|
@@ -131,14 +131,14 @@
|
||
|
int out;
|
||
|
int loadimgs = 1;
|
||
|
|
||
|
-#include "boardinit.c"
|
||
|
#include "counters.c"
|
||
|
+#include "boardinit.c"
|
||
|
#include "gfx.c"
|
||
|
#include "gamestatus.c"
|
||
|
#include "uncover.c"
|
||
|
#include "menu.c"
|
||
|
|
||
|
-main(int argc, char *argv[])
|
||
|
+int main(int argc, char *argv[])
|
||
|
{
|
||
|
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
|
||
|
fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
|
||
|
@@ -189,7 +189,7 @@
|
||
|
SDL_Event event;
|
||
|
|
||
|
|
||
|
-int x,y,x2,y2,mx,my,i,j;
|
||
|
+int x,y,x2,y2,mx,my;
|
||
|
|
||
|
x2 = -1;
|
||
|
|
||
|
@@ -228,6 +228,7 @@
|
||
|
break;
|
||
|
case SDLK_F1: if (firstclick == 0 && gamestatus == 0) {solve();}
|
||
|
break;
|
||
|
+ default:;
|
||
|
}
|
||
|
|
||
|
break; // end case SDL_KEYDOWN
|
||
|
@@ -380,11 +381,13 @@
|
||
|
break; // end case SDL_MOUSEBUTTONDOWN
|
||
|
|
||
|
case SDL_QUIT: SDL_ShowCursor(SDL_ENABLE); main(0,0);
|
||
|
+ break;
|
||
|
|
||
|
+ default:;
|
||
|
} // end switch (event.type)
|
||
|
|
||
|
} }// end whiles
|
||
|
|
||
|
atexit(SDL_Quit);
|
||
|
-
|
||
|
+ exit(0);
|
||
|
}
|
||
|
diff -ruN trimines-1.3.0.orig/src/menu.c trimines-1.3.0/src/menu.c
|
||
|
--- trimines-1.3.0.orig/src/menu.c 2006-05-13 15:40:32.000000000 -0400
|
||
|
+++ trimines-1.3.0/src/menu.c 2010-10-13 18:00:58.239609676 -0400
|
||
|
@@ -104,6 +104,7 @@
|
||
|
if (mode == 6) {if (mines != 1){mines--;}
|
||
|
}}}
|
||
|
break;
|
||
|
+ default:;
|
||
|
}
|
||
|
|
||
|
|
||
|
@@ -126,6 +127,7 @@
|
||
|
exit(0);
|
||
|
break;
|
||
|
|
||
|
+ default:;
|
||
|
}
|
||
|
}
|
||
|
|