rtengine/src/asset_compiler/processor.h
Kevin Trogant 027ef8a46f Restructure the project
Move asset_compiler into its own (static) library.
This removes the dependency on it from the runtime and makes it possible
to have a standalone asset_compiler tool (useful for modding support).

Split meson.build into sub-files to improve readability.

Give each target its own pch directory.
This is more inline with what the meson manual recommends.

Export dependencies to make it possible to use the engine as a meson
subproject.
This is currently untested.
2024-02-07 13:56:06 +01:00

44 lines
1.3 KiB
C

#ifndef RT_PROCESSOR_H
#define RT_PROCESSOR_H
#include "runtime/file_tab.h"
#include "runtime/mem_arena.h"
#include "runtime/resources.h"
#ifdef __cplusplus
extern "C" {
#endif
enum {
RT_ASSET_PROCESSING_FAILED = RT_CUSTOM_ERROR_START,
};
#define RT_MAX_RESOURCES_PER_ASSET 32
/* Asset processor prototype.
*
* The new resources will replace the associated resources completely.
*/
#define RT_ASSET_PROCESSOR_FN(_Name) \
rt_result _Name(rt_file_id file, \
unsigned int existing_resource_count, \
const rt_resource_id *existing_resources, \
unsigned int *new_resource_count, \
rt_resource_id *new_resources, \
rt_arena *arena)
/* A Asset processor function */
typedef RT_ASSET_PROCESSOR_FN(rt_asset_processor_fn);
/* Allocated from the buffer manager */
typedef struct {
void *buffer;
size_t size;
} rt_loaded_asset;
rt_loaded_asset LoadAsset(rt_file_id file);
#ifdef __cplusplus
}
#endif
#endif