2020-03-15 23:06:58 +08:00
|
|
|
#ifndef UTIL_H_
|
|
|
|
#define UTIL_H_
|
|
|
|
|
2020-07-26 23:49:01 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2021-04-19 01:50:08 +08:00
|
|
|
const char *biome2str(int id);
|
2021-06-06 23:00:35 +08:00
|
|
|
void initBiomeColors(unsigned char biomeColors[256][3]);
|
|
|
|
void initBiomeTypeColors(unsigned char biomeColors[256][3]);
|
2020-03-15 23:06:58 +08:00
|
|
|
|
|
|
|
int biomesToImage(unsigned char *pixels,
|
2021-06-06 23:00:35 +08:00
|
|
|
const unsigned char biomeColors[256][3], const int *biomes,
|
|
|
|
const unsigned int sx, const unsigned int sy,
|
2020-03-15 23:06:58 +08:00
|
|
|
const unsigned int pixscale, const int flip);
|
|
|
|
|
2021-06-06 23:00:35 +08:00
|
|
|
int savePPM(const char* path, const unsigned char *pixels,
|
2020-03-15 23:06:58 +08:00
|
|
|
const unsigned int sx, const unsigned int sy);
|
|
|
|
|
2020-07-26 23:49:01 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-03-15 23:06:58 +08:00
|
|
|
#endif
|