libdragon
Loading...
Searching...
No Matches
asset.h
Go to the documentation of this file.
1
6#ifndef __LIBDRAGON_ASSET_H
7#define __LIBDRAGON_ASSET_H
8
68#include <stdio.h>
69
70#ifdef N64
71#include "debug.h"
72#endif
73
74#ifdef __cplusplus
75extern "C" {
76#endif
77
79extern void __asset_init_compression_lvl2(void);
80extern void __asset_init_compression_lvl3(void);
82
105#define asset_init_compression(level) ({ \
106 switch (level) { \
107 case 1: break; \
108 case 2: __asset_init_compression_lvl2(); break; \
109 case 3: __asset_init_compression_lvl3(); break; \
110 default: assertf(0, "Unsupported compression level: %d", level); \
111 } \
112})
113
125void *asset_load(const char *fn, int *sz);
126
149FILE *asset_fopen(const char *fn, int *sz);
150
151#ifdef __cplusplus
152}
153#endif
154
155#endif
void * asset_load(const char *fn, int *sz)
Load an asset file (possibly uncompressing it)
Definition asset.c:157
FILE * asset_fopen(const char *fn, int *sz)
Open an asset file for reading (with transparent decompression)
Debugging Support.