* Fixed loading of AFMs when no resnametable is found. [Valaris]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@182 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
864838086d
commit
aa11516bae
@ -1,7 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
11/14
|
11/14
|
||||||
|
* Fixed loading of AFMs when no resnametable is found. [Valaris]
|
||||||
* mob_db.txt: Fixed Golden Thief Bug MVP MOB mode (it wasn't moving/attacking) [Lupus]
|
* mob_db.txt: Fixed Golden Thief Bug MVP MOB mode (it wasn't moving/attacking) [Lupus]
|
||||||
11/14
|
|
||||||
* Added AFM (Advanced Fusion Map) support, thanks to alexkreuz and fusion. [Valaris]
|
* Added AFM (Advanced Fusion Map) support, thanks to alexkreuz and fusion. [Valaris]
|
||||||
Use the afm_dir option in grf-files.txt (currently needs a resnametable.txt).
|
Use the afm_dir option in grf-files.txt (currently needs a resnametable.txt).
|
||||||
* Initialized password variable in login.c. [Valaris]
|
* Initialized password variable in login.c. [Valaris]
|
||||||
|
@ -2,3 +2,4 @@ data: C:\Program Files\Gravity\RO\data.grf
|
|||||||
sdata: C:\Program Files\Gravity\RO\sdata.grf
|
sdata: C:\Program Files\Gravity\RO\sdata.grf
|
||||||
//adata: C:\Program Files\Gravity\RO\adata.grf
|
//adata: C:\Program Files\Gravity\RO\adata.grf
|
||||||
//data_dir: C:\Program Files\Gravity\RO\
|
//data_dir: C:\Program Files\Gravity\RO\
|
||||||
|
//afm_dir: afm
|
@ -417,7 +417,7 @@ char* grfio_resnametable(char* fname, char *lfname)
|
|||||||
fp = fopen(restable,"rb");
|
fp = fopen(restable,"rb");
|
||||||
if(fp==NULL) {
|
if(fp==NULL) {
|
||||||
printf("%s not found (grfio_resnametable)\n",restable);
|
printf("%s not found (grfio_resnametable)\n",restable);
|
||||||
exit(1); // 1:not found error
|
return NULL; // 1:not found error
|
||||||
}
|
}
|
||||||
|
|
||||||
while(fgets(line,508,fp)){
|
while(fgets(line,508,fp)){
|
||||||
|
@ -1612,16 +1612,6 @@ int map_readallmap(void) {
|
|||||||
FILE *afm_file;
|
FILE *afm_file;
|
||||||
|
|
||||||
// 先に全部のャbプの存在を確認
|
// 先に全部のャbプの存在を確認
|
||||||
for(i=0;i<map_num;i++){
|
|
||||||
if(strstr(map[i].name,".gat")==NULL)
|
|
||||||
continue;
|
|
||||||
sprintf(fn,"data\\%s",map[i].name);
|
|
||||||
if(grfio_size(fn) == -1) {
|
|
||||||
map_delmap(map[i].name);
|
|
||||||
maps_removed++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for(i=0;i<map_num;i++){
|
for(i=0;i<map_num;i++){
|
||||||
char afm_name[256] = "";
|
char afm_name[256] = "";
|
||||||
strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
|
strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
|
||||||
@ -1631,7 +1621,7 @@ int map_readallmap(void) {
|
|||||||
afm_file = fopen(fn, "r");
|
afm_file = fopen(fn, "r");
|
||||||
if (afm_file != NULL) {
|
if (afm_file != NULL) {
|
||||||
map_readafm(i,fn);
|
map_readafm(i,fn);
|
||||||
}
|
}
|
||||||
else if(strstr(map[i].name,".gat")!=NULL) {
|
else if(strstr(map[i].name,".gat")!=NULL) {
|
||||||
char *p = strstr(map[i].name, ">"); // [MouseJstr]
|
char *p = strstr(map[i].name, ">"); // [MouseJstr]
|
||||||
if (p != NULL) {
|
if (p != NULL) {
|
||||||
@ -1640,13 +1630,13 @@ int map_readallmap(void) {
|
|||||||
strcpy(alias, map[i].name);
|
strcpy(alias, map[i].name);
|
||||||
strcpy(map[i].name, p + 1);
|
strcpy(map[i].name, p + 1);
|
||||||
sprintf(fn,"data\\%s",map[i].name);
|
sprintf(fn,"data\\%s",map[i].name);
|
||||||
if(map_readmap(i,fn, alias) == -1) {
|
if(grfio_size(fn) == -1 || map_readmap(i,fn, alias) == -1) {
|
||||||
map_delmap(map[i].name);
|
map_delmap(map[i].name);
|
||||||
maps_removed++;
|
maps_removed++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sprintf(fn,"data\\%s",map[i].name);
|
sprintf(fn,"data\\%s",map[i].name);
|
||||||
if(map_readmap(i,fn, NULL) == -1) {
|
if(grfio_size(fn) == -1 || map_readmap(i,fn, NULL) == -1) {
|
||||||
map_delmap(map[i].name);
|
map_delmap(map[i].name);
|
||||||
maps_removed++;
|
maps_removed++;
|
||||||
}
|
}
|
||||||
@ -1685,6 +1675,7 @@ int map_addmap(char *mapname) {
|
|||||||
*------------------------------------------
|
*------------------------------------------
|
||||||
*/
|
*/
|
||||||
int map_delmap(char *mapname) {
|
int map_delmap(char *mapname) {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (strcmpi(mapname, "all") == 0) {
|
if (strcmpi(mapname, "all") == 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user