[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/map map_save.c script_map.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/map map_save.c script_map.c |
Date: |
31 Jan 2004 17:18:21 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/31 17:18:21
Modified files:
src/map : map_save.c script_map.c
Log message:
Load/Saved Map properly with multiple load/saves
Patches:
Index: stratagus/src/map/map_save.c
diff -u stratagus/src/map/map_save.c:1.24 stratagus/src/map/map_save.c:1.25
--- stratagus/src/map/map_save.c:1.24 Sat Jan 17 02:17:26 2004
+++ stratagus/src/map/map_save.c Sat Jan 31 17:18:21 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: map_save.c,v 1.24 2004/01/16 15:17:26 wizzard Exp $
+// $Id: map_save.c,v 1.25 2004/01/31 06:18:21 wizzard Exp $
//@{
@@ -68,7 +68,7 @@
int i;
CLprintf(file, "\n--- -----------------------------------------\n");
- CLprintf(file, "--- MODULE: map $Id: map_save.c,v 1.24 2004/01/16
15:17:26 wizzard Exp $\n");
+ CLprintf(file, "--- MODULE: map $Id: map_save.c,v 1.25 2004/01/31
06:18:21 wizzard Exp $\n");
CLprintf(file, "StratagusMap(\n");
@@ -84,6 +84,7 @@
CLprintf(file, " \"size\", {%d, %d},\n", TheMap.Width, TheMap.Height);
CLprintf(file, " \"%s\",\n", TheMap.NoFogOfWar ? "no-fog-of-war" :
"fog-of-war");
+ CLprintf(file, " \"filename\", \"%s\",\n", TheMap.Info->Filename);
CLprintf(file, " \"map-fields\", {\n");
for (h = 0; h < TheMap.Height; ++h) {
Index: stratagus/src/map/script_map.c
diff -u stratagus/src/map/script_map.c:1.55 stratagus/src/map/script_map.c:1.56
--- stratagus/src/map/script_map.c:1.55 Sat Jan 31 16:56:00 2004
+++ stratagus/src/map/script_map.c Sat Jan 31 17:18:21 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: script_map.c,v 1.55 2004/01/31 05:56:00 wizzard Exp $
+// $Id: script_map.c,v 1.56 2004/01/31 06:18:21 wizzard Exp $
//@{
@@ -152,7 +152,9 @@
TheMap.NoFogOfWar = 1;
--k;
} else if (!strcmp(value, "filename")) {
- TheMap.Info->Filename =
strdup(LuaToString(l, k + 1));
+ lua_rawgeti(l, j + 1, k + 1);
+ TheMap.Info->Filename =
strdup(LuaToString(l, -1));
+ lua_pop(l, 1);
} else if (!strcmp(value, "map-fields")) {
int i;
int subsubargs;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/map map_save.c script_map.c,
address@hidden <=