summaryrefslogtreecommitdiff
path: root/games-puzzle/mures/files/mures-0.5-save.patch
blob: 704dcf1f53bc6d34f68d0b5154fe3bf4a89880ef (plain)
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
--- gi_sdl.c
+++ gi_sdl.c
@@ -606,6 +606,7 @@
 {
   int i,found;
   gi_sdl_data *data = &GI;
+  char temp_path[70];
 
   switch(e.type) {
 
@@ -714,7 +715,8 @@
 	  sim_start(&g->sim);
 	break;
       case SDLK_F6:
-	map_save(&g->sim.map, "saved.mus");
+	snprintf(temp_path, 70, "%s/.mures.save", getenv("HOME"));
+	map_save(&g->sim.map, temp_path);
 	break;
       case SDLK_F1:
 	game_restart(g);

--- output.c
+++ output.c
@@ -215,7 +215,8 @@
 
 void output_screenshot()
 {
-  char *l = "shot.bmp";
+  char l[70];
+  snprintf(l, 70, "%s/mures_shot.bmp", getenv("HOME"));
   SDL_SaveBMP(screen, l);
   printf("Screenshot saved to %s.\n", l);
 }