28 lines
666 B
C
28 lines
666 B
C
#ifndef VY_ASSETC_PROCESSING_H
|
|
#define VY_ASSETC_PROCESSING_H
|
|
|
|
#include "runtime/file_tab.h"
|
|
#include "runtime/assets.h"
|
|
|
|
enum {
|
|
VY_PROCESSING_FAILED = VY_SUCCESS + 1,
|
|
/* Used if the processing depends on other files beeing processed first. */
|
|
VY_PROCESSING_TRY_AGAIN,
|
|
};
|
|
|
|
typedef struct {
|
|
vy_uid asset_uid;
|
|
} vy_processor_output;
|
|
|
|
typedef vy_result vy_processor_fn(vy_file_id file, void *buffer, size_t size, vy_processor_output *output);
|
|
|
|
vy_result vyAddAssetProcessor(const char *file_extension, vy_processor_fn fn);
|
|
|
|
vy_result vyAddFileToProcessingQueue(vy_file_id file);
|
|
|
|
vy_result vyStartProcessing(void);
|
|
|
|
void vyStopProcessing(void);
|
|
|
|
#endif
|