瀏覽代碼

Small bugfixes and enhancements to the map cache generator

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@10267 54d463be-8e91-2dee-dedb-b68131a5f0ec
DracoRPG 18 年之前
父節點
當前提交
eef15360f9
共有 3 個文件被更改,包括 9 次插入3 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 6 3
      src/tool/grfio.c
  3. 1 0
      src/tool/mapcache.c

+ 2 - 0
Changelog-Trunk.txt

@@ -3,6 +3,8 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2007/04/17
+	* Small bugfixes and enhancements to the map cache generator [DracoRPG]
 2007/04/15
 	* Fixed 'randomtarget' picking dead characters.
 	* Adjusted Spiral Pierce, Shield Boomerang and Shield Chain to use atk2

+ 6 - 3
src/tool/grfio.c

@@ -648,9 +648,10 @@ static int grfio_entryread(char *gfname,int gentry)
 
 	fp = fopen(gfname, "rb");
 	if (fp == NULL) {
-		printf("GRF data file not found: '%s'.\n",gfname);
+		printf("GRF data file not found: '%s'\n",gfname);
 		return 1;	// 1:not found error
-	}
+	} else
+		printf("GRF data file found: '%s'\n",gfname);
 
 	fseek(fp,0,2);	// SEEK_END
 	grf_size = ftell(fp);
@@ -961,8 +962,10 @@ void grfio_init(char *fname)
 			// Entry table reading
 			if(strcmp(w1, "grf") == 0)	// GRF file
 				grf_num += (grfio_add(w2) == 0);
-			else if(strcmp(w1,"data_dir") == 0)	// Data directory
+			else if(strcmp(w1,"data_dir") == 0) {	// Data directory
 				strcpy(data_dir, w2);
+				printf("Use data directory %s\n", w2);
+			}
 		}
 		fclose(data_conf);
 	} // end of reading grf-files.txt

+ 1 - 0
src/tool/mapcache.c

@@ -310,6 +310,7 @@ int main(int argc, char *argv[])
 		if(strcmp("map:", name) == 0 && sscanf(line, "%*s %15s", name) < 1)
 			continue;
 
+		name[MAP_NAME_LENGTH_EXT-1] = '\0';
 		remove_extension(name);
 		printf("%s", name);
 		if(find_map(name))