mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-13 09:48:23 +03:00
Refactor archive management code
Implement a new interface for managing archives. This is mainly to support loading afa archives alongside ald archives. Also included here is some code for creating an index for afa CG archives (the numbers used to reference CGs in afa archives correspond to the file name, not the position in the archive).
This commit is contained in:
+4
-1
@@ -15,13 +15,16 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#include "system4/archive.h"
|
||||
#include "system4/buffer.h"
|
||||
#include "system4/mt19937int.h"
|
||||
#include "system4/string.h"
|
||||
|
||||
#include "hll.h"
|
||||
#include "asset_manager.h"
|
||||
#include "xsystem4.h"
|
||||
|
||||
enum value_type {
|
||||
@@ -248,7 +251,7 @@ possibly_unused static void gdat_dump_as_json(struct gdat *dat, FILE *fp)
|
||||
|
||||
static int DataFile_Open(int link)
|
||||
{
|
||||
struct archive_data *dfile = archive_get(ald[ALDFILE_DATA], link - 1);
|
||||
struct archive_data *dfile = asset_get(ASSET_DATA, link - 1);
|
||||
if (!dfile) {
|
||||
WARNING("Failed to load data file %d", link);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user