equal
deleted
inserted
replaced
31 } |
31 } |
32 } |
32 } |
33 |
33 |
34 PHYSFS_freeList(filesList); |
34 PHYSFS_freeList(filesList); |
35 } |
35 } |
|
36 |
|
37 PHYSFS_DECL void hedgewarsMountPackage(char * fileName) |
|
38 { |
|
39 int fileNameLength = strlen(fileName); |
|
40 if (fileNameLength > 4) |
|
41 if (strcmp(fileName + fileNameLength - 4, ".hwp") == 0) |
|
42 { |
|
43 const char * dir = PHYSFS_getRealDir(fileName); |
|
44 if(dir) |
|
45 { |
|
46 char * fullPath = (char *)malloc(strlen(dir) + fileNameLength + 2); |
|
47 strcpy(fullPath, dir); |
|
48 strcat(fullPath, "/"); |
|
49 strcat(fullPath, fileName); |
|
50 |
|
51 PHYSFS_mount(fullPath, NULL, 0); |
|
52 |
|
53 free(fullPath); |
|
54 } |
|
55 } |
|
56 } |