mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 09:06:55 -04:00
Also import .mine files as dat map format, fix some survival test maps not importing due to having more than 16 different class types
This commit is contained in:
parent
fd020a355f
commit
080659f7ca
@ -41,14 +41,16 @@ static cc_result Map_SkipGZipHeader(struct Stream* stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IMapImporter Map_FindImporter(const cc_string* path) {
|
IMapImporter Map_FindImporter(const cc_string* path) {
|
||||||
static const cc_string cw = String_FromConst(".cw"), lvl = String_FromConst(".lvl");
|
static const cc_string cw = String_FromConst(".cw"), lvl = String_FromConst(".lvl");
|
||||||
static const cc_string fcm = String_FromConst(".fcm"), dat = String_FromConst(".dat");
|
static const cc_string fcm = String_FromConst(".fcm"), dat = String_FromConst(".dat");
|
||||||
|
static const cc_string mine = String_FromConst(".mine");
|
||||||
|
|
||||||
if (String_CaselessEnds(path, &cw)) return Cw_Load;
|
if (String_CaselessEnds(path, &cw)) return Cw_Load;
|
||||||
#ifndef CC_BUILD_WEB
|
#ifndef CC_BUILD_WEB
|
||||||
if (String_CaselessEnds(path, &lvl)) return Lvl_Load;
|
if (String_CaselessEnds(path, &lvl)) return Lvl_Load;
|
||||||
if (String_CaselessEnds(path, &fcm)) return Fcm_Load;
|
if (String_CaselessEnds(path, &fcm)) return Fcm_Load;
|
||||||
if (String_CaselessEnds(path, &dat)) return Dat_Load;
|
if (String_CaselessEnds(path, &dat)) return Dat_Load;
|
||||||
|
if (String_CaselessEnds(path, &mine)) return Dat_Load;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -836,8 +838,9 @@ static cc_result Java_SkipAnnotation(struct Stream* stream) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* .dat files only seem to use at most 16 different class types */
|
/* Most .dat maps only use at most 16 different class types */
|
||||||
#define CLASS_CAPACITY 17
|
/* However some survival test maps can use up to 30 */
|
||||||
|
#define CLASS_CAPACITY 30
|
||||||
static struct JClassDesc* class_cache;
|
static struct JClassDesc* class_cache;
|
||||||
static int class_count;
|
static int class_count;
|
||||||
static cc_result Java_ReadClassDesc(struct Stream* stream, struct JClassDesc** desc);
|
static cc_result Java_ReadClassDesc(struct Stream* stream, struct JClassDesc** desc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user