Add ASSET_FLASH asset type

This commit is contained in:
kichikuou
2023-06-11 15:06:44 +09:00
parent eaa08b6991
commit 6d3abdaa02
2 changed files with 8 additions and 2 deletions
+3 -2
View File
@@ -30,9 +30,10 @@ enum asset_type {
ASSET_CG,
ASSET_FLAT,
ASSET_PACT,
ASSET_DATA
ASSET_DATA,
ASSET_FLASH
};
#define ASSET_TYPE_MAX (ASSET_DATA+1)
#define ASSET_TYPE_MAX (ASSET_FLASH+1)
const char *asset_strtype(enum asset_type type);
void asset_manager_init(void);
+5
View File
@@ -51,6 +51,7 @@ const char *asset_strtype(enum asset_type type)
case ASSET_FLAT: return "Flat";
case ASSET_PACT: return "Pact";
case ASSET_DATA: return "Data";
case ASSET_FLASH: return "Flash";
}
return "Invalid";
}
@@ -402,6 +403,8 @@ void asset_manager_init(void)
afa_filenames[ASSET_FLAT] = path_join(config.game_dir, d_name);
} else if (!strcmp(type, "Pact.afa")) {
afa_filenames[ASSET_PACT] = path_join(config.game_dir, d_name);
} else if (!strcmp(type, "AFF.afa")) {
afa_filenames[ASSET_FLASH] = path_join(config.game_dir, d_name);
}
} else if (!strcasecmp(ext, "fnl")) {
if (!config.fnl_path)
@@ -421,6 +424,7 @@ void asset_manager_init(void)
ald_init(ASSET_FLAT, ald_filenames[ASSET_FLAT], ald_count[ASSET_FLAT]);
ald_init(ASSET_PACT, ald_filenames[ASSET_PACT], ald_count[ASSET_PACT]);
ald_init(ASSET_DATA, ald_filenames[ASSET_DATA], ald_count[ASSET_DATA]);
ald_init(ASSET_FLASH, ald_filenames[ASSET_FLASH], ald_count[ASSET_FLASH]);
// open AFA archives
afa_init(ASSET_BGM, afa_filenames[ASSET_BGM]);
@@ -430,4 +434,5 @@ void asset_manager_init(void)
afa_init(ASSET_FLAT, afa_filenames[ASSET_FLAT]);
afa_init(ASSET_PACT, afa_filenames[ASSET_PACT]);
afa_init(ASSET_DATA, afa_filenames[ASSET_DATA]);
afa_init(ASSET_FLASH, afa_filenames[ASSET_FLASH]);
}